@dcl/shop 1.9.2-32490364182.commit-e2e4c6b → 1.9.2

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 (234) hide show
  1. package/_assets/{Activity-C4Kzn5fk.js → Activity-Dt6DfbvQ.js} +64 -64
  2. package/_assets/{AnimatedBackground-BwuwfNrk.js → AnimatedBackground-D9fqKZZL.js} +6 -6
  3. package/_assets/{Assets-CTbQPjcM.js → Assets-Cpt6sCyJ.js} +3 -3
  4. package/_assets/{Authorizations-N-jDljmP.js → Authorizations-QDcGhwOD.js} +4 -4
  5. package/_assets/{Cart-ywFlNL9H.js → Cart-k83ms4yR.js} +2 -2
  6. package/_assets/{CircularProgress-DPY51kqk.js → CircularProgress-Zi497kNF.js} +2 -2
  7. package/_assets/{Collection-BbPumsdq.js → Collection-DN9kyHxU.js} +11 -11
  8. package/_assets/{CollectionCarousel-CoM9Gv9s.js → CollectionCarousel-CiQjTUxK.js} +3 -3
  9. package/_assets/{Confetti-C0-okGdM.js → Confetti-BxjiVKPm.js} +4 -4
  10. package/_assets/{ConstantsUtil-BX0kJSLy.js → ConstantsUtil-DaE8obaZ.js} +2 -2
  11. package/_assets/{ContentClient-FkKb15O9.js → ContentClient-D0SQSgXF.js} +2 -2
  12. package/_assets/{Creator-B-q7Mpyx.js → Creator-DV2Q_EhN.js} +2 -2
  13. package/_assets/{DeploymentBuilder-B-vRvz4q.js → DeploymentBuilder-xN7K8y9o.js} +2 -2
  14. package/_assets/{EmotePlaybackBar-DLxsISmS.js → EmotePlaybackBar-DiG0rn9W.js} +5 -5
  15. package/_assets/{ErrorNotice-Bwbke-jb.js → ErrorNotice-BW8aXw_7.js} +2 -2
  16. package/_assets/{ExchangeController-wLrEO73T.js → ExchangeController-B4BdmoV9.js} +2 -2
  17. package/_assets/{Faq-Bn3oD9jJ.js → Faq-CI78-N0I.js} +2 -2
  18. package/_assets/{GetCredits-1dwWdfH1.js → GetCredits-LUpSuIG_.js} +8 -8
  19. package/_assets/{Grow-A1ryBOre.js → Grow-CjEYi24F.js} +2 -2
  20. package/_assets/{HelpersUtil-zE-WUDXf.js → HelpersUtil-B76CBImb.js} +2 -2
  21. package/_assets/ItemDetail--_To60pF.js +3655 -0
  22. package/_assets/{LoadMore-D-zzUoTF.js → LoadMore-BXkJAed-.js} +2 -2
  23. package/_assets/{ManaPricingBanner.styles-CdSp5zDl.js → ManaPricingBanner.styles-C4fJtJh-.js} +28 -24
  24. package/_assets/{MyAssets-vSbkMz3D.js → MyAssets-1QA09uaq.js} +45 -45
  25. package/_assets/{MyFavorites-V0_oPzp8.js → MyFavorites-BGBd9cHu.js} +2 -2
  26. package/_assets/{NetworkUtil-C2E64C4n.js → NetworkUtil-CUhhiBwq.js} +2 -2
  27. package/_assets/{NotFound-BDte9RrV.js → NotFound-1d5l0fPQ.js} +2 -2
  28. package/_assets/{NotificationsBell-D2-6APUI.js → NotificationsBell-cuQUq5HL.js} +2 -2
  29. package/_assets/{OutfitDetail-2F7CkzM9.js → OutfitDetail-Hft483Ec.js} +2 -2
  30. package/_assets/{OutfitPreview-vLgRLTXf.js → OutfitPreview-WwPNEOjI.js} +2 -2
  31. package/_assets/{OutfitStudio-B7-5-HLr.js → OutfitStudio-Ccib9vIn.js} +2 -2
  32. package/_assets/{StoreSettings-DYpES0Qy.js → StoreSettings-CX45pls-.js} +3 -3
  33. package/_assets/{Success-CbxoRTGm.js → Success-C7bxhod-.js} +2 -2
  34. package/_assets/{SwapController-CNhuabdS.js → SwapController-2o6kQ91x.js} +2 -2
  35. package/_assets/{TradeService-Dq5kA3hU.js → TradeService-p9Z6Y0wD.js} +2 -2
  36. package/_assets/{W3MFrameProviderSingleton-qLuUEBFJ.js → W3MFrameProviderSingleton-Cil5qlaS.js} +4 -4
  37. package/_assets/{WebCryptoP256-BNgcFtmR.js → WebCryptoP256-BZht8npt.js} +2 -2
  38. package/_assets/{authorizations-Wa0_wT0Z.js → authorizations-CJLGounG.js} +2 -2
  39. package/_assets/{basic-CFDlu1LL.js → basic-CV4HIKM2.js} +2 -2
  40. package/_assets/{biconomy-CbaORytl.js → biconomy-C1M_WGYX.js} +2 -2
  41. package/_assets/{browseLayout.styles-CuE2syAy.js → browseLayout.styles-CbyAhCls.js} +2 -2
  42. package/_assets/{browser-XADW-5I9.js → browser-BsRaY-pm.js} +2 -2
  43. package/_assets/{browser-ponyfill-ByHh5PGV.js → browser-ponyfill--2nwarnr.js} +2 -2
  44. package/_assets/{builder-Cil_nXWA.js → builder-CeLuOnuM.js} +2 -2
  45. package/_assets/{buy-DAGs2gvU.js → buy-DymchWn5.js} +2 -2
  46. package/_assets/{buy-gasless-CXg0ob_0.js → buy-gasless-_tY7hzCY.js} +2 -2
  47. package/_assets/{categories-Bwi3LuIK.js → categories-CXj1P-ln.js} +2 -2
  48. package/_assets/{ccip-DxEPKiwF.js → ccip-CQiZ3-qM.js} +2 -2
  49. package/_assets/{ccip-CABvxDcN.js → ccip-FnhUFIYm.js} +2 -2
  50. package/_assets/{chains-CKHFLxhm.js → chains-DfMERfnW.js} +2 -2
  51. package/_assets/collectionPage.styles-ADf8X1pQ.js +40 -0
  52. package/_assets/{common-AHgzOdSB.js → common-C_ndt6fZ.js} +2 -2
  53. package/_assets/{controller-389ptNLt.js → controller-DDEQmJXP.js} +3 -3
  54. package/_assets/{core-CWqAJwp-.js → core-j77nIizU.js} +5 -5
  55. package/_assets/{createSvgIcon-RTgYqIT0.js → createSvgIcon-Du97wPGf.js} +3 -3
  56. package/_assets/{custom-B6FOcLFS.js → custom-Dxc1jEzQ.js} +2 -2
  57. package/_assets/{data-capture-DZoFqspx.js → data-capture-BU8pDw-T.js} +2 -2
  58. package/_assets/{dcl-schemas-CQsQxWYK.js → dcl-schemas-BBgGLe8k.js} +2 -2
  59. package/_assets/{decimals-B8ji3I9T.js → decimals-e9gwXexf.js} +2 -2
  60. package/_assets/{decimals-BrfaLWeO.js → decimals-letC916t.js} +2 -2
  61. package/_assets/{detectExtension-CBEeT0QS.js → detectExtension-C9d6YCCt.js} +2 -2
  62. package/_assets/{disposePreview-NijpZXe_.js → disposePreview-Dezrw02g.js} +2 -2
  63. package/_assets/{email-WN7zlIKb.js → email-DSscz4Vl.js} +2 -2
  64. package/_assets/{embedded-wallet-c9wepCXs.js → embedded-wallet-Kj2rnf5C.js} +2 -2
  65. package/_assets/{emotion-styled.browser.esm-CYlNKf9I.js → emotion-styled.browser.esm-JObVDgrH.js} +2 -2
  66. package/_assets/{engine-C91fSUt_.js → engine-HowSqiPZ.js} +2 -2
  67. package/_assets/{errors-DGWrzcZ2.js → errors-CqEjLz14.js} +2 -2
  68. package/_assets/{estimate-l1-fee-BscyCbli.js → estimate-l1-fee-4Nc3yCK1.js} +2 -2
  69. package/_assets/{eth_estimateGas-zf8E350c.js → eth_estimateGas-07hHMEkF.js} +2 -2
  70. package/_assets/{eth_getStorageAt-C7mDOh_o.js → eth_getStorageAt-B_6XaGoO.js} +2 -2
  71. package/_assets/{eth_getTransactionCount-BZuLOO7k.js → eth_getTransactionCount-BvPk5RHG.js} +2 -2
  72. package/_assets/{ethereum-RVBnTLaL.js → ethereum-eDYZBrz5.js} +2 -2
  73. package/_assets/{ethers-DXUQI3Ut.js → ethers-BKRWnjV9.js} +2 -2
  74. package/_assets/{events-DLLBOQYG.js → events-S6R_9oRG.js} +2 -2
  75. package/_assets/{execute-C57BG5lJ.js → execute-DxIYEcvB.js} +3 -3
  76. package/_assets/{extractIPFS-BKXzy-Rh.js → extractIPFS-DKyUVdVV.js} +2 -2
  77. package/_assets/{features-ALZAg55_.js → features-PyWxVTLV.js} +2 -2
  78. package/_assets/{fetchTokenMetadata-Cr3PV6X1.js → fetchTokenMetadata-DTgK8IFo.js} +3 -3
  79. package/_assets/{field.styles-1qNXB2de.js → field.styles-DKQS3oWo.js} +2 -2
  80. package/_assets/{fortmatic-VEuLc1E0.js → fortmatic-Cd8UWzR7.js} +2 -2
  81. package/_assets/{get-bytecode-Dgh4Jb3X.js → get-bytecode-CNrt-FoQ.js} +2 -2
  82. package/_assets/{get-ecosystem-wallet-info-Bo9paKe6.js → get-ecosystem-wallet-info-Ddh0TZp5.js} +2 -2
  83. package/_assets/{getBalance-BE7W--GK.js → getBalance-HweKqf1d.js} +3 -3
  84. package/_assets/{getInstalledModules-BQ_ILdNe.js → getInstalledModules-DIY2QXZg.js} +2 -2
  85. package/_assets/{getNFT-C4VCKNcO.js → getNFT--CbGnkWO.js} +2 -2
  86. package/_assets/{getNFT-BYOtm54v.js → getNFT-Dm-BLuw5.js} +3 -3
  87. package/_assets/{grid.styles-DzvODQdq.js → grid.styles-C24oAL5O.js} +2 -2
  88. package/_assets/{hashTypedData-X0KUMzG4.js → hashTypedData-Cs3JQ0er.js} +2 -2
  89. package/_assets/{hashTypedData-ChT5ZbgL.js → hashTypedData-DQ_Lbi0o.js} +2 -2
  90. package/_assets/{in-app-zluvfGQX.js → in-app-CW-TClWX.js} +2 -2
  91. package/_assets/{in-app-wallet-calls-BrnhR34A.js → in-app-wallet-calls-Td7jQu3N.js} +2 -2
  92. package/_assets/{index-D6hTzS8e.js → index--RzAwV6Q.js} +2 -2
  93. package/_assets/{index-C5onHlUQ.js → index-9jY2-EBG.js} +2 -2
  94. package/_assets/{index-BZPiWmJM.js → index-AiBvYRW5.js} +2 -2
  95. package/_assets/{index-B9WM1WTc.js → index-B0zOOgnV.js} +2 -2
  96. package/_assets/{index-C8H2vLAP.js → index-B3XA61Pm.js} +2 -2
  97. package/_assets/{index-BrC_okhM.js → index-B6SpJox_.js} +2 -2
  98. package/_assets/{index-CimY5gmO.js → index-B7lHpbYl.js} +2 -2
  99. package/_assets/{index-CLfKjViB.js → index-BCN8HQIT.js} +2 -2
  100. package/_assets/{index-D3jeiuFw.js → index-BEfcKQqS.js} +2 -2
  101. package/_assets/{index-SPFq-ZCl.js → index-BJ6Fw5Al.js} +2 -2
  102. package/_assets/{index-DvfEbLUY.js → index-BJITEOWs.js} +2 -2
  103. package/_assets/{index-DNuGqPWd.js → index-BKoIacqr.js} +3 -3
  104. package/_assets/{index-g_xcW_-R.js → index-BRF6gJ7Q.js} +2 -2
  105. package/_assets/{index-NJ_79PUz.js → index-BSzD0ncl.js} +2 -2
  106. package/_assets/{index-36NDvu3w.js → index-BTGMdjiQ.js} +2 -2
  107. package/_assets/{index-D_3daVMJ.js → index-BTdE-853.js} +2 -2
  108. package/_assets/{index-CarTIHBr.js → index-BTkKLFzm.js} +2 -2
  109. package/_assets/{index-CaHn1v4Y.js → index-BVuZOuvn.js} +3 -3
  110. package/_assets/{index-BAeUu19q.js → index-BXQ9FyQv.js} +3 -3
  111. package/_assets/{index-DJA_1O-1.js → index-BYZ634H2.js} +2 -2
  112. package/_assets/{index-CbZQowQ5.js → index-Bbs_JDF9.js} +6 -6
  113. package/_assets/{index-DDxLpm0Z.js → index-BdM6GuSo.js} +2 -2
  114. package/_assets/{index-OeIHT0cR.js → index-BfNdu86e.js} +2 -2
  115. package/_assets/index-BhsA-pb-.js +2 -0
  116. package/_assets/{index-DHM5xCcE.js → index-BjW_aHIh.js} +2 -2
  117. package/_assets/{index-Dbp8PJtv.js → index-BpCu9mM3.js} +17 -17
  118. package/_assets/{index-RYnkqAG_.js → index-C2gUP7Wd.js} +2 -2
  119. package/_assets/{index-C-cuJat3.js → index-C5UkgriS.js} +2 -2
  120. package/_assets/{index-BcpaMHLt.js → index-C7fDOFW2.js} +2 -2
  121. package/_assets/{index-DAuK57Cr.js → index-CGZa27zg.js} +2 -2
  122. package/_assets/index-CKGO8NWe.css +1 -0
  123. package/_assets/{index-BD0UDtYF.js → index-CMZjflvo.js} +2 -2
  124. package/_assets/{index-DCSeDwHz.js → index-CNbMuq6z.js} +2 -2
  125. package/_assets/{index-C0fNNzGI.js → index-CR-CF0bF.js} +2 -2
  126. package/_assets/{index-drol9D68.js → index-CWMBT2iW.js} +2 -2
  127. package/_assets/{index-2QDRSKTI.js → index-CZXqNGbb.js} +2 -2
  128. package/_assets/{index-BzhoSaGz.js → index-CdfCxJMq.js} +2 -2
  129. package/_assets/{index-CRP5QaPb.js → index-CeMa_Fpw.js} +2 -2
  130. package/_assets/{index-PPamm-Fm.js → index-CoCdUrpV.js} +2 -2
  131. package/_assets/{index-BpQETbke.js → index-CoFmUEdb.js} +4 -4
  132. package/_assets/{index-CSBo6qrQ.js → index-CuBLDtFZ.js} +4 -4
  133. package/_assets/{index-BuABw98X.js → index-CxkbKeKD.js} +2 -2
  134. package/_assets/{index-CZJQqq1_.js → index-CzbStCVl.js} +2 -2
  135. package/_assets/{index-CQ3eT5S4.js → index-CzuWMO-_.js} +2 -2
  136. package/_assets/{index-fKbajirP.js → index-D-M7F27b.js} +2 -2
  137. package/_assets/{index-Cx1edpy0.js → index-D2bN0_3y.js} +2 -2
  138. package/_assets/{index-BQ0ZshU5.js → index-D9kntTpl.js} +2 -2
  139. package/_assets/{index-CwlpUkJ3.js → index-DEOUkXMy.js} +2 -2
  140. package/_assets/{index-1nMFaDfq.js → index-DF089E3i.js} +2 -2
  141. package/_assets/{index-vnVB3yV9.js → index-DNROAxKm.js} +2 -2
  142. package/_assets/{index-4dXpSk57.js → index-DQdcxui0.js} +2 -2
  143. package/_assets/{index-Cwx8-XY7.js → index-DY6pIrBT.js} +2 -2
  144. package/_assets/{index-C4iYwCkM.js → index-D_nXvzND.js} +2 -2
  145. package/_assets/{index-DwCKhtFu.js → index-DjP3X3Jh.js} +2 -2
  146. package/_assets/{index-ioIg36Q5.js → index-Djpq4q5g.js} +4 -4
  147. package/_assets/{index-CTAs_Ona.js → index-DpMjDWPc.js} +2 -2
  148. package/_assets/{index-BN-bGk3n.js → index-Dq2Ka7mB.js} +3 -3
  149. package/_assets/{index-BGw5m7Uo.js → index-EW0m5fIH.js} +3 -3
  150. package/_assets/{index-DlWdq6Mw.js → index-FPMEVY0k.js} +2 -2
  151. package/_assets/{index-C-SyxpJI.js → index-Kerq77jm.js} +2 -2
  152. package/_assets/{index-BPpGc36z.js → index-YSCl74H6.js} +2 -2
  153. package/_assets/{index-DX-xaYge.js → index-_iT3UM2o.js} +2 -2
  154. package/_assets/{index-6m82mLa-.js → index-hGWc_5eF.js} +2 -2
  155. package/_assets/{index-D8CbiuvG.js → index-haPNmxuN.js} +2 -2
  156. package/_assets/{index-DVqruI7F.js → index-kizwd9je.js} +2 -2
  157. package/_assets/index-sQFfvNZX.js +4090 -0
  158. package/_assets/{index-CwSVzkMY.js → index-uVLu1nYC.js} +2 -2
  159. package/_assets/{index-BJ83OlRb.js → index-zyd0LxKG.js} +2 -2
  160. package/_assets/{index.es-BmijG_o0.js → index.es-CReVKXvk.js} +2 -2
  161. package/_assets/{index.es-Bmub6mvo.js → index.es-CnQERyF2.js} +2 -2
  162. package/_assets/{index.es-DW9WuktD.js → index.es-NKUXf-un.js} +5 -5
  163. package/_assets/{index.es-B7WIB4xs.js → index.es-iv8hf5ai.js} +2 -2
  164. package/_assets/items-empty-CJboE1w9.js +2 -0
  165. package/_assets/{jump-DpEhRseo.js → jump-CeInMpQz.js} +2 -2
  166. package/_assets/{linkAccount-Ce-F8zrz.js → linkAccount-CJSln8y3.js} +2 -2
  167. package/_assets/{localBatchGatewayRequest-Dx1kkAvc.js → localBatchGatewayRequest-C4ULrlUp.js} +2 -2
  168. package/_assets/{native-vLlkzvxI.js → native-d_18A6YH.js} +2 -2
  169. package/_assets/{networks-DZ7rrynN.js → networks-a6Oqotld.js} +2 -2
  170. package/_assets/{onramp-DLuIEWh8.js → onramp-CDgb9WlA.js} +2 -2
  171. package/_assets/{openzeppelin-B3-AW1et.js → openzeppelin-MXrpXJs9.js} +2 -2
  172. package/_assets/{ownerOf-Dj22dy0c.js → ownerOf-BSpUUDYN.js} +2 -2
  173. package/_assets/{parseNft-DIyPdcOK.js → parseNft-Dq5u9zmT.js} +3 -3
  174. package/_assets/{parseSignature-D8jGniDr.js → parseSignature-JDi4tHpL.js} +2 -2
  175. package/_assets/{parseSignature-xueulJgr.js → parseSignature-bTbb9ogg.js} +4 -4
  176. package/_assets/{passkeys-CZmD8fl-.js → passkeys-BeLLEm8_.js} +2 -2
  177. package/_assets/{pay-with-exchange-Bc61S8fk.js → pay-with-exchange-uspxaKYi.js} +2 -2
  178. package/_assets/{prepare-contract-call-a0euYGw1.js → prepare-contract-call-glyYfDZw.js} +2 -2
  179. package/_assets/{qr-overlay-Bxcymc80.js → qr-overlay-Cfm7lv4J.js} +4 -4
  180. package/_assets/{react-G9L2um0r.js → react-9aRvCYbm.js} +2 -2
  181. package/_assets/{receive-B2L8XUAK.js → receive-DzqSGOBo.js} +2 -2
  182. package/_assets/{resolveImplementation-CyW7nJOY.js → resolveImplementation-CGlyDT1c.js} +2 -2
  183. package/_assets/{resume-buy-DjsRBHGc.js → resume-buy-DzrSPRFa.js} +2 -2
  184. package/_assets/{rpc-HuV61zaY.js → rpc-B4vokLJn.js} +2 -2
  185. package/_assets/{sales-empty-C2d5fYtD.js → sales-empty-DqC1PsNb.js} +2 -2
  186. package/_assets/{search-empty-a5Cznk_m.js → search-empty-DCFe-ryo.js} +2 -2
  187. package/_assets/{secp256k1-D_V4Ye8O.js → secp256k1-0pYvee0N.js} +2 -2
  188. package/_assets/{secp256k1-DRRm-iBM.js → secp256k1-C-dCnxvN.js} +2 -2
  189. package/_assets/{secp256k1-DVs4vnDB.js → secp256k1-mA2HPwtH.js} +2 -2
  190. package/_assets/{send-7zzvm8CG.js → send-BhFWXDEQ.js} +2 -2
  191. package/_assets/{send-batch-transaction-DzSQ0vye.js → send-batch-transaction-ClbwXouE.js} +2 -2
  192. package/_assets/{send-eip712-transaction-C8xbqwl4.js → send-eip712-transaction-Cvujs_IY.js} +3 -3
  193. package/_assets/{send-gasless-transaction-BApkPjqX.js → send-gasless-transaction-o6WLUU8m.js} +3 -3
  194. package/_assets/{send-transaction-BWqOlzuO.js → send-transaction-brMtxtLa.js} +3 -3
  195. package/_assets/{sendMetaTransaction-DtqCFoTt.js → sendMetaTransaction-BO1lGCgN.js} +2 -2
  196. package/_assets/{sendRawTransaction-DxOSpPmA.js → sendRawTransaction-ClZJFTYs.js} +4 -4
  197. package/_assets/{sentry-RCtiQtjC.js → sentry-CJqFbG11.js} +3 -3
  198. package/_assets/{serializeTransaction-DMjWbKEY.js → serializeTransaction-CHRQ4nRc.js} +2 -2
  199. package/_assets/{session-proposal-CDANnhiF.js → session-proposal-DIVrgaZs.js} +2 -2
  200. package/_assets/{session-request-Bn0fkTkw.js → session-request-DQ1KJ9v-.js} +3 -3
  201. package/_assets/{sha256-Cbk06XOV.js → sha256-D95xpIOk.js} +2 -2
  202. package/_assets/{signing-BH_9uHTG.js → signing-CF8ZzSie.js} +4 -4
  203. package/_assets/{skeleton.styles-KSeN66We.js → skeleton.styles-CDClgQZa.js} +2 -2
  204. package/_assets/{socials-DGCX2gsj.js → socials-Bh2JNm2f.js} +2 -2
  205. package/_assets/{styled-K_r8RfK3.js → styled-BJAerMAa.js} +3 -3
  206. package/_assets/{swaps-CLkWisZt.js → swaps-CP0hsXom.js} +2 -2
  207. package/_assets/{thirdweb-DbdkDnGO.js → thirdweb-CvWXAZKa.js} +4 -4
  208. package/_assets/{to-serializable-transaction-DeE9YtTe.js → to-serializable-transaction-BKfOcqcV.js} +3 -3
  209. package/_assets/{totalSupply-f-_lj4s2.js → totalSupply-Civ1rKAR.js} +2 -2
  210. package/_assets/{transaction-fETmGUb_.js → transaction-LdbEZ3QP.js} +2 -2
  211. package/_assets/{transactionReceipt-BHye7StB.js → transactionReceipt-BWD_rE0W.js} +2 -2
  212. package/_assets/{transactions-DUAV8yRm.js → transactions-BTkg5Hbg.js} +2 -2
  213. package/_assets/{useCreditPacks-DFJcm3cB.js → useCreditPacks-DnU6Nk_-.js} +2 -2
  214. package/_assets/{useInfiniteGrid-CLHeOKn3.js → useInfiniteGrid-DvgTy6W_.js} +2 -2
  215. package/_assets/{useStore-BBUVWiPd.js → useStore-CgGE1SzL.js} +3 -3
  216. package/_assets/{useTheme-DD0IQ_3Z.js → useTheme-DCVzmxd7.js} +2 -2
  217. package/_assets/{utils-u4hNmxb_.js → utils-DF0qXAQT.js} +2 -2
  218. package/_assets/{verifyHash-CY-z2bj3.js → verifyHash-DbgcJwW2.js} +2 -2
  219. package/_assets/{w3m-modal-CAKNlWwi.js → w3m-modal-BCt908iO.js} +2 -2
  220. package/_assets/{w3m-modal-O6Eqk9dV.js → w3m-modal-MofBNC-s.js} +2 -2
  221. package/_assets/{wait-for-tx-receipt-1jFQBtZz.js → wait-for-tx-receipt-BWYdev56.js} +2 -2
  222. package/_assets/{wallets-D1PAyMOY.js → wallets-CyXKPtLh.js} +6 -6
  223. package/_assets/{web-connector-Dnqy9LKi.js → web-connector-CBmqwNC1.js} +4 -4
  224. package/_assets/{writeContract-V_-ojxW6.js → writeContract-U8xgcLR7.js} +2 -2
  225. package/_assets/{zora-sepolia-CIIRKC4C.js → zora-sepolia-BcoXfUYO.js} +2 -2
  226. package/_assets/{zoraTestnet-C2UcAlsp.js → zoraTestnet-CdLP96ll.js} +2 -2
  227. package/index.html +11 -11
  228. package/package.json +2 -2
  229. package/_assets/ItemDetail-DtAVOGXV.js +0 -3490
  230. package/_assets/collectionPage.styles-DZFdmcAO.js +0 -40
  231. package/_assets/index-CpeNCh1-.js +0 -2
  232. package/_assets/index-LDPyoGDo.js +0 -4090
  233. package/_assets/index-l2QjlKjX.css +0 -1
  234. package/_assets/items-empty-Bs5yNmsR.js +0 -2
@@ -1,4 +1,4 @@
1
- import{i as _,b as l,a as Te}from"./lit-element-wjYUA6aF.js";import{n as x,o as f,r as h,a as Ie}from"./class-map-DopF_Eyi.js";import{d as U,r as Ne,e as Se,v as ke}from"./index-CSBo6qrQ.js";import{c as C,U as _e}from"./index-BrC_okhM.js";import"./index-RYnkqAG_.js";import"./index-CRP5QaPb.js";import"./index-OeIHT0cR.js";import"./index-drol9D68.js";import"./index-C5onHlUQ.js";import"./index-BD0UDtYF.js";import"./index-NJ_79PUz.js";import{$ as Ce,k as T,a0 as $e,a1 as y,b as O,a2 as Re,a3 as N,O as ce,N as A,a4 as me,C as m,q as v,E as M,S as R,n as Oe,M as G,e as Ue,i as Le,p as qe,o as P,R as z}from"./W3MFrameProviderSingleton-qLuUEBFJ.js";import{au as I}from"./NetworkUtil-C2E64C4n.js";import"./index-DlWdq6Mw.js";import{M as ge}from"./MathUtil-BvP0JcjY.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e9462f8b-05cf-480d-983d-7683b6b8f835",t._sentryDebugIdIdentifier="sentry-dbid-e9462f8b-05cf-480d-983d-7683b6b8f835")}catch{}})();const De=U`
1
+ import{i as _,b as l,a as Te}from"./lit-element-wjYUA6aF.js";import{n as x,o as f,r as h,a as Ie}from"./class-map-DopF_Eyi.js";import{d as U,r as Ne,e as Se,v as ke}from"./index-CuBLDtFZ.js";import{c as C,U as _e}from"./index-B6SpJox_.js";import"./index-C2gUP7Wd.js";import"./index-CeMa_Fpw.js";import"./index-BfNdu86e.js";import"./index-CWMBT2iW.js";import"./index-9jY2-EBG.js";import"./index-CMZjflvo.js";import"./index-BSzD0ncl.js";import{$ as Ce,k as T,a0 as $e,a1 as y,b as O,a2 as Re,a3 as N,O as ce,N as A,a4 as me,C as m,q as v,E as M,S as R,n as Oe,M as G,e as Ue,i as Le,p as qe,o as P,R as z}from"./W3MFrameProviderSingleton-Cil5qlaS.js";import{au as I}from"./NetworkUtil-CUhhiBwq.js";import"./index-FPMEVY0k.js";import{M as ge}from"./MathUtil-BvP0JcjY.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e9462f8b-05cf-480d-983d-7683b6b8f835",t._sentryDebugIdIdentifier="sentry-dbid-e9462f8b-05cf-480d-983d-7683b6b8f835")}catch{}})();const De=U`
2
2
  :host {
3
3
  position: relative;
4
4
  }
@@ -1062,4 +1062,4 @@ import{i as _,b as l,a as Te}from"./lit-element-wjYUA6aF.js";import{n as x,o as
1062
1062
  ></wui-icon>`}
1063
1063
  </wui-button>
1064
1064
  `}getPaymentAssetFromTokenBalances(){return this.namespace?(this.tokenBalances[this.namespace]??[]).map(i=>{try{return tt(i)}catch{return null}}).filter(i=>!!i).filter(i=>{const{chainId:a}=y.parseCaipNetworkId(i.network),{chainId:o}=y.parseCaipNetworkId(this.paymentAsset.network);return N.isLowerCaseMatch(i.asset,this.paymentAsset.asset)?!0:this.selectedExchange?!N.isLowerCaseMatch(a.toString(),o.toString()):!0}):[]}onTokenBalancesChanged(e){this.tokenBalances=e;const[n]=this.getPaymentAssetFromTokenBalances();n&&u.setSelectedPaymentAsset(n)}async onConnectOtherWallet(){await P.connect(),await G.open({view:"PayQuote"})}onAccountStateChanged(e){const{address:n}=this.caipAddress?y.parseCaipAddress(this.caipAddress):{};if(this.caipAddress=e==null?void 0:e.caipAddress,this.profileName=(e==null?void 0:e.profileName)??null,n){const{address:s}=this.caipAddress?y.parseCaipAddress(this.caipAddress):{};s?N.isLowerCaseMatch(s,n)||(this.resetAssetsState(),this.resetQuoteState(),this.fetchTokens()):G.close()}}onSelectedPaymentAssetChanged(e){this.isFetchingQuote||u.setSelectedPaymentAsset(e)}async onTransfer(){var n,s,i;const e=ie(this.quote);if(e){if(!N.isLowerCaseMatch((n=this.selectedPaymentAsset)==null?void 0:n.asset,e.deposit.currency))throw new Error("Quote asset is not the same as the selected payment asset");const o=((s=this.selectedPaymentAsset)==null?void 0:s.amount)??"0",c=A.formatNumber(e.deposit.amount,{decimals:((i=this.selectedPaymentAsset)==null?void 0:i.metadata.decimals)??0}).toString();if(!A.bigNumber(o).gte(c)){R.showError("Insufficient funds");return}if(this.quote&&this.selectedPaymentAsset&&this.caipAddress&&this.namespace){const{address:L}=y.parseCaipAddress(this.caipAddress);await u.onTransfer({chainNamespace:this.namespace,fromAddress:L,toAddress:e.deposit.receiver,amount:c,paymentAsset:this.selectedPaymentAsset}),u.setRequestId(e.requestId),z.push("PayLoading")}}}async onSendTransactions(){var o,c,g;const e=((o=this.selectedPaymentAsset)==null?void 0:o.amount)??"0",n=A.formatNumber(((c=this.quote)==null?void 0:c.origin.amount)??0,{decimals:((g=this.selectedPaymentAsset)==null?void 0:g.metadata.decimals)??0}).toString();if(!A.bigNumber(e).gte(n)){R.showError("Insufficient funds");return}const i=te(this.quote),[a]=te(this.quote,this.completedTransactionsCount);a&&this.namespace&&(await u.onSendTransaction({namespace:this.namespace,transactionStep:a}),this.completedTransactionsCount+=1,this.completedTransactionsCount===i.length&&(u.setRequestId(a.requestId),z.push("PayLoading")))}onPayWithExchange(){if(this.exchangeUrlForQuote){const e=O.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!e)throw new Error("Could not create popup window");e.location.href=this.exchangeUrlForQuote;const n=ie(this.quote);n&&u.setRequestId(n.requestId),u.initiatePayment(),z.push("PayLoading")}}resetAssetsState(){u.setSelectedPaymentAsset(null)}resetQuoteState(){u.resetQuoteState()}};w.styles=Nt;b([h()],w.prototype,"profileName",void 0);b([h()],w.prototype,"paymentAsset",void 0);b([h()],w.prototype,"namespace",void 0);b([h()],w.prototype,"caipAddress",void 0);b([h()],w.prototype,"amount",void 0);b([h()],w.prototype,"recipient",void 0);b([h()],w.prototype,"activeConnectorIds",void 0);b([h()],w.prototype,"selectedPaymentAsset",void 0);b([h()],w.prototype,"selectedExchange",void 0);b([h()],w.prototype,"isFetchingQuote",void 0);b([h()],w.prototype,"quoteError",void 0);b([h()],w.prototype,"quote",void 0);b([h()],w.prototype,"isFetchingTokenBalances",void 0);b([h()],w.prototype,"tokenBalances",void 0);b([h()],w.prototype,"isPaymentInProgress",void 0);b([h()],w.prototype,"exchangeUrlForQuote",void 0);b([h()],w.prototype,"completedTransactionsCount",void 0);w=b([C("w3m-pay-quote-view")],w);export{p as A,u as P,E as W,d as a,w as b,k as c};
1065
- //# sourceMappingURL=index-D_3daVMJ.js.map
1065
+ //# sourceMappingURL=index-BTdE-853.js.map
@@ -1,4 +1,4 @@
1
- import{i as u,b as f}from"./lit-element-wjYUA6aF.js";import{n as c}from"./class-map-DopF_Eyi.js";import"./index-OeIHT0cR.js";import{d as v,r as h}from"./index-CSBo6qrQ.js";import{c as m,U as p}from"./index-BrC_okhM.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="4d049f33-1f4d-458e-9ba0-158287304762",a._sentryDebugIdIdentifier="sentry-dbid-4d049f33-1f4d-458e-9ba0-158287304762")}catch{}})();const g=v`
1
+ import{i as u,b as f}from"./lit-element-wjYUA6aF.js";import{n as c}from"./class-map-DopF_Eyi.js";import"./index-BfNdu86e.js";import{d as v,r as h}from"./index-CuBLDtFZ.js";import{c as m,U as p}from"./index-B6SpJox_.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="4d049f33-1f4d-458e-9ba0-158287304762",a._sentryDebugIdIdentifier="sentry-dbid-4d049f33-1f4d-458e-9ba0-158287304762")}catch{}})();const g=v`
2
2
  :host {
3
3
  display: block;
4
4
  width: var(--local-width);
@@ -44,4 +44,4 @@ import{i as u,b as f}from"./lit-element-wjYUA6aF.js";import{n as c}from"./class-
44
44
  --local-height: var(--apkt-spacing-${e[this.size??"xl"]});
45
45
  `,f`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",f`<wui-image src=${this.imageSrc} alt=${this.alt??"avatar"}></wui-image>`;if(this.address){this.dataset.variant="generated";const e=p.generateAvatarColors(this.address);return this.style.cssText+=`
46
46
  ${e}`,null}return this.dataset.variant="default",null}};r.styles=[h,g];o([c()],r.prototype,"imageSrc",void 0);o([c()],r.prototype,"alt",void 0);o([c()],r.prototype,"address",void 0);o([c()],r.prototype,"size",void 0);r=o([m("wui-avatar")],r);
47
- //# sourceMappingURL=index-CarTIHBr.js.map
47
+ //# sourceMappingURL=index-BTkKLFzm.js.map
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/fortmatic-VEuLc1E0.js","_assets/react-G9L2um0r.js","_assets/index-DCSeDwHz.js","_assets/dcl-schemas-CQsQxWYK.js","_assets/ethers-DXUQI3Ut.js","_assets/sentry-RCtiQtjC.js","_assets/index-CwSVzkMY.js","_assets/index-DX-xaYge.js","_assets/index-SPFq-ZCl.js","_assets/hooks.module-54Oj1-WJ.js","_assets/events-DLLBOQYG.js","_assets/intl-AKLEHPeO.js","_assets/index-CSBo6qrQ.js","_assets/index-LDPyoGDo.js","_assets/index-l2QjlKjX.css","_assets/W3MFrameProviderSingleton-qLuUEBFJ.js","_assets/index-D6hTzS8e.js","_assets/browser-ponyfill-ByHh5PGV.js","_assets/NetworkUtil-C2E64C4n.js","_assets/index-C-SyxpJI.js","_assets/index-OpYIGLSa.js","_assets/index-CTAs_Ona.js","_assets/index.es-BmijG_o0.js","_assets/lit-element-wjYUA6aF.js","_assets/index-ioIg36Q5.js","_assets/sendRawTransaction-DxOSpPmA.js","_assets/index-BZPiWmJM.js","_assets/store-80QKZ2rN.js","_assets/custom-B6FOcLFS.js","_assets/writeContract-V_-ojxW6.js","_assets/networks-DZ7rrynN.js","_assets/zoraTestnet-C2UcAlsp.js","_assets/verifyHash-CY-z2bj3.js","_assets/secp256k1-DRRm-iBM.js","_assets/serializeTransaction-DMjWbKEY.js","_assets/index-BcpaMHLt.js","_assets/index-PPamm-Fm.js","_assets/index-C-cuJat3.js","_assets/index-36NDvu3w.js","_assets/wallets-D1PAyMOY.js","_assets/signing-BH_9uHTG.js","_assets/prepare-contract-call-a0euYGw1.js","_assets/utils-u4hNmxb_.js","_assets/to-serializable-transaction-DeE9YtTe.js","_assets/transaction-fETmGUb_.js","_assets/get-bytecode-Dgh4Jb3X.js","_assets/execute-C57BG5lJ.js","_assets/detectExtension-CBEeT0QS.js","_assets/linkAccount-Ce-F8zrz.js","_assets/index-BpQETbke.js","_assets/ethereum-RVBnTLaL.js","_assets/types-BeDU9GfL.js","_assets/hashTypedData-ChT5ZbgL.js","_assets/send-transaction-BWqOlzuO.js","_assets/eth_sendRawTransaction-DYAsy3sS.js","_assets/index-DVqruI7F.js","_assets/in-app-zluvfGQX.js","_assets/passkeys-CZmD8fl-.js","_assets/uint8-array-BMe04WIx.js","_assets/thirdweb-DbdkDnGO.js","_assets/wait-for-tx-receipt-1jFQBtZz.js","_assets/transactionReceipt-BHye7StB.js","_assets/sleep-fBr8OToA.js","_assets/eth_estimateGas-zf8E350c.js","_assets/eth_getStorageAt-C7mDOh_o.js","_assets/eth_getTransactionCount-BZuLOO7k.js","_assets/decimals-B8ji3I9T.js","_assets/decimals-BrfaLWeO.js","_assets/zora-sepolia-CIIRKC4C.js","_assets/send-batch-transaction-DzSQ0vye.js","_assets/chains-CKHFLxhm.js"])))=>i.map(i=>d[i]);
2
- var ce=Object.defineProperty;var de=(i,n,e)=>n in i?ce(i,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[n]=e;var d=(i,n,e)=>de(i,typeof n!="symbol"?n+"":n,e);import{e as h,f as l,g}from"./dcl-schemas-CQsQxWYK.js";import{g as ue}from"./react-G9L2um0r.js";import{r as he}from"./events-DLLBOQYG.js";import{_ as m}from"./index-LDPyoGDo.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new i.Error().stack;n&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[n]="20a92f51-2ae4-4c2a-880a-fc2fed55d2ec",i._sentryDebugIdIdentifier="sentry-dbid-20a92f51-2ae4-4c2a-880a-fc2fed55d2ec")}catch{}})();var C;(function(i){i.Update="Web3ReactUpdate",i.Error="Web3ReactError",i.Deactivate="Web3ReactDeactivate"})(C||(C={}));const le={clientId:"e1adce863fe287bb6cf0e3fd90bdb77f",chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY]},pe={storageKey:"decentraland-connect-storage-key",[l.ProviderType.INJECTED]:{},[l.ProviderType.FORTMATIC]:{apiKeys:{[h.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[h.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:A(l.ProviderType.FORTMATIC)},[l.ProviderType.NETWORK]:{urls:A(l.ProviderType.NETWORK)},[l.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:A(l.ProviderType.WALLET_LINK)},[l.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:A(l.ProviderType.WALLET_CONNECT_V2),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.ARBITRUM_MAINNET,h.ChainId.OPTIMISM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},[l.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:A(l.ProviderType.MAGIC),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.OPTIMISM_MAINNET,h.ChainId.ARBITRUM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},[l.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:A(l.ProviderType.MAGIC),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.OPTIMISM_MAINNET,h.ChainId.ARBITRUM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},thirdweb:le};function I(){return pe}function A(i){const n={[h.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[h.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[h.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[h.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[h.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[h.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[h.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[h.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[h.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let e="";switch(i){case l.ProviderType.WALLET_LINK:e="walletlink";break;case l.ProviderType.FORTMATIC:e="fortmatic";break;case l.ProviderType.MAGIC:e="magic";break;case l.ProviderType.MAGIC_TEST:e="magic";break;case l.ProviderType.WALLET_CONNECT_V2:e="walletconnect-v2";break;case l.ProviderType.THIRDWEB:e="thirdweb";break}if(e){const t=Object.keys(n);for(const r of t)n[r]+=`?project=${e}`}return n}var $=he();const je=ue($);function fe(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n}var E=(function(i){fe(n,i);function n(t){var r,o=t===void 0?{}:t,s=o.supportedChainIds;return r=i.call(this)||this,r.supportedChainIds=s,r}var e=n.prototype;return e.emitUpdate=function(r){this.emit(C.Update,r)},e.emitError=function(r){this.emit(C.Error,r)},e.emitDeactivate=function(){this.emit(C.Deactivate)},n})($.EventEmitter);class z extends E{constructor(e){const t=I()[g.ProviderType.FORTMATIC],r=Object.keys(t.apiKeys).map(o=>Number(o));if(!r.includes(e))throw new Error(`Invariant error: Unsupported chainId ${e}`);super({supportedChainIds:r});d(this,"apiKey");d(this,"chainId");d(this,"rpcUrl");d(this,"fortmatic");this.apiKey=t.apiKeys[e],this.chainId=e,this.rpcUrl=t.urls[e]}async activate(){if(!this.fortmatic){const{default:t}=await m(async()=>{const{default:r}=await import("./fortmatic-VEuLc1E0.js").then(o=>o.f);return{default:r}},__vite__mapDeps([0,1]));this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const e=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:e}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(e=>e[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function j(){return j=Object.assign||function(i){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}return i},j.apply(this,arguments)}function q(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n}function D(i){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},D(i)}function L(i,n){return L=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},L(i,n)}function ve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function O(i,n,e){return ve()?O=Reflect.construct:O=function(r,o,s){var a=[null];a.push.apply(a,o);var c=Function.bind.apply(r,a),u=new c;return s&&L(u,s.prototype),u},O.apply(null,arguments)}function we(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function S(i){var n=typeof Map=="function"?new Map:void 0;return S=function(t){if(t===null||!we(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return O(t,arguments,D(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),L(r,t)},S(i)}function b(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function P(i,n){try{var e=i()}catch(t){return n(t)}return e&&e.then?e.then(void 0,n):e}function y(i){return i.hasOwnProperty("result")?i.result:i}var k=(function(i){q(n,i);function n(){var e;return e=i.call(this)||this,e.name=e.constructor.name,e.message="No Ethereum provider was found on window.ethereum.",e}return n})(S(Error)),ge=(function(i){q(n,i);function n(){var e;return e=i.call(this)||this,e.name=e.constructor.name,e.message="The user rejected the request.",e}return n})(S(Error)),me=(function(i){q(n,i);function n(t){var r;return r=i.call(this,t)||this,r.handleNetworkChanged=r.handleNetworkChanged.bind(b(r)),r.handleChainChanged=r.handleChainChanged.bind(b(r)),r.handleAccountsChanged=r.handleAccountsChanged.bind(b(r)),r.handleClose=r.handleClose.bind(b(r)),r}var e=n.prototype;return e.handleChainChanged=function(r){this.emitUpdate({chainId:r,provider:window.ethereum})},e.handleAccountsChanged=function(r){r.length===0?this.emitDeactivate():this.emitUpdate({account:r[0]})},e.handleClose=function(r,o){this.emitDeactivate()},e.handleNetworkChanged=function(r){this.emitUpdate({chainId:r,provider:window.ethereum})},e.activate=function(){try{var r=function(f){if(o)return f;function p(){return j({provider:window.ethereum},a?{account:a}:{})}var v=(function(){if(!a)return Promise.resolve(window.ethereum.enable().then(function(T){return T&&y(T)[0]})).then(function(T){a=T})})();return v&&v.then?v.then(p):p(v)},o=!1,s=this;if(!window.ethereum)throw new k;window.ethereum.on&&(window.ethereum.on("chainChanged",s.handleChainChanged),window.ethereum.on("accountsChanged",s.handleAccountsChanged),window.ethereum.on("close",s.handleClose),window.ethereum.on("networkChanged",s.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var a,c=P(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(u){return y(u)[0]})).then(function(u){a=u})},function(u){if(u.code===4001)throw new ge});return Promise.resolve(c&&c.then?c.then(r):r(c))}catch(u){return Promise.reject(u)}},e.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(r){return Promise.reject(r)}},e.getChainId=function(){try{var r=function(){function c(){if(!o)try{o=y(window.ethereum.send({method:"net_version"}))}catch{}return o||(window.ethereum.isDapper?o=y(window.ethereum.cachedResults.net_version):o=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),o}var u=(function(){if(!o){var f=P(function(){return Promise.resolve(window.ethereum.send("net_version").then(y)).then(function(p){o=p})},function(){});if(f&&f.then)return f.then(function(){})}})();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new k;var o,s=P(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(y)).then(function(a){o=a})},function(){});return Promise.resolve(s&&s.then?s.then(r):r(s))}catch(a){return Promise.reject(a)}},e.getAccount=function(){try{var r=function(){function c(){return o||(o=y(window.ethereum.send({method:"eth_accounts"}))[0]),o}var u=(function(){if(!o){var f=P(function(){return Promise.resolve(window.ethereum.enable().then(function(p){return y(p)[0]})).then(function(p){o=p})},function(){});if(f&&f.then)return f.then(function(){})}})();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new k;var o,s=P(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(a){return y(a)[0]})).then(function(a){o=a})},function(){});return Promise.resolve(s&&s.then?s.then(r):r(s))}catch(a){return Promise.reject(a)}},e.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},e.isAuthorized=function(){try{return window.ethereum?Promise.resolve(P(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(r){return y(r).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(r){return Promise.reject(r)}},n})(E);class G extends Error{constructor(){super("There was an error unlocking your wallet. Please be sure your wallet is unlocked and try again."),this.name="ErrorUnlockingWallet"}}const Ie=60*1e3;class J extends me{constructor(n){super({supportedChainIds:[n]})}async activate(){const n=new Promise((t,r)=>{setTimeout(()=>{r(new G)},Ie)}),e=super.activate();return Promise.race([e,n])}}var ye="Invariant failed";function V(i,n){throw new Error(ye)}function Y(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,N(i,n)}function K(i){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},K(i)}function N(i,n){return N=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},N(i,n)}function Ce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function R(i,n,e){return Ce()?R=Reflect.construct:R=function(r,o,s){var a=[null];a.push.apply(a,o);var c=Function.bind.apply(r,a),u=new c;return s&&N(u,s.prototype),u},R.apply(null,arguments)}function Ee(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function W(i){var n=typeof Map=="function"?new Map:void 0;return W=function(t){if(t===null||!Ee(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return R(t,arguments,K(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),N(r,t)},W(i)}var U=(function(i){Y(n,i);function n(e,t,r){var o;return o=i.call(this)||this,o.code=t,o.data=r,o.name=o.constructor.name,o.message=e,o}return n})(W(Error)),Ae=function(n,e){var t=this,r=this;this.isMetaMask=!1,this.sendAsync=function(s,a){console.log("sendAsync",s.method,s.params),r.request(s.method,s.params).then(function(c){return a(null,{jsonrpc:"2.0",id:s.id,result:c})}).catch(function(c){return a(c,null)})},this.request=function(s,a){try{return typeof s!="string"&&(a=s.params,s=s.method),Promise.resolve(fetch(t.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:s,params:a}),headers:{"Content-Type":"application/json"}})).then(function(c){if(!c.ok)throw new U(c.status+": "+c.statusText,-32e3);return Promise.resolve(c.json()).then(function(u){if("error"in u){var f,p,v;throw new U(u==null||(f=u.error)==null?void 0:f.message,u==null||(p=u.error)==null?void 0:p.code,u==null||(v=u.error)==null?void 0:v.data)}else{if("result"in u)return u.result;throw new U("Received unexpected JSON-RPC response to "+s+" request.",-32e3,u)}})})}catch(c){return Promise.reject(c)}},this.chainId=n,this.url=e;var o=new URL(e);this.host=o.host,this.path=o.pathname},Te=(function(i){Y(n,i);function n(t){var r,o=t.urls,s=t.defaultChainId;return s||Object.keys(o).length===1||V(),r=i.call(this,{supportedChainIds:Object.keys(o).map(function(a){return Number(a)})})||this,r.currentChainId=s||Number(Object.keys(o)[0]),r.providers=Object.keys(o).reduce(function(a,c){return a[Number(c)]=new Ae(Number(c),o[Number(c)]),a},{}),r}var e=n.prototype;return e.activate=function(){try{var r=this;return Promise.resolve({provider:r.providers[r.currentChainId],chainId:r.currentChainId,account:null})}catch(o){return Promise.reject(o)}},e.getProvider=function(){try{var r=this;return Promise.resolve(r.providers[r.currentChainId])}catch(o){return Promise.reject(o)}},e.getChainId=function(){try{var r=this;return Promise.resolve(r.currentChainId)}catch(o){return Promise.reject(o)}},e.getAccount=function(){return Promise.resolve(null)},e.deactivate=function(){},e.changeChainId=function(r){Object.keys(this.providers).includes(r.toString())||V(),this.currentChainId=r,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:r})},n})(E);class Q extends Te{constructor(n){super({urls:I()[l.ProviderType.NETWORK].urls,defaultChainId:n})}}function x(){return x=Object.assign||function(i){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}return i},x.apply(this,arguments)}function Pe(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,F(i,n)}function F(i,n){return F=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},F(i,n)}function B(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}var _e=1,Ne=(function(i){Pe(n,i);function n(t){var r,o=t.url,s=t.appName,a=t.appLogoUrl,c=t.darkMode,u=t.supportedChainIds;return r=i.call(this,{supportedChainIds:u})||this,r.url=o,r.appName=s,r.appLogoUrl=a,r.darkMode=c||!1,r.handleChainChanged=r.handleChainChanged.bind(B(r)),r.handleAccountsChanged=r.handleAccountsChanged.bind(B(r)),r}var e=n.prototype;return e.activate=function(){try{var r=this,o=function(){return Promise.resolve(r.provider.request({method:"eth_requestAccounts"})).then(function(c){var u=c[0];return r.provider.on("chainChanged",r.handleChainChanged),r.provider.on("accountsChanged",r.handleAccountsChanged),{provider:r.provider,account:u}})},s=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)r.provider=window.ethereum;else{var a=(function(){if(!r.walletLink)return Promise.resolve(m(()=>import("./index-DCSeDwHz.js").then(c=>c.i),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11])).then(function(c){var u;return(u=c==null?void 0:c.default)!=null?u:c})).then(function(c){r.walletLink=new c(x({appName:r.appName,darkMode:r.darkMode},r.appLogoUrl?{appLogoUrl:r.appLogoUrl}:{})),r.provider=r.walletLink.makeWeb3Provider(r.url,_e)})})();if(a&&a.then)return a.then(function(){})}})();return Promise.resolve(s&&s.then?s.then(o):o(s))}catch(a){return Promise.reject(a)}},e.getProvider=function(){try{var r=this;return Promise.resolve(r.provider)}catch(o){return Promise.reject(o)}},e.getChainId=function(){try{var r=this;return Promise.resolve(r.provider.chainId)}catch(o){return Promise.reject(o)}},e.getAccount=function(){try{var r=this;return Promise.resolve(r.provider.request({method:"eth_requestAccounts"})).then(function(o){return o[0]})}catch(o){return Promise.reject(o)}},e.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},e.close=function(){try{var r=this;return r.provider.close(),r.emitDeactivate(),Promise.resolve()}catch(o){return Promise.reject(o)}},e.handleChainChanged=function(r){this.emitUpdate({chainId:r})},e.handleAccountsChanged=function(r){this.emitUpdate({account:r[0]})},n})(E);class X extends Ne{constructor(n){const e=I()[g.ProviderType.WALLET_LINK],t=e.urls[n];if(!t)throw new Error(`Unsupported chainId for WalletLink: ${n}. Supported chains: ${Object.keys(e.urls).join(", ")}`);super({url:t,appName:e.appName,supportedChainIds:[n]})}}class Me{}class Z extends Me{get(n){const e=window.localStorage.getItem(n);return e===null?void 0:e}set(n,e){window.localStorage.setItem(n,e)}remove(n){window.localStorage.removeItem(n)}removeRegExp(n){for(let e=localStorage.length-1;e>=0;e--){const t=localStorage.key(e);t&&n.test(t)&&localStorage.removeItem(t)}}}const be={[g.ChainId.ETHEREUM_MAINNET]:"mainnet",[g.ChainId.ETHEREUM_SEPOLIA]:"sepolia",[g.ChainId.MATIC_MAINNET]:"polygon",[g.ChainId.MATIC_AMOY]:"polygonAmoy",[g.ChainId.ARBITRUM_MAINNET]:"arbitrum",[g.ChainId.OPTIMISM_MAINNET]:"optimism",[g.ChainId.AVALANCHE_MAINNET]:"avalanche",[g.ChainId.BSC_MAINNET]:"bsc",[g.ChainId.FANTOM_MAINNET]:"fantom"},w=class w extends E{constructor(e){super({supportedChainIds:w.configuration.chains});d(this,"desiredChainId");d(this,"appKit");d(this,"provider");d(this,"accountUnsubscribe");d(this,"networkUnsubscribe");d(this,"initAppKit",async()=>{if(w.sharedAppKit)return this.appKit=w.sharedAppKit,this.appKit;const{createAppKit:e}=await m(async()=>{const{createAppKit:s}=await import("./index-CSBo6qrQ.js").then(a=>a.h);return{createAppKit:s}},__vite__mapDeps([12,13,1,3,5,4,11,14,15,16,17,18,19,20,21,22,23])),{WagmiAdapter:t}=await m(async()=>{const{WagmiAdapter:s}=await import("./index-ioIg36Q5.js").then(a=>a.b);return{WagmiAdapter:s}},__vite__mapDeps([24,15,3,1,16,5,17,18,13,4,11,14,25,26,6,27,28,29])),r=await this.getNetworks(),o=new t({networks:r,projectId:w.configuration.projectId});return this.appKit=e({adapters:[o],projectId:w.configuration.projectId,networks:r,defaultNetwork:r[0],metadata:{name:"Decentraland",description:"Decentraland - Virtual World",url:typeof window<"u"?window.location.origin:"https://decentraland.org",icons:["https://decentraland.org/favicon.ico"]},themeMode:"dark",themeVariables:{"--w3m-z-index":3e3},features:{analytics:!1,email:!1,socials:!1,onramp:!1,swaps:!1},enableInjected:!0,enableEIP6963:!0}),w.sharedAppKit=this.appKit,await this.waitForSessionRestore(),this.appKit});d(this,"waitForSessionRestore",async()=>{const e=this.appKit;if(!e)return;const t=e.getAccount();if((t==null?void 0:t.status)==="connected"||(t==null?void 0:t.status)==="disconnected")return;const r=t!=null&&t.status?5e3:500;return new Promise(o=>{const s=setTimeout(()=>{a==null||a(),o()},r),a=e.subscribeAccount(c=>{((c==null?void 0:c.status)==="connected"||(c==null?void 0:c.status)==="disconnected")&&(clearTimeout(s),a==null||a(),o())},"eip155")})});d(this,"validateRestoredSession",async e=>{try{const t=e.getWalletProvider();return t?(await t.request({method:"eth_chainId"}),!0):!1}catch(t){return w.isStaleSessionError(t)?!1:(console.warn("Error validating WalletConnect session:",t),!0)}});d(this,"openModalAndWaitForConnection",async()=>{const e=this.requireAppKit(),t=()=>new Promise((r,o)=>{let s=!1;const a=(p,v)=>{s||(s=!0,clearTimeout(c),p==null||p(),v==null||v())},c=setTimeout(()=>{a(),o(new Error("Connection timeout"))},3e5),u=e.subscribeAccount(p=>{p!=null&&p.isConnected&&(p!=null&&p.address)&&(a(u,f),r(p.address))},"eip155"),f=e.subscribeState(p=>{!p.open&&!e.getAddress("eip155")&&(a(u,f),o(new Error("User closed the modal without connecting")))})});try{await e.open({view:"Connect"}),await t()}catch(r){if(w.isStaleSessionError(r)){if(console.warn("Stale session detected, retrying connection..."),w.clearStorage(),await this.initAppKit(),!this.appKit)throw new Error("AppKit reinitialization failed");await this.appKit.open({view:"Connect"}),await t()}else throw r}});d(this,"activate",async()=>{try{await this.initAppKit()}catch(c){if(console.error("Error initializing AppKit",c),w.isStaleSessionError(c))console.warn("WalletConnect session is stale, clearing storage and retrying..."),w.clearStorage(),await this.initAppKit();else throw c}const e=this.requireAppKit(),t=e.getAccount();(t==null?void 0:t.status)==="connected"&&(t==null?void 0:t.address)?await this.validateRestoredSession(e)||(console.warn("Restored WalletConnect session is stale, clearing and prompting reconnection..."),w.clearStorage(),await this.initAppKit(),await this.openModalAndWaitForConnection()):await this.openModalAndWaitForConnection();const o=e.getWalletProvider();if(!o)throw new Error("Failed to get wallet provider after connection");this.provider=o,this.accountUnsubscribe=e.subscribeAccount(c=>{c!=null&&c.address&&this.handleAccountsChanged([c.address])},"eip155"),this.networkUnsubscribe=e.subscribeCaipNetworkChange(c=>{c!=null&&c.id&&this.handleChainChanged(c.id)});const s=e.getAddress("eip155");return{chainId:e.getChainId()||this.desiredChainId,account:s||null,provider:this.provider}});d(this,"getProvider",async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider});d(this,"getChainId",async()=>this.requireAppKit().getChainId()??this.desiredChainId);d(this,"getAccount",async()=>this.requireAppKit().getAddress("eip155")??null);d(this,"getWalletName",()=>{var e,t,r;return(r=(t=(e=this.appKit)==null?void 0:e.getWalletInfo)==null?void 0:t.call(e,"eip155"))==null?void 0:r.name});d(this,"deactivate",()=>{});d(this,"clearInstance",()=>{var t,r;const e=this.provider;if(e){this.provider=void 0;try{(t=this.accountUnsubscribe)==null||t.call(this),(r=this.networkUnsubscribe)==null||r.call(this)}catch(o){console.warn("Error unsubscribing from AppKit events:",o)}return this.accountUnsubscribe=void 0,this.networkUnsubscribe=void 0,e}});d(this,"close",async()=>{var t;if(this.clearInstance()){try{await((t=this.appKit)==null?void 0:t.disconnect())}catch(r){console.warn("Error during WalletConnect disconnect:",r)}this.appKit=void 0}});d(this,"handleAccountsChanged",e=>{this.emitUpdate({account:e[0]})});d(this,"handleChainChanged",e=>{this.emitUpdate({chainId:e})});d(this,"handleDisconnect",()=>{this.clearInstance(),this.emitDeactivate()});this.desiredChainId=e}requireAppKit(){if(!this.appKit)throw new Error("AppKit is not initialized");return this.appKit}static isStaleSessionError(e){if(e instanceof Error){const t=e.message.toLowerCase();return t.includes("no matching key")||t.includes("session topic doesn't exist")||t.includes("missing or invalid")||t.includes("expired")||t.includes("user rejected methods")||t.includes("is not configured")||t.includes("cannot read properties")||t.includes("undefined is not an object")}return!1}async getNetworks(){const e=w.configuration.chains,t=await m(()=>import("./networks-DZ7rrynN.js"),__vite__mapDeps([30,18,5,1,31,32,25,13,3,4,11,14,33,34,29])),r=e.map(s=>{const a=be[s];if(a)return t[a]}).filter(s=>s!==void 0);if(r.length===0)throw new Error("No supported networks found for WalletConnect");const o=r.find(s=>s.id===this.desiredChainId);if(o){const s=r.filter(a=>a.id!==this.desiredChainId);return[o,...s]}return[r[0],...r.slice(1)]}};d(w,"configuration",I()[g.ProviderType.WALLET_CONNECT_V2]),d(w,"clearStorage",(e=new Z)=>{e.removeRegExp(new RegExp("^wc@2:")),e.removeRegExp(new RegExp("^@appkit")),w.sharedAppKit=null}),d(w,"sharedAppKit",null);let _=w;class H extends E{constructor(e,t=!1){super({supportedChainIds:I()[g.ProviderType.MAGIC].chains});d(this,"isTest");d(this,"chainId");d(this,"account");d(this,"magic");d(this,"activate",async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const t=await this.getProvider(),r=await t.request({method:"eth_accounts"});return this.account=r[0]??null,{provider:t,chainId:this.chainId,account:this.account}});d(this,"getProvider",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const e=await this.magic.wallet.getProvider();return{...e,isMagic:!0,request:new Proxy(e.request,{apply:async(t,r,o)=>{var s,a,c;if(((s=o[0])==null?void 0:s.method)==="wallet_switchEthereumChain")try{const u=parseInt((c=(a=o[0])==null?void 0:a.params[0])==null?void 0:c.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(u)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(u),this.emitUpdate({chainId:u}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return t.bind(e)(...o)}}),sendAsync:new Proxy(e.send,{apply:async(t,r,o)=>t.bind(e)(...o)})}});d(this,"getChainId",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId});d(this,"getAccount",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account});d(this,"getEmail",async()=>{try{if(!this.magic||!await this.magic.user.isLoggedIn())return;const t=await this.magic.user.getInfo();return(t==null?void 0:t.email)??void 0}catch{return}});d(this,"deactivate",()=>{});d(this,"buildMagicInstance",async e=>{const{Magic:t}=await m(async()=>{const{Magic:a}=await import("./index-BcpaMHLt.js");return{Magic:a}},__vite__mapDeps([35,5,1,36])),{OAuthExtension:r}=await m(async()=>{const{OAuthExtension:a}=await import("./index-C-cuJat3.js");return{OAuthExtension:a}},__vite__mapDeps([37,36,5,1,38,7,8,4,10,3])),o=I()[this.isTest?g.ProviderType.MAGIC_TEST:g.ProviderType.MAGIC],s=o.urls[e];if(!s)throw new Error(`Unsupported chainId for Magic: ${e}. Supported chains: ${Object.keys(o.urls).join(", ")}`);return new t(o.apiKey,{extensions:[new r],network:{rpcUrl:s,chainId:e}})});this.isTest=t,this.chainId=e,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class ee extends H{constructor(n){super(n,!0)}}class te extends E{constructor(e){var t;super({supportedChainIds:((t=I().thirdweb)==null?void 0:t.chains)??[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA]});d(this,"chainId");d(this,"client");d(this,"wallet");d(this,"chain");d(this,"eip1193Provider");d(this,"activate",async()=>{const e=await this.getClient(),t=await this.getWallet();let r;try{r=await t.autoConnect({client:e})}catch{throw new Error("Thirdweb: No active session. User must authenticate first.")}if(!r)throw new Error("Thirdweb: No active session. User must authenticate first.");const o=await this.getChain(),{EIP1193:s}=await m(async()=>{const{EIP1193:u}=await import("./wallets-D1PAyMOY.js").then(f=>f.Q);return{EIP1193:u}},__vite__mapDeps([39,40,41,42,5,1,13,3,4,11,14,43,44,45,46,47,48,49,50,51,27,52,53,54,19,16,20,55,21]));return this.eip1193Provider=s.toProvider({wallet:t,chain:o,client:e}),{provider:await this.getProvider(),chainId:this.chainId,account:r.address}});d(this,"getProvider",async()=>{if(!this.eip1193Provider)throw new Error("Thirdweb: wallet is not connected. Call activate() first.");const e=this.eip1193Provider;return{...e,isDapper:!1,isFortmatic:!1,isMetamask:!1,isMagic:!1,isThirdweb:!0,request:new Proxy(e.request,{apply:async(t,r,o)=>{var a,c,u,f;if(((a=o[0])==null?void 0:a.method)==="wallet_switchEthereumChain"){const p=(f=(u=(c=o[0])==null?void 0:c.params)==null?void 0:u[0])==null?void 0:f.chainId,v=parseInt(p,16);if(this.supportedChainIds&&!this.supportedChainIds.includes(v))throw new Error("Thirdweb: unsupported chain");this.chainId=v,this.chain=null,this.eip1193Provider=null;const T=await this.getClient(),ne=await this.getWallet(),ie=await this.getChain(),{EIP1193:oe}=await m(async()=>{const{EIP1193:ae}=await import("./wallets-D1PAyMOY.js").then(se=>se.Q);return{EIP1193:ae}},__vite__mapDeps([39,40,41,42,5,1,13,3,4,11,14,43,44,45,46,47,48,49,50,51,27,52,53,54,19,16,20,55,21]));return this.eip1193Provider=oe.toProvider({wallet:ne,chain:ie,client:T}),this.emitUpdate({chainId:v}),null}return Reflect.apply(t,e,o)}}),sendAsync:new Proxy(e.request,{apply:async(t,r,o)=>Reflect.apply(t,e,o)})}});d(this,"getChainId",async()=>this.chainId);d(this,"getAccount",async()=>{if(!this.wallet)return null;try{const e=this.wallet.getAccount();return(e==null?void 0:e.address)??null}catch{return null}});d(this,"getEmail",async()=>{try{const e=await this.getClient(),{getUserEmail:t}=await m(async()=>{const{getUserEmail:o}=await import("./in-app-zluvfGQX.js");return{getUserEmail:o}},__vite__mapDeps([56,41,42,5,1,47,46,13,3,4,11,14,57,58]));return await t({client:e})??void 0}catch{return}});d(this,"deactivate",()=>{});this.chainId=e,this.client=null,this.wallet=null,this.chain=null,this.eip1193Provider=null}async getClient(){if(this.client)return this.client;let e;try{e=await m(()=>import("./thirdweb-DbdkDnGO.js").then(r=>r.t),__vite__mapDeps([59,42,5,1,41,40,13,3,4,11,14,43,44,45,60,61,62,63,64,65,54,66,67,68,69,53]))}catch{throw new Error("Thirdweb: thirdweb package is not installed.")}const t=I().thirdweb;return this.client=e.createThirdwebClient({clientId:t.clientId}),this.client}async getWallet(){if(this.wallet)return this.wallet;let e;try{e=await m(()=>import("./wallets-D1PAyMOY.js").then(t=>t.Q),__vite__mapDeps([39,40,41,42,5,1,13,3,4,11,14,43,44,45,46,47,48,49,50,51,27,52,53,54,19,16,20,55,21]))}catch{throw new Error("Thirdweb: thirdweb package is not installed. Run: npm install thirdweb")}return this.wallet=e.inAppWallet(),this.wallet}async getChain(){if(this.chain)return this.chain;const e=await m(()=>import("./chains-CKHFLxhm.js"),__vite__mapDeps([70,42,5,1,68,50]));return this.chain=e.defineChain(this.chainId),this.chain}async close(){this.wallet&&await this.wallet.disconnect(),this.wallet=null,this.chain=null,this.eip1193Provider=null}}class M{constructor(n){d(this,"provider");d(this,"id",0);d(this,"on",(n,e)=>this.provider.on(n,e));d(this,"emit",(n,...e)=>this.provider.emit(n,e));d(this,"removeListener",(n,e)=>this.provider.removeListener(n,e));d(this,"request",async({method:n,params:e})=>this.isModernProvider()?this.provider.request({method:n,params:e}):this.send(n,e));d(this,"sendAsync",async(n,e)=>this.hasSendAsync()?this.provider.sendAsync(n,(t,r)=>{r&&!Object.prototype.hasOwnProperty.call(r,"result")?e(t,{id:0,jsonrpc:"2.0",result:r}):e(t,r)}):this.send(n,e));this.provider=n}static adapt(n){const e=new M(n);return{...n,on:e.on,emit:e.emit,removeListener:e.removeListener,request:e.request,sendAsync:e.sendAsync,send:e.send.bind(e)}}async send(n,e){let t,r,o;const s=typeof e=="function";if(s){const a=n;r=a.params||[],t=a.method,o=e}else t=n,r=e||[],o=(a,c)=>{if(a)throw a;return c};if(this.isModernProvider()){const[a,c]=await this.provider.request({method:t,params:r}).then(f=>[null,f]).catch(f=>[f,void 0]);return o(a,s?{id:"",jsonrpc:"2.0",result:c}:c)}else{this.patchOldMobile();const[a,c]=s?await new Promise(u=>this.provider.send(n,(f,p)=>{u([f,p])})):await new Promise(u=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:t,params:r},(f,p)=>{const v=p;u([(v==null?void 0:v.error)??f,(v==null?void 0:v.result)??p])}));return o(a,c)}}isModernProvider(){return"request"in this.provider&&typeof this.provider.request=="function"}hasSendAsync(){return typeof this.provider.sendAsync=="function"}patchOldMobile(){this.provider&&!this.provider.isDapper&&!this.provider.isFortmatic&&!this.provider.isMetamask&&this.hasSendAsync()&&this.provider.send!==this.provider.sendAsync&&(this.provider.send=this.provider.sendAsync.bind(this.provider))}}class re{constructor(n){d(this,"storage");d(this,"connector");d(this,"promiseOfConnection");d(this,"getWalletName",()=>{if(this.connector instanceof _)return this.connector.getWalletName()});d(this,"clearConnectionData",()=>{const{storageKey:n}=I();this.storage.remove(n),_.clearStorage(this.storage)});d(this,"handleWeb3ReactDeactivate",async()=>{try{await this.disconnect()}catch(n){console.error(n)}});this.storage=n}async connect(n,e=h.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(a){console.error("Error disconnecting previous connection",a)}const t=this.buildConnector(n,e);t.on(C.Deactivate,this.handleWeb3ReactDeactivate);let{provider:r,account:o}={};try{const a=await t.activate();r=a.provider,o=a.account}catch(a){throw console.error("Error activating the connector",a),a}(n===l.ProviderType.MAGIC||n===l.ProviderType.MAGIC_TEST||n===l.ProviderType.THIRDWEB)&&t.on(C.Update,({chainId:a})=>{a&&this.setConnectionData(n,a)});let s=e;if(n===l.ProviderType.INJECTED){const a=await r.request({method:"eth_chainId"});s=a?parseInt(a,16):s}return this.connector=t,this.setConnectionData(n,s),{provider:M.adapt(r),providerType:n,account:o||"",chainId:s}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const n=this.getConnectionData();if(!n)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");if(this.connector){const[t,r]=await Promise.all([this.connector.getProvider(),this.connector.getAccount()]);return{provider:t,providerType:n.providerType,chainId:n.chainId,account:r||""}}let e;try{e=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(n.providerType,n.chainId))}finally{this.promiseOfConnection=void 0}return{...e,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const n=[l.ProviderType.FORTMATIC,l.ProviderType.WALLET_CONNECT,l.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?n.unshift(l.ProviderType.INJECTED):n.unshift(l.ProviderType.METAMASK_MOBILE),n}async disconnect(){this.connector&&(this.connector.removeAllListeners(C.Deactivate),this.connector.removeAllListeners(C.Update),this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async getEmail(){const n=this.connector;if(n!=null&&n.getEmail)try{return await n.getEmail()}catch{return}}async createProvider(n,e=h.ChainId.ETHEREUM_MAINNET){const r=await this.buildConnector(n,e).getProvider();return M.adapt(r)}buildConnector(n,e){switch(n){case l.ProviderType.INJECTED:return new J(e);case l.ProviderType.FORTMATIC:return new z(e);case l.ProviderType.MAGIC:return new H(e);case l.ProviderType.MAGIC_TEST:return new ee(e);case l.ProviderType.WALLET_LINK:return new X(e);case l.ProviderType.NETWORK:return new Q(e);case l.ProviderType.WALLET_CONNECT_V2:return new _(e);case l.ProviderType.THIRDWEB:return new te(e);default:throw new Error(`Invalid provider ${n}`)}}getConnectionData(){const{storageKey:n}=I(),e=this.storage.get(n);try{return e?JSON.parse(e):void 0}catch(t){console.error("Error parsing connection data",t);return}}storeConnectionData(n,e){this.setConnectionData(n,e)}setConnectionData(n,e){const{storageKey:t}=I(),r=JSON.stringify({providerType:n,chainId:e});this.storage.set(t,r)}isClosableConnector(){return this.connector&&"close"in this.connector}}const Oe=new re(new Z),De=Object.freeze(Object.defineProperty({__proto__:null,AbstractConnector:E,ConnectionManager:re,ErrorUnlockingWallet:G,FortmaticConnector:z,InjectedConnector:J,MagicConnector:H,MagicTestConnector:ee,NetworkConnector:Q,ProviderAdapter:M,ThirdwebConnector:te,WalletConnectV2Connector:_,WalletLinkConnector:X,connection:Oe,getConfiguration:I,getRpcUrls:A},Symbol.toStringTag,{value:"Module"}));export{je as N,Oe as c,$ as e,De as i};
3
- //# sourceMappingURL=index-CaHn1v4Y.js.map
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/fortmatic-Cd8UWzR7.js","_assets/react-9aRvCYbm.js","_assets/index-CNbMuq6z.js","_assets/dcl-schemas-BBgGLe8k.js","_assets/ethers-BKRWnjV9.js","_assets/sentry-CJqFbG11.js","_assets/index-uVLu1nYC.js","_assets/index-_iT3UM2o.js","_assets/index-BJ6Fw5Al.js","_assets/hooks.module-54Oj1-WJ.js","_assets/events-S6R_9oRG.js","_assets/intl-AKLEHPeO.js","_assets/index-CuBLDtFZ.js","_assets/index-sQFfvNZX.js","_assets/index-CKGO8NWe.css","_assets/W3MFrameProviderSingleton-Cil5qlaS.js","_assets/index--RzAwV6Q.js","_assets/browser-ponyfill--2nwarnr.js","_assets/NetworkUtil-CUhhiBwq.js","_assets/index-Kerq77jm.js","_assets/index-OpYIGLSa.js","_assets/index-DpMjDWPc.js","_assets/index.es-CReVKXvk.js","_assets/lit-element-wjYUA6aF.js","_assets/index-Djpq4q5g.js","_assets/sendRawTransaction-ClZJFTYs.js","_assets/index-AiBvYRW5.js","_assets/store-80QKZ2rN.js","_assets/custom-Dxc1jEzQ.js","_assets/writeContract-U8xgcLR7.js","_assets/networks-a6Oqotld.js","_assets/zoraTestnet-CdLP96ll.js","_assets/verifyHash-DbgcJwW2.js","_assets/secp256k1-C-dCnxvN.js","_assets/serializeTransaction-CHRQ4nRc.js","_assets/index-C7fDOFW2.js","_assets/index-CoCdUrpV.js","_assets/index-C5UkgriS.js","_assets/index-BTGMdjiQ.js","_assets/wallets-CyXKPtLh.js","_assets/signing-CF8ZzSie.js","_assets/prepare-contract-call-glyYfDZw.js","_assets/utils-DF0qXAQT.js","_assets/to-serializable-transaction-BKfOcqcV.js","_assets/transaction-LdbEZ3QP.js","_assets/get-bytecode-CNrt-FoQ.js","_assets/execute-DxIYEcvB.js","_assets/detectExtension-C9d6YCCt.js","_assets/linkAccount-CJSln8y3.js","_assets/index-CoFmUEdb.js","_assets/ethereum-eDYZBrz5.js","_assets/types-BeDU9GfL.js","_assets/hashTypedData-DQ_Lbi0o.js","_assets/send-transaction-brMtxtLa.js","_assets/eth_sendRawTransaction-DYAsy3sS.js","_assets/index-kizwd9je.js","_assets/in-app-CW-TClWX.js","_assets/passkeys-BeLLEm8_.js","_assets/uint8-array-BMe04WIx.js","_assets/thirdweb-CvWXAZKa.js","_assets/wait-for-tx-receipt-BWYdev56.js","_assets/transactionReceipt-BWD_rE0W.js","_assets/sleep-fBr8OToA.js","_assets/eth_estimateGas-07hHMEkF.js","_assets/eth_getStorageAt-B_6XaGoO.js","_assets/eth_getTransactionCount-BvPk5RHG.js","_assets/decimals-e9gwXexf.js","_assets/decimals-letC916t.js","_assets/zora-sepolia-BcoXfUYO.js","_assets/send-batch-transaction-ClbwXouE.js","_assets/chains-DfMERfnW.js"])))=>i.map(i=>d[i]);
2
+ var ce=Object.defineProperty;var de=(i,n,e)=>n in i?ce(i,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[n]=e;var d=(i,n,e)=>de(i,typeof n!="symbol"?n+"":n,e);import{e as h,f as l,g}from"./dcl-schemas-BBgGLe8k.js";import{g as ue}from"./react-9aRvCYbm.js";import{r as he}from"./events-S6R_9oRG.js";import{_ as m}from"./index-sQFfvNZX.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new i.Error().stack;n&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[n]="20a92f51-2ae4-4c2a-880a-fc2fed55d2ec",i._sentryDebugIdIdentifier="sentry-dbid-20a92f51-2ae4-4c2a-880a-fc2fed55d2ec")}catch{}})();var C;(function(i){i.Update="Web3ReactUpdate",i.Error="Web3ReactError",i.Deactivate="Web3ReactDeactivate"})(C||(C={}));const le={clientId:"e1adce863fe287bb6cf0e3fd90bdb77f",chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY]},pe={storageKey:"decentraland-connect-storage-key",[l.ProviderType.INJECTED]:{},[l.ProviderType.FORTMATIC]:{apiKeys:{[h.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[h.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:A(l.ProviderType.FORTMATIC)},[l.ProviderType.NETWORK]:{urls:A(l.ProviderType.NETWORK)},[l.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:A(l.ProviderType.WALLET_LINK)},[l.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:A(l.ProviderType.WALLET_CONNECT_V2),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.ARBITRUM_MAINNET,h.ChainId.OPTIMISM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},[l.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:A(l.ProviderType.MAGIC),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.OPTIMISM_MAINNET,h.ChainId.ARBITRUM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},[l.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:A(l.ProviderType.MAGIC),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.OPTIMISM_MAINNET,h.ChainId.ARBITRUM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},thirdweb:le};function I(){return pe}function A(i){const n={[h.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[h.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[h.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[h.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[h.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[h.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[h.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[h.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[h.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let e="";switch(i){case l.ProviderType.WALLET_LINK:e="walletlink";break;case l.ProviderType.FORTMATIC:e="fortmatic";break;case l.ProviderType.MAGIC:e="magic";break;case l.ProviderType.MAGIC_TEST:e="magic";break;case l.ProviderType.WALLET_CONNECT_V2:e="walletconnect-v2";break;case l.ProviderType.THIRDWEB:e="thirdweb";break}if(e){const t=Object.keys(n);for(const r of t)n[r]+=`?project=${e}`}return n}var $=he();const je=ue($);function fe(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n}var E=(function(i){fe(n,i);function n(t){var r,o=t===void 0?{}:t,s=o.supportedChainIds;return r=i.call(this)||this,r.supportedChainIds=s,r}var e=n.prototype;return e.emitUpdate=function(r){this.emit(C.Update,r)},e.emitError=function(r){this.emit(C.Error,r)},e.emitDeactivate=function(){this.emit(C.Deactivate)},n})($.EventEmitter);class z extends E{constructor(e){const t=I()[g.ProviderType.FORTMATIC],r=Object.keys(t.apiKeys).map(o=>Number(o));if(!r.includes(e))throw new Error(`Invariant error: Unsupported chainId ${e}`);super({supportedChainIds:r});d(this,"apiKey");d(this,"chainId");d(this,"rpcUrl");d(this,"fortmatic");this.apiKey=t.apiKeys[e],this.chainId=e,this.rpcUrl=t.urls[e]}async activate(){if(!this.fortmatic){const{default:t}=await m(async()=>{const{default:r}=await import("./fortmatic-Cd8UWzR7.js").then(o=>o.f);return{default:r}},__vite__mapDeps([0,1]));this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const e=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:e}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(e=>e[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function j(){return j=Object.assign||function(i){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}return i},j.apply(this,arguments)}function q(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n}function D(i){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},D(i)}function L(i,n){return L=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},L(i,n)}function ve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function O(i,n,e){return ve()?O=Reflect.construct:O=function(r,o,s){var a=[null];a.push.apply(a,o);var c=Function.bind.apply(r,a),u=new c;return s&&L(u,s.prototype),u},O.apply(null,arguments)}function we(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function S(i){var n=typeof Map=="function"?new Map:void 0;return S=function(t){if(t===null||!we(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return O(t,arguments,D(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),L(r,t)},S(i)}function b(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function P(i,n){try{var e=i()}catch(t){return n(t)}return e&&e.then?e.then(void 0,n):e}function y(i){return i.hasOwnProperty("result")?i.result:i}var k=(function(i){q(n,i);function n(){var e;return e=i.call(this)||this,e.name=e.constructor.name,e.message="No Ethereum provider was found on window.ethereum.",e}return n})(S(Error)),ge=(function(i){q(n,i);function n(){var e;return e=i.call(this)||this,e.name=e.constructor.name,e.message="The user rejected the request.",e}return n})(S(Error)),me=(function(i){q(n,i);function n(t){var r;return r=i.call(this,t)||this,r.handleNetworkChanged=r.handleNetworkChanged.bind(b(r)),r.handleChainChanged=r.handleChainChanged.bind(b(r)),r.handleAccountsChanged=r.handleAccountsChanged.bind(b(r)),r.handleClose=r.handleClose.bind(b(r)),r}var e=n.prototype;return e.handleChainChanged=function(r){this.emitUpdate({chainId:r,provider:window.ethereum})},e.handleAccountsChanged=function(r){r.length===0?this.emitDeactivate():this.emitUpdate({account:r[0]})},e.handleClose=function(r,o){this.emitDeactivate()},e.handleNetworkChanged=function(r){this.emitUpdate({chainId:r,provider:window.ethereum})},e.activate=function(){try{var r=function(f){if(o)return f;function p(){return j({provider:window.ethereum},a?{account:a}:{})}var v=(function(){if(!a)return Promise.resolve(window.ethereum.enable().then(function(T){return T&&y(T)[0]})).then(function(T){a=T})})();return v&&v.then?v.then(p):p(v)},o=!1,s=this;if(!window.ethereum)throw new k;window.ethereum.on&&(window.ethereum.on("chainChanged",s.handleChainChanged),window.ethereum.on("accountsChanged",s.handleAccountsChanged),window.ethereum.on("close",s.handleClose),window.ethereum.on("networkChanged",s.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var a,c=P(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(u){return y(u)[0]})).then(function(u){a=u})},function(u){if(u.code===4001)throw new ge});return Promise.resolve(c&&c.then?c.then(r):r(c))}catch(u){return Promise.reject(u)}},e.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(r){return Promise.reject(r)}},e.getChainId=function(){try{var r=function(){function c(){if(!o)try{o=y(window.ethereum.send({method:"net_version"}))}catch{}return o||(window.ethereum.isDapper?o=y(window.ethereum.cachedResults.net_version):o=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),o}var u=(function(){if(!o){var f=P(function(){return Promise.resolve(window.ethereum.send("net_version").then(y)).then(function(p){o=p})},function(){});if(f&&f.then)return f.then(function(){})}})();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new k;var o,s=P(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(y)).then(function(a){o=a})},function(){});return Promise.resolve(s&&s.then?s.then(r):r(s))}catch(a){return Promise.reject(a)}},e.getAccount=function(){try{var r=function(){function c(){return o||(o=y(window.ethereum.send({method:"eth_accounts"}))[0]),o}var u=(function(){if(!o){var f=P(function(){return Promise.resolve(window.ethereum.enable().then(function(p){return y(p)[0]})).then(function(p){o=p})},function(){});if(f&&f.then)return f.then(function(){})}})();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new k;var o,s=P(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(a){return y(a)[0]})).then(function(a){o=a})},function(){});return Promise.resolve(s&&s.then?s.then(r):r(s))}catch(a){return Promise.reject(a)}},e.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},e.isAuthorized=function(){try{return window.ethereum?Promise.resolve(P(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(r){return y(r).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(r){return Promise.reject(r)}},n})(E);class G extends Error{constructor(){super("There was an error unlocking your wallet. Please be sure your wallet is unlocked and try again."),this.name="ErrorUnlockingWallet"}}const Ie=60*1e3;class J extends me{constructor(n){super({supportedChainIds:[n]})}async activate(){const n=new Promise((t,r)=>{setTimeout(()=>{r(new G)},Ie)}),e=super.activate();return Promise.race([e,n])}}var ye="Invariant failed";function V(i,n){throw new Error(ye)}function Y(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,N(i,n)}function K(i){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},K(i)}function N(i,n){return N=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},N(i,n)}function Ce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function R(i,n,e){return Ce()?R=Reflect.construct:R=function(r,o,s){var a=[null];a.push.apply(a,o);var c=Function.bind.apply(r,a),u=new c;return s&&N(u,s.prototype),u},R.apply(null,arguments)}function Ee(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function W(i){var n=typeof Map=="function"?new Map:void 0;return W=function(t){if(t===null||!Ee(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return R(t,arguments,K(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),N(r,t)},W(i)}var U=(function(i){Y(n,i);function n(e,t,r){var o;return o=i.call(this)||this,o.code=t,o.data=r,o.name=o.constructor.name,o.message=e,o}return n})(W(Error)),Ae=function(n,e){var t=this,r=this;this.isMetaMask=!1,this.sendAsync=function(s,a){console.log("sendAsync",s.method,s.params),r.request(s.method,s.params).then(function(c){return a(null,{jsonrpc:"2.0",id:s.id,result:c})}).catch(function(c){return a(c,null)})},this.request=function(s,a){try{return typeof s!="string"&&(a=s.params,s=s.method),Promise.resolve(fetch(t.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:s,params:a}),headers:{"Content-Type":"application/json"}})).then(function(c){if(!c.ok)throw new U(c.status+": "+c.statusText,-32e3);return Promise.resolve(c.json()).then(function(u){if("error"in u){var f,p,v;throw new U(u==null||(f=u.error)==null?void 0:f.message,u==null||(p=u.error)==null?void 0:p.code,u==null||(v=u.error)==null?void 0:v.data)}else{if("result"in u)return u.result;throw new U("Received unexpected JSON-RPC response to "+s+" request.",-32e3,u)}})})}catch(c){return Promise.reject(c)}},this.chainId=n,this.url=e;var o=new URL(e);this.host=o.host,this.path=o.pathname},Te=(function(i){Y(n,i);function n(t){var r,o=t.urls,s=t.defaultChainId;return s||Object.keys(o).length===1||V(),r=i.call(this,{supportedChainIds:Object.keys(o).map(function(a){return Number(a)})})||this,r.currentChainId=s||Number(Object.keys(o)[0]),r.providers=Object.keys(o).reduce(function(a,c){return a[Number(c)]=new Ae(Number(c),o[Number(c)]),a},{}),r}var e=n.prototype;return e.activate=function(){try{var r=this;return Promise.resolve({provider:r.providers[r.currentChainId],chainId:r.currentChainId,account:null})}catch(o){return Promise.reject(o)}},e.getProvider=function(){try{var r=this;return Promise.resolve(r.providers[r.currentChainId])}catch(o){return Promise.reject(o)}},e.getChainId=function(){try{var r=this;return Promise.resolve(r.currentChainId)}catch(o){return Promise.reject(o)}},e.getAccount=function(){return Promise.resolve(null)},e.deactivate=function(){},e.changeChainId=function(r){Object.keys(this.providers).includes(r.toString())||V(),this.currentChainId=r,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:r})},n})(E);class Q extends Te{constructor(n){super({urls:I()[l.ProviderType.NETWORK].urls,defaultChainId:n})}}function x(){return x=Object.assign||function(i){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}return i},x.apply(this,arguments)}function Pe(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,F(i,n)}function F(i,n){return F=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},F(i,n)}function B(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}var _e=1,Ne=(function(i){Pe(n,i);function n(t){var r,o=t.url,s=t.appName,a=t.appLogoUrl,c=t.darkMode,u=t.supportedChainIds;return r=i.call(this,{supportedChainIds:u})||this,r.url=o,r.appName=s,r.appLogoUrl=a,r.darkMode=c||!1,r.handleChainChanged=r.handleChainChanged.bind(B(r)),r.handleAccountsChanged=r.handleAccountsChanged.bind(B(r)),r}var e=n.prototype;return e.activate=function(){try{var r=this,o=function(){return Promise.resolve(r.provider.request({method:"eth_requestAccounts"})).then(function(c){var u=c[0];return r.provider.on("chainChanged",r.handleChainChanged),r.provider.on("accountsChanged",r.handleAccountsChanged),{provider:r.provider,account:u}})},s=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)r.provider=window.ethereum;else{var a=(function(){if(!r.walletLink)return Promise.resolve(m(()=>import("./index-CNbMuq6z.js").then(c=>c.i),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11])).then(function(c){var u;return(u=c==null?void 0:c.default)!=null?u:c})).then(function(c){r.walletLink=new c(x({appName:r.appName,darkMode:r.darkMode},r.appLogoUrl?{appLogoUrl:r.appLogoUrl}:{})),r.provider=r.walletLink.makeWeb3Provider(r.url,_e)})})();if(a&&a.then)return a.then(function(){})}})();return Promise.resolve(s&&s.then?s.then(o):o(s))}catch(a){return Promise.reject(a)}},e.getProvider=function(){try{var r=this;return Promise.resolve(r.provider)}catch(o){return Promise.reject(o)}},e.getChainId=function(){try{var r=this;return Promise.resolve(r.provider.chainId)}catch(o){return Promise.reject(o)}},e.getAccount=function(){try{var r=this;return Promise.resolve(r.provider.request({method:"eth_requestAccounts"})).then(function(o){return o[0]})}catch(o){return Promise.reject(o)}},e.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},e.close=function(){try{var r=this;return r.provider.close(),r.emitDeactivate(),Promise.resolve()}catch(o){return Promise.reject(o)}},e.handleChainChanged=function(r){this.emitUpdate({chainId:r})},e.handleAccountsChanged=function(r){this.emitUpdate({account:r[0]})},n})(E);class X extends Ne{constructor(n){const e=I()[g.ProviderType.WALLET_LINK],t=e.urls[n];if(!t)throw new Error(`Unsupported chainId for WalletLink: ${n}. Supported chains: ${Object.keys(e.urls).join(", ")}`);super({url:t,appName:e.appName,supportedChainIds:[n]})}}class Me{}class Z extends Me{get(n){const e=window.localStorage.getItem(n);return e===null?void 0:e}set(n,e){window.localStorage.setItem(n,e)}remove(n){window.localStorage.removeItem(n)}removeRegExp(n){for(let e=localStorage.length-1;e>=0;e--){const t=localStorage.key(e);t&&n.test(t)&&localStorage.removeItem(t)}}}const be={[g.ChainId.ETHEREUM_MAINNET]:"mainnet",[g.ChainId.ETHEREUM_SEPOLIA]:"sepolia",[g.ChainId.MATIC_MAINNET]:"polygon",[g.ChainId.MATIC_AMOY]:"polygonAmoy",[g.ChainId.ARBITRUM_MAINNET]:"arbitrum",[g.ChainId.OPTIMISM_MAINNET]:"optimism",[g.ChainId.AVALANCHE_MAINNET]:"avalanche",[g.ChainId.BSC_MAINNET]:"bsc",[g.ChainId.FANTOM_MAINNET]:"fantom"},w=class w extends E{constructor(e){super({supportedChainIds:w.configuration.chains});d(this,"desiredChainId");d(this,"appKit");d(this,"provider");d(this,"accountUnsubscribe");d(this,"networkUnsubscribe");d(this,"initAppKit",async()=>{if(w.sharedAppKit)return this.appKit=w.sharedAppKit,this.appKit;const{createAppKit:e}=await m(async()=>{const{createAppKit:s}=await import("./index-CuBLDtFZ.js").then(a=>a.h);return{createAppKit:s}},__vite__mapDeps([12,13,1,3,5,4,11,14,15,16,17,18,19,20,21,22,23])),{WagmiAdapter:t}=await m(async()=>{const{WagmiAdapter:s}=await import("./index-Djpq4q5g.js").then(a=>a.b);return{WagmiAdapter:s}},__vite__mapDeps([24,15,3,1,16,5,17,18,13,4,11,14,25,26,6,27,28,29])),r=await this.getNetworks(),o=new t({networks:r,projectId:w.configuration.projectId});return this.appKit=e({adapters:[o],projectId:w.configuration.projectId,networks:r,defaultNetwork:r[0],metadata:{name:"Decentraland",description:"Decentraland - Virtual World",url:typeof window<"u"?window.location.origin:"https://decentraland.org",icons:["https://decentraland.org/favicon.ico"]},themeMode:"dark",themeVariables:{"--w3m-z-index":3e3},features:{analytics:!1,email:!1,socials:!1,onramp:!1,swaps:!1},enableInjected:!0,enableEIP6963:!0}),w.sharedAppKit=this.appKit,await this.waitForSessionRestore(),this.appKit});d(this,"waitForSessionRestore",async()=>{const e=this.appKit;if(!e)return;const t=e.getAccount();if((t==null?void 0:t.status)==="connected"||(t==null?void 0:t.status)==="disconnected")return;const r=t!=null&&t.status?5e3:500;return new Promise(o=>{const s=setTimeout(()=>{a==null||a(),o()},r),a=e.subscribeAccount(c=>{((c==null?void 0:c.status)==="connected"||(c==null?void 0:c.status)==="disconnected")&&(clearTimeout(s),a==null||a(),o())},"eip155")})});d(this,"validateRestoredSession",async e=>{try{const t=e.getWalletProvider();return t?(await t.request({method:"eth_chainId"}),!0):!1}catch(t){return w.isStaleSessionError(t)?!1:(console.warn("Error validating WalletConnect session:",t),!0)}});d(this,"openModalAndWaitForConnection",async()=>{const e=this.requireAppKit(),t=()=>new Promise((r,o)=>{let s=!1;const a=(p,v)=>{s||(s=!0,clearTimeout(c),p==null||p(),v==null||v())},c=setTimeout(()=>{a(),o(new Error("Connection timeout"))},3e5),u=e.subscribeAccount(p=>{p!=null&&p.isConnected&&(p!=null&&p.address)&&(a(u,f),r(p.address))},"eip155"),f=e.subscribeState(p=>{!p.open&&!e.getAddress("eip155")&&(a(u,f),o(new Error("User closed the modal without connecting")))})});try{await e.open({view:"Connect"}),await t()}catch(r){if(w.isStaleSessionError(r)){if(console.warn("Stale session detected, retrying connection..."),w.clearStorage(),await this.initAppKit(),!this.appKit)throw new Error("AppKit reinitialization failed");await this.appKit.open({view:"Connect"}),await t()}else throw r}});d(this,"activate",async()=>{try{await this.initAppKit()}catch(c){if(console.error("Error initializing AppKit",c),w.isStaleSessionError(c))console.warn("WalletConnect session is stale, clearing storage and retrying..."),w.clearStorage(),await this.initAppKit();else throw c}const e=this.requireAppKit(),t=e.getAccount();(t==null?void 0:t.status)==="connected"&&(t==null?void 0:t.address)?await this.validateRestoredSession(e)||(console.warn("Restored WalletConnect session is stale, clearing and prompting reconnection..."),w.clearStorage(),await this.initAppKit(),await this.openModalAndWaitForConnection()):await this.openModalAndWaitForConnection();const o=e.getWalletProvider();if(!o)throw new Error("Failed to get wallet provider after connection");this.provider=o,this.accountUnsubscribe=e.subscribeAccount(c=>{c!=null&&c.address&&this.handleAccountsChanged([c.address])},"eip155"),this.networkUnsubscribe=e.subscribeCaipNetworkChange(c=>{c!=null&&c.id&&this.handleChainChanged(c.id)});const s=e.getAddress("eip155");return{chainId:e.getChainId()||this.desiredChainId,account:s||null,provider:this.provider}});d(this,"getProvider",async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider});d(this,"getChainId",async()=>this.requireAppKit().getChainId()??this.desiredChainId);d(this,"getAccount",async()=>this.requireAppKit().getAddress("eip155")??null);d(this,"getWalletName",()=>{var e,t,r;return(r=(t=(e=this.appKit)==null?void 0:e.getWalletInfo)==null?void 0:t.call(e,"eip155"))==null?void 0:r.name});d(this,"deactivate",()=>{});d(this,"clearInstance",()=>{var t,r;const e=this.provider;if(e){this.provider=void 0;try{(t=this.accountUnsubscribe)==null||t.call(this),(r=this.networkUnsubscribe)==null||r.call(this)}catch(o){console.warn("Error unsubscribing from AppKit events:",o)}return this.accountUnsubscribe=void 0,this.networkUnsubscribe=void 0,e}});d(this,"close",async()=>{var t;if(this.clearInstance()){try{await((t=this.appKit)==null?void 0:t.disconnect())}catch(r){console.warn("Error during WalletConnect disconnect:",r)}this.appKit=void 0}});d(this,"handleAccountsChanged",e=>{this.emitUpdate({account:e[0]})});d(this,"handleChainChanged",e=>{this.emitUpdate({chainId:e})});d(this,"handleDisconnect",()=>{this.clearInstance(),this.emitDeactivate()});this.desiredChainId=e}requireAppKit(){if(!this.appKit)throw new Error("AppKit is not initialized");return this.appKit}static isStaleSessionError(e){if(e instanceof Error){const t=e.message.toLowerCase();return t.includes("no matching key")||t.includes("session topic doesn't exist")||t.includes("missing or invalid")||t.includes("expired")||t.includes("user rejected methods")||t.includes("is not configured")||t.includes("cannot read properties")||t.includes("undefined is not an object")}return!1}async getNetworks(){const e=w.configuration.chains,t=await m(()=>import("./networks-a6Oqotld.js"),__vite__mapDeps([30,18,5,1,31,32,25,13,3,4,11,14,33,34,29])),r=e.map(s=>{const a=be[s];if(a)return t[a]}).filter(s=>s!==void 0);if(r.length===0)throw new Error("No supported networks found for WalletConnect");const o=r.find(s=>s.id===this.desiredChainId);if(o){const s=r.filter(a=>a.id!==this.desiredChainId);return[o,...s]}return[r[0],...r.slice(1)]}};d(w,"configuration",I()[g.ProviderType.WALLET_CONNECT_V2]),d(w,"clearStorage",(e=new Z)=>{e.removeRegExp(new RegExp("^wc@2:")),e.removeRegExp(new RegExp("^@appkit")),w.sharedAppKit=null}),d(w,"sharedAppKit",null);let _=w;class H extends E{constructor(e,t=!1){super({supportedChainIds:I()[g.ProviderType.MAGIC].chains});d(this,"isTest");d(this,"chainId");d(this,"account");d(this,"magic");d(this,"activate",async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const t=await this.getProvider(),r=await t.request({method:"eth_accounts"});return this.account=r[0]??null,{provider:t,chainId:this.chainId,account:this.account}});d(this,"getProvider",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const e=await this.magic.wallet.getProvider();return{...e,isMagic:!0,request:new Proxy(e.request,{apply:async(t,r,o)=>{var s,a,c;if(((s=o[0])==null?void 0:s.method)==="wallet_switchEthereumChain")try{const u=parseInt((c=(a=o[0])==null?void 0:a.params[0])==null?void 0:c.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(u)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(u),this.emitUpdate({chainId:u}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return t.bind(e)(...o)}}),sendAsync:new Proxy(e.send,{apply:async(t,r,o)=>t.bind(e)(...o)})}});d(this,"getChainId",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId});d(this,"getAccount",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account});d(this,"getEmail",async()=>{try{if(!this.magic||!await this.magic.user.isLoggedIn())return;const t=await this.magic.user.getInfo();return(t==null?void 0:t.email)??void 0}catch{return}});d(this,"deactivate",()=>{});d(this,"buildMagicInstance",async e=>{const{Magic:t}=await m(async()=>{const{Magic:a}=await import("./index-C7fDOFW2.js");return{Magic:a}},__vite__mapDeps([35,5,1,36])),{OAuthExtension:r}=await m(async()=>{const{OAuthExtension:a}=await import("./index-C5UkgriS.js");return{OAuthExtension:a}},__vite__mapDeps([37,36,5,1,38,7,8,4,10,3])),o=I()[this.isTest?g.ProviderType.MAGIC_TEST:g.ProviderType.MAGIC],s=o.urls[e];if(!s)throw new Error(`Unsupported chainId for Magic: ${e}. Supported chains: ${Object.keys(o.urls).join(", ")}`);return new t(o.apiKey,{extensions:[new r],network:{rpcUrl:s,chainId:e}})});this.isTest=t,this.chainId=e,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class ee extends H{constructor(n){super(n,!0)}}class te extends E{constructor(e){var t;super({supportedChainIds:((t=I().thirdweb)==null?void 0:t.chains)??[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA]});d(this,"chainId");d(this,"client");d(this,"wallet");d(this,"chain");d(this,"eip1193Provider");d(this,"activate",async()=>{const e=await this.getClient(),t=await this.getWallet();let r;try{r=await t.autoConnect({client:e})}catch{throw new Error("Thirdweb: No active session. User must authenticate first.")}if(!r)throw new Error("Thirdweb: No active session. User must authenticate first.");const o=await this.getChain(),{EIP1193:s}=await m(async()=>{const{EIP1193:u}=await import("./wallets-CyXKPtLh.js").then(f=>f.Q);return{EIP1193:u}},__vite__mapDeps([39,40,41,42,5,1,13,3,4,11,14,43,44,45,46,47,48,49,50,51,27,52,53,54,19,16,20,55,21]));return this.eip1193Provider=s.toProvider({wallet:t,chain:o,client:e}),{provider:await this.getProvider(),chainId:this.chainId,account:r.address}});d(this,"getProvider",async()=>{if(!this.eip1193Provider)throw new Error("Thirdweb: wallet is not connected. Call activate() first.");const e=this.eip1193Provider;return{...e,isDapper:!1,isFortmatic:!1,isMetamask:!1,isMagic:!1,isThirdweb:!0,request:new Proxy(e.request,{apply:async(t,r,o)=>{var a,c,u,f;if(((a=o[0])==null?void 0:a.method)==="wallet_switchEthereumChain"){const p=(f=(u=(c=o[0])==null?void 0:c.params)==null?void 0:u[0])==null?void 0:f.chainId,v=parseInt(p,16);if(this.supportedChainIds&&!this.supportedChainIds.includes(v))throw new Error("Thirdweb: unsupported chain");this.chainId=v,this.chain=null,this.eip1193Provider=null;const T=await this.getClient(),ne=await this.getWallet(),ie=await this.getChain(),{EIP1193:oe}=await m(async()=>{const{EIP1193:ae}=await import("./wallets-CyXKPtLh.js").then(se=>se.Q);return{EIP1193:ae}},__vite__mapDeps([39,40,41,42,5,1,13,3,4,11,14,43,44,45,46,47,48,49,50,51,27,52,53,54,19,16,20,55,21]));return this.eip1193Provider=oe.toProvider({wallet:ne,chain:ie,client:T}),this.emitUpdate({chainId:v}),null}return Reflect.apply(t,e,o)}}),sendAsync:new Proxy(e.request,{apply:async(t,r,o)=>Reflect.apply(t,e,o)})}});d(this,"getChainId",async()=>this.chainId);d(this,"getAccount",async()=>{if(!this.wallet)return null;try{const e=this.wallet.getAccount();return(e==null?void 0:e.address)??null}catch{return null}});d(this,"getEmail",async()=>{try{const e=await this.getClient(),{getUserEmail:t}=await m(async()=>{const{getUserEmail:o}=await import("./in-app-CW-TClWX.js");return{getUserEmail:o}},__vite__mapDeps([56,41,42,5,1,47,46,13,3,4,11,14,57,58]));return await t({client:e})??void 0}catch{return}});d(this,"deactivate",()=>{});this.chainId=e,this.client=null,this.wallet=null,this.chain=null,this.eip1193Provider=null}async getClient(){if(this.client)return this.client;let e;try{e=await m(()=>import("./thirdweb-CvWXAZKa.js").then(r=>r.t),__vite__mapDeps([59,42,5,1,41,40,13,3,4,11,14,43,44,45,60,61,62,63,64,65,54,66,67,68,69,53]))}catch{throw new Error("Thirdweb: thirdweb package is not installed.")}const t=I().thirdweb;return this.client=e.createThirdwebClient({clientId:t.clientId}),this.client}async getWallet(){if(this.wallet)return this.wallet;let e;try{e=await m(()=>import("./wallets-CyXKPtLh.js").then(t=>t.Q),__vite__mapDeps([39,40,41,42,5,1,13,3,4,11,14,43,44,45,46,47,48,49,50,51,27,52,53,54,19,16,20,55,21]))}catch{throw new Error("Thirdweb: thirdweb package is not installed. Run: npm install thirdweb")}return this.wallet=e.inAppWallet(),this.wallet}async getChain(){if(this.chain)return this.chain;const e=await m(()=>import("./chains-DfMERfnW.js"),__vite__mapDeps([70,42,5,1,68,50]));return this.chain=e.defineChain(this.chainId),this.chain}async close(){this.wallet&&await this.wallet.disconnect(),this.wallet=null,this.chain=null,this.eip1193Provider=null}}class M{constructor(n){d(this,"provider");d(this,"id",0);d(this,"on",(n,e)=>this.provider.on(n,e));d(this,"emit",(n,...e)=>this.provider.emit(n,e));d(this,"removeListener",(n,e)=>this.provider.removeListener(n,e));d(this,"request",async({method:n,params:e})=>this.isModernProvider()?this.provider.request({method:n,params:e}):this.send(n,e));d(this,"sendAsync",async(n,e)=>this.hasSendAsync()?this.provider.sendAsync(n,(t,r)=>{r&&!Object.prototype.hasOwnProperty.call(r,"result")?e(t,{id:0,jsonrpc:"2.0",result:r}):e(t,r)}):this.send(n,e));this.provider=n}static adapt(n){const e=new M(n);return{...n,on:e.on,emit:e.emit,removeListener:e.removeListener,request:e.request,sendAsync:e.sendAsync,send:e.send.bind(e)}}async send(n,e){let t,r,o;const s=typeof e=="function";if(s){const a=n;r=a.params||[],t=a.method,o=e}else t=n,r=e||[],o=(a,c)=>{if(a)throw a;return c};if(this.isModernProvider()){const[a,c]=await this.provider.request({method:t,params:r}).then(f=>[null,f]).catch(f=>[f,void 0]);return o(a,s?{id:"",jsonrpc:"2.0",result:c}:c)}else{this.patchOldMobile();const[a,c]=s?await new Promise(u=>this.provider.send(n,(f,p)=>{u([f,p])})):await new Promise(u=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:t,params:r},(f,p)=>{const v=p;u([(v==null?void 0:v.error)??f,(v==null?void 0:v.result)??p])}));return o(a,c)}}isModernProvider(){return"request"in this.provider&&typeof this.provider.request=="function"}hasSendAsync(){return typeof this.provider.sendAsync=="function"}patchOldMobile(){this.provider&&!this.provider.isDapper&&!this.provider.isFortmatic&&!this.provider.isMetamask&&this.hasSendAsync()&&this.provider.send!==this.provider.sendAsync&&(this.provider.send=this.provider.sendAsync.bind(this.provider))}}class re{constructor(n){d(this,"storage");d(this,"connector");d(this,"promiseOfConnection");d(this,"getWalletName",()=>{if(this.connector instanceof _)return this.connector.getWalletName()});d(this,"clearConnectionData",()=>{const{storageKey:n}=I();this.storage.remove(n),_.clearStorage(this.storage)});d(this,"handleWeb3ReactDeactivate",async()=>{try{await this.disconnect()}catch(n){console.error(n)}});this.storage=n}async connect(n,e=h.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(a){console.error("Error disconnecting previous connection",a)}const t=this.buildConnector(n,e);t.on(C.Deactivate,this.handleWeb3ReactDeactivate);let{provider:r,account:o}={};try{const a=await t.activate();r=a.provider,o=a.account}catch(a){throw console.error("Error activating the connector",a),a}(n===l.ProviderType.MAGIC||n===l.ProviderType.MAGIC_TEST||n===l.ProviderType.THIRDWEB)&&t.on(C.Update,({chainId:a})=>{a&&this.setConnectionData(n,a)});let s=e;if(n===l.ProviderType.INJECTED){const a=await r.request({method:"eth_chainId"});s=a?parseInt(a,16):s}return this.connector=t,this.setConnectionData(n,s),{provider:M.adapt(r),providerType:n,account:o||"",chainId:s}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const n=this.getConnectionData();if(!n)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");if(this.connector){const[t,r]=await Promise.all([this.connector.getProvider(),this.connector.getAccount()]);return{provider:t,providerType:n.providerType,chainId:n.chainId,account:r||""}}let e;try{e=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(n.providerType,n.chainId))}finally{this.promiseOfConnection=void 0}return{...e,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const n=[l.ProviderType.FORTMATIC,l.ProviderType.WALLET_CONNECT,l.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?n.unshift(l.ProviderType.INJECTED):n.unshift(l.ProviderType.METAMASK_MOBILE),n}async disconnect(){this.connector&&(this.connector.removeAllListeners(C.Deactivate),this.connector.removeAllListeners(C.Update),this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async getEmail(){const n=this.connector;if(n!=null&&n.getEmail)try{return await n.getEmail()}catch{return}}async createProvider(n,e=h.ChainId.ETHEREUM_MAINNET){const r=await this.buildConnector(n,e).getProvider();return M.adapt(r)}buildConnector(n,e){switch(n){case l.ProviderType.INJECTED:return new J(e);case l.ProviderType.FORTMATIC:return new z(e);case l.ProviderType.MAGIC:return new H(e);case l.ProviderType.MAGIC_TEST:return new ee(e);case l.ProviderType.WALLET_LINK:return new X(e);case l.ProviderType.NETWORK:return new Q(e);case l.ProviderType.WALLET_CONNECT_V2:return new _(e);case l.ProviderType.THIRDWEB:return new te(e);default:throw new Error(`Invalid provider ${n}`)}}getConnectionData(){const{storageKey:n}=I(),e=this.storage.get(n);try{return e?JSON.parse(e):void 0}catch(t){console.error("Error parsing connection data",t);return}}storeConnectionData(n,e){this.setConnectionData(n,e)}setConnectionData(n,e){const{storageKey:t}=I(),r=JSON.stringify({providerType:n,chainId:e});this.storage.set(t,r)}isClosableConnector(){return this.connector&&"close"in this.connector}}const Oe=new re(new Z),De=Object.freeze(Object.defineProperty({__proto__:null,AbstractConnector:E,ConnectionManager:re,ErrorUnlockingWallet:G,FortmaticConnector:z,InjectedConnector:J,MagicConnector:H,MagicTestConnector:ee,NetworkConnector:Q,ProviderAdapter:M,ThirdwebConnector:te,WalletConnectV2Connector:_,WalletLinkConnector:X,connection:Oe,getConfiguration:I,getRpcUrls:A},Symbol.toStringTag,{value:"Module"}));export{je as N,Oe as c,$ as e,De as i};
3
+ //# sourceMappingURL=index-BVuZOuvn.js.map
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/native-vLlkzvxI.js","_assets/sentry-RCtiQtjC.js","_assets/react-G9L2um0r.js"])))=>i.map(i=>d[i]);
2
- import{p as gt,b as Yt,i as Qt,I as Zt,m as bt,s as ut,A as D,e as Xt,g as U,d as te,f as N,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as le,x as Z,y as me,z as fe,B as pe,C as $,D as he,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as Ie,M as Te,N as St,O as At,P as Ce,Q as Pt,R as _t,S as Rt,T as ve,U as dt,V as qt,W as Se,X as Ae,Y as Ft,Z as Pe,_ as Ut,$ as K,a0 as _e,a1 as kt,a2 as Re,a3 as qe,a4 as lt,a5 as Fe,a6 as Ue,a7 as ke,a8 as Be,a9 as Ne,aa as Bt,ab as Le}from"./parseSignature-xueulJgr.js";import{ac as Pr,ad as _r,ae as Rr,af as qr,ag as Fr,ah as Ur,ai as kr,aj as Br,ak as Nr,al as Lr,am as Mr,an as Dr,ao as zr,ap as Gr,aq as $r,ar as Hr,as as Or,at as jr,au as Wr,av as Vr,aw as Kr,ax as Jr,ay as Yr,az as Qr,aA as Zr,aB as Xr,aC as ts,aD as es,aE as as,aF as ns,aG as rs,aH as ss,aI as os,aJ as is,aK as cs,aL as us,aM as ds,aN as ls,aO as ms,aP as fs,aQ as ps,aR as hs,aS as ys,aT as gs,aU as bs,aV as ws,aW as xs,aX as Es,aY as Is,aZ as Ts,a_ as Cs,a$ as vs,b0 as Ss,b1 as As,b2 as Ps,b3 as _s,b4 as Rs,b5 as qs,b6 as Fs,b7 as Us,b8 as ks,b9 as Bs,ba as Ns,bb as Ls,bc as Ms,bd as Ds,be as zs,bf as Gs,bg as $s,bh as Hs,bi as Os,bj as js,bk as Ws,bl as Vs,bm as Ks,bn as Js,bo as Ys,bp as Qs,bq as Zs,br as Xs,bs as to,bt as eo,bu as ao,bv as no,bw as ro,bx as so,by as oo,bz as io,br as co,bA as uo,bB as lo,bC as mo,bD as fo,bE as po,bF as ho,bG as yo,bH as go,bH as bo,bI as wo,bJ as xo,bi as Eo,bj as Io,bK as To,bL as Co,bM as vo,bN as So,bO as Ao}from"./parseSignature-xueulJgr.js";import{R as B,b3 as k,S as Me,x as Y,a7 as De,w as ze,b4 as Ge,U as H,V as ct,W as G,B as mt,q as E,E as $e,a2 as He,b5 as j,a1 as wt,G as Nt,b6 as Lt,d as Mt,A as R,m as F,b7 as A,C as Oe,I as je,b8 as We,b9 as xt,y as Ve,ba as Ke,bb as Je,bc as Ye,bd as Et}from"./prepare-contract-call-a0euYGw1.js";import{be as _o,O as Ro,a8 as qo,bf as Fo,bg as Uo,bh as ko,bi as Bo,bj as No,a9 as Lo,bk as Mo,J as Do,M as zo,bl as Go,bm as $o,bn as Ho,F as Oo,Q as jo,N as Wo,bo as Vo,bp as Ko,bq as Jo,br as Yo,bs as Qo,bt as Zo,bu as Xo,bv as ti,bw as ei,bx as ai,by as ni,bz as ri,bA as si,bB as oi,bC as ii,bD as ci,bE as ui,bF as di,bG as li,bH as mi,j as fi,bI as pi,bJ as hi,bK as yi,bL as gi,K as bi,bM as wi,t as xi,bM as Ei,bN as Ii,bO as Ti,bP as Ci,bQ as vi,bR as Si,bS as Ai,bT as Pi,bU as _i,K as Ri,bM as qi,bU as Fi,t as Ui,bM as ki}from"./prepare-contract-call-a0euYGw1.js";import{u as ft}from"./to-serializable-transaction-DeE9YtTe.js";import{b as Ni,B as Li,C as Mi,D as Di,E as zi,m as Gi,n as $i,F as Hi,s as Oi,a as ji}from"./to-serializable-transaction-DeE9YtTe.js";import{w as Qe,h as Ze,g as Xe,v as ta,s as ea}from"./hashTypedData-ChT5ZbgL.js";import{I as Vi,a as Ki,b as Ji,d as Yi,c as Qi,e as Zi}from"./hashTypedData-ChT5ZbgL.js";import{T as aa,a as Q,W as It,b as na,U as ra,R as sa}from"./rpc-HuV61zaY.js";import{A as tc,c as ec,B as ac,C as nc,D as rc,H as sc,I as oc,d as ic,e as cc,f as uc,J as dc,L as lc,M as mc,h as fc,P as pc,i as hc,j as yc,k as gc,l as bc,m as wc,S as xc,n as Ec,o as Ic,p as Tc,q as Cc,r as vc,s as Sc}from"./rpc-HuV61zaY.js";import{_ as oa}from"./index-LDPyoGDo.js";import{t as ia,H as ca}from"./sha256-Cbk06XOV.js";import{b as Pc,h as _c,a as Rc,c as qc,d as Fc,e as Uc,f as kc,g as Bc,i as Nc,j as Lc,k as Mc,l as Dc,n as zc,o as Gc,p as $c,q as Hc,r as Oc,u as jc,v as Wc,w as Vc,x as Kc,y as Jc,z as Yc,A as Qc,B as Zc,C as Xc,D as tu,E as eu,F as au,G as nu,I as ru,J as su,K as ou,L as iu,M as cu,N as uu,O as du,P as lu,Q as mu,R as fu,S as pu,m as hu,T as yu,U as gu,V as bu,W as wu,X as xu,Y as Eu,Z as Iu,_ as Tu,$ as Cu,a0 as vu,a1 as Su,a2 as Au,a3 as Pu,a4 as _u,a5 as Ru,a6 as qu,a7 as Fu,a8 as Uu,a9 as ku,aa as Bu,ab as Nu,ac as Lu,ad as Mu,ae as Du,af as zu,ag as Gu,ah as $u,ai as Hu,aj as Ou,ak as ju,al as Wu,am as Vu,an as Ku,ao as Ju,ap as Yu,aq as Qu,ar as Zu,as as Xu,at as td,au as ed,av as ad,aw as nd,ax as rd,ay as sd,az as od,aA as id,aB as cd,aC as ud,aD as dd,aE as ld,aF as md,aG as fd,aH as pd,aI as hd,aJ as yd,aK as gd,s as bd}from"./sha256-Cbk06XOV.js";import{i as pt}from"./get-bytecode-Dgh4Jb3X.js";import{d as xd,a as Ed}from"./get-bytecode-Dgh4Jb3X.js";import{ccipRequest as Td,ccipRequest as Cd,offchainLookup as vd,offchainLookupAbiItem as Sd,offchainLookupSignature as Ad}from"./ccip-DxEPKiwF.js";import{d as _d,a as Rd,f as qd}from"./transactionReceipt-BHye7StB.js";import"./utils-u4hNmxb_.js";import"./sentry-RCtiQtjC.js";import"./react-G9L2um0r.js";import"./transaction-fETmGUb_.js";import"./dcl-schemas-CQsQxWYK.js";import"./ethers-DXUQI3Ut.js";import"./intl-AKLEHPeO.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ec6d0deb-6698-4fde-9481-110dc5c000b0",t._sentryDebugIdIdentifier="sentry-dbid-ec6d0deb-6698-4fde-9481-110dc5c000b0")}catch{}})();function Qn(t){let e;if(typeof t=="string")e=gt(t,{modifiers:bt});else{const a=Yt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Qt(s)){e=gt(s,{modifiers:bt,structs:a});break}}}if(!e)throw new Zt({param:t});return e}async function M(t,e){return M.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:u,account:d=a.account,address:c,args:i,dataSuffix:f,functionName:m,...p}=s;if(typeof d>"u")throw new D({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,h=Xt({abi:u,args:i,functionName:m});try{return await U(a,n,r)({data:`${h}${f?f.replace("0x",""):""}`,to:c,account:o,...p})}catch(l){throw te(l,{abi:u,address:c,args:i,docsPath:"/docs/contract/writeContract",functionName:m,sender:o==null?void 0:o.address})}}t.internal=e})(M||(M={}));function Zn({abi:t,address:e,client:a}){const n=a,[r,s]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],u=r!=null,d=s!=null,c={};let i=!1,f=!1,m=!1;for(const p of t)if(p.type==="function"?p.stateMutability==="view"||p.stateMutability==="pure"?i=!0:f=!0:p.type==="event"&&(m=!0),i&&f&&m)break;return u&&(i&&(c.read=new Proxy({},{get(p,o){return(...h)=>{const{args:l,options:y}=W(h);return U(r,ee,"readContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),f&&(c.simulate=new Proxy({},{get(p,o){return(...h)=>{const{args:l,options:y}=W(h);return U(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),m&&(c.createEventFilter=new Proxy({},{get(p,o){return(...h)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(h,l);return U(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.getEvents=new Proxy({},{get(p,o){return(...h)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(h,l);return U(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.watchEvent=new Proxy({},{get(p,o){return(...h)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(h,l);return U(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(c.write=new Proxy({},{get(p,o){return(...h)=>{const{args:l,options:y}=W(h);return U(s,M,"writeContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),(u||d)&&f&&(c.estimateGas=new Proxy({},{get(p,o){return(...h)=>{const{args:l,options:y}=W(h);return U(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:l,...y,account:y.account??s.account})}}})),c.address=e,c.abi=t,c}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function Tt(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Xn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=B(k(t.from));let a=B(t.nonce);return a[0]===0&&(a=new Uint8Array([])),k(`0x${Y(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=B(k(t.from)),a=Me(Tt(t.salt)?t.salt:B(t.salt),{size:32}),n="bytecodeHash"in t?Tt(t.bytecodeHash)?t.bytecodeHash:B(t.bytecodeHash):Y(t.bytecode,"bytes");return k(De(Y(ze([B("0xff"),e,a,n])),12))}function tr({chains:t,id:e}){return t.find(a=>a.id===e)}function Dt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return H(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return zt(n,e)}function zt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Ct(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Ct(t,a,192);return la(t,n,e)}function Ct(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new mt("Invalid RLP prefix")}function la(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(zt(t,a));return r}function ma(t){return E(t)&&$e(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Gt=Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)),pa=Gt.map(t=>(9*t+5)%16),$t=(()=>{const a=[[Gt],[pa]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),Ht=$t[0],Ot=$t[1],jt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),ha=Ht.map((t,e)=>t.map(a=>jt[e][a])),ya=Ot.map((t,e)=>t.map(a=>jt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function vt(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,u=s,d=this.h2|0,c=d,i=this.h3|0,f=i,m=this.h4|0,p=m;for(let o=0;o<5;o++){const h=4-o,l=ga[o],y=ba[o],w=Ht[o],g=Ot[o],C=ha[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+vt(o,s,d,i)+V[w[x]]+l,C[x])+m|0;n=m,m=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+vt(h,u,c,f)+V[g[x]]+y,b[x])+p|0;r=p,p=f,f=j(c,10)|0,c=u,u=I}}this.set(this.h1+d+f|0,this.h2+i+p|0,this.h3+m+r|0,this.h4+n+u|0,this.h0+s+c|0)}roundClean(){wt(V)}destroy(){this.destroyed=!0,wt(this.buffer),this.set(0,0,0,0,0)}}const xa=He(()=>new wa),Ea=xa;function er(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?B(t):t);return a==="bytes"?n:Nt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:u=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:c=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let m=0;const{schedule:p}=ie({id:i,fn:async()=>{const l=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&m<d){if(b)return;b=!0,m++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},c)}else l.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of l.values())(v=S.onError)==null||v.call(S,new Q({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Q({url:s}));x()},onError(v){var P,S;w=v;for(const _ of l.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,m=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:l,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},u)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};l.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Qe(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:l,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[h]]=await p();return h}async function J(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:u,onResponse:d}){const c=await oa(()=>import("./native-vLlkzvxI.js").then(o=>o.n),__vite__mapDeps([0,1,2])).then(o=>o.WebSocket),i=new c(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",m),i.removeEventListener("error",s),i.removeEventListener("open",u),r()}function m({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const h=JSON.parse(o);d(h)}catch(h){s(h)}}i.addEventListener("close",f),i.addEventListener("message",m),i.addEventListener("error",s),i.addEventListener("open",u),i.readyState===c.CONNECTING&&await new Promise((o,h)=>{i&&(i.onopen=o,i.onerror=h)});const{close:p}=i;return Object.assign(i,{close(){p.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({url:i.url,cause:new Q({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({body:o,url:i.url,cause:new Q({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await J(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Lt(t,-32)===ue}function va(t){return de(t)}function ar(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function nr(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=le(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Z({hash:me(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Z({hash:Ze({domain:e,message:a,primaryType:n,types:s}),signature:r})}function rr(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:H(s)}async function sr({address:t,hash:e,signature:a}){return pt(k(t),await Z({hash:e,signature:a}))}async function or({address:t,message:e,signature:a}){return pt(k(t),await Sa({message:e,signature:a}))}async function ir(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:u}=t;return pt(k(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:u}))}function Pa(t){const e=Lt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new pe({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?Ua(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):ka(t)}function Ra(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,p,o,h]=e;if(e.length!==10&&e.length!==13)throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,authorizationList:m,...e.length>9?{v:p,r:o,s:h}:{}},serializedTransaction:t,type:"eip7702"});const l={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(l.to=d),E(u)&&u!=="0x"&&(l.gas=A(u)),E(i)&&i!=="0x"&&(l.data=i),E(n)&&(l.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(l.value=A(c)),E(s)&&s!=="0x"&&(l.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(l.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(l.accessList=tt(f)),m.length!==0&&m!=="0x"&&(l.authorizationList=Ba(m)),we(l),{...e.length===13?O(e):void 0,...l}}function qa(t){const e=X(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,u,d,c,i,f,m,p,o,h,l,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new $({attributes:{chainId:s,nonce:u,maxPriorityFeePerGas:d,maxFeePerGas:c,gas:i,to:f,value:m,data:p,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:l,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(p)&&p!=="0x"&&(I.data=p),E(u)&&(I.nonce=u==="0x"?0:F(u)),E(m)&&m!=="0x"&&(I.value=A(m)),E(h)&&h!=="0x"&&(I.maxFeePerBlobGas=A(h)),E(c)&&c!=="0x"&&(I.maxFeePerGas=A(c)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ge({blobs:C,commitments:b,proofs:x})),be(I),{...n.length===14?O(n):void 0,...I}}function Fa(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,p,o]=e;if(!(e.length===9||e.length===12))throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,...e.length>9?{v:m,r:p,s:o}:{}},serializedTransaction:t,type:"eip1559"});const h={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(h.to=d),E(u)&&u!=="0x"&&(h.gas=A(u)),E(i)&&i!=="0x"&&(h.data=i),E(n)&&(h.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(h.value=A(c)),E(s)&&s!=="0x"&&(h.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(h.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(h.accessList=tt(f)),he(h),{...e.length===12?O(e):void 0,...h}}function Ua(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,p]=e;if(!(e.length===8||e.length===11))throw new $({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:u,value:d,data:c,accessList:i,...e.length>8?{v:f,r:m,s:p}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(u)&&u!=="0x"&&(o.to=u),E(s)&&s!=="0x"&&(o.gas=A(s)),E(c)&&c!=="0x"&&(o.data=c),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),ye(o),{...e.length===11?O(e):void 0,...o}}function ka(t){const e=Dt(t,"hex"),[a,n,r,s,u,d,c,i,f]=e;if(!(e.length===6||e.length===9))throw new $({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:u,data:d,...e.length>6?{v:c,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const m={type:"legacy"};if(E(s)&&s!=="0x"&&(m.to=s),E(r)&&r!=="0x"&&(m.gas=A(r)),E(d)&&d!=="0x"&&(m.data=d),E(a)&&(m.nonce=a==="0x"?0:F(a)),E(u)&&u!=="0x"&&(m.value=A(u)),E(n)&&n!=="0x"&&(m.gasPrice=A(n)),xe(m),e.length===6)return m;const p=E(c)&&c!=="0x"?A(c):0n;if(f==="0x"&&i==="0x")return p>0&&(m.chainId=Number(p)),m;const o=p,h=Number((o-35n)/2n);if(h>0)m.chainId=h;else if(o!==27n&&o!==28n)throw new Ee({v:o});return m.v=o,m.s=f,m.r=i,m.yParity=o%2n===0n?1:0,m}function X(t){return Dt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!Oe(n,{strict:!1}))throw new je({address:n});e.push({address:n,storageKeys:r.map(s=>ma(s)?s:We(s))})}return e}function Ba(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,u,d,c]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...O([u,d,c])})}return e}function O(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}class Na extends mt{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Wt(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new Na({value:t});let[a,n="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(a=`${BigInt(a)+1n}`),n="";else if(n.length>e){const[s,u,d]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${u}.${d}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>e&&(n=n.slice(1),a=`${BigInt(a)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${r?"-":""}${a}${n}`)}function cr(t,e="wei"){return Wt(t,Ie[e])}function ur(t,e="wei"){return Wt(t,Te[e])}async function La(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function Ma(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function za(t){return await t.request({method:"txpool_content"})}async function Ga(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function $a(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function ja(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function Wa(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Va(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Ka(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ja(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ya(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m,...p}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,l=(o||ft)({...St(p,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[l]})}async function Qa(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Za(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Xa(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function tn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function en(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function an(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function nn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:"evm_setIntervalMining",params:[a]})}async function rn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function sn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function on(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function cn(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function un(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function dn(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function ln(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function mn(t){return await t.request({method:"evm_snapshot"})}async function fn(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function pn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>La(a,n),dumpState:()=>Ma(a),getAutomine:()=>Da(a),getTxpoolContent:()=>za(a),getTxpoolStatus:()=>Ga(a),impersonateAccount:n=>$a(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>ja(a,n),mine:n=>Wa(a,n),removeBlockTimestampInterval:()=>Va(a),reset:n=>Ka(a,n),revert:n=>Ja(a,n),sendUnsignedTransaction:n=>Ya(a,n),setAutomine:n=>Qa(a,n),setBalance:n=>Za(a,n),setBlockGasLimit:n=>Xa(a,n),setBlockTimestampInterval:n=>tn(a,n),setCode:n=>en(a,n),setCoinbase:n=>an(a,n),setIntervalMining:n=>nn(a,n),setLoggingEnabled:n=>rn(a,n),setMinGasPrice:n=>sn(a,n),setNextBlockBaseFeePerGas:n=>on(a,n),setNextBlockTimestamp:n=>cn(a,n),setNonce:n=>un(a,n),setRpcUrl:n=>dn(a,n),setStorageAt:n=>ln(a,n),snapshot:()=>mn(a),stopImpersonatingAccount:n=>fn(a,n)}}}function dr(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...pn({mode:n})(s)}))}async function hn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:u}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function yn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,u=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:u})}async function gn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ve(n))}async function bn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],u=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[c,i]of Object.entries(u)){d[Number(c)]={};for(let[f,m]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(c)][f]=m}return typeof n=="number"?d[n]:d}async function wn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function xn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>k(a))}async function En(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function In(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Ke(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:u,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:p,nonce:o,pollingInterval:h,throwOnReceiptRevert:l,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new D({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new mt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await U(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||ft)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:u,chainId:S,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:p,nonce:o,to:P,type:y,value:w},"sendTransaction"),ht=ot.get(t.uid),Kt=ht?"wallet_sendTransaction":"eth_sendTransaction",Jt=await(async()=>{try{return await t.request({method:Kt,params:[z]},{retryCount:0})}catch(yt){if(ht===!1)throw yt;const L=yt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await U(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Jt,pollingInterval:h,timeout:C});if(l&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await U(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:u,chain:n,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:p,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await U(t,Ut,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:l})}throw(b==null?void 0:b.type)==="smart"?new K({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new K({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof K?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function Tn(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Cn(t,e){const{account:a=t.account}=e;if(!a)throw new D({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new K({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await kt(t,e);return n.signAuthorization(r)}async function vn(t,{account:e=t.account,message:a}){if(!e)throw new D({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=typeof a=="string"?Je(a):a.raw instanceof Uint8Array?Nt(a.raw):a.raw;return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function Sn(t,e){var i,f,m,p;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const u=await U(t,dt,"getChainId")({});n!==null&&qt({currentChainId:u,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),c=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||ft;return s.signTransaction?s.signTransaction({...r,chainId:u},{serializer:(p=(m=t.chain)==null?void 0:m.serializers)==null?void 0:p.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:R(u),from:s.address}]},{retryCount:0})}async function An(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTypedData"});const u=N(a),d={EIP712Domain:Xe({domain:n}),...e.types};if(ta({domain:n,message:r,primaryType:s,types:d}),u.signTypedData)return u.signTypedData({domain:n,message:r,primaryType:s,types:d});const c=ea({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[u.address,c]},{retryCount:0})}async function Pn(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function _n(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function Rn(t,e){return M.internal(t,Vt,"sendTransactionSync",e)}function qn(t){return{addChain:e=>hn(t,e),deployContract:e=>yn(t,e),getAddresses:()=>gn(t),getCallsStatus:e=>qe(t,e),getCapabilities:e=>bn(t,e),getChainId:()=>dt(t),getPermissions:()=>wn(t),prepareAuthorization:e=>kt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>xn(t),requestPermissions:e=>En(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>In(t,e),sendRawTransaction:e=>Re(t,e),sendRawTransactionSync:e=>Ut(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>Tn(t,e),signAuthorization:e=>Cn(t,e),signMessage:e=>vn(t,e),signTransaction:e=>Sn(t,e),signTypedData:e=>An(t,e),switchChain:e=>Pn(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>_n(t,e),writeContract:e=>M(t,e),writeContractSync:e=>Rn(t,e)}}function lr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(qn)}function mr(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:u})=>lt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??u,retryDelay:s,type:"custom"})}function fr(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=Fn,retryCount:u,retryDelay:d}=e;return(({chain:c,pollingInterval:i=4e3,timeout:f,...m})=>{let p=t,o=()=>{};const h=lt({key:a,name:n,async request({method:l,params:y}){let w;const g=async(C=0)=>{const b=p[C]({...m,chain:c,retryCount:0,timeout:f});try{const x=await b.request({method:l,params:y});return o({method:l,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:l,params:y,transport:b,status:"error"}),s(x)||C===p.length-1||(w??(w=p.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:c}).config.methods||{};return T?T.includes(l):v?!v.includes(l):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:l=>o=l,transports:p.map(l=>l({chain:c,retryCount:0}))});if(r){const l=typeof r=="object"?r:{};Un({chain:c,interval:l.interval??i,onTransports:y=>p=y,ping:l.ping,sampleCount:l.sampleCount,timeout:l.timeout,transports:p,weights:l.weights})}return h})}function Fn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function Un({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:u,weights:d={}}){const{stability:c=.7,latency:i=.3}=d,f=[],m=async()=>{const p=await Promise.all(u.map(async l=>{const y=l({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(p),f.length>r&&f.shift();const o=Math.max(...f.map(l=>Math.max(...l.map(({latency:y})=>y)))),h=u.map((l,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+c*x,y]}).sort((l,y)=>y[0]-l[0]);a(h.map(([,l])=>u[l])),await Ue(e),m()};m()}function pr(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:u,retryDelay:d}=e;return({chain:c,retryCount:i,timeout:f})=>{var l;const m=e.retryCount??i,p=f??e.timeout??1e4,o=t||((l=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:l[0]),h={keepAlive:a,reconnect:u};if(!o)throw new ke;return lt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await J(o,h),{error:b,result:x}=await C.requestAsync({body:g,timeout:p});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:m,retryDelay:d,timeout:p,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return J(o,h)},async subscribe({params:y,onData:w,onError:g}){const C=await J(o,h),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class hr extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function yr(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(u=>"type"in u&&u.type==="constructor");if(!r)throw new Ye({docsPath:it});if(!("inputs"in r))throw new Et({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new Et({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function gr(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>H(d)):t.blobs,n=a.reduce((d,c)=>d+c.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const c=ct(d);for(;s&&c.position<d.length;){c.incrementPosition(1);let i=31;d.length-c.position<31&&(i=d.length-c.position);for(const f in Array.from({length:i})){const m=c.readByte();if(m===128&&!c.inspectBytes(c.remaining).includes(128)){s=!1;break}r.pushByte(m)}}}const u=r.bytes.slice(0,r.position);return e==="hex"?G(u):u}function br(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Be({commitment:s,to:n,version:a}));return r}const kn=2147483648;function wr(t){if(t===1)return 60n;if(t>=kn||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function Bn({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function xr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return Bn(t)}function Er({r:t,yParityAndS:e}){const a=H(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function Ir(t){const{r:e,s:a}=Bt.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function Tr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Z({hash:Y(s),signature:r})}function Cr({r:t,yParityAndS:e}){return`0x${new Bt.Signature(A(t),A(e)).toCompactHex()}`}function vr(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let u=a;if(s===1){const d=H(a);d[0]|=128,u=G(d)}return{r:e,yParityAndS:u}}export{Ye as AbiConstructorNotFoundError,Et as AbiConstructorParamsNotFoundError,_o as AbiDecodingDataSizeInvalidError,Ro as AbiDecodingDataSizeTooSmallError,qo as AbiDecodingZeroDataError,Fo as AbiEncodingArrayLengthMismatchError,Uo as AbiEncodingBytesSizeMismatchError,ko as AbiEncodingLengthMismatchError,Bo as AbiErrorInputsNotFoundError,No as AbiErrorNotFoundError,Lo as AbiErrorSignatureNotFoundError,Mo as AbiEventNotFoundError,Do as AbiEventSignatureEmptyTopicsError,zo as AbiEventSignatureNotFoundError,Go as AbiFunctionNotFoundError,$o as AbiFunctionOutputsNotFoundError,Ho as AbiFunctionSignatureNotFoundError,Pr as AccountStateConflictError,tc as AtomicReadyWalletRejectedUpgradeError,ec as AtomicityNotSupportedError,mt as BaseError,_r as BaseFeeScalarError,Rr as BlockNotFoundError,qr as BundleFailedError,ac as BundleTooLargeError,Oo as BytesSizeMismatchError,Fr as CallExecutionError,nc as ChainDisconnectedError,Ur as ChainDoesNotSupportContract,kr as ChainMismatchError,Br as ChainNotFoundError,Nr as CircularReferenceError,Lr as ClientChainNotConfiguredError,Mr as ContractFunctionExecutionError,Dr as ContractFunctionRevertedError,zr as ContractFunctionZeroDataError,Gr as CounterfactualDeploymentFailedError,jo as DecodeLogDataMismatch,Wo as DecodeLogTopicsMismatch,rc as DuplicateIdError,hr as EIP1193ProviderRpcError,$r as Eip1559FeesNotSupportedError,Hr as EnsAvatarInvalidNftUriError,Or as EnsAvatarUnsupportedNamespaceError,jr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,Wr as EstimateGasExecutionError,Fe as ExecutionRevertedError,Vr as FeeCapTooHighError,Kr as FeeCapTooLowError,Jr as FeeConflictError,Vo as FilterTypeNotSupportedError,sc as HttpRequestError,Yr as InsufficientFundsError,Ko as IntegerOutOfRangeError,oc as InternalRpcError,Qr as IntrinsicGasTooHighError,Zr as IntrinsicGasTooLowError,Jo as InvalidAbiDecodingTypeError,Yo as InvalidAbiEncodingTypeError,Xr as InvalidAbiItemError,Zt as InvalidAbiParameterError,ts as InvalidAbiParametersError,es as InvalidAbiTypeParameterError,je as InvalidAddressError,Qo as InvalidArrayError,Zo as InvalidBytesBooleanError,as as InvalidChainIdError,Na as InvalidDecimalNumberError,Xo as InvalidDefinitionTypeError,Vi as InvalidDomainError,ns as InvalidFunctionModifierError,ti as InvalidHexBooleanError,Ge as InvalidHexValueError,ic as InvalidInputRpcError,Ee as InvalidLegacyVError,rs as InvalidModifierError,ss as InvalidParameterError,cc as InvalidParamsRpcError,os as InvalidParenthesisError,Ki as InvalidPrimaryTypeError,uc as InvalidRequestRpcError,is as InvalidSerializableTransactionError,$ as InvalidSerializedTransactionError,pe as InvalidSerializedTransactionTypeError,cs as InvalidSignatureError,us as InvalidStorageKeySizeError,ds as InvalidStructSignatureError,Ji as InvalidStructTypeError,dc as JsonRpcVersionUnsupportedError,lc as LimitExceededRpcError,ls as MaxFeePerGasTooLowError,mc as MethodNotFoundRpcError,fc as MethodNotSupportedRpcError,ms as NonceMaxValueError,fs as NonceTooHighError,ps as NonceTooLowError,pc as ParseRpcError,hc as ProviderDisconnectedError,yc as ProviderRpcError,hs as RawContractError,gc as ResourceNotFoundRpcError,bc as ResourceUnavailableRpcError,wc as RpcError,sa as RpcRequestError,ei as SizeExceedsPaddingSizeError,ai as SizeOverflowError,ni as SliceOffsetOutOfBoundsError,Q as SocketClosedError,ys as SolidityProtectedKeywordError,gs as StateAssignmentConflictError,xc as SwitchChainError,aa as TimeoutError,bs as TipAboveFeeCapError,ws as TransactionExecutionError,xs as TransactionNotFoundError,Es as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,Is as TransactionTypeNotSupportedError,Ec as UnauthorizedProviderError,Ic as UnknownBundleIdError,Ts as UnknownNodeError,Tc as UnknownRpcError,Cs as UnknownSignatureError,vs as UnknownTypeError,Cc as UnsupportedChainIdError,vc as UnsupportedNonOptionalCapabilityError,ri as UnsupportedPackedAbiType,Sc as UnsupportedProviderMethodError,ke as UrlRequiredError,ra as UserRejectedRequestError,Ss as WaitForCallsStatusTimeoutError,As as WaitForTransactionReceiptTimeoutError,It as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,he as assertTransactionEIP1559,ye as assertTransactionEIP2930,xe as assertTransactionLegacy,Ps as blobsToCommitments,_s as blobsToProofs,si as boolToBytes,oi as boolToHex,ii as bytesToBigInt,ci as bytesToBool,G as bytesToHex,ui as bytesToNumber,Pc as bytesToRlp,di as bytesToString,Td as ccipFetch,Cd as ccipRequest,Ve as checksumAddress,Be as commitmentToVersionedHash,Rs as commitmentsToVersionedHashes,Cr as compactSignatureToHex,Er as compactSignatureToSignature,ze as concat,li as concatBytes,mi as concatHex,At as createClient,qs as createNonceManager,Fs as createPublicClient,dr as createTestClient,lt as createTransport,lr as createWalletClient,mr as custom,Mt as decodeAbiParameters,yr as decodeDeployData,Ni as decodeErrorResult,xd as decodeEventLog,Us as decodeFunctionData,ks as decodeFunctionResult,Li as defineBlock,Mi as defineChain,Bn as defineKzg,Di as defineTransaction,_d as defineTransactionReceipt,zi as defineTransactionRequest,Bs as deploylessCallViaBytecodeBytecode,Ns as deploylessCallViaFactoryBytecode,Yi as domainSeparator,fi as encodeAbiParameters,Ce as encodeDeployData,Ls as encodeErrorResult,pi as encodeEventTopics,Xt as encodeFunctionData,Ms as encodeFunctionResult,Ds as encodePacked,zs as erc1155Abi,Gs as erc20Abi,$s as erc20Abi_bytes32,Hs as erc4626Abi,Os as erc6492SignatureValidatorAbi,js as erc6492SignatureValidatorByteCode,Ws as erc721Abi,Vs as ethAddress,Ie as etherUnits,tr as extractChain,fr as fallback,Gi as formatBlock,Ks as formatEther,Js as formatGwei,Rd as formatLog,$i as formatTransaction,qd as formatTransactionReceipt,ft as formatTransactionRequest,Ys as formatUnits,gr as fromBlobs,hi as fromBytes,yi as fromHex,Dt as fromRlp,gi as getAbiItem,k as getAddress,Qs as getChainContractAddress,Zn as getContract,Xn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,bi as getEventSelector,wi as getEventSignature,xi as getFunctionSelector,Ei as getFunctionSignature,Pa as getSerializedTransactionType,Zs as getTransactionType,Xe as getTypesForEIP712Domain,Te as gweiUnits,Qi as hashDomain,me as hashMessage,Zi as hashStruct,Ze as hashTypedData,A as hexToBigInt,Ii as hexToBool,H as hexToBytes,Ir as hexToCompactSignature,F as hexToNumber,_c as hexToRlp,Xs as hexToSignature,Ti as hexToString,to as http,Oe as isAddress,pt as isAddressEqual,Tt as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,ma as isHash,E as isHex,Y as keccak256,eo as labelhash,Rc as maxInt104,qc as maxInt112,Fc as maxInt120,Uc as maxInt128,kc as maxInt136,Bc as maxInt144,Nc as maxInt152,Lc as maxInt16,Mc as maxInt160,Dc as maxInt168,zc as maxInt176,Gc as maxInt184,$c as maxInt192,Hc as maxInt200,Oc as maxInt208,jc as maxInt216,Wc as maxInt224,Vc as maxInt232,Kc as maxInt24,Jc as maxInt240,Yc as maxInt248,Qc as maxInt256,Zc as maxInt32,Xc as maxInt40,tu as maxInt48,eu as maxInt56,au as maxInt64,nu as maxInt72,ru as maxInt8,su as maxInt80,ou as maxInt88,iu as maxInt96,cu as maxUint104,uu as maxUint112,du as maxUint120,lu as maxUint128,mu as maxUint136,fu as maxUint144,pu as maxUint152,hu as maxUint16,yu as maxUint160,gu as maxUint168,bu as maxUint176,wu as maxUint184,xu as maxUint192,Eu as maxUint200,Iu as maxUint208,Tu as maxUint216,Cu as maxUint224,vu as maxUint232,Su as maxUint24,Au as maxUint240,Pu as maxUint248,_u as maxUint256,Ru as maxUint32,qu as maxUint40,Fu as maxUint48,Uu as maxUint56,ku as maxUint64,Bu as maxUint72,Nu as maxUint8,Lu as maxUint80,Mu as maxUint88,Du as maxUint96,zu as minInt104,Gu as minInt112,$u as minInt120,Hu as minInt128,Ou as minInt136,ju as minInt144,Wu as minInt152,Vu as minInt16,Ku as minInt160,Ju as minInt168,Yu as minInt176,Qu as minInt184,Zu as minInt192,Xu as minInt200,td as minInt208,ed as minInt216,ad as minInt224,nd as minInt232,rd as minInt24,sd as minInt240,od as minInt248,id as minInt256,cd as minInt32,ud as minInt40,dd as minInt48,ld as minInt56,md as minInt64,fd as minInt72,pd as minInt8,hd as minInt80,yd as minInt88,gd as minInt96,ao as multicall3Abi,no as namehash,ro as nonceManager,Ci as numberToBytes,R as numberToHex,vd as offchainLookup,Sd as offchainLookupAbiItem,Ad as offchainLookupSignature,Me as pad,vi as padBytes,xt as padHex,so as parseAbi,oo as parseAbiItem,Qn as parseAbiParameter,io as parseAbiParameters,Ir as parseCompactSignature,ar as parseErc6492Signature,nr as parseErc8010Signature,cr as parseEther,Ed as parseEventLogs,ur as parseGwei,co as parseSignature,_a as parseTransaction,Wt as parseUnits,uo as prepareEncodeFunctionData,lo as presignMessagePrefix,mo as publicActions,Z as recoverAddress,Sa as recoverMessageAddress,fo as recoverPublicKey,Tr as recoverTransactionAddress,Aa as recoverTypedDataAddress,er as ripemd160,po as rpcSchema,Hi as rpcTransactionType,ho as serializeAccessList,Cr as serializeCompactSignature,yo as serializeErc6492Signature,rr as serializeErc8010Signature,go as serializeSignature,Le as serializeTransaction,ea as serializeTypedData,Si as setErrorConfig,xr as setupKzg,bd as sha256,Fn as shouldThrow,br as sidecarsToVersionedHashes,vr as signatureToCompactSignature,bo as signatureToHex,$e as size,De as slice,Ai as sliceBytes,Lt as sliceHex,Pi as stringToBytes,Je as stringToHex,Oi as stringify,pn as testActions,ge as toBlobSidecars,wo as toBlobs,B as toBytes,wr as toCoinType,_i as toEventHash,Ri as toEventSelector,qi as toEventSignature,Fi as toFunctionHash,Ui as toFunctionSelector,ki as toFunctionSignature,Nt as toHex,xo as toPrefixedMessage,ia as toRlp,ji as transactionType,We as trim,Eo as universalSignatureValidatorAbi,Io as universalSignatureValidatorByteCode,ta as validateTypedData,sr as verifyHash,or as verifyMessage,ir as verifyTypedData,qn as walletActions,pr as webSocket,To as weiUnits,Co as withCache,vo as withRetry,Qe as withTimeout,So as zeroAddress,Ao as zeroHash};
3
- //# sourceMappingURL=index-BAeUu19q.js.map
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/native-d_18A6YH.js","_assets/sentry-CJqFbG11.js","_assets/react-9aRvCYbm.js"])))=>i.map(i=>d[i]);
2
+ import{p as gt,b as Yt,i as Qt,I as Zt,m as bt,s as ut,A as D,e as Xt,g as U,d as te,f as N,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as le,x as Z,y as me,z as fe,B as pe,C as $,D as he,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as Ie,M as Te,N as St,O as At,P as Ce,Q as Pt,R as _t,S as Rt,T as ve,U as dt,V as qt,W as Se,X as Ae,Y as Ft,Z as Pe,_ as Ut,$ as K,a0 as _e,a1 as kt,a2 as Re,a3 as qe,a4 as lt,a5 as Fe,a6 as Ue,a7 as ke,a8 as Be,a9 as Ne,aa as Bt,ab as Le}from"./parseSignature-bTbb9ogg.js";import{ac as Pr,ad as _r,ae as Rr,af as qr,ag as Fr,ah as Ur,ai as kr,aj as Br,ak as Nr,al as Lr,am as Mr,an as Dr,ao as zr,ap as Gr,aq as $r,ar as Hr,as as Or,at as jr,au as Wr,av as Vr,aw as Kr,ax as Jr,ay as Yr,az as Qr,aA as Zr,aB as Xr,aC as ts,aD as es,aE as as,aF as ns,aG as rs,aH as ss,aI as os,aJ as is,aK as cs,aL as us,aM as ds,aN as ls,aO as ms,aP as fs,aQ as ps,aR as hs,aS as ys,aT as gs,aU as bs,aV as ws,aW as xs,aX as Es,aY as Is,aZ as Ts,a_ as Cs,a$ as vs,b0 as Ss,b1 as As,b2 as Ps,b3 as _s,b4 as Rs,b5 as qs,b6 as Fs,b7 as Us,b8 as ks,b9 as Bs,ba as Ns,bb as Ls,bc as Ms,bd as Ds,be as zs,bf as Gs,bg as $s,bh as Hs,bi as Os,bj as js,bk as Ws,bl as Vs,bm as Ks,bn as Js,bo as Ys,bp as Qs,bq as Zs,br as Xs,bs as to,bt as eo,bu as ao,bv as no,bw as ro,bx as so,by as oo,bz as io,br as co,bA as uo,bB as lo,bC as mo,bD as fo,bE as po,bF as ho,bG as yo,bH as go,bH as bo,bI as wo,bJ as xo,bi as Eo,bj as Io,bK as To,bL as Co,bM as vo,bN as So,bO as Ao}from"./parseSignature-bTbb9ogg.js";import{R as B,b3 as k,S as Me,x as Y,a7 as De,w as ze,b4 as Ge,U as H,V as ct,W as G,B as mt,q as E,E as $e,a2 as He,b5 as j,a1 as wt,G as Nt,b6 as Lt,d as Mt,A as R,m as F,b7 as A,C as Oe,I as je,b8 as We,b9 as xt,y as Ve,ba as Ke,bb as Je,bc as Ye,bd as Et}from"./prepare-contract-call-glyYfDZw.js";import{be as _o,O as Ro,a8 as qo,bf as Fo,bg as Uo,bh as ko,bi as Bo,bj as No,a9 as Lo,bk as Mo,J as Do,M as zo,bl as Go,bm as $o,bn as Ho,F as Oo,Q as jo,N as Wo,bo as Vo,bp as Ko,bq as Jo,br as Yo,bs as Qo,bt as Zo,bu as Xo,bv as ti,bw as ei,bx as ai,by as ni,bz as ri,bA as si,bB as oi,bC as ii,bD as ci,bE as ui,bF as di,bG as li,bH as mi,j as fi,bI as pi,bJ as hi,bK as yi,bL as gi,K as bi,bM as wi,t as xi,bM as Ei,bN as Ii,bO as Ti,bP as Ci,bQ as vi,bR as Si,bS as Ai,bT as Pi,bU as _i,K as Ri,bM as qi,bU as Fi,t as Ui,bM as ki}from"./prepare-contract-call-glyYfDZw.js";import{u as ft}from"./to-serializable-transaction-BKfOcqcV.js";import{b as Ni,B as Li,C as Mi,D as Di,E as zi,m as Gi,n as $i,F as Hi,s as Oi,a as ji}from"./to-serializable-transaction-BKfOcqcV.js";import{w as Qe,h as Ze,g as Xe,v as ta,s as ea}from"./hashTypedData-DQ_Lbi0o.js";import{I as Vi,a as Ki,b as Ji,d as Yi,c as Qi,e as Zi}from"./hashTypedData-DQ_Lbi0o.js";import{T as aa,a as Q,W as It,b as na,U as ra,R as sa}from"./rpc-B4vokLJn.js";import{A as tc,c as ec,B as ac,C as nc,D as rc,H as sc,I as oc,d as ic,e as cc,f as uc,J as dc,L as lc,M as mc,h as fc,P as pc,i as hc,j as yc,k as gc,l as bc,m as wc,S as xc,n as Ec,o as Ic,p as Tc,q as Cc,r as vc,s as Sc}from"./rpc-B4vokLJn.js";import{_ as oa}from"./index-sQFfvNZX.js";import{t as ia,H as ca}from"./sha256-D95xpIOk.js";import{b as Pc,h as _c,a as Rc,c as qc,d as Fc,e as Uc,f as kc,g as Bc,i as Nc,j as Lc,k as Mc,l as Dc,n as zc,o as Gc,p as $c,q as Hc,r as Oc,u as jc,v as Wc,w as Vc,x as Kc,y as Jc,z as Yc,A as Qc,B as Zc,C as Xc,D as tu,E as eu,F as au,G as nu,I as ru,J as su,K as ou,L as iu,M as cu,N as uu,O as du,P as lu,Q as mu,R as fu,S as pu,m as hu,T as yu,U as gu,V as bu,W as wu,X as xu,Y as Eu,Z as Iu,_ as Tu,$ as Cu,a0 as vu,a1 as Su,a2 as Au,a3 as Pu,a4 as _u,a5 as Ru,a6 as qu,a7 as Fu,a8 as Uu,a9 as ku,aa as Bu,ab as Nu,ac as Lu,ad as Mu,ae as Du,af as zu,ag as Gu,ah as $u,ai as Hu,aj as Ou,ak as ju,al as Wu,am as Vu,an as Ku,ao as Ju,ap as Yu,aq as Qu,ar as Zu,as as Xu,at as td,au as ed,av as ad,aw as nd,ax as rd,ay as sd,az as od,aA as id,aB as cd,aC as ud,aD as dd,aE as ld,aF as md,aG as fd,aH as pd,aI as hd,aJ as yd,aK as gd,s as bd}from"./sha256-D95xpIOk.js";import{i as pt}from"./get-bytecode-CNrt-FoQ.js";import{d as xd,a as Ed}from"./get-bytecode-CNrt-FoQ.js";import{ccipRequest as Td,ccipRequest as Cd,offchainLookup as vd,offchainLookupAbiItem as Sd,offchainLookupSignature as Ad}from"./ccip-CQiZ3-qM.js";import{d as _d,a as Rd,f as qd}from"./transactionReceipt-BWD_rE0W.js";import"./utils-DF0qXAQT.js";import"./sentry-CJqFbG11.js";import"./react-9aRvCYbm.js";import"./transaction-LdbEZ3QP.js";import"./dcl-schemas-BBgGLe8k.js";import"./ethers-BKRWnjV9.js";import"./intl-AKLEHPeO.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ec6d0deb-6698-4fde-9481-110dc5c000b0",t._sentryDebugIdIdentifier="sentry-dbid-ec6d0deb-6698-4fde-9481-110dc5c000b0")}catch{}})();function Qn(t){let e;if(typeof t=="string")e=gt(t,{modifiers:bt});else{const a=Yt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Qt(s)){e=gt(s,{modifiers:bt,structs:a});break}}}if(!e)throw new Zt({param:t});return e}async function M(t,e){return M.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:u,account:d=a.account,address:c,args:i,dataSuffix:f,functionName:m,...p}=s;if(typeof d>"u")throw new D({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,h=Xt({abi:u,args:i,functionName:m});try{return await U(a,n,r)({data:`${h}${f?f.replace("0x",""):""}`,to:c,account:o,...p})}catch(l){throw te(l,{abi:u,address:c,args:i,docsPath:"/docs/contract/writeContract",functionName:m,sender:o==null?void 0:o.address})}}t.internal=e})(M||(M={}));function Zn({abi:t,address:e,client:a}){const n=a,[r,s]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],u=r!=null,d=s!=null,c={};let i=!1,f=!1,m=!1;for(const p of t)if(p.type==="function"?p.stateMutability==="view"||p.stateMutability==="pure"?i=!0:f=!0:p.type==="event"&&(m=!0),i&&f&&m)break;return u&&(i&&(c.read=new Proxy({},{get(p,o){return(...h)=>{const{args:l,options:y}=W(h);return U(r,ee,"readContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),f&&(c.simulate=new Proxy({},{get(p,o){return(...h)=>{const{args:l,options:y}=W(h);return U(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),m&&(c.createEventFilter=new Proxy({},{get(p,o){return(...h)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(h,l);return U(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.getEvents=new Proxy({},{get(p,o){return(...h)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(h,l);return U(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.watchEvent=new Proxy({},{get(p,o){return(...h)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(h,l);return U(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(c.write=new Proxy({},{get(p,o){return(...h)=>{const{args:l,options:y}=W(h);return U(s,M,"writeContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),(u||d)&&f&&(c.estimateGas=new Proxy({},{get(p,o){return(...h)=>{const{args:l,options:y}=W(h);return U(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:l,...y,account:y.account??s.account})}}})),c.address=e,c.abi=t,c}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function Tt(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Xn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=B(k(t.from));let a=B(t.nonce);return a[0]===0&&(a=new Uint8Array([])),k(`0x${Y(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=B(k(t.from)),a=Me(Tt(t.salt)?t.salt:B(t.salt),{size:32}),n="bytecodeHash"in t?Tt(t.bytecodeHash)?t.bytecodeHash:B(t.bytecodeHash):Y(t.bytecode,"bytes");return k(De(Y(ze([B("0xff"),e,a,n])),12))}function tr({chains:t,id:e}){return t.find(a=>a.id===e)}function Dt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return H(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return zt(n,e)}function zt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Ct(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Ct(t,a,192);return la(t,n,e)}function Ct(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new mt("Invalid RLP prefix")}function la(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(zt(t,a));return r}function ma(t){return E(t)&&$e(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Gt=Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)),pa=Gt.map(t=>(9*t+5)%16),$t=(()=>{const a=[[Gt],[pa]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),Ht=$t[0],Ot=$t[1],jt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),ha=Ht.map((t,e)=>t.map(a=>jt[e][a])),ya=Ot.map((t,e)=>t.map(a=>jt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function vt(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,u=s,d=this.h2|0,c=d,i=this.h3|0,f=i,m=this.h4|0,p=m;for(let o=0;o<5;o++){const h=4-o,l=ga[o],y=ba[o],w=Ht[o],g=Ot[o],C=ha[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+vt(o,s,d,i)+V[w[x]]+l,C[x])+m|0;n=m,m=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+vt(h,u,c,f)+V[g[x]]+y,b[x])+p|0;r=p,p=f,f=j(c,10)|0,c=u,u=I}}this.set(this.h1+d+f|0,this.h2+i+p|0,this.h3+m+r|0,this.h4+n+u|0,this.h0+s+c|0)}roundClean(){wt(V)}destroy(){this.destroyed=!0,wt(this.buffer),this.set(0,0,0,0,0)}}const xa=He(()=>new wa),Ea=xa;function er(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?B(t):t);return a==="bytes"?n:Nt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:u=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:c=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let m=0;const{schedule:p}=ie({id:i,fn:async()=>{const l=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&m<d){if(b)return;b=!0,m++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},c)}else l.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of l.values())(v=S.onError)==null||v.call(S,new Q({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Q({url:s}));x()},onError(v){var P,S;w=v;for(const _ of l.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,m=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:l,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},u)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};l.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Qe(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:l,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[h]]=await p();return h}async function J(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:u,onResponse:d}){const c=await oa(()=>import("./native-d_18A6YH.js").then(o=>o.n),__vite__mapDeps([0,1,2])).then(o=>o.WebSocket),i=new c(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",m),i.removeEventListener("error",s),i.removeEventListener("open",u),r()}function m({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const h=JSON.parse(o);d(h)}catch(h){s(h)}}i.addEventListener("close",f),i.addEventListener("message",m),i.addEventListener("error",s),i.addEventListener("open",u),i.readyState===c.CONNECTING&&await new Promise((o,h)=>{i&&(i.onopen=o,i.onerror=h)});const{close:p}=i;return Object.assign(i,{close(){p.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({url:i.url,cause:new Q({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({body:o,url:i.url,cause:new Q({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await J(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Lt(t,-32)===ue}function va(t){return de(t)}function ar(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function nr(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=le(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Z({hash:me(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Z({hash:Ze({domain:e,message:a,primaryType:n,types:s}),signature:r})}function rr(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:H(s)}async function sr({address:t,hash:e,signature:a}){return pt(k(t),await Z({hash:e,signature:a}))}async function or({address:t,message:e,signature:a}){return pt(k(t),await Sa({message:e,signature:a}))}async function ir(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:u}=t;return pt(k(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:u}))}function Pa(t){const e=Lt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new pe({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?Ua(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):ka(t)}function Ra(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,p,o,h]=e;if(e.length!==10&&e.length!==13)throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,authorizationList:m,...e.length>9?{v:p,r:o,s:h}:{}},serializedTransaction:t,type:"eip7702"});const l={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(l.to=d),E(u)&&u!=="0x"&&(l.gas=A(u)),E(i)&&i!=="0x"&&(l.data=i),E(n)&&(l.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(l.value=A(c)),E(s)&&s!=="0x"&&(l.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(l.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(l.accessList=tt(f)),m.length!==0&&m!=="0x"&&(l.authorizationList=Ba(m)),we(l),{...e.length===13?O(e):void 0,...l}}function qa(t){const e=X(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,u,d,c,i,f,m,p,o,h,l,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new $({attributes:{chainId:s,nonce:u,maxPriorityFeePerGas:d,maxFeePerGas:c,gas:i,to:f,value:m,data:p,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:l,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(p)&&p!=="0x"&&(I.data=p),E(u)&&(I.nonce=u==="0x"?0:F(u)),E(m)&&m!=="0x"&&(I.value=A(m)),E(h)&&h!=="0x"&&(I.maxFeePerBlobGas=A(h)),E(c)&&c!=="0x"&&(I.maxFeePerGas=A(c)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ge({blobs:C,commitments:b,proofs:x})),be(I),{...n.length===14?O(n):void 0,...I}}function Fa(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,p,o]=e;if(!(e.length===9||e.length===12))throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,...e.length>9?{v:m,r:p,s:o}:{}},serializedTransaction:t,type:"eip1559"});const h={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(h.to=d),E(u)&&u!=="0x"&&(h.gas=A(u)),E(i)&&i!=="0x"&&(h.data=i),E(n)&&(h.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(h.value=A(c)),E(s)&&s!=="0x"&&(h.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(h.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(h.accessList=tt(f)),he(h),{...e.length===12?O(e):void 0,...h}}function Ua(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,p]=e;if(!(e.length===8||e.length===11))throw new $({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:u,value:d,data:c,accessList:i,...e.length>8?{v:f,r:m,s:p}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(u)&&u!=="0x"&&(o.to=u),E(s)&&s!=="0x"&&(o.gas=A(s)),E(c)&&c!=="0x"&&(o.data=c),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),ye(o),{...e.length===11?O(e):void 0,...o}}function ka(t){const e=Dt(t,"hex"),[a,n,r,s,u,d,c,i,f]=e;if(!(e.length===6||e.length===9))throw new $({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:u,data:d,...e.length>6?{v:c,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const m={type:"legacy"};if(E(s)&&s!=="0x"&&(m.to=s),E(r)&&r!=="0x"&&(m.gas=A(r)),E(d)&&d!=="0x"&&(m.data=d),E(a)&&(m.nonce=a==="0x"?0:F(a)),E(u)&&u!=="0x"&&(m.value=A(u)),E(n)&&n!=="0x"&&(m.gasPrice=A(n)),xe(m),e.length===6)return m;const p=E(c)&&c!=="0x"?A(c):0n;if(f==="0x"&&i==="0x")return p>0&&(m.chainId=Number(p)),m;const o=p,h=Number((o-35n)/2n);if(h>0)m.chainId=h;else if(o!==27n&&o!==28n)throw new Ee({v:o});return m.v=o,m.s=f,m.r=i,m.yParity=o%2n===0n?1:0,m}function X(t){return Dt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!Oe(n,{strict:!1}))throw new je({address:n});e.push({address:n,storageKeys:r.map(s=>ma(s)?s:We(s))})}return e}function Ba(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,u,d,c]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...O([u,d,c])})}return e}function O(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}class Na extends mt{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Wt(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new Na({value:t});let[a,n="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(a=`${BigInt(a)+1n}`),n="";else if(n.length>e){const[s,u,d]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${u}.${d}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>e&&(n=n.slice(1),a=`${BigInt(a)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${r?"-":""}${a}${n}`)}function cr(t,e="wei"){return Wt(t,Ie[e])}function ur(t,e="wei"){return Wt(t,Te[e])}async function La(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function Ma(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function za(t){return await t.request({method:"txpool_content"})}async function Ga(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function $a(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function ja(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function Wa(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Va(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Ka(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ja(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ya(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m,...p}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,l=(o||ft)({...St(p,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[l]})}async function Qa(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Za(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Xa(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function tn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function en(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function an(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function nn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:"evm_setIntervalMining",params:[a]})}async function rn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function sn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function on(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function cn(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function un(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function dn(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function ln(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function mn(t){return await t.request({method:"evm_snapshot"})}async function fn(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function pn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>La(a,n),dumpState:()=>Ma(a),getAutomine:()=>Da(a),getTxpoolContent:()=>za(a),getTxpoolStatus:()=>Ga(a),impersonateAccount:n=>$a(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>ja(a,n),mine:n=>Wa(a,n),removeBlockTimestampInterval:()=>Va(a),reset:n=>Ka(a,n),revert:n=>Ja(a,n),sendUnsignedTransaction:n=>Ya(a,n),setAutomine:n=>Qa(a,n),setBalance:n=>Za(a,n),setBlockGasLimit:n=>Xa(a,n),setBlockTimestampInterval:n=>tn(a,n),setCode:n=>en(a,n),setCoinbase:n=>an(a,n),setIntervalMining:n=>nn(a,n),setLoggingEnabled:n=>rn(a,n),setMinGasPrice:n=>sn(a,n),setNextBlockBaseFeePerGas:n=>on(a,n),setNextBlockTimestamp:n=>cn(a,n),setNonce:n=>un(a,n),setRpcUrl:n=>dn(a,n),setStorageAt:n=>ln(a,n),snapshot:()=>mn(a),stopImpersonatingAccount:n=>fn(a,n)}}}function dr(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...pn({mode:n})(s)}))}async function hn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:u}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function yn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,u=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:u})}async function gn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ve(n))}async function bn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],u=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[c,i]of Object.entries(u)){d[Number(c)]={};for(let[f,m]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(c)][f]=m}return typeof n=="number"?d[n]:d}async function wn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function xn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>k(a))}async function En(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function In(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Ke(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:u,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:p,nonce:o,pollingInterval:h,throwOnReceiptRevert:l,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new D({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new mt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await U(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||ft)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:u,chainId:S,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:p,nonce:o,to:P,type:y,value:w},"sendTransaction"),ht=ot.get(t.uid),Kt=ht?"wallet_sendTransaction":"eth_sendTransaction",Jt=await(async()=>{try{return await t.request({method:Kt,params:[z]},{retryCount:0})}catch(yt){if(ht===!1)throw yt;const L=yt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await U(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Jt,pollingInterval:h,timeout:C});if(l&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await U(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:u,chain:n,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:p,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await U(t,Ut,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:l})}throw(b==null?void 0:b.type)==="smart"?new K({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new K({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof K?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function Tn(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Cn(t,e){const{account:a=t.account}=e;if(!a)throw new D({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new K({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await kt(t,e);return n.signAuthorization(r)}async function vn(t,{account:e=t.account,message:a}){if(!e)throw new D({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=typeof a=="string"?Je(a):a.raw instanceof Uint8Array?Nt(a.raw):a.raw;return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function Sn(t,e){var i,f,m,p;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const u=await U(t,dt,"getChainId")({});n!==null&&qt({currentChainId:u,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),c=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||ft;return s.signTransaction?s.signTransaction({...r,chainId:u},{serializer:(p=(m=t.chain)==null?void 0:m.serializers)==null?void 0:p.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:R(u),from:s.address}]},{retryCount:0})}async function An(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTypedData"});const u=N(a),d={EIP712Domain:Xe({domain:n}),...e.types};if(ta({domain:n,message:r,primaryType:s,types:d}),u.signTypedData)return u.signTypedData({domain:n,message:r,primaryType:s,types:d});const c=ea({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[u.address,c]},{retryCount:0})}async function Pn(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function _n(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function Rn(t,e){return M.internal(t,Vt,"sendTransactionSync",e)}function qn(t){return{addChain:e=>hn(t,e),deployContract:e=>yn(t,e),getAddresses:()=>gn(t),getCallsStatus:e=>qe(t,e),getCapabilities:e=>bn(t,e),getChainId:()=>dt(t),getPermissions:()=>wn(t),prepareAuthorization:e=>kt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>xn(t),requestPermissions:e=>En(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>In(t,e),sendRawTransaction:e=>Re(t,e),sendRawTransactionSync:e=>Ut(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>Tn(t,e),signAuthorization:e=>Cn(t,e),signMessage:e=>vn(t,e),signTransaction:e=>Sn(t,e),signTypedData:e=>An(t,e),switchChain:e=>Pn(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>_n(t,e),writeContract:e=>M(t,e),writeContractSync:e=>Rn(t,e)}}function lr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(qn)}function mr(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:u})=>lt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??u,retryDelay:s,type:"custom"})}function fr(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=Fn,retryCount:u,retryDelay:d}=e;return(({chain:c,pollingInterval:i=4e3,timeout:f,...m})=>{let p=t,o=()=>{};const h=lt({key:a,name:n,async request({method:l,params:y}){let w;const g=async(C=0)=>{const b=p[C]({...m,chain:c,retryCount:0,timeout:f});try{const x=await b.request({method:l,params:y});return o({method:l,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:l,params:y,transport:b,status:"error"}),s(x)||C===p.length-1||(w??(w=p.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:c}).config.methods||{};return T?T.includes(l):v?!v.includes(l):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:l=>o=l,transports:p.map(l=>l({chain:c,retryCount:0}))});if(r){const l=typeof r=="object"?r:{};Un({chain:c,interval:l.interval??i,onTransports:y=>p=y,ping:l.ping,sampleCount:l.sampleCount,timeout:l.timeout,transports:p,weights:l.weights})}return h})}function Fn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function Un({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:u,weights:d={}}){const{stability:c=.7,latency:i=.3}=d,f=[],m=async()=>{const p=await Promise.all(u.map(async l=>{const y=l({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(p),f.length>r&&f.shift();const o=Math.max(...f.map(l=>Math.max(...l.map(({latency:y})=>y)))),h=u.map((l,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+c*x,y]}).sort((l,y)=>y[0]-l[0]);a(h.map(([,l])=>u[l])),await Ue(e),m()};m()}function pr(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:u,retryDelay:d}=e;return({chain:c,retryCount:i,timeout:f})=>{var l;const m=e.retryCount??i,p=f??e.timeout??1e4,o=t||((l=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:l[0]),h={keepAlive:a,reconnect:u};if(!o)throw new ke;return lt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await J(o,h),{error:b,result:x}=await C.requestAsync({body:g,timeout:p});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:m,retryDelay:d,timeout:p,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return J(o,h)},async subscribe({params:y,onData:w,onError:g}){const C=await J(o,h),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class hr extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function yr(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(u=>"type"in u&&u.type==="constructor");if(!r)throw new Ye({docsPath:it});if(!("inputs"in r))throw new Et({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new Et({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function gr(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>H(d)):t.blobs,n=a.reduce((d,c)=>d+c.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const c=ct(d);for(;s&&c.position<d.length;){c.incrementPosition(1);let i=31;d.length-c.position<31&&(i=d.length-c.position);for(const f in Array.from({length:i})){const m=c.readByte();if(m===128&&!c.inspectBytes(c.remaining).includes(128)){s=!1;break}r.pushByte(m)}}}const u=r.bytes.slice(0,r.position);return e==="hex"?G(u):u}function br(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Be({commitment:s,to:n,version:a}));return r}const kn=2147483648;function wr(t){if(t===1)return 60n;if(t>=kn||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function Bn({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function xr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return Bn(t)}function Er({r:t,yParityAndS:e}){const a=H(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function Ir(t){const{r:e,s:a}=Bt.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function Tr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Z({hash:Y(s),signature:r})}function Cr({r:t,yParityAndS:e}){return`0x${new Bt.Signature(A(t),A(e)).toCompactHex()}`}function vr(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let u=a;if(s===1){const d=H(a);d[0]|=128,u=G(d)}return{r:e,yParityAndS:u}}export{Ye as AbiConstructorNotFoundError,Et as AbiConstructorParamsNotFoundError,_o as AbiDecodingDataSizeInvalidError,Ro as AbiDecodingDataSizeTooSmallError,qo as AbiDecodingZeroDataError,Fo as AbiEncodingArrayLengthMismatchError,Uo as AbiEncodingBytesSizeMismatchError,ko as AbiEncodingLengthMismatchError,Bo as AbiErrorInputsNotFoundError,No as AbiErrorNotFoundError,Lo as AbiErrorSignatureNotFoundError,Mo as AbiEventNotFoundError,Do as AbiEventSignatureEmptyTopicsError,zo as AbiEventSignatureNotFoundError,Go as AbiFunctionNotFoundError,$o as AbiFunctionOutputsNotFoundError,Ho as AbiFunctionSignatureNotFoundError,Pr as AccountStateConflictError,tc as AtomicReadyWalletRejectedUpgradeError,ec as AtomicityNotSupportedError,mt as BaseError,_r as BaseFeeScalarError,Rr as BlockNotFoundError,qr as BundleFailedError,ac as BundleTooLargeError,Oo as BytesSizeMismatchError,Fr as CallExecutionError,nc as ChainDisconnectedError,Ur as ChainDoesNotSupportContract,kr as ChainMismatchError,Br as ChainNotFoundError,Nr as CircularReferenceError,Lr as ClientChainNotConfiguredError,Mr as ContractFunctionExecutionError,Dr as ContractFunctionRevertedError,zr as ContractFunctionZeroDataError,Gr as CounterfactualDeploymentFailedError,jo as DecodeLogDataMismatch,Wo as DecodeLogTopicsMismatch,rc as DuplicateIdError,hr as EIP1193ProviderRpcError,$r as Eip1559FeesNotSupportedError,Hr as EnsAvatarInvalidNftUriError,Or as EnsAvatarUnsupportedNamespaceError,jr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,Wr as EstimateGasExecutionError,Fe as ExecutionRevertedError,Vr as FeeCapTooHighError,Kr as FeeCapTooLowError,Jr as FeeConflictError,Vo as FilterTypeNotSupportedError,sc as HttpRequestError,Yr as InsufficientFundsError,Ko as IntegerOutOfRangeError,oc as InternalRpcError,Qr as IntrinsicGasTooHighError,Zr as IntrinsicGasTooLowError,Jo as InvalidAbiDecodingTypeError,Yo as InvalidAbiEncodingTypeError,Xr as InvalidAbiItemError,Zt as InvalidAbiParameterError,ts as InvalidAbiParametersError,es as InvalidAbiTypeParameterError,je as InvalidAddressError,Qo as InvalidArrayError,Zo as InvalidBytesBooleanError,as as InvalidChainIdError,Na as InvalidDecimalNumberError,Xo as InvalidDefinitionTypeError,Vi as InvalidDomainError,ns as InvalidFunctionModifierError,ti as InvalidHexBooleanError,Ge as InvalidHexValueError,ic as InvalidInputRpcError,Ee as InvalidLegacyVError,rs as InvalidModifierError,ss as InvalidParameterError,cc as InvalidParamsRpcError,os as InvalidParenthesisError,Ki as InvalidPrimaryTypeError,uc as InvalidRequestRpcError,is as InvalidSerializableTransactionError,$ as InvalidSerializedTransactionError,pe as InvalidSerializedTransactionTypeError,cs as InvalidSignatureError,us as InvalidStorageKeySizeError,ds as InvalidStructSignatureError,Ji as InvalidStructTypeError,dc as JsonRpcVersionUnsupportedError,lc as LimitExceededRpcError,ls as MaxFeePerGasTooLowError,mc as MethodNotFoundRpcError,fc as MethodNotSupportedRpcError,ms as NonceMaxValueError,fs as NonceTooHighError,ps as NonceTooLowError,pc as ParseRpcError,hc as ProviderDisconnectedError,yc as ProviderRpcError,hs as RawContractError,gc as ResourceNotFoundRpcError,bc as ResourceUnavailableRpcError,wc as RpcError,sa as RpcRequestError,ei as SizeExceedsPaddingSizeError,ai as SizeOverflowError,ni as SliceOffsetOutOfBoundsError,Q as SocketClosedError,ys as SolidityProtectedKeywordError,gs as StateAssignmentConflictError,xc as SwitchChainError,aa as TimeoutError,bs as TipAboveFeeCapError,ws as TransactionExecutionError,xs as TransactionNotFoundError,Es as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,Is as TransactionTypeNotSupportedError,Ec as UnauthorizedProviderError,Ic as UnknownBundleIdError,Ts as UnknownNodeError,Tc as UnknownRpcError,Cs as UnknownSignatureError,vs as UnknownTypeError,Cc as UnsupportedChainIdError,vc as UnsupportedNonOptionalCapabilityError,ri as UnsupportedPackedAbiType,Sc as UnsupportedProviderMethodError,ke as UrlRequiredError,ra as UserRejectedRequestError,Ss as WaitForCallsStatusTimeoutError,As as WaitForTransactionReceiptTimeoutError,It as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,he as assertTransactionEIP1559,ye as assertTransactionEIP2930,xe as assertTransactionLegacy,Ps as blobsToCommitments,_s as blobsToProofs,si as boolToBytes,oi as boolToHex,ii as bytesToBigInt,ci as bytesToBool,G as bytesToHex,ui as bytesToNumber,Pc as bytesToRlp,di as bytesToString,Td as ccipFetch,Cd as ccipRequest,Ve as checksumAddress,Be as commitmentToVersionedHash,Rs as commitmentsToVersionedHashes,Cr as compactSignatureToHex,Er as compactSignatureToSignature,ze as concat,li as concatBytes,mi as concatHex,At as createClient,qs as createNonceManager,Fs as createPublicClient,dr as createTestClient,lt as createTransport,lr as createWalletClient,mr as custom,Mt as decodeAbiParameters,yr as decodeDeployData,Ni as decodeErrorResult,xd as decodeEventLog,Us as decodeFunctionData,ks as decodeFunctionResult,Li as defineBlock,Mi as defineChain,Bn as defineKzg,Di as defineTransaction,_d as defineTransactionReceipt,zi as defineTransactionRequest,Bs as deploylessCallViaBytecodeBytecode,Ns as deploylessCallViaFactoryBytecode,Yi as domainSeparator,fi as encodeAbiParameters,Ce as encodeDeployData,Ls as encodeErrorResult,pi as encodeEventTopics,Xt as encodeFunctionData,Ms as encodeFunctionResult,Ds as encodePacked,zs as erc1155Abi,Gs as erc20Abi,$s as erc20Abi_bytes32,Hs as erc4626Abi,Os as erc6492SignatureValidatorAbi,js as erc6492SignatureValidatorByteCode,Ws as erc721Abi,Vs as ethAddress,Ie as etherUnits,tr as extractChain,fr as fallback,Gi as formatBlock,Ks as formatEther,Js as formatGwei,Rd as formatLog,$i as formatTransaction,qd as formatTransactionReceipt,ft as formatTransactionRequest,Ys as formatUnits,gr as fromBlobs,hi as fromBytes,yi as fromHex,Dt as fromRlp,gi as getAbiItem,k as getAddress,Qs as getChainContractAddress,Zn as getContract,Xn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,bi as getEventSelector,wi as getEventSignature,xi as getFunctionSelector,Ei as getFunctionSignature,Pa as getSerializedTransactionType,Zs as getTransactionType,Xe as getTypesForEIP712Domain,Te as gweiUnits,Qi as hashDomain,me as hashMessage,Zi as hashStruct,Ze as hashTypedData,A as hexToBigInt,Ii as hexToBool,H as hexToBytes,Ir as hexToCompactSignature,F as hexToNumber,_c as hexToRlp,Xs as hexToSignature,Ti as hexToString,to as http,Oe as isAddress,pt as isAddressEqual,Tt as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,ma as isHash,E as isHex,Y as keccak256,eo as labelhash,Rc as maxInt104,qc as maxInt112,Fc as maxInt120,Uc as maxInt128,kc as maxInt136,Bc as maxInt144,Nc as maxInt152,Lc as maxInt16,Mc as maxInt160,Dc as maxInt168,zc as maxInt176,Gc as maxInt184,$c as maxInt192,Hc as maxInt200,Oc as maxInt208,jc as maxInt216,Wc as maxInt224,Vc as maxInt232,Kc as maxInt24,Jc as maxInt240,Yc as maxInt248,Qc as maxInt256,Zc as maxInt32,Xc as maxInt40,tu as maxInt48,eu as maxInt56,au as maxInt64,nu as maxInt72,ru as maxInt8,su as maxInt80,ou as maxInt88,iu as maxInt96,cu as maxUint104,uu as maxUint112,du as maxUint120,lu as maxUint128,mu as maxUint136,fu as maxUint144,pu as maxUint152,hu as maxUint16,yu as maxUint160,gu as maxUint168,bu as maxUint176,wu as maxUint184,xu as maxUint192,Eu as maxUint200,Iu as maxUint208,Tu as maxUint216,Cu as maxUint224,vu as maxUint232,Su as maxUint24,Au as maxUint240,Pu as maxUint248,_u as maxUint256,Ru as maxUint32,qu as maxUint40,Fu as maxUint48,Uu as maxUint56,ku as maxUint64,Bu as maxUint72,Nu as maxUint8,Lu as maxUint80,Mu as maxUint88,Du as maxUint96,zu as minInt104,Gu as minInt112,$u as minInt120,Hu as minInt128,Ou as minInt136,ju as minInt144,Wu as minInt152,Vu as minInt16,Ku as minInt160,Ju as minInt168,Yu as minInt176,Qu as minInt184,Zu as minInt192,Xu as minInt200,td as minInt208,ed as minInt216,ad as minInt224,nd as minInt232,rd as minInt24,sd as minInt240,od as minInt248,id as minInt256,cd as minInt32,ud as minInt40,dd as minInt48,ld as minInt56,md as minInt64,fd as minInt72,pd as minInt8,hd as minInt80,yd as minInt88,gd as minInt96,ao as multicall3Abi,no as namehash,ro as nonceManager,Ci as numberToBytes,R as numberToHex,vd as offchainLookup,Sd as offchainLookupAbiItem,Ad as offchainLookupSignature,Me as pad,vi as padBytes,xt as padHex,so as parseAbi,oo as parseAbiItem,Qn as parseAbiParameter,io as parseAbiParameters,Ir as parseCompactSignature,ar as parseErc6492Signature,nr as parseErc8010Signature,cr as parseEther,Ed as parseEventLogs,ur as parseGwei,co as parseSignature,_a as parseTransaction,Wt as parseUnits,uo as prepareEncodeFunctionData,lo as presignMessagePrefix,mo as publicActions,Z as recoverAddress,Sa as recoverMessageAddress,fo as recoverPublicKey,Tr as recoverTransactionAddress,Aa as recoverTypedDataAddress,er as ripemd160,po as rpcSchema,Hi as rpcTransactionType,ho as serializeAccessList,Cr as serializeCompactSignature,yo as serializeErc6492Signature,rr as serializeErc8010Signature,go as serializeSignature,Le as serializeTransaction,ea as serializeTypedData,Si as setErrorConfig,xr as setupKzg,bd as sha256,Fn as shouldThrow,br as sidecarsToVersionedHashes,vr as signatureToCompactSignature,bo as signatureToHex,$e as size,De as slice,Ai as sliceBytes,Lt as sliceHex,Pi as stringToBytes,Je as stringToHex,Oi as stringify,pn as testActions,ge as toBlobSidecars,wo as toBlobs,B as toBytes,wr as toCoinType,_i as toEventHash,Ri as toEventSelector,qi as toEventSignature,Fi as toFunctionHash,Ui as toFunctionSelector,ki as toFunctionSignature,Nt as toHex,xo as toPrefixedMessage,ia as toRlp,ji as transactionType,We as trim,Eo as universalSignatureValidatorAbi,Io as universalSignatureValidatorByteCode,ta as validateTypedData,sr as verifyHash,or as verifyMessage,ir as verifyTypedData,qn as walletActions,pr as webSocket,To as weiUnits,Co as withCache,vo as withRetry,Qe as withTimeout,So as zeroAddress,Ao as zeroHash};
3
+ //# sourceMappingURL=index-BXQ9FyQv.js.map
@@ -1,4 +1,4 @@
1
- import{i as g,b as r}from"./lit-element-wjYUA6aF.js";import{n as s}from"./class-map-DopF_Eyi.js";import{c as h}from"./index-BrC_okhM.js";import"./index-OeIHT0cR.js";import"./index-DlWdq6Mw.js";import{d as m,r as p,e as b}from"./index-CSBo6qrQ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6d34bc4e-8755-43c1-a182-00c8989bbe71",e._sentryDebugIdIdentifier="sentry-dbid-6d34bc4e-8755-43c1-a182-00c8989bbe71")}catch{}})();const f=m`
1
+ import{i as g,b as r}from"./lit-element-wjYUA6aF.js";import{n as s}from"./class-map-DopF_Eyi.js";import{c as h}from"./index-B6SpJox_.js";import"./index-BfNdu86e.js";import"./index-FPMEVY0k.js";import{d as m,r as p,e as b}from"./index-CuBLDtFZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6d34bc4e-8755-43c1-a182-00c8989bbe71",e._sentryDebugIdIdentifier="sentry-dbid-6d34bc4e-8755-43c1-a182-00c8989bbe71")}catch{}})();const f=m`
2
2
  button {
3
3
  display: block;
4
4
  display: flex;
@@ -136,4 +136,4 @@ import{i as g,b as r}from"./lit-element-wjYUA6aF.js";import{n as s}from"./class-
136
136
  </wui-flex>`}textTemplate(){const t=x[this.size];return r`<wui-text color="primary" variant=${t}
137
137
  >${this.text}</wui-text
138
138
  >`}};i.styles=[p,b,f];n([s()],i.prototype,"size",void 0);n([s()],i.prototype,"imageSrc",void 0);n([s()],i.prototype,"chainImageSrc",void 0);n([s({type:Boolean})],i.prototype,"disabled",void 0);n([s()],i.prototype,"text",void 0);n([s({type:Boolean})],i.prototype,"loading",void 0);i=n([h("wui-token-button")],i);
139
- //# sourceMappingURL=index-DJA_1O-1.js.map
139
+ //# sourceMappingURL=index-BYZ634H2.js.map