@dcl/blog-site 0.2.2 → 0.2.3-23948667956.commit-cfe47f9

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 (302) hide show
  1. package/assets/QueryClientProvider-mZKMZTwe.js +2 -0
  2. package/assets/RoobertPRO-Bold-DDyOqNrI.woff2 +0 -0
  3. package/assets/SignInRedirect-CXUOqOjy.js +11 -0
  4. package/assets/X-3yocgepi.js +15 -0
  5. package/assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js +1 -0
  6. package/assets/__federation_expose_App-CMGDAIUH.js +1 -0
  7. package/assets/__federation_fn_import-C51lglKS.js +1 -0
  8. package/assets/__federation_shared_@dcl/hooks-Dm9PRmKy.js +535 -0
  9. package/assets/__federation_shared_@dcl/schemas-CVwtHlVJ.js +1 -0
  10. package/assets/__federation_shared_@emotion/react-AmEOkpjC.js +1 -0
  11. package/assets/__federation_shared_@emotion/styled-aZ9bk9Xh.js +1 -0
  12. package/assets/__federation_shared_@reduxjs/toolkit-DIZvwqf7.js +1 -0
  13. package/assets/__federation_shared_decentraland-ui2-KxrbFOTA.js +358 -0
  14. package/assets/__federation_shared_react-B3tlNTLg.js +1 -0
  15. package/assets/__federation_shared_react-dom-CCS4dT_K.js +1 -0
  16. package/assets/__federation_shared_react-redux-Ckcz2edF.js +13 -0
  17. package/assets/__federation_shared_react-router-dom-jUWpDOjR.js +49 -0
  18. package/assets/__federation_shared_viem-Cdp7wK0V.js +2 -0
  19. package/assets/__federation_shared_wagmi-CHWRoybR.js +17 -0
  20. package/assets/__vite-optional-peer-dep_lottie-react_decentraland-ui2-BIHI7g3E.js +1 -0
  21. package/assets/_commonjsHelpers-C4iS2aBk.js +1 -0
  22. package/assets/{add-Dnkf3E3Q.js → add-DHMb_tRw.js} +2 -2
  23. package/assets/all-wallets-Bo3QRxXL.js +6 -0
  24. package/assets/{app-store-C9FH4_zP.js → app-store-BHwDXU8D.js} +2 -2
  25. package/assets/{apple-Dm5w1W69.js → apple-BFX-plRw.js} +2 -2
  26. package/assets/arrow-bottom-Djx9NXV2.js +8 -0
  27. package/assets/{arrow-bottom-circle-Bgw9yiHN.js → arrow-bottom-circle-DcJnW2eo.js} +2 -2
  28. package/assets/arrow-left-BS_dJGSP.js +8 -0
  29. package/assets/arrow-right-B-mwy0Iu.js +8 -0
  30. package/assets/arrow-top-Di1bbZG1.js +8 -0
  31. package/assets/auto-track-pkMvCaah.js +1 -0
  32. package/assets/{bank-qNUWniDB.js → bank-B9SMq-ix.js} +2 -2
  33. package/assets/{basic-DJvhbg9L.js → basic-DijYF-IW.js} +124 -124
  34. package/assets/biconomy-CCw3vtwR.js +1 -0
  35. package/assets/{browser-Du0KKb8R.js → browser-CdKdszu-.js} +2 -2
  36. package/assets/{card-BpDAuOwe.js → card-CQu4Eu8c.js} +2 -2
  37. package/assets/ccip-AgQ5AD9v.js +1 -0
  38. package/assets/chains-D88UzVoE.js +1 -0
  39. package/assets/{checkmark-srdyV91l.js → checkmark-D2vezo75.js} +2 -2
  40. package/assets/{checkmark-bold-BYtPga6u.js → checkmark-bold-DriAapzP.js} +2 -2
  41. package/assets/chevron-bottom-CcFEOVdH.js +8 -0
  42. package/assets/chevron-left-BXS-ybhL.js +8 -0
  43. package/assets/chevron-right-TvO5COya.js +8 -0
  44. package/assets/chevron-top-D84SgxMg.js +8 -0
  45. package/assets/{chrome-store-D-UYtj15.js → chrome-store-rpsfVQln.js} +2 -2
  46. package/assets/{clock-BGyfn2Ix.js → clock-BMJ2gt7b.js} +2 -2
  47. package/assets/close-kAWkeKAP.js +8 -0
  48. package/assets/{coinPlaceholder-o1yCmFLN.js → coinPlaceholder-Dz8MKewa.js} +2 -2
  49. package/assets/common-D37S_OFt.js +1 -0
  50. package/assets/{compass-BrX88OdU.js → compass-BednEqu-.js} +2 -2
  51. package/assets/controller-D0Gc4Hsp.js +2 -0
  52. package/assets/{copy-CGKLgPMf.js → copy-D7rBk-hZ.js} +2 -2
  53. package/assets/core-Bn8Mr-tS.js +907 -0
  54. package/assets/create-submenu-Bu20F8-Z.webp +0 -0
  55. package/assets/createBundlerClient-DhRCLsYO.js +4 -0
  56. package/assets/createClient-C9QPJaZu.js +1 -0
  57. package/assets/cursor-C8UG2IDe.js +3 -0
  58. package/assets/{cursor-transparent--gaS-5ET.js → cursor-transparent-CyP0H3C5.js} +2 -2
  59. package/assets/decimals-B7Pm5rZk.js +1 -0
  60. package/assets/decimals-DedKFk8m.js +1 -0
  61. package/assets/defineChain-7I0Ce1VT.js +1 -0
  62. package/assets/{desktop-D3dzP-FX.js → desktop-LBcRpcZE.js} +2 -2
  63. package/assets/detectExtension-C2uVeK-n.js +1 -0
  64. package/assets/{disconnect-CsHX0nla.js → disconnect-DEBEe-yK.js} +2 -2
  65. package/assets/{discord-TnXCJHRv.js → discord-BlVFKMf0.js} +2 -2
  66. package/assets/emotion-react.browser.esm-BzYQLDSp.js +8 -0
  67. package/assets/emotion-use-insertion-effect-with-fallbacks.browser.esm-TsHx33zg.js +1 -0
  68. package/assets/encode-DvvW4ZKt.js +2 -0
  69. package/assets/engine-CD7SeAap.js +1 -0
  70. package/assets/estimate-gas-CeHGaIbG.js +3 -0
  71. package/assets/estimate-l1-fee-ClMO5l7U.js +1 -0
  72. package/assets/eth_estimateGas-C2ENZ_HR.js +1 -0
  73. package/assets/eth_getStorageAt-BHgF2qz5.js +1 -0
  74. package/assets/eth_getTransactionCount-DWnnw2mX.js +1 -0
  75. package/assets/ethereum-dN7ENYl_.js +1 -0
  76. package/assets/{etherscan-BNOTAlpJ.js → etherscan-C_pqcV9R.js} +2 -2
  77. package/assets/events-B5inrCVE.js +1 -0
  78. package/assets/{exclamation-triangle-3cTnBFEz.js → exclamation-triangle-R9Xq3IaG.js} +2 -2
  79. package/assets/explore-submenu-BFVuYMi9.webp +0 -0
  80. package/assets/{extension-C7i3kBcJ.js → extension-DkA_7Cbg.js} +2 -2
  81. package/assets/external-link-BPOw_fuW.js +8 -0
  82. package/assets/extractIPFS-B4LGER25.js +1 -0
  83. package/assets/{facebook-BtRXxuTh.js → facebook-CMZk_t1A.js} +2 -2
  84. package/assets/{farcaster-DuvCkOsj.js → farcaster-CveILPqa.js} +2 -2
  85. package/assets/fee-data-BKBGP5kG.js +1 -0
  86. package/assets/fetchTokenMetadata-BLDHgO8L.js +2 -0
  87. package/assets/{filters-q4uY0GXA.js → filters-BspTrZpX.js} +2 -2
  88. package/assets/get-ecosystem-wallet-info-D3PrM5FE.js +1 -0
  89. package/assets/getBalance-D7nzATjL.js +2 -0
  90. package/assets/getInstalledModules-Ck_Gj8FO.js +1 -0
  91. package/assets/getNFT-BcCS23O_.js +1 -0
  92. package/assets/getNFT-DXdMP0Q5.js +2 -0
  93. package/assets/{github-DdvkoPeB.js → github-DoFHEMIF.js} +2 -2
  94. package/assets/{google-d4Ql9qix.js → google-NTQi9GVe.js} +2 -2
  95. package/assets/governance-submenu-VTIKvCIL.webp +0 -0
  96. package/assets/{help-circle-BY_Weu8t.js → help-circle-DV0uNPdn.js} +2 -2
  97. package/assets/hex-B0Rx0hII.js +2 -0
  98. package/assets/{id-BJNb6vOI.js → id-UAVc1FOO.js} +1 -1
  99. package/assets/{image-DIsXNsXJ.js → image-BeHBzCPG.js} +2 -2
  100. package/assets/in-app-wallet-calls-CvFtsXP9.js +1 -0
  101. package/assets/index-B2OCb4Ez.js +1 -0
  102. package/assets/index-B65z14KI.js +4 -0
  103. package/assets/index-BAhlRyDG.js +1 -0
  104. package/assets/{index-DOqN8xaU.js → index-BTtTX-5z.js} +1 -1
  105. package/assets/index-BjzJcZq6.js +1 -0
  106. package/assets/index-BjzJcZq6__bundled.js +24 -0
  107. package/assets/index-BozJS3za.js +12 -0
  108. package/assets/index-C05H8NDX.js +1 -0
  109. package/assets/index-C1IoT2if.js +3 -0
  110. package/assets/index-C2hdqzGT.js +2 -0
  111. package/assets/index-CgMDPZul.js +13 -0
  112. package/assets/index-CjuQOkbh.js +2 -0
  113. package/assets/index-CpR9p5nk.js +1 -0
  114. package/assets/index-D1lXZVQu.js +45 -0
  115. package/assets/index-D6ZAha0r.js +395 -0
  116. package/assets/{index-X-a697cI.js → index-DJ7GgcJ9.js} +2 -2
  117. package/assets/index-DajuSfcu.js +2 -0
  118. package/assets/index-DeklogZX.js +1 -0
  119. package/assets/index-DmAaXUNv.js +1 -0
  120. package/assets/index-Dy0yjznp.js +1 -0
  121. package/assets/index-Dy0yjznp__bundled.js +9 -0
  122. package/assets/index-HvoTJwGm.js +1 -0
  123. package/assets/index-MYKNZAUu.js +8 -0
  124. package/assets/index-Tsk25L8E.js +1 -0
  125. package/assets/index.es-C8Kfv-K1.js +11 -0
  126. package/assets/index.es-CAXGMBEH.js +1 -0
  127. package/assets/index.es-D3pP9hN4.js +27 -0
  128. package/assets/index.es-D5YKsq2-.js +2 -0
  129. package/assets/index.umd-DK712HHb.js +1 -0
  130. package/assets/{info-BvPgRaaJ.js → info-CzcA85TO.js} +2 -2
  131. package/assets/{info-circle-sWcom9RD.js → info-circle-D3Mr3R9u.js} +2 -2
  132. package/assets/is-plan-event-enabled-DeNtQvA5.js +1 -0
  133. package/assets/json-BHzNJmTy.js +1 -0
  134. package/assets/jsx-runtime-DncYoG30.js +1 -0
  135. package/assets/jsx-runtime-DncYoG30__bundled.js +9 -0
  136. package/assets/learn-submenu-sfxVP5Db.webp +0 -0
  137. package/assets/{lightbulb-HJchniSu.js → lightbulb-B2FZtM_8.js} +2 -2
  138. package/assets/localBatchGatewayRequest-BIEAG3VG.js +1 -0
  139. package/assets/{mail-DlRijJmV.js → mail-CkhGbows.js} +2 -2
  140. package/assets/marketplace-submenu-CixWTv8_.webp +0 -0
  141. package/assets/{mobile-CoiDw6cg.js → mobile-1H3FtqAS.js} +2 -2
  142. package/assets/{more-LUiRL6x4.js → more-CZiQi624.js} +2 -2
  143. package/assets/{network-placeholder-Cj3jgVfo.js → network-placeholder-DA2bm2rC.js} +2 -2
  144. package/assets/{nftPlaceholder-LkhQmGFs.js → nftPlaceholder-C9t5Ydxp.js} +2 -2
  145. package/assets/off-D8z0OQ3M.js +8 -0
  146. package/assets/op-gas-fee-reducer-CfxMcvXl.js +1 -0
  147. package/assets/openzeppelin-ZKz6sLW9.js +1 -0
  148. package/assets/ownerOf-D1aXOt9Q.js +1 -0
  149. package/assets/parseNft-LjEwmOst.js +2 -0
  150. package/assets/passkeys-CTJ4NPfL.js +1 -0
  151. package/assets/{play-store-DBit2AoS.js → play-store-_X5LrPwx.js} +2 -2
  152. package/assets/{plus-CZe-WgSN.js → plus-JriDhMxt.js} +2 -2
  153. package/assets/preload-helper-BorDCKdG.js +1 -0
  154. package/assets/publicKeyToAddress-CxEKPAKT.js +1 -0
  155. package/assets/{qr-code-BhW7ZXY-.js → qr-code-DaB080BF.js} +2 -2
  156. package/assets/{qr-overlay-DsRPQv6v.js → qr-overlay-CGnFhcTk.js} +1 -1
  157. package/assets/{recycle-horizontal-DBnWoDRV.js → recycle-horizontal-CGeFmMrT.js} +2 -2
  158. package/assets/redux-BNDF-Lt-.js +1 -0
  159. package/assets/{refresh-qvocxvcf.js → refresh-Dgvxxw5C.js} +2 -2
  160. package/assets/remoteEntry.js +1 -0
  161. package/assets/{reown-logo-C-45v-AJ.js → reown-logo-CBX48aN9.js} +2 -2
  162. package/assets/resolveImplementation-Cb2bL1tx.js +1 -0
  163. package/assets/rich-text-react-renderer.es5-D_tE7AHo.js +2 -0
  164. package/assets/rpc-ti0b0r_u.js +3 -0
  165. package/assets/search-DamXBOxM.js +8 -0
  166. package/assets/secp256k1-UEF-yOzn.js +1 -0
  167. package/assets/{send-DI2x4DfJ.js → send-BLpUSx_G.js} +2 -2
  168. package/assets/send-batch-transaction-DnH876GL.js +1 -0
  169. package/assets/send-eip712-transaction-D_FU-Avh.js +2 -0
  170. package/assets/send-gasless-transaction-MP1Q_mLW.js +2 -0
  171. package/assets/serializeTransaction-mtsVBaO6.js +1 -0
  172. package/assets/session-proposal-CM3P7DaL.js +1 -0
  173. package/assets/session-request-Dqw67u3p.js +2 -0
  174. package/assets/sha256-DYtpy1Qz.js +1 -0
  175. package/assets/signing-BFeVjjPi.js +5 -0
  176. package/assets/store-DOLZnwHk.js +1 -0
  177. package/assets/{swapHorizontal-eTjjU7d8.js → swapHorizontal-Br-MZ1tO.js} +2 -2
  178. package/assets/{swapHorizontalBold-B86nJTAP.js → swapHorizontalBold-CkUNbZ1G.js} +2 -2
  179. package/assets/{swapHorizontalMedium-CNT7ELrN.js → swapHorizontalMedium-D3qEQNb5.js} +2 -2
  180. package/assets/{swapHorizontalRoundedBold-R_inXmIh.js → swapHorizontalRoundedBold-CzzBPCtt.js} +2 -2
  181. package/assets/{swapVertical-DBChOUj8.js → swapVertical-Mrn3zm_W.js} +2 -2
  182. package/assets/{telegram-DjYbgHgS.js → telegram-ZTLC9FiA.js} +2 -2
  183. package/assets/thirdweb-CHfVLLbM.js +1 -0
  184. package/assets/thirdweb-D5ezTmuN.js +27 -0
  185. package/assets/{three-dots-VoULPGrI.js → three-dots-DYl4uQjm.js} +2 -2
  186. package/assets/totalSupply-B5jHW8gx.js +1 -0
  187. package/assets/tslib.es6-DbvBTznf.js +1 -0
  188. package/assets/{twitch-ETBgqGHE.js → twitch-DPLkA98Q.js} +2 -2
  189. package/assets/{twitterIcon-N584dzfh.js → twitterIcon-BEY_UAyG.js} +2 -2
  190. package/assets/uid-D00jCazq.js +44 -0
  191. package/assets/{uint8-array-CjVHUazS.js → uint8-array-DZKEMhA1.js} +1 -1
  192. package/assets/utils-C7urdXtO.js +2 -0
  193. package/assets/utils-CozXUO91.js +1 -0
  194. package/assets/{verify-Dp4bztGk.js → verify-DuPdiufm.js} +2 -2
  195. package/assets/{verify-filled-B7WhO3Kn.js → verify-filled-CdqEW5AP.js} +2 -2
  196. package/assets/{w3m-modal-BmEHfmEu.js → w3m-modal-BLzhBUlF.js} +34 -34
  197. package/assets/wait-for-tx-receipt-B-o5aPQ8.js +1 -0
  198. package/assets/{wallet-tXSvlbUa.js → wallet-CZw1g3L8.js} +2 -2
  199. package/assets/{wallet-placeholder-B2e9Wl_u.js → wallet-placeholder-OAkoJuru.js} +2 -2
  200. package/assets/{walletconnect-D70wSjLs.js → walletconnect-BJ3w7-IU.js} +4 -4
  201. package/assets/wallets-Q5RcRyG6.js +16 -0
  202. package/assets/{warning-circle-CsTkZ4Rl.js → warning-circle-DpDeOZKv.js} +2 -2
  203. package/assets/web-connector-CB7tpRui.js +9 -0
  204. package/assets/webSocket-dQW3n9NM.js +3 -0
  205. package/assets/withCache-DYumIHzL.js +1 -0
  206. package/assets/{x-DwOCQuex.js → x-liJqLZUi.js} +2 -2
  207. package/assets/zora-sepolia-DNJ2DQat.js +1 -0
  208. package/index.html +17 -3
  209. package/package.json +3 -3
  210. package/assets/RoobertPRO-Bold-BLoSpx-h.otf +0 -0
  211. package/assets/all-wallets-C5N9p7Oh.js +0 -6
  212. package/assets/arrow-bottom-CXaxVEeb.js +0 -8
  213. package/assets/arrow-left-pgI3hg3C.js +0 -8
  214. package/assets/arrow-right-CyKp2yFa.js +0 -8
  215. package/assets/arrow-top-B2waxVPx.js +0 -8
  216. package/assets/auto-track-BvFI9h3i.js +0 -1
  217. package/assets/biconomy-DZsFbmF0.js +0 -1
  218. package/assets/ccip-CpLmER95.js +0 -1
  219. package/assets/chains-BJ1WS73W.js +0 -1
  220. package/assets/chevron-bottom-C2aa3E9i.js +0 -8
  221. package/assets/chevron-left-jGoftk_A.js +0 -8
  222. package/assets/chevron-right-Dt6SfcNy.js +0 -8
  223. package/assets/chevron-top-CBCgyIVe.js +0 -8
  224. package/assets/close-BQpWkcd5.js +0 -8
  225. package/assets/common-B5-2TPMC.js +0 -1
  226. package/assets/controller-BW9fJMCh.js +0 -2
  227. package/assets/core-f4taWsy5.js +0 -908
  228. package/assets/create-submenu-DEFVbrc5.png +0 -0
  229. package/assets/createBundlerClient-r1Kofl9Y.js +0 -8
  230. package/assets/cursor-l_ly71I2.js +0 -3
  231. package/assets/decimals-BB5yEnWu.js +0 -1
  232. package/assets/decimals-D7yTLBH-.js +0 -1
  233. package/assets/detectExtension-BOyq5ueD.js +0 -1
  234. package/assets/engine-COatTZhI.js +0 -1
  235. package/assets/estimate-l1-fee-gm3XrWSf.js +0 -1
  236. package/assets/eth_estimateGas-A6ba-Fl3.js +0 -1
  237. package/assets/eth_getStorageAt-DiqyV3Wq.js +0 -1
  238. package/assets/eth_getTransactionCount-CF50onAO.js +0 -1
  239. package/assets/ethereum-Bb-GI0c-.js +0 -1
  240. package/assets/events-CjOrSHaz.js +0 -1
  241. package/assets/explore-submenu-KVl6Dc-h.png +0 -0
  242. package/assets/external-link-C6RRSRES.js +0 -8
  243. package/assets/extractIPFS-BchHnCEN.js +0 -1
  244. package/assets/fetchTokenMetadata-ClRC5ORW.js +0 -2
  245. package/assets/get-ecosystem-wallet-info-C2CJ_2OU.js +0 -1
  246. package/assets/getBalance-DGuxWuYL.js +0 -1
  247. package/assets/getInstalledModules-A3tAP18V.js +0 -1
  248. package/assets/getNFT-C7cllYFm.js +0 -1
  249. package/assets/getNFT-CQKD7QHk.js +0 -2
  250. package/assets/governance-submenu-CXxLX9nT.png +0 -0
  251. package/assets/hashTypedData-7WNMs5EV.js +0 -1
  252. package/assets/in-app-wallet-calls-CIRR0eJZ.js +0 -1
  253. package/assets/index-B1P0UjN9.js +0 -1
  254. package/assets/index-BNdVKnva.js +0 -2
  255. package/assets/index-BtvcwkC4.js +0 -1
  256. package/assets/index-C3CMrfih.js +0 -1
  257. package/assets/index-C8ynIJrk.js +0 -395
  258. package/assets/index-Ca6sys5l.js +0 -3
  259. package/assets/index-CvqvWWYJ.js +0 -2
  260. package/assets/index-CxA55UWl.js +0 -1
  261. package/assets/index-D-W42D03.js +0 -12
  262. package/assets/index-DC9TKWAz.js +0 -23
  263. package/assets/index-DFfsl0Io.js +0 -4
  264. package/assets/index-DN2JqH-l.js +0 -895
  265. package/assets/index-DfqIHbWG.js +0 -2
  266. package/assets/index-pQ6ZXw4u.js +0 -13
  267. package/assets/index-qMD90g0X.js +0 -1
  268. package/assets/index.es-B2O4h03u.js +0 -12
  269. package/assets/index.es-BEAksKXY.js +0 -2
  270. package/assets/index.es-Dxxm_SKC.js +0 -1
  271. package/assets/index.es-MXG0VeeZ.js +0 -27
  272. package/assets/index.umd-DvfMpbcY.js +0 -1
  273. package/assets/is-plan-event-enabled-DS1Agtkw.js +0 -1
  274. package/assets/learn-submenu-Xs1jOwfy.png +0 -0
  275. package/assets/localBatchGatewayRequest-CHeIulW5.js +0 -1
  276. package/assets/marketplace-submenu-CjxTqNhj.png +0 -0
  277. package/assets/off-BCDn43Xl.js +0 -8
  278. package/assets/openzeppelin-_xpy9vRo.js +0 -1
  279. package/assets/ownerOf-ClSM4brX.js +0 -1
  280. package/assets/parseNft-BmEusGKu.js +0 -2
  281. package/assets/passkeys-CqFedyqV.js +0 -1
  282. package/assets/resolveImplementation-BssH7H5b.js +0 -1
  283. package/assets/rpc-DMtarHL0.js +0 -3
  284. package/assets/search-CAzZVrZw.js +0 -8
  285. package/assets/secp256k1-C_4ya0Qz.js +0 -1
  286. package/assets/secp256k1-CnKxz2gu.js +0 -1
  287. package/assets/secp256k1-oGq0B4P7.js +0 -1
  288. package/assets/send-batch-transaction-DfUNUZ4Z.js +0 -1
  289. package/assets/send-eip712-transaction-Ro5QmOlW.js +0 -2
  290. package/assets/send-gasless-transaction-B-Uu5KdW.js +0 -2
  291. package/assets/session-proposal-CRjqbz7W.js +0 -1
  292. package/assets/session-request-BI3BlMfs.js +0 -2
  293. package/assets/sha256-ChRob2fv.js +0 -1
  294. package/assets/signing-B1K_Jdsm.js +0 -30
  295. package/assets/thirdweb-0Fl_ECmE.js +0 -27
  296. package/assets/thirdweb-DZ2vK6IO.js +0 -1
  297. package/assets/totalSupply-ClM38QOc.js +0 -1
  298. package/assets/utils-B3vUvlNq.js +0 -1
  299. package/assets/wait-for-tx-receipt-pc2BJc62.js +0 -1
  300. package/assets/wallets-Dj6CY1yi.js +0 -17
  301. package/assets/web-connector-CiZO9RvI.js +0 -9
  302. package/assets/zora-sepolia-CZ4Tf1UH.js +0 -1
@@ -0,0 +1 @@
1
+ import{K as at,q as L,t as kt,Y as F,P as Ht,F as M,V as R,u as J,v as $t,w as Tt}from"./wallets-Q5RcRyG6.js";import{O as Mt,k as Bt,f as Lt,o as g,a as At}from"./index.es-D3pP9hN4.js";import{f as P}from"./index.es-D5YKsq2-.js";import{N as Jt}from"./events-B5inrCVE.js";const ot="error",zt="wss://relay.walletconnect.org",Gt="wc",Vt="universal_provider",x=`${Gt}@2:${Vt}:`,Et="https://rpc.walletconnect.org/v1/",St="generic",Kt=`${Et}bundler`,_="call_status",Wt=86400,v={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function et(i){return i==null||typeof i!="object"&&typeof i!="function"}function qt(i){return Object.getOwnPropertySymbols(i).filter(t=>Object.prototype.propertyIsEnumerable.call(i,t))}function Nt(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Yt="[object RegExp]",Dt="[object String]",_t="[object Number]",Ft="[object Boolean]",Rt="[object Arguments]",Qt="[object Symbol]",Xt="[object Date]",Zt="[object Map]",te="[object Set]",ee="[object Array]",ie="[object ArrayBuffer]",se="[object Object]",re="[object DataView]",ne="[object Uint8Array]",ae="[object Uint8ClampedArray]",oe="[object Uint16Array]",ce="[object Uint32Array]",he="[object Int8Array]",pe="[object Int16Array]",ue="[object Int32Array]",le="[object Float32Array]",de="[object Float64Array]";function it(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function fe(i,t){return D(i,void 0,i,new Map,t)}function D(i,t,e,s=new Map,n=void 0){const a=n?.(i,t,e,s);if(a!=null)return a;if(et(i))return i;if(s.has(i))return s.get(i);if(Array.isArray(i)){const r=new Array(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return Object.hasOwn(i,"index")&&(r.index=i.index),Object.hasOwn(i,"input")&&(r.input=i.input),r}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const r=new RegExp(i.source,i.flags);return r.lastIndex=i.lastIndex,r}if(i instanceof Map){const r=new Map;s.set(i,r);for(const[o,c]of i)r.set(o,D(c,o,e,s,n));return r}if(i instanceof Set){const r=new Set;s.set(i,r);for(const o of i)r.add(D(o,void 0,e,s,n));return r}if(typeof Buffer<"u"&&Buffer.isBuffer(i))return i.subarray();if(it(i)){const r=new(Object.getPrototypeOf(i)).constructor(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return r}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const r=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return s.set(i,r),y(r,i,e,s,n),r}if(typeof File<"u"&&i instanceof File){const r=new File([i],i.name,{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Blob){const r=new Blob([i],{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Error){const r=new i.constructor;return s.set(i,r),r.message=i.message,r.name=i.name,r.stack=i.stack,r.cause=i.cause,y(r,i,e,s,n),r}if(typeof i=="object"&&me(i)){const r=Object.create(Object.getPrototypeOf(i));return s.set(i,r),y(r,i,e,s,n),r}return i}function y(i,t,e=i,s,n){const a=[...Object.keys(t),...qt(t)];for(let r=0;r<a.length;r++){const o=a[r],c=Object.getOwnPropertyDescriptor(i,o);(c==null||c.writable)&&(i[o]=D(t[o],o,e,s,n))}}function me(i){switch(Nt(i)){case Rt:case ee:case ie:case re:case Ft:case Xt:case le:case de:case he:case pe:case ue:case Zt:case _t:case se:case Yt:case te:case Dt:case Qt:case ne:case ae:case oe:case ce:return!0;default:return!1}}function ve(i,t){return fe(i,(e,s,n,a)=>{if(typeof i=="object")switch(Object.prototype.toString.call(i)){case _t:case Dt:case Ft:{const r=new i.constructor(i?.valueOf());return y(r,i),r}case Rt:{const r={};return y(r,i),r.length=i.length,r[Symbol.iterator]=i[Symbol.iterator],r}default:return}})}function ct(i){return ve(i)}function ht(i){return i!==null&&typeof i=="object"&&Nt(i)==="[object Arguments]"}function pt(i){return typeof i=="object"&&i!==null}function ge(){}function Pe(i){return it(i)}function we(i){if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const e=i[Symbol.toStringTag];return e==null||!Object.getOwnPropertyDescriptor(i,Symbol.toStringTag)?.writable?!1:i.toString()===`[object ${e}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function be(i){if(et(i))return i;if(Array.isArray(i)||it(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function ye(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let n=i;for(let a=0;a<e.length;a++){const r=e[a];n=X(n,r,s,new Map)}return n}function X(i,t,e,s){if(et(i)&&(i=Object(i)),t==null||typeof t!="object")return i;if(s.has(t))return be(s.get(t));if(s.set(t,i),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const n=[...Object.keys(t),...qt(t)];for(let a=0;a<n.length;a++){const r=n[a];let o=t[r],c=i[r];if(ht(o)&&(o={...o}),ht(c)&&(c={...c}),typeof Buffer<"u"&&Buffer.isBuffer(o)&&(o=ct(o)),Array.isArray(o))if(typeof c=="object"&&c!=null){const l=[],p=Reflect.ownKeys(c);for(let w=0;w<p.length;w++){const d=p[w];l[d]=c[d]}c=l}else c=[];const u=e(c,o,r,i,t,s);u!=null?i[r]=u:Array.isArray(o)||pt(c)&&pt(o)?i[r]=X(c,o,e,s):c==null&&we(o)?i[r]=X({},o,e,s):c==null&&Pe(o)?i[r]=ct(o):(c===void 0||o!==void 0)&&(i[r]=o)}return i}function Ce(i,...t){return ye(i,...t,ge)}var Ie=Object.defineProperty,Oe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,lt=(i,t,e)=>t in i?Ie(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t)=>{for(var e in t||(t={}))He.call(t,e)&&lt(i,e,t[e]);if(ut)for(var e of ut(t))$e.call(t,e)&&lt(i,e,t[e]);return i},Ae=(i,t)=>Oe(i,je(t));function f(i,t,e){var s;const n=M(i);return((s=t.rpcMap)==null?void 0:s[n.reference])||`${Et}?chainId=${n.namespace}:${n.reference}&projectId=${e}`}function C(i){return i.includes(":")?i.split(":")[1]:i}function xt(i){return i.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Ee(i,t){const e=Object.keys(t.namespaces).filter(n=>n.includes(i));if(!e.length)return[];const s=[];return e.forEach(n=>{const a=t.namespaces[n].accounts;s.push(...a)}),s}function dt(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,n;return((s=e?.chains)==null?void 0:s.length)&&((n=e?.chains)==null?void 0:n.length)>0}))}function k(i={},t={}){const e=dt(ft(i)),s=dt(ft(t));return Ce(e,s)}function ft(i){var t,e,s,n,a;const r={};if(!R(i))return r;for(const[o,c]of Object.entries(i)){const u=Ht(o)?[o]:c.chains,l=c.methods||[],p=c.events||[],w=c.rpcMap||{},d=F(o);r[d]=Ae(U(U({},r[d]),c),{chains:J(u,(t=r[d])==null?void 0:t.chains),methods:J(l,(e=r[d])==null?void 0:e.methods),events:J(p,(s=r[d])==null?void 0:s.events)}),(R(w)||R(((n=r[d])==null?void 0:n.rpcMap)||{}))&&(r[d].rpcMap=U(U({},w),(a=r[d])==null?void 0:a.rpcMap))}return r}function mt(i){return i.includes(":")?i.split(":")[2]:i}function vt(i){const t={};for(const[e,s]of Object.entries(i)){const n=s.methods||[],a=s.events||[],r=s.accounts||[],o=Ht(e)?[e]:s.chains?s.chains:xt(s.accounts);t[e]={chains:o,methods:n,events:a,accounts:r}}return t}function z(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}function Se(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}}const Ut={},h=i=>Ut[i],G=(i,t)=>{Ut[i]=t};var qe=Object.defineProperty,gt=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Pt=(i,t,e)=>t in i?qe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,wt=(i,t)=>{for(var e in t||(t={}))Ne.call(t,e)&&Pt(i,e,t[e]);if(gt)for(var e of gt(t))De.call(t,e)&&Pt(i,e,t[e]);return i};const bt="eip155",_e=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Fe=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,V=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,yt=i=>Object.keys(i).filter(t=>_e.includes(t)).reduce((t,e)=>(t[e]=Re(i[e]),t),{}),Re=i=>typeof i=="string"&&Se(i)?JSON.parse(i):i,xe=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:n={}}=i,a={};if(!R(n)&&!R(s))return;const r=yt(s);for(const o of e){const c=Fe(o);if(!c)continue;a[V(c)]=r;const u=n?.[`${bt}:${c}`];if(u){const l=u?.[`${bt}:${c}:${t}`];a[V(c)]=wt(wt({},a[V(c)]),yt(l||u))}}for(const[o,c]of Object.entries(a))Object.keys(c).length===0&&delete a[o];return Object.keys(a).length>0?a:void 0};var Ue=Object.defineProperty,ke=(i,t,e)=>t in i?Ue(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Te=(i,t,e)=>ke(i,t+"",e);let K;class st{constructor(t){Te(this,"storage"),this.storage=t}async getItem(t){return await this.storage.getItem(t)}async setItem(t,e){return await this.storage.setItem(t,e)}async removeItem(t){return await this.storage.removeItem(t)}static getStorage(t){return K||(K=new st(t)),K}}var Me=Object.defineProperty,Be=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,It=(i,t,e)=>t in i?Me(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Ge=(i,t)=>{for(var e in t||(t={}))Je.call(t,e)&&It(i,e,t[e]);if(Ct)for(var e of Ct(t))ze.call(t,e)&&It(i,e,t[e]);return i},Ve=(i,t)=>Be(i,Le(t));async function Ke(i,t){const e=M(i.result.capabilities.caip345.caip2),s=i.result.capabilities.caip345.transactionHashes,n=await Promise.allSettled(s.map(p=>We(e.reference,p,t))),a=n.filter(p=>p.status==="fulfilled").map(p=>p.value).filter(p=>p);n.filter(p=>p.status==="rejected").forEach(p=>console.warn("Failed to fetch transaction receipt:",p.reason));const r=!a.length||a.some(p=>!p),o=a.every(p=>p?.status==="0x1"),c=a.every(p=>p?.status==="0x0"),u=a.some(p=>p?.status==="0x0");let l;return r?l=100:o?l=200:c?l=500:u&&(l=600),{id:i.result.id,version:i.request.version,atomic:i.request.atomicRequired,chainId:i.request.chainId,capabilities:i.result.capabilities,receipts:a,status:l}}async function We(i,t,e){return await e(parseInt(i)).request(At("eth_getTransactionReceipt",[t]))}async function Ye({sendCalls:i,storage:t}){const e=await t.getItem(_);await t.setItem(_,Ve(Ge({},e),{[i.result.id]:{request:i.request,result:i.result,expiry:Tt(Wt)}}))}async function Qe({resultId:i,storage:t}){const e=await t.getItem(_);if(e){delete e[i],await t.setItem(_,e);for(const s in e)$t(e[s].expiry)&&delete e[s];await t.setItem(_,e)}}async function Xe({resultId:i,storage:t}){const e=await t.getItem(_),s=e?.[i];if(s&&!$t(s.expiry))return s;await Qe({resultId:i,storage:t})}var Ze=Object.defineProperty,ti=(i,t,e)=>t in i?Ze(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,I=(i,t,e)=>ti(i,typeof t!="symbol"?t+"":t,e);class ei{constructor(t){I(this,"name","polkadot"),I(this,"client"),I(this,"httpProviders"),I(this,"events"),I(this,"namespace"),I(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}}var ii=Object.defineProperty,si=Object.defineProperties,ri=Object.getOwnPropertyDescriptors,Ot=Object.getOwnPropertySymbols,ni=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,Z=(i,t,e)=>t in i?ii(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,W=(i,t)=>{for(var e in t||(t={}))ni.call(t,e)&&Z(i,e,t[e]);if(Ot)for(var e of Ot(t))ai.call(t,e)&&Z(i,e,t[e]);return i},Y=(i,t)=>si(i,ri(t)),b=(i,t,e)=>Z(i,typeof t!="symbol"?t+"":t,e);class oi{constructor(t){b(this,"name","eip155"),b(this,"client"),b(this,"chainId"),b(this,"namespace"),b(this,"httpProviders"),b(this,"events"),b(this,"storage"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=st.getStorage(this.client.core.storage)}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(t);case"wallet_getCallsStatus":return await this.getCallStatus(t);case"wallet_sendCalls":return await this.sendCalls(t)}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(parseInt(t),e),this.chainId=parseInt(t),this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,e){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=parseInt(C(e));t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(t){const e=t||this.chainId;return this.httpProviders[e]||(this.httpProviders=Y(W({},this.httpProviders),{[e]:this.createHttpProvider(e)}),this.httpProviders[e])}async handleSwitchChain(t){var e,s;let n=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:n}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}async getCapabilities(t){var e,s,n,a,r;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(n=t.request)==null?void 0:n.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(t.topic),l=((r=u?.sessionProperties)==null?void 0:r.capabilities)||{},p=`${o}${c.join(",")}`,w=l?.[p];if(w)return w;let d;try{d=xe(u,o,c)}catch(B){console.warn("Failed to extract capabilities from session",B)}if(d)return d;const nt=await this.client.request(t);try{await this.client.session.update(t.topic,{sessionProperties:Y(W({},u.sessionProperties||{}),{capabilities:Y(W({},l||{}),{[p]:nt})})})}catch(B){console.warn("Failed to update session with capabilities",B)}return nt}async getCallStatus(t){var e,s,n;const a=this.client.session.get(t.topic),r=(e=a.sessionProperties)==null?void 0:e.bundler_name;if(r){const u=this.getBundlerUrl(t.chainId,r);try{return await this.getUserOperationReceipt(u,t)}catch(l){console.warn("Failed to fetch call status from bundler",l,u)}}const o=(s=a.sessionProperties)==null?void 0:s.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,t)}catch(u){console.warn("Failed to fetch call status from custom bundler",u,o)}const c=await Xe({resultId:(n=t.request.params)==null?void 0:n[0],storage:this.storage});if(c)try{return await Ke(c,this.getHttpProvider.bind(this))}catch(u){console.warn("Failed to fetch call status from stored send calls",u,c)}if(this.namespace.methods.includes(t.request.method))return await this.client.request(t);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(t,e){var s;const n=new URL(t),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(At("eth_getUserOperationReceipt",[(s=e.request.params)==null?void 0:s[0]]))});if(!a.ok)throw new Error(`Failed to fetch user operation receipt - ${a.status}`);return await a.json()}getBundlerUrl(t,e){return`${Kt}?projectId=${this.client.core.projectId}&chainId=${t}&bundler=${e}`}async sendCalls(t){var e,s,n;const a=await this.client.request(t),r=(e=t.request.params)==null?void 0:e[0],o=a?.id,c=a?.capabilities||{},u=(s=c?.caip345)==null?void 0:s.caip2,l=(n=c?.caip345)==null?void 0:n.transactionHashes;return!o||!u||!(l!=null&&l.length)||await Ye({sendCalls:{request:r,result:a},storage:this.storage}),a}}var ci=Object.defineProperty,hi=(i,t,e)=>t in i?ci(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t,e)=>hi(i,typeof t!="symbol"?t+"":t,e);class pi{constructor(t){O(this,"name","solana"),O(this,"client"),O(this,"httpProviders"),O(this,"events"),O(this,"namespace"),O(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}}var ui=Object.defineProperty,li=(i,t,e)=>t in i?ui(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,j=(i,t,e)=>li(i,typeof t!="symbol"?t+"":t,e);class di{constructor(t){j(this,"name","cosmos"),j(this,"client"),j(this,"httpProviders"),j(this,"events"),j(this,"namespace"),j(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}}var fi=Object.defineProperty,mi=(i,t,e)=>t in i?fi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,H=(i,t,e)=>mi(i,typeof t!="symbol"?t+"":t,e);class vi{constructor(t){H(this,"name","algorand"),H(this,"client"),H(this,"httpProviders"),H(this,"events"),H(this,"namespace"),H(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new g(new P(s,h("disableProviderPing")))}}var gi=Object.defineProperty,Pi=(i,t,e)=>t in i?gi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,$=(i,t,e)=>Pi(i,typeof t!="symbol"?t+"":t,e);class wi{constructor(t){$(this,"name","cip34"),$(this,"client"),$(this,"httpProviders"),$(this,"events"),$(this,"namespace"),$(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),n=C(e);t[n]=this.createHttpProvider(n,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}}var bi=Object.defineProperty,yi=(i,t,e)=>t in i?bi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>yi(i,typeof t!="symbol"?t+"":t,e);class Ci{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}}var Ii=Object.defineProperty,Oi=(i,t,e)=>t in i?Ii(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,E=(i,t,e)=>Oi(i,typeof t!="symbol"?t+"":t,e);class ji{constructor(t){E(this,"name","multiversx"),E(this,"client"),E(this,"httpProviders"),E(this,"events"),E(this,"namespace"),E(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}}var Hi=Object.defineProperty,$i=(i,t,e)=>t in i?Hi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,S=(i,t,e)=>$i(i,typeof t!="symbol"?t+"":t,e);class Ai{constructor(t){S(this,"name","near"),S(this,"client"),S(this,"httpProviders"),S(this,"events"),S(this,"namespace"),S(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s,h("disableProviderPing")))}}var Ei=Object.defineProperty,Si=(i,t,e)=>t in i?Ei(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,q=(i,t,e)=>Si(i,typeof t!="symbol"?t+"":t,e);class qi{constructor(t){q(this,"name","tezos"),q(this,"client"),q(this,"httpProviders"),q(this,"events"),q(this,"namespace"),q(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{t[e]=this.createHttpProvider(e)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s))}}var Ni=Object.defineProperty,Di=(i,t,e)=>t in i?Ni(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t,e)=>Di(i,typeof t!="symbol"?t+"":t,e);class _i{constructor(t){N(this,"name",St),N(this,"client"),N(this,"httpProviders"),N(this,"events"),N(this,"namespace"),N(this,"chainId"),this.namespace=t.namespace,this.events=h("events"),this.client=h("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(t.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(t.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(t.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(t.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider(t.chainId).request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getNamespaceName(){const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return M(t).namespace}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var t,e;const s={};return(e=(t=this.namespace)==null?void 0:t.accounts)==null||e.forEach(n=>{const a=M(n);s[a.reference]=this.createHttpProvider(n)}),s}getHttpProvider(t){const e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,h("disableProviderPing")))}}var Fi=Object.defineProperty,Ri=Object.defineProperties,xi=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,Ui=Object.prototype.hasOwnProperty,ki=Object.prototype.propertyIsEnumerable,tt=(i,t,e)=>t in i?Fi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,T=(i,t)=>{for(var e in t||(t={}))Ui.call(t,e)&&tt(i,e,t[e]);if(jt)for(var e of jt(t))ki.call(t,e)&&tt(i,e,t[e]);return i},Q=(i,t)=>Ri(i,xi(t)),m=(i,t,e)=>tt(i,typeof t!="symbol"?t+"":t,e);class rt{constructor(t){m(this,"client"),m(this,"namespaces"),m(this,"optionalNamespaces"),m(this,"sessionProperties"),m(this,"scopedProperties"),m(this,"events",new Jt),m(this,"rpcProviders",{}),m(this,"session"),m(this,"providerOpts"),m(this,"logger"),m(this,"uri"),m(this,"disableProviderPing",!1),this.providerOpts=t,this.logger=typeof t?.logger<"u"&&typeof t?.logger!="string"?t.logger:Mt(Bt({level:t?.logger||ot})),this.disableProviderPing=t?.disableProviderPing||!1}static async init(t){const e=new rt(t);return await e.initialize(),e}async request(t,e,s){const[n,a]=this.validateChain(e);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:T({},t),chainId:`${n}:${a}`,topic:this.session.topic,expiry:s})}sendAsync(t,e,s,n){const a=new Date().getTime();this.request(t,s,n).then(r=>e(null,Lt(a,r))).catch(r=>e(r,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:at("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}async authenticate(t,e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(t),await this.cleanupPendingPairings();const{uri:s,response:n}=await this.client.authenticate(t,e);s&&(this.uri=s,this.events.emit("display_uri",s));const a=await n();if(this.session=a.session,this.session){const r=vt(this.session.namespaces);this.namespaces=k(this.namespaces,r),await this.persist("namespaces",this.namespaces),this.onConnect()}return a}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}removeListener(t,e){this.events.removeListener(t,e)}off(t,e){this.events.off(t,e)}get isWalletConnect(){return!0}async pair(t){const{uri:e,approval:s}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});e&&(this.uri=e,this.events.emit("display_uri",e));const n=await s();this.session=n;const a=vt(n.namespaces);return this.namespaces=k(this.namespaces,a),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(t,e){try{if(!this.session)return;const[s,n]=this.validateChain(t);this.getProvider(s).setDefaultChain(n,e)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){try{this.logger.info("Cleaning up inactive pairings...");const e=this.client.pairing.getAll();if(!L(e))return;for(const s of e)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${e.length}`)}catch(e){this.logger.warn("Failed to cleanup pending pairings",e)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var t,e;if(this.client=this.providerOpts.client||await kt.init({core:this.providerOpts.core,logger:this.providerOpts.logger||ot,relayUrl:this.providerOpts.relayUrl||zt,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(s){throw this.logger.error("Failed to get session",s),new Error(`The provided session: ${(e=(t=this.providerOpts)==null?void 0:t.session)==null?void 0:e.topic} doesn't exist in the Sign client`)}else{const s=this.client.session.getAll();this.session=s[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(e=>F(e)))];G("client",this.client),G("events",this.events),G("disableProviderPing",this.disableProviderPing),t.forEach(e=>{if(!this.session)return;const s=Ee(e,this.session);if(s?.length===0)return;const n=xt(s),a=k(this.namespaces,this.optionalNamespaces),r=Q(T({},a[e]),{accounts:s,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new oi({namespace:r});break;case"algorand":this.rpcProviders[e]=new vi({namespace:r});break;case"solana":this.rpcProviders[e]=new pi({namespace:r});break;case"cosmos":this.rpcProviders[e]=new di({namespace:r});break;case"polkadot":this.rpcProviders[e]=new ei({namespace:r});break;case"cip34":this.rpcProviders[e]=new wi({namespace:r});break;case"elrond":this.rpcProviders[e]=new Ci({namespace:r});break;case"multiversx":this.rpcProviders[e]=new ji({namespace:r});break;case"near":this.rpcProviders[e]=new Ai({namespace:r});break;case"tezos":this.rpcProviders[e]=new qi({namespace:r});break;default:this.rpcProviders[e]=new _i({namespace:r})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{var e;const{topic:s}=t;s===((e=this.session)==null?void 0:e.topic)&&this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{var e;const{params:s,topic:n}=t;if(n!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const r=a.data;r&&L(r)&&this.events.emit("accountsChanged",r.map(mt))}else if(a.name==="chainChanged"){const r=s.chainId,o=s.event.data,c=F(r),u=z(r)!==z(o)?`${c}:${z(o)}`:r;this.onChainChanged(u)}else this.events.emit(a.name,a.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:e})=>{var s,n;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,r=(n=this.client)==null?void 0:n.session.get(t);this.session=Q(T({},r),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:e})}),this.client.on("session_delete",async t=>{var e;t.topic===((e=this.session)==null?void 0:e.topic)&&(await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",Q(T({},at("USER_DISCONNECTED")),{data:t.topic})))}),this.on(v.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){return this.rpcProviders[t]||this.rpcProviders[St]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var e;this.getProvider(t).updateNamespace((e=this.session)==null?void 0:e.namespaces[t])})}setNamespaces(t){const{namespaces:e={},optionalNamespaces:s={},sessionProperties:n,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=n,this.scopedProperties=a}validateChain(t){const[e,s]=t?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[e,s];if(e&&!Object.keys(this.namespaces||{}).map(r=>F(r)).includes(e))throw new Error(`Namespace '${e}' is not configured. Please call connect() first with namespace config.`);if(e&&s)return[e,s];const n=F(Object.keys(this.namespaces)[0]),a=this.rpcProviders[n].getDefaultChain();return[n,a]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}async onChainChanged(t,e=!1){if(!this.namespaces)return;const[s,n]=this.validateChain(t);if(!n)return;this.updateNamespaceChain(s,n);const a=this.getProvider(s).getDefaultChain();e?(this.events.emit("chainChanged",n),this.emitAccountsChangedOnChainChange({namespace:s,previousChainId:a,newChainId:t})):this.getProvider(s).setDefaultChain(n),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:t,previousChainId:e,newChainId:s}){var n,a;try{if(e===s)return;const r=(a=(n=this.session)==null?void 0:n.namespaces[t])==null?void 0:a.accounts;if(!r)return;const o=r.filter(c=>c.includes(`${s}:`)).map(mt);if(!L(o))return;this.events.emit("accountsChanged",o)}catch(r){this.logger.warn("Failed to emit accountsChanged on chain change",r)}}updateNamespaceChain(t,e){if(!this.namespaces)return;const s=this.namespaces[t]?t:`${t}:${e}`,n={chains:[],methods:[],events:[],defaultChain:e};this.namespaces[s]?this.namespaces[s]&&(this.namespaces[s].defaultChain=e):this.namespaces[s]=n}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(t,e){var s;const n=((s=this.session)==null?void 0:s.topic)||"";await this.client.core.storage.setItem(`${x}/${t}${n}`,e)}async getFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";return await this.client.core.storage.getItem(`${x}/${t}${s}`)}async deleteFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";await this.client.core.storage.removeItem(`${x}/${t}${s}`)}async cleanupStorage(){var t;try{if(((t=this.client)==null?void 0:t.session.length)>0)return;const e=await this.client.core.storage.getKeys();for(const s of e)s.startsWith(x)&&await this.client.core.storage.removeItem(s)}catch(e){this.logger.warn("Failed to cleanup storage",e)}}}const Ji=rt;export{Ji as UniversalProvider,rt as default};
@@ -0,0 +1,27 @@
1
+ import{e as St}from"./events-B5inrCVE.js";import{g as Ir,a as Pn,c as de}from"./_commonjsHelpers-C4iS2aBk.js";var Ve={};/*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */var dt=function(e,t){return dt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},dt(e,t)};function Ln(e,t){dt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var bt=function(){return bt=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},bt.apply(this,arguments)};function jn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Mn(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function zn(e,t){return function(r,n){t(r,n,e)}}function kn(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Wn(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(h){s(h)}}function u(f){try{c(n.throw(f))}catch(h){s(h)}}function c(f){f.done?o(f.value):i(f.value).then(a,u)}c((n=n.apply(e,t||[])).next())})}function Hn(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(f){return u([c,f])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(f){c=[6,f],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Vn(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}function qn(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function pt(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ur(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function Yn(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ur(arguments[t]));return e}function Gn(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function Oe(e){return this instanceof Oe?(this.v=e,this):new Oe(e)}function Kn(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(b){n[b]&&(i[b]=function(d){return new Promise(function(l,g){o.push([b,d,l,g])>1||a(b,d)})})}function a(b,d){try{u(n[b](d))}catch(l){h(o[0][3],l)}}function u(b){b.value instanceof Oe?Promise.resolve(b.value.v).then(c,f):h(o[0][2],b)}function c(b){a("next",b)}function f(b){a("throw",b)}function h(b,d){b(d),o.shift(),o.length&&a(o[0][0],o[0][1])}}function $n(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(s){return(r=!r)?{value:Oe(e[i](s)),done:i==="return"}:o?o(s):s}:o}}function Jn(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof pt=="function"?pt(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(s){return new Promise(function(a,u){s=e[o](s),i(a,u,s.done,s.value)})}}function i(o,s,a,u){Promise.resolve(u).then(function(c){o({value:c,done:a})},s)}}function Zn(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Xn(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function Qn(e){return e&&e.__esModule?e:{default:e}}function eo(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function to(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const ro=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return bt},__asyncDelegator:$n,__asyncGenerator:Kn,__asyncValues:Jn,__await:Oe,__awaiter:Wn,__classPrivateFieldGet:eo,__classPrivateFieldSet:to,__createBinding:Vn,__decorate:Mn,__exportStar:qn,__extends:Ln,__generator:Hn,__importDefault:Qn,__importStar:Xn,__makeTemplateObject:Zn,__metadata:kn,__param:zn,__read:Ur,__rest:jn,__spread:Yn,__spreadArrays:Gn,__values:pt},Symbol.toStringTag,{value:"Module"})),qe=Ir(ro);var Qe={},ve={},qt;function no(){if(qt)return ve;qt=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.delay=void 0;function e(t){return new Promise(r=>{setTimeout(()=>{r(!0)},t)})}return ve.delay=e,ve}var ue={},et={},ae={},Yt;function oo(){return Yt||(Yt=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.ONE_THOUSAND=ae.ONE_HUNDRED=void 0,ae.ONE_HUNDRED=100,ae.ONE_THOUSAND=1e3),ae}var tt={},Gt;function io(){return Gt||(Gt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=e.ONE_MINUTE*5,e.TEN_MINUTES=e.ONE_MINUTE*10,e.THIRTY_MINUTES=e.ONE_MINUTE*30,e.SIXTY_MINUTES=e.ONE_MINUTE*60,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=e.ONE_HOUR*3,e.SIX_HOURS=e.ONE_HOUR*6,e.TWELVE_HOURS=e.ONE_HOUR*12,e.TWENTY_FOUR_HOURS=e.ONE_HOUR*24,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=e.ONE_DAY*3,e.FIVE_DAYS=e.ONE_DAY*5,e.SEVEN_DAYS=e.ONE_DAY*7,e.THIRTY_DAYS=e.ONE_DAY*30,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=e.ONE_WEEK*2,e.THREE_WEEKS=e.ONE_WEEK*3,e.FOUR_WEEKS=e.ONE_WEEK*4,e.ONE_YEAR=e.ONE_DAY*365}(tt)),tt}var Kt;function Pr(){return Kt||(Kt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=qe;t.__exportStar(oo(),e),t.__exportStar(io(),e)}(et)),et}var $t;function so(){if($t)return ue;$t=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.fromMiliseconds=ue.toMiliseconds=void 0;const e=Pr();function t(n){return n*e.ONE_THOUSAND}ue.toMiliseconds=t;function r(n){return Math.floor(n/e.ONE_THOUSAND)}return ue.fromMiliseconds=r,ue}var Jt;function uo(){return Jt||(Jt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=qe;t.__exportStar(no(),e),t.__exportStar(so(),e)}(Qe)),Qe}var be={},Zt;function ao(){if(Zt)return be;Zt=1,Object.defineProperty(be,"__esModule",{value:!0}),be.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const i=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:i})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return be.Watch=e,be.default=e,be}var rt={},_e={},Xt;function co(){if(Xt)return _e;Xt=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.IWatch=void 0;class e{}return _e.IWatch=e,_e}var Qt;function fo(){return Qt||(Qt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),qe.__exportStar(co(),e)}(rt)),rt}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=qe;t.__exportStar(uo(),e),t.__exportStar(ao(),e),t.__exportStar(fo(),e),t.__exportStar(Pr(),e)})(Ve);class lo{}let ho=class extends lo{constructor(t){super()}};const er=Ve.FIVE_SECONDS,bo={pulse:"heartbeat_pulse"};let af=class Lr extends ho{constructor(t){super(t),this.events=new St.EventEmitter,this.interval=er,this.interval=t?.interval||er}static async init(t){const r=new Lr(t);return await r.init(),r}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),Ve.toMiliseconds(this.interval))}pulse(){this.events.emit(bo.pulse)}};const po=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Do=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,go=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function wo(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){yo(e);return}return t}function yo(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function cf(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const r=e.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!go.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(po.test(e)||Do.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,wo)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}const Eo=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r),mo=e=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=e.replace(t,'$1"$2n"$3');return JSON.parse(r,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function jr(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return mo(e)}catch{return e}}function Me(e){return typeof e=="string"?e:Eo(e)||""}function vo(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var _o=Fo;function Fo(e,t,r){var n=r&&r.stringify||vo,i=1;if(typeof e=="object"&&e!==null){var o=t.length+i;if(o===1)return e;var s=new Array(o);s[0]=n(e);for(var a=1;a<o;a++)s[a]=n(t[a]);return s.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",f=1-i,h=-1,b=e&&e.length||0,d=0;d<b;){if(e.charCodeAt(d)===37&&d+1<b){switch(h=h>-1?h:0,e.charCodeAt(d+1)){case 100:case 102:if(f>=u||t[f]==null)break;h<d&&(c+=e.slice(h,d)),c+=Number(t[f]),h=d+2,d++;break;case 105:if(f>=u||t[f]==null)break;h<d&&(c+=e.slice(h,d)),c+=Math.floor(Number(t[f])),h=d+2,d++;break;case 79:case 111:case 106:if(f>=u||t[f]===void 0)break;h<d&&(c+=e.slice(h,d));var l=typeof t[f];if(l==="string"){c+="'"+t[f]+"'",h=d+2,d++;break}if(l==="function"){c+=t[f].name||"<anonymous>",h=d+2,d++;break}c+=n(t[f]),h=d+2,d++;break;case 115:if(f>=u)break;h<d&&(c+=e.slice(h,d)),c+=String(t[f]),h=d+2,d++;break;case 37:h<d&&(c+=e.slice(h,d)),c+="%",h=d+2,d++,f--;break}++f}++d}return h===-1?e:(h<b&&(c+=e.slice(h)),c)}const tr=_o;var we=$;const Ce=Io().console||{},So={mapHttpRequest:Ie,mapHttpResponse:Ie,wrapRequestSerializer:nt,wrapResponseSerializer:nt,wrapErrorSerializer:nt,req:Ie,res:Ie,err:Bo};function Oo(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function $(e){e=e||{},e.browser=e.browser||{};const t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||Ce;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},i=Oo(e.browser.serialize,n);let o=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(o=!1);const s=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),e.enabled===!1&&(e.level="silent");const a=e.level||"info",u=Object.create(r);u.log||(u.log=Ae),Object.defineProperty(u,"levelVal",{get:f}),Object.defineProperty(u,"level",{get:h,set:b});const c={transmit:t,serialize:i,asObject:e.browser.asObject,levels:s,timestamp:To(e)};u.levels=$.levels,u.level=a,u.setMaxListeners=u.getMaxListeners=u.emit=u.addListener=u.on=u.prependListener=u.once=u.prependOnceListener=u.removeListener=u.removeAllListeners=u.listeners=u.listenerCount=u.eventNames=u.write=u.flush=Ae,u.serializers=n,u._serialize=i,u._stdErrSerialize=o,u.child=d,t&&(u._logEvent=Dt());function f(){return this.level==="silent"?1/0:this.levels.values[this.level]}function h(){return this._level}function b(l){if(l!=="silent"&&!this.levels.values[l])throw Error("unknown level "+l);this._level=l,pe(c,u,"error","log"),pe(c,u,"fatal","error"),pe(c,u,"warn","error"),pe(c,u,"info","log"),pe(c,u,"debug","log"),pe(c,u,"trace","log")}function d(l,g){if(!l)throw new Error("missing bindings for child Pino");g=g||{},i&&l.serializers&&(g.serializers=l.serializers);const w=g.serializers;if(i&&w){var m=Object.assign({},n,w),S=e.browser.serialize===!0?Object.keys(m):i;delete l.serializers,Ye([l],S,m,this._stdErrSerialize)}function p(E){this._childLevel=(E._childLevel|0)+1,this.error=De(E,l,"error"),this.fatal=De(E,l,"fatal"),this.warn=De(E,l,"warn"),this.info=De(E,l,"info"),this.debug=De(E,l,"debug"),this.trace=De(E,l,"trace"),m&&(this.serializers=m,this._serialize=S),t&&(this._logEvent=Dt([].concat(E._logEvent.bindings,l)))}return p.prototype=this,new p(this)}return u}$.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};$.stdSerializers=So;$.stdTimeFunctions=Object.assign({},{nullTime:Mr,epochTime:zr,unixTime:No,isoTime:Ro});function pe(e,t,r,n){const i=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?Ae:i[r]?i[r]:Ce[r]||Ce[n]||Ae,Co(e,t,r)}function Co(e,t,r){!e.transmit&&t[r]===Ae||(t[r]=function(n){return function(){const o=e.timestamp(),s=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Ce?Ce:this;for(var u=0;u<s.length;u++)s[u]=arguments[u];if(e.serialize&&!e.asObject&&Ye(s,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?n.call(a,Ao(this,r,s,o)):n.apply(a,s),e.transmit){const c=e.transmit.level||t.level,f=$.levels.values[c],h=$.levels.values[r];if(h<f)return;xo(this,{ts:o,methodLevel:r,methodValue:h,transmitValue:$.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},s)}}}(t[r]))}function Ao(e,t,r,n){e._serialize&&Ye(r,e._serialize,e.serializers,e._stdErrSerialize);const i=r.slice();let o=i[0];const s={};n&&(s.time=n),s.level=$.levels.values[t];let a=(e._childLevel|0)+1;if(a<1&&(a=1),o!==null&&typeof o=="object"){for(;a--&&typeof i[0]=="object";)Object.assign(s,i.shift());o=i.length?tr(i.shift(),i):void 0}else typeof o=="string"&&(o=tr(i.shift(),i));return o!==void 0&&(s.msg=o),s}function Ye(e,t,r,n){for(const i in e)if(n&&e[i]instanceof Error)e[i]=$.stdSerializers.err(e[i]);else if(typeof e[i]=="object"&&!Array.isArray(e[i]))for(const o in e[i])t&&t.indexOf(o)>-1&&o in r&&(e[i][o]=r[o](e[i][o]))}function De(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return e[r].apply(this,n)}}function xo(e,t,r){const n=t.send,i=t.ts,o=t.methodLevel,s=t.methodValue,a=t.val,u=e._logEvent.bindings;Ye(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(c){return u.indexOf(c)===-1}),e._logEvent.level.label=o,e._logEvent.level.value=s,n(o,e._logEvent,a),e._logEvent=Dt(u)}function Dt(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Bo(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)t[r]===void 0&&(t[r]=e[r]);return t}function To(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Mr:zr}function Ie(){return{}}function nt(e){return e}function Ae(){}function Mr(){return!1}function zr(){return Date.now()}function No(){return Math.round(Date.now()/1e3)}function Ro(){return new Date(Date.now()).toISOString()}function Io(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}const kr=Pn(we),Uo={level:"info"},Be="custom_context",Ot=1e3*1024;class Po{constructor(t){this.nodeValue=t,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}let rr=class{constructor(t){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=t,this.sizeInBytes=0}append(t){const r=new Po(t);if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${t} with size ${r.size}`);for(;this.size+r.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=r),this.tail=r):(this.head=r,this.tail=r),this.lengthInNodes++,this.sizeInBytes+=r.size}shift(){if(!this.head)return;const t=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=t.size}toArray(){const t=[];let r=this.head;for(;r!==null;)t.push(r.value),r=r.next;return t}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let t=this.head;return{next:()=>{if(!t)return{done:!0,value:null};const r=t.value;return t=t.next,{done:!1,value:r}}}}};class Wr{constructor(t,r=Ot){this.level=t??"error",this.levelValue=we.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new rr(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(t,r){r===we.levels.values.error?console.error(t):r===we.levels.values.warn?console.warn(t):r===we.levels.values.debug?console.debug(t):r===we.levels.values.trace?console.trace(t):console.log(t)}appendToLogs(t){this.logs.append(Me({timestamp:new Date().toISOString(),log:t}));const r=typeof t=="string"?JSON.parse(t).level:t.level;r>=this.levelValue&&this.forwardToConsole(t,r)}getLogs(){return this.logs}clearLogs(){this.logs=new rr(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(t){const r=this.getLogArray();return r.push(Me({extraMetadata:t})),new Blob(r,{type:"application/json"})}}class Lo{constructor(t,r=Ot){this.baseChunkLogger=new Wr(t,r)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}downloadLogsBlobInBrowser(t){const r=URL.createObjectURL(this.logsToBlob(t)),n=document.createElement("a");n.href=r,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}}class jo{constructor(t,r=Ot){this.baseChunkLogger=new Wr(t,r)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}}var Mo=Object.defineProperty,zo=Object.defineProperties,ko=Object.getOwnPropertyDescriptors,nr=Object.getOwnPropertySymbols,Wo=Object.prototype.hasOwnProperty,Ho=Object.prototype.propertyIsEnumerable,or=(e,t,r)=>t in e?Mo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ze=(e,t)=>{for(var r in t||(t={}))Wo.call(t,r)&&or(e,r,t[r]);if(nr)for(var r of nr(t))Ho.call(t,r)&&or(e,r,t[r]);return e},ke=(e,t)=>zo(e,ko(t));function lf(e){return ke(ze({},e),{level:e?.level||Uo.level})}function Vo(e,t=Be){return e[t]||""}function qo(e,t,r=Be){return e[r]=t,e}function Yo(e,t=Be){let r="";return typeof e.bindings>"u"?r=Vo(e,t):r=e.bindings().context||"",r}function Go(e,t,r=Be){const n=Yo(e,r);return n.trim()?`${n}/${t}`:t}function hf(e,t,r=Be){const n=Go(e,t,r),i=e.child({context:n});return qo(i,n,r)}function Ko(e){var t,r;const n=new Lo((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:kr(ke(ze({},e.opts),{level:"trace",browser:ke(ze({},(r=e.opts)==null?void 0:r.browser),{write:i=>n.write(i)})})),chunkLoggerController:n}}function $o(e){var t;const r=new jo((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:kr(ke(ze({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}function df(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?Ko(e):$o(e)}function Jo(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Hr(e,...t){if(!Jo(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function ir(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Zo(e,t){Hr(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}const ge=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ot=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);function Xo(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function Vr(e){return typeof e=="string"&&(e=Xo(e)),Hr(e),e}class Qo{clone(){return this._cloneInto()}}function ei(e){const t=n=>e().update(Vr(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function qr(e=32){if(ge&&typeof ge.getRandomValues=="function")return ge.getRandomValues(new Uint8Array(e));if(ge&&typeof ge.randomBytes=="function")return ge.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}function ti(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,s,n),e.setUint32(t+c,a,n)}class ri extends Qo{constructor(t,r,n,i){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ot(this.buffer)}update(t){ir(this);const{view:r,buffer:n,blockLen:i}=this;t=Vr(t);const o=t.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a===i){const u=ot(t);for(;i<=o-s;s+=i)this.process(u,s);continue}n.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){ir(this),Zo(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:o}=this;let{pos:s}=this;r[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>i-s&&(this.process(n,0),s=0);for(let h=s;h<i;h++)r[h]=0;ti(n,i-8,BigInt(this.length*8),o),this.process(n,0);const a=ot(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=u/4,f=this.get();if(c>f.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<c;h++)a.setUint32(4*h,f[h],o)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:o,destroyed:s,pos:a}=this;return t.length=i,t.pos=a,t.finished=o,t.destroyed=s,i%r&&t.buffer.set(n),t}}const Ue=BigInt(2**32-1),gt=BigInt(32);function Yr(e,t=!1){return t?{h:Number(e&Ue),l:Number(e>>gt&Ue)}:{h:Number(e>>gt&Ue)|0,l:Number(e&Ue)|0}}function ni(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:s}=Yr(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]}const oi=(e,t)=>BigInt(e>>>0)<<gt|BigInt(t>>>0),ii=(e,t,r)=>e>>>r,si=(e,t,r)=>e<<32-r|t>>>r,ui=(e,t,r)=>e>>>r|t<<32-r,ai=(e,t,r)=>e<<32-r|t>>>r,ci=(e,t,r)=>e<<64-r|t>>>r-32,fi=(e,t,r)=>e>>>r-32|t<<64-r,li=(e,t)=>t,hi=(e,t)=>e,di=(e,t,r)=>e<<r|t>>>32-r,bi=(e,t,r)=>t<<r|e>>>32-r,pi=(e,t,r)=>t<<r-32|e>>>64-r,Di=(e,t,r)=>e<<r-32|t>>>64-r;function gi(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}const wi=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),yi=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,Ei=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),mi=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0,vi=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0),_i=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0,F={fromBig:Yr,split:ni,toBig:oi,shrSH:ii,shrSL:si,rotrSH:ui,rotrSL:ai,rotrBH:ci,rotrBL:fi,rotr32H:li,rotr32L:hi,rotlSH:di,rotlSL:bi,rotlBH:pi,rotlBL:Di,add:gi,add3L:wi,add3H:yi,add4L:Ei,add4H:mi,add5H:_i,add5L:vi},[Fi,Si]=F.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),ne=new Uint32Array(80),oe=new Uint32Array(80);class Oi extends ri{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:r,Bh:n,Bl:i,Ch:o,Cl:s,Dh:a,Dl:u,Eh:c,El:f,Fh:h,Fl:b,Gh:d,Gl:l,Hh:g,Hl:w}=this;return[t,r,n,i,o,s,a,u,c,f,h,b,d,l,g,w]}set(t,r,n,i,o,s,a,u,c,f,h,b,d,l,g,w){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=a|0,this.Dl=u|0,this.Eh=c|0,this.El=f|0,this.Fh=h|0,this.Fl=b|0,this.Gh=d|0,this.Gl=l|0,this.Hh=g|0,this.Hl=w|0}process(t,r){for(let p=0;p<16;p++,r+=4)ne[p]=t.getUint32(r),oe[p]=t.getUint32(r+=4);for(let p=16;p<80;p++){const E=ne[p-15]|0,O=oe[p-15]|0,N=F.rotrSH(E,O,1)^F.rotrSH(E,O,8)^F.shrSH(E,O,7),B=F.rotrSL(E,O,1)^F.rotrSL(E,O,8)^F.shrSL(E,O,7),C=ne[p-2]|0,U=oe[p-2]|0,le=F.rotrSH(C,U,19)^F.rotrBH(C,U,61)^F.shrSH(C,U,6),ie=F.rotrSL(C,U,19)^F.rotrBL(C,U,61)^F.shrSL(C,U,6),he=F.add4L(B,ie,oe[p-7],oe[p-16]),me=F.add4H(he,N,le,ne[p-7],ne[p-16]);ne[p]=me|0,oe[p]=he|0}let{Ah:n,Al:i,Bh:o,Bl:s,Ch:a,Cl:u,Dh:c,Dl:f,Eh:h,El:b,Fh:d,Fl:l,Gh:g,Gl:w,Hh:m,Hl:S}=this;for(let p=0;p<80;p++){const E=F.rotrSH(h,b,14)^F.rotrSH(h,b,18)^F.rotrBH(h,b,41),O=F.rotrSL(h,b,14)^F.rotrSL(h,b,18)^F.rotrBL(h,b,41),N=h&d^~h&g,B=b&l^~b&w,C=F.add5L(S,O,B,Si[p],oe[p]),U=F.add5H(C,m,E,N,Fi[p],ne[p]),le=C|0,ie=F.rotrSH(n,i,28)^F.rotrBH(n,i,34)^F.rotrBH(n,i,39),he=F.rotrSL(n,i,28)^F.rotrBL(n,i,34)^F.rotrBL(n,i,39),me=n&o^n&a^o&a,Ze=i&s^i&u^s&u;m=g|0,S=w|0,g=d|0,w=l|0,d=h|0,l=b|0,{h,l:b}=F.add(c|0,f|0,U|0,le|0),c=a|0,f=u|0,a=o|0,u=s|0,o=n|0,s=i|0;const v=F.add3L(le,he,Ze);n=F.add3H(v,U,ie,me),i=v|0}({h:n,l:i}=F.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:o,l:s}=F.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:a,l:u}=F.add(this.Ch|0,this.Cl|0,a|0,u|0),{h:c,l:f}=F.add(this.Dh|0,this.Dl|0,c|0,f|0),{h,l:b}=F.add(this.Eh|0,this.El|0,h|0,b|0),{h:d,l}=F.add(this.Fh|0,this.Fl|0,d|0,l|0),{h:g,l:w}=F.add(this.Gh|0,this.Gl|0,g|0,w|0),{h:m,l:S}=F.add(this.Hh|0,this.Hl|0,m|0,S|0),this.set(n,i,o,s,a,u,c,f,h,b,d,l,g,w,m,S)}roundClean(){ne.fill(0),oe.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Ci=ei(()=>new Oi);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ct=BigInt(0),Gr=BigInt(1),Ai=BigInt(2);function At(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function xt(e){if(!At(e))throw new Error("Uint8Array expected")}function it(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}const xi=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Bt(e){xt(e);let t="";for(let r=0;r<e.length;r++)t+=xi[e[r]];return t}function Kr(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Ct:BigInt("0x"+e)}const X={_0:48,_9:57,A:65,F:70,a:97,f:102};function sr(e){if(e>=X._0&&e<=X._9)return e-X._0;if(e>=X.A&&e<=X.F)return e-(X.A-10);if(e>=X.a&&e<=X.f)return e-(X.a-10)}function $r(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let i=0,o=0;i<r;i++,o+=2){const s=sr(e.charCodeAt(o)),a=sr(e.charCodeAt(o+1));if(s===void 0||a===void 0){const u=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+u+'" at index '+o)}n[i]=s*16+a}return n}function Bi(e){return Kr(Bt(e))}function je(e){return xt(e),Kr(Bt(Uint8Array.from(e).reverse()))}function Jr(e,t){return $r(e.toString(16).padStart(t*2,"0"))}function wt(e,t){return Jr(e,t).reverse()}function Q(e,t,r){let n;if(typeof t=="string")try{n=$r(t)}catch(o){throw new Error(e+" must be hex string or Uint8Array, cause: "+o)}else if(At(t))n=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(e+" of length "+r+" expected, got "+i);return n}function ur(...e){let t=0;for(let n=0;n<e.length;n++){const i=e[n];xt(i),t+=i.length}const r=new Uint8Array(t);for(let n=0,i=0;n<e.length;n++){const o=e[n];r.set(o,i),i+=o.length}return r}const st=e=>typeof e=="bigint"&&Ct<=e;function Ti(e,t,r){return st(e)&&st(t)&&st(r)&&t<=e&&e<r}function Fe(e,t,r,n){if(!Ti(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function Ni(e){let t;for(t=0;e>Ct;e>>=Gr,t+=1);return t}const Ri=e=>(Ai<<BigInt(e-1))-Gr,Ii={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||At(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Tt(e,t,r={}){const n=(i,o,s)=>{const a=Ii[o];if(typeof a!="function")throw new Error("invalid validator function");const u=e[i];if(!(s&&u===void 0)&&!a(u,e))throw new Error("param "+String(i)+" is invalid. Expected "+o+", got "+u)};for(const[i,o]of Object.entries(t))n(i,o,!1);for(const[i,o]of Object.entries(r))n(i,o,!0);return e}function ar(e){const t=new WeakMap;return(r,...n)=>{const i=t.get(r);if(i!==void 0)return i;const o=e(r,...n);return t.set(r,o),o}}const z=BigInt(0),j=BigInt(1),ce=BigInt(2),Ui=BigInt(3),yt=BigInt(4),cr=BigInt(5),fr=BigInt(8);function M(e,t){const r=e%t;return r>=z?r:t+r}function Pi(e,t,r){if(t<z)throw new Error("invalid exponent, negatives unsupported");if(r<=z)throw new Error("invalid modulus");if(r===j)return z;let n=j;for(;t>z;)t&j&&(n=n*e%r),e=e*e%r,t>>=j;return n}function K(e,t,r){let n=e;for(;t-- >z;)n*=n,n%=r;return n}function lr(e,t){if(e===z)throw new Error("invert: expected non-zero number");if(t<=z)throw new Error("invert: expected positive modulus, got "+t);let r=M(e,t),n=t,i=z,o=j;for(;r!==z;){const s=n/r,a=n%r,u=i-o*s;n=r,r=a,i=o,o=u}if(n!==j)throw new Error("invert: does not exist");return M(i,t)}function Li(e){const t=(e-j)/ce;let r,n,i;for(r=e-j,n=0;r%ce===z;r/=ce,n++);for(i=ce;i<e&&Pi(i,t,e)!==e-j;i++)if(i>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){const s=(e+j)/yt;return function(a,u){const c=a.pow(u,s);if(!a.eql(a.sqr(c),u))throw new Error("Cannot find square root");return c}}const o=(r+j)/ce;return function(s,a){if(s.pow(a,t)===s.neg(s.ONE))throw new Error("Cannot find square root");let u=n,c=s.pow(s.mul(s.ONE,i),r),f=s.pow(a,o),h=s.pow(a,r);for(;!s.eql(h,s.ONE);){if(s.eql(h,s.ZERO))return s.ZERO;let b=1;for(let l=s.sqr(h);b<u&&!s.eql(l,s.ONE);b++)l=s.sqr(l);const d=s.pow(c,j<<BigInt(u-b-1));c=s.sqr(d),f=s.mul(f,d),h=s.mul(h,c),u=b}return f}}function ji(e){if(e%yt===Ui){const t=(e+j)/yt;return function(r,n){const i=r.pow(n,t);if(!r.eql(r.sqr(i),n))throw new Error("Cannot find square root");return i}}if(e%fr===cr){const t=(e-cr)/fr;return function(r,n){const i=r.mul(n,ce),o=r.pow(i,t),s=r.mul(n,o),a=r.mul(r.mul(s,ce),o),u=r.mul(s,r.sub(a,r.ONE));if(!r.eql(r.sqr(u),n))throw new Error("Cannot find square root");return u}}return Li(e)}const Mi=(e,t)=>(M(e,t)&j)===j,zi=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ki(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=zi.reduce((n,i)=>(n[i]="function",n),t);return Tt(e,r)}function Wi(e,t,r){if(r<z)throw new Error("invalid exponent, negatives unsupported");if(r===z)return e.ONE;if(r===j)return t;let n=e.ONE,i=t;for(;r>z;)r&j&&(n=e.mul(n,i)),i=e.sqr(i),r>>=j;return n}function Hi(e,t){const r=new Array(t.length),n=t.reduce((o,s,a)=>e.is0(s)?o:(r[a]=o,e.mul(o,s)),e.ONE),i=e.inv(n);return t.reduceRight((o,s,a)=>e.is0(s)?o:(r[a]=e.mul(o,r[a]),e.mul(o,s)),i),r}function Zr(e,t){const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Xr(e,t,r=!1,n={}){if(e<=z)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:i,nByteLength:o}=Zr(e,t);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let s;const a=Object.freeze({ORDER:e,isLE:r,BITS:i,BYTES:o,MASK:Ri(i),ZERO:z,ONE:j,create:u=>M(u,e),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return z<=u&&u<e},is0:u=>u===z,isOdd:u=>(u&j)===j,neg:u=>M(-u,e),eql:(u,c)=>u===c,sqr:u=>M(u*u,e),add:(u,c)=>M(u+c,e),sub:(u,c)=>M(u-c,e),mul:(u,c)=>M(u*c,e),pow:(u,c)=>Wi(a,u,c),div:(u,c)=>M(u*lr(c,e),e),sqrN:u=>u*u,addN:(u,c)=>u+c,subN:(u,c)=>u-c,mulN:(u,c)=>u*c,inv:u=>lr(u,e),sqrt:n.sqrt||(u=>(s||(s=ji(e)),s(a,u))),invertBatch:u=>Hi(a,u),cmov:(u,c,f)=>f?c:u,toBytes:u=>r?wt(u,o):Jr(u,o),fromBytes:u=>{if(u.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+u.length);return r?je(u):Bi(u)}});return Object.freeze(a)}const hr=BigInt(0),Pe=BigInt(1);function ut(e,t){const r=t.negate();return e?r:t}function Qr(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function at(e,t){Qr(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1);return{windows:r,windowSize:n}}function Vi(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function qi(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}const ct=new WeakMap,en=new WeakMap;function ft(e){return en.get(e)||1}function Yi(e,t){return{constTimeNegate:ut,hasPrecomputes(r){return ft(r)!==1},unsafeLadder(r,n,i=e.ZERO){let o=r;for(;n>hr;)n&Pe&&(i=i.add(o)),o=o.double(),n>>=Pe;return i},precomputeWindow(r,n){const{windows:i,windowSize:o}=at(n,t),s=[];let a=r,u=a;for(let c=0;c<i;c++){u=a,s.push(u);for(let f=1;f<o;f++)u=u.add(a),s.push(u);a=u.double()}return s},wNAF(r,n,i){const{windows:o,windowSize:s}=at(r,t);let a=e.ZERO,u=e.BASE;const c=BigInt(2**r-1),f=2**r,h=BigInt(r);for(let b=0;b<o;b++){const d=b*s;let l=Number(i&c);i>>=h,l>s&&(l-=f,i+=Pe);const g=d,w=d+Math.abs(l)-1,m=b%2!==0,S=l<0;l===0?u=u.add(ut(m,n[g])):a=a.add(ut(S,n[w]))}return{p:a,f:u}},wNAFUnsafe(r,n,i,o=e.ZERO){const{windows:s,windowSize:a}=at(r,t),u=BigInt(2**r-1),c=2**r,f=BigInt(r);for(let h=0;h<s;h++){const b=h*a;if(i===hr)break;let d=Number(i&u);if(i>>=f,d>a&&(d-=c,i+=Pe),d===0)continue;let l=n[b+Math.abs(d)-1];d<0&&(l=l.negate()),o=o.add(l)}return o},getPrecomputes(r,n,i){let o=ct.get(n);return o||(o=this.precomputeWindow(n,r),r!==1&&ct.set(n,i(o))),o},wNAFCached(r,n,i){const o=ft(r);return this.wNAF(o,this.getPrecomputes(o,r,i),n)},wNAFCachedUnsafe(r,n,i,o){const s=ft(r);return s===1?this.unsafeLadder(r,n,o):this.wNAFUnsafe(s,this.getPrecomputes(s,r,i),n,o)},setWindowSize(r,n){Qr(n,t),en.set(r,n),ct.delete(r)}}}function Gi(e,t,r,n){if(Vi(r,e),qi(n,t),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const i=e.ZERO,o=Ni(BigInt(r.length)),s=o>12?o-3:o>4?o-2:o?2:1,a=(1<<s)-1,u=new Array(a+1).fill(i),c=Math.floor((t.BITS-1)/s)*s;let f=i;for(let h=c;h>=0;h-=s){u.fill(i);for(let d=0;d<n.length;d++){const l=n[d],g=Number(l>>BigInt(h)&BigInt(a));u[g]=u[g].add(r[d])}let b=i;for(let d=u.length-1,l=i;d>0;d--)l=l.add(u[d]),b=b.add(l);if(f=f.add(b),h!==0)for(let d=0;d<s;d++)f=f.double()}return f}function Ki(e){return ki(e.Fp),Tt(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Zr(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const G=BigInt(0),q=BigInt(1),Le=BigInt(2),$i=BigInt(8),Ji={zip215:!0};function Zi(e){const t=Ki(e);return Tt(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function Xi(e){const t=Zi(e),{Fp:r,n,prehash:i,hash:o,randomBytes:s,nByteLength:a,h:u}=t,c=Le<<BigInt(a*8)-q,f=r.create,h=Xr(t.n,t.nBitLength),b=t.uvRatio||((v,D)=>{try{return{isValid:!0,value:r.sqrt(v*r.inv(D))}}catch{return{isValid:!1,value:G}}}),d=t.adjustScalarBytes||(v=>v),l=t.domain||((v,D,y)=>{if(it("phflag",y),D.length||y)throw new Error("Contexts/pre-hash are not supported");return v});function g(v,D){Fe("coordinate "+v,D,G,c)}function w(v){if(!(v instanceof p))throw new Error("ExtendedPoint expected")}const m=ar((v,D)=>{const{ex:y,ey:_,ez:A}=v,x=v.is0();D==null&&(D=x?$i:r.inv(A));const T=f(y*D),P=f(_*D),R=f(A*D);if(x)return{x:G,y:q};if(R!==q)throw new Error("invZ was invalid");return{x:T,y:P}}),S=ar(v=>{const{a:D,d:y}=t;if(v.is0())throw new Error("bad point: ZERO");const{ex:_,ey:A,ez:x,et:T}=v,P=f(_*_),R=f(A*A),L=f(x*x),k=f(L*L),V=f(P*D),J=f(L*f(V+R)),Z=f(k+f(y*f(P*R)));if(J!==Z)throw new Error("bad point: equation left != right (1)");const Y=f(_*A),re=f(x*T);if(Y!==re)throw new Error("bad point: equation left != right (2)");return!0});class p{constructor(D,y,_,A){this.ex=D,this.ey=y,this.ez=_,this.et=A,g("x",D),g("y",y),g("z",_),g("t",A),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(D){if(D instanceof p)throw new Error("extended point not allowed");const{x:y,y:_}=D||{};return g("x",y),g("y",_),new p(y,_,q,f(y*_))}static normalizeZ(D){const y=r.invertBatch(D.map(_=>_.ez));return D.map((_,A)=>_.toAffine(y[A])).map(p.fromAffine)}static msm(D,y){return Gi(p,h,D,y)}_setWindowSize(D){N.setWindowSize(this,D)}assertValidity(){S(this)}equals(D){w(D);const{ex:y,ey:_,ez:A}=this,{ex:x,ey:T,ez:P}=D,R=f(y*P),L=f(x*A),k=f(_*P),V=f(T*A);return R===L&&k===V}is0(){return this.equals(p.ZERO)}negate(){return new p(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){const{a:D}=t,{ex:y,ey:_,ez:A}=this,x=f(y*y),T=f(_*_),P=f(Le*f(A*A)),R=f(D*x),L=y+_,k=f(f(L*L)-x-T),V=R+T,J=V-P,Z=R-T,Y=f(k*J),re=f(V*Z),se=f(k*Z),Re=f(J*V);return new p(Y,re,Re,se)}add(D){w(D);const{a:y,d:_}=t,{ex:A,ey:x,ez:T,et:P}=this,{ex:R,ey:L,ez:k,et:V}=D;if(y===BigInt(-1)){const jt=f((x-A)*(L+R)),Mt=f((x+A)*(L-R)),Xe=f(Mt-jt);if(Xe===G)return this.double();const zt=f(T*Le*V),kt=f(P*Le*k),Wt=kt+zt,Ht=Mt+jt,Vt=kt-zt,Nn=f(Wt*Xe),Rn=f(Ht*Vt),In=f(Wt*Vt),Un=f(Xe*Ht);return new p(Nn,Rn,Un,In)}const J=f(A*R),Z=f(x*L),Y=f(P*_*V),re=f(T*k),se=f((A+x)*(R+L)-J-Z),Re=re-Y,Pt=re+Y,Lt=f(Z-y*J),An=f(se*Re),xn=f(Pt*Lt),Bn=f(se*Lt),Tn=f(Re*Pt);return new p(An,xn,Tn,Bn)}subtract(D){return this.add(D.negate())}wNAF(D){return N.wNAFCached(this,D,p.normalizeZ)}multiply(D){const y=D;Fe("scalar",y,q,n);const{p:_,f:A}=this.wNAF(y);return p.normalizeZ([_,A])[0]}multiplyUnsafe(D,y=p.ZERO){const _=D;return Fe("scalar",_,G,n),_===G?O:this.is0()||_===q?this:N.wNAFCachedUnsafe(this,_,p.normalizeZ,y)}isSmallOrder(){return this.multiplyUnsafe(u).is0()}isTorsionFree(){return N.unsafeLadder(this,n).is0()}toAffine(D){return m(this,D)}clearCofactor(){const{h:D}=t;return D===q?this:this.multiplyUnsafe(D)}static fromHex(D,y=!1){const{d:_,a:A}=t,x=r.BYTES;D=Q("pointHex",D,x),it("zip215",y);const T=D.slice(),P=D[x-1];T[x-1]=P&-129;const R=je(T),L=y?c:r.ORDER;Fe("pointHex.y",R,G,L);const k=f(R*R),V=f(k-q),J=f(_*k-A);let{isValid:Z,value:Y}=b(V,J);if(!Z)throw new Error("Point.fromHex: invalid y coordinate");const re=(Y&q)===q,se=(P&128)!==0;if(!y&&Y===G&&se)throw new Error("Point.fromHex: x=0 and x_0=1");return se!==re&&(Y=f(-Y)),p.fromAffine({x:Y,y:R})}static fromPrivateKey(D){return U(D).point}toRawBytes(){const{x:D,y}=this.toAffine(),_=wt(y,r.BYTES);return _[_.length-1]|=D&q?128:0,_}toHex(){return Bt(this.toRawBytes())}}p.BASE=new p(t.Gx,t.Gy,q,f(t.Gx*t.Gy)),p.ZERO=new p(G,q,q,G);const{BASE:E,ZERO:O}=p,N=Yi(p,a*8);function B(v){return M(v,n)}function C(v){return B(je(v))}function U(v){const D=r.BYTES;v=Q("private key",v,D);const y=Q("hashed private key",o(v),2*D),_=d(y.slice(0,D)),A=y.slice(D,2*D),x=C(_),T=E.multiply(x),P=T.toRawBytes();return{head:_,prefix:A,scalar:x,point:T,pointBytes:P}}function le(v){return U(v).pointBytes}function ie(v=new Uint8Array,...D){const y=ur(...D);return C(o(l(y,Q("context",v),!!i)))}function he(v,D,y={}){v=Q("message",v),i&&(v=i(v));const{prefix:_,scalar:A,pointBytes:x}=U(D),T=ie(y.context,_,v),P=E.multiply(T).toRawBytes(),R=ie(y.context,P,x,v),L=B(T+R*A);Fe("signature.s",L,G,n);const k=ur(P,wt(L,r.BYTES));return Q("result",k,r.BYTES*2)}const me=Ji;function Ze(v,D,y,_=me){const{context:A,zip215:x}=_,T=r.BYTES;v=Q("signature",v,2*T),D=Q("message",D),y=Q("publicKey",y,T),x!==void 0&&it("zip215",x),i&&(D=i(D));const P=je(v.slice(T,2*T));let R,L,k;try{R=p.fromHex(y,x),L=p.fromHex(v.slice(0,T),x),k=E.multiplyUnsafe(P)}catch{return!1}if(!x&&R.isSmallOrder())return!1;const V=ie(A,L.toRawBytes(),R.toRawBytes(),D);return L.add(R.multiplyUnsafe(V)).subtract(k).clearCofactor().equals(p.ZERO)}return E._setWindowSize(8),{CURVE:t,getPublicKey:le,sign:he,verify:Ze,ExtendedPoint:p,utils:{getExtendedPublicKey:U,randomPrivateKey:()=>s(r.BYTES),precompute(v=8,D=p.BASE){return D._setWindowSize(v),D.multiply(BigInt(3)),D}}}}BigInt(0),BigInt(1);const Nt=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),dr=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const Qi=BigInt(1),br=BigInt(2);BigInt(3);const es=BigInt(5),ts=BigInt(8);function rs(e){const t=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),o=Nt,s=e*e%o*e%o,a=K(s,br,o)*s%o,u=K(a,Qi,o)*e%o,c=K(u,es,o)*u%o,f=K(c,t,o)*c%o,h=K(f,r,o)*f%o,b=K(h,n,o)*h%o,d=K(b,i,o)*b%o,l=K(d,i,o)*b%o,g=K(l,t,o)*c%o;return{pow_p_5_8:K(g,br,o)*e%o,b2:s}}function ns(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function os(e,t){const r=Nt,n=M(t*t*t,r),i=M(n*n*t,r),o=rs(e*i).pow_p_5_8;let s=M(e*n*o,r);const a=M(t*s*s,r),u=s,c=M(s*dr,r),f=a===e,h=a===M(-e,r),b=a===M(-e*dr,r);return f&&(s=u),(h||b)&&(s=c),Mi(s,r)&&(s=M(-s,r)),{isValid:f||h,value:s}}const is=Xr(Nt,void 0,!0),ss={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:is,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:ts,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:Ci,randomBytes:qr,adjustScalarBytes:ns,uvRatio:os},tn=Xi(ss),us="EdDSA",as="JWT",We=".",Ge="base64url",rn="utf8",nn="utf8",cs=":",fs="did",ls="key",pr="base58btc",hs="z",ds="K36",bs=32;function Rt(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function on(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Rt(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function sn(e,t){t||(t=e.reduce((i,o)=>i+o.length,0));const r=on(t);let n=0;for(const i of e)r.set(i,n),n+=i.length;return Rt(r)}function ps(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(r[s]!==255)throw new TypeError(o+" is ambiguous");r[s]=i}var a=e.length,u=e.charAt(0),c=Math.log(a)/Math.log(256),f=Math.log(256)/Math.log(a);function h(l){if(l instanceof Uint8Array||(ArrayBuffer.isView(l)?l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength):Array.isArray(l)&&(l=Uint8Array.from(l))),!(l instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(l.length===0)return"";for(var g=0,w=0,m=0,S=l.length;m!==S&&l[m]===0;)m++,g++;for(var p=(S-m)*f+1>>>0,E=new Uint8Array(p);m!==S;){for(var O=l[m],N=0,B=p-1;(O!==0||N<w)&&B!==-1;B--,N++)O+=256*E[B]>>>0,E[B]=O%a>>>0,O=O/a>>>0;if(O!==0)throw new Error("Non-zero carry");w=N,m++}for(var C=p-w;C!==p&&E[C]===0;)C++;for(var U=u.repeat(g);C<p;++C)U+=e.charAt(E[C]);return U}function b(l){if(typeof l!="string")throw new TypeError("Expected String");if(l.length===0)return new Uint8Array;var g=0;if(l[g]!==" "){for(var w=0,m=0;l[g]===u;)w++,g++;for(var S=(l.length-g)*c+1>>>0,p=new Uint8Array(S);l[g];){var E=r[l.charCodeAt(g)];if(E===255)return;for(var O=0,N=S-1;(E!==0||O<m)&&N!==-1;N--,O++)E+=a*p[N]>>>0,p[N]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");m=O,g++}if(l[g]!==" "){for(var B=S-m;B!==S&&p[B]===0;)B++;for(var C=new Uint8Array(w+(S-B)),U=w;B!==S;)C[U++]=p[B++];return C}}}function d(l){var g=b(l);if(g)return g;throw new Error(`Non-${t} character`)}return{encode:h,decodeUnsafe:b,decode:d}}var Ds=ps,gs=Ds;const un=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},ws=e=>new TextEncoder().encode(e),ys=e=>new TextDecoder().decode(e);class Es{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class ms{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return an(this,t)}}class vs{constructor(t){this.decoders=t}or(t){return an(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const an=(e,t)=>new vs({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class _s{constructor(t,r,n,i){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new Es(t,r,n),this.decoder=new ms(t,r,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const Ke=({name:e,prefix:t,encode:r,decode:n})=>new _s(e,t,r,n),Te=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=gs(r,t);return Ke({prefix:e,name:t,encode:n,decode:o=>un(i(o))})},Fs=(e,t,r,n)=>{const i={};for(let f=0;f<t.length;++f)i[t[f]]=f;let o=e.length;for(;e[o-1]==="=";)--o;const s=new Uint8Array(o*r/8|0);let a=0,u=0,c=0;for(let f=0;f<o;++f){const h=i[e[f]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);u=u<<r|h,a+=r,a>=8&&(a-=8,s[c++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s},Ss=(e,t,r)=>{const n=t[t.length-1]==="=",i=(1<<r)-1;let o="",s=0,a=0;for(let u=0;u<e.length;++u)for(a=a<<8|e[u],s+=8;s>r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o},W=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>Ke({prefix:t,name:e,encode(i){return Ss(i,n,r)},decode(i){return Fs(i,n,r,e)}}),Os=Ke({prefix:"\0",name:"identity",encode:e=>ys(e),decode:e=>ws(e)});var Cs=Object.freeze({__proto__:null,identity:Os});const As=W({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var xs=Object.freeze({__proto__:null,base2:As});const Bs=W({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Ts=Object.freeze({__proto__:null,base8:Bs});const Ns=Te({prefix:"9",name:"base10",alphabet:"0123456789"});var Rs=Object.freeze({__proto__:null,base10:Ns});const Is=W({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Us=W({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Ps=Object.freeze({__proto__:null,base16:Is,base16upper:Us});const Ls=W({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),js=W({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Ms=W({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),zs=W({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ks=W({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Ws=W({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Hs=W({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Vs=W({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),qs=W({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Ys=Object.freeze({__proto__:null,base32:Ls,base32upper:js,base32pad:Ms,base32padupper:zs,base32hex:ks,base32hexupper:Ws,base32hexpad:Hs,base32hexpadupper:Vs,base32z:qs});const Gs=Te({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ks=Te({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var $s=Object.freeze({__proto__:null,base36:Gs,base36upper:Ks});const Js=Te({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Zs=Te({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Xs=Object.freeze({__proto__:null,base58btc:Js,base58flickr:Zs});const Qs=W({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),eu=W({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),tu=W({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ru=W({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var nu=Object.freeze({__proto__:null,base64:Qs,base64pad:eu,base64url:tu,base64urlpad:ru});const cn=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),ou=cn.reduce((e,t,r)=>(e[r]=t,e),[]),iu=cn.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function su(e){return e.reduce((t,r)=>(t+=ou[r],t),"")}function uu(e){const t=[];for(const r of e){const n=iu[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const au=Ke({prefix:"🚀",name:"base256emoji",encode:su,decode:uu});var cu=Object.freeze({__proto__:null,base256emoji:au}),fu=fn,Dr=128,lu=-128,hu=Math.pow(2,31);function fn(e,t,r){t=t||[],r=r||0;for(var n=r;e>=hu;)t[r++]=e&255|Dr,e/=128;for(;e&lu;)t[r++]=e&255|Dr,e>>>=7;return t[r]=e|0,fn.bytes=r-n+1,t}var du=Et,bu=128,gr=127;function Et(e,n){var r=0,n=n||0,i=0,o=n,s,a=e.length;do{if(o>=a)throw Et.bytes=0,new RangeError("Could not decode varint");s=e[o++],r+=i<28?(s&gr)<<i:(s&gr)*Math.pow(2,i),i+=7}while(s>=bu);return Et.bytes=o-n,r}var pu=Math.pow(2,7),Du=Math.pow(2,14),gu=Math.pow(2,21),wu=Math.pow(2,28),yu=Math.pow(2,35),Eu=Math.pow(2,42),mu=Math.pow(2,49),vu=Math.pow(2,56),_u=Math.pow(2,63),Fu=function(e){return e<pu?1:e<Du?2:e<gu?3:e<wu?4:e<yu?5:e<Eu?6:e<mu?7:e<vu?8:e<_u?9:10},Su={encode:fu,decode:du,encodingLength:Fu},ln=Su;const wr=(e,t,r=0)=>(ln.encode(e,t,r),t),yr=e=>ln.encodingLength(e),mt=(e,t)=>{const r=t.byteLength,n=yr(e),i=n+yr(r),o=new Uint8Array(i+r);return wr(e,o,0),wr(r,o,n),o.set(t,i),new Ou(e,r,t,o)};class Ou{constructor(t,r,n,i){this.code=t,this.size=r,this.digest=n,this.bytes=i}}const hn=({name:e,code:t,encode:r})=>new Cu(e,t,r);class Cu{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?mt(this.code,r):r.then(n=>mt(this.code,n))}else throw Error("Unknown type, must be binary type")}}const dn=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Au=hn({name:"sha2-256",code:18,encode:dn("SHA-256")}),xu=hn({name:"sha2-512",code:19,encode:dn("SHA-512")});var Bu=Object.freeze({__proto__:null,sha256:Au,sha512:xu});const bn=0,Tu="identity",pn=un,Nu=e=>mt(bn,pn(e)),Ru={code:bn,name:Tu,encode:pn,digest:Nu};var Iu=Object.freeze({__proto__:null,identity:Ru});new TextEncoder,new TextDecoder;const Er={...Cs,...xs,...Ts,...Rs,...Ps,...Ys,...$s,...Xs,...nu,...cu};({...Bu,...Iu});function Dn(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const mr=Dn("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),lt=Dn("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=on(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),gn={utf8:mr,"utf-8":mr,hex:Er.base16,latin1:lt,ascii:lt,binary:lt,...Er};function $e(e,t="utf8"){const r=gn[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}function ye(e,t="utf8"){const r=gn[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Rt(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}function vr(e){return jr($e(ye(e,Ge),rn))}function He(e){return $e(ye(Me(e),rn),Ge)}function Uu(e){const t=ye(ds,pr),r=hs+$e(sn([t,e]),pr);return[fs,ls,r].join(cs)}function Pu(e){return $e(e,Ge)}function Lu(e){return ye(e,Ge)}function ju(e){return ye([He(e.header),He(e.payload)].join(We),nn)}function Mu(e){return[He(e.header),He(e.payload),Pu(e.signature)].join(We)}function bf(e){const t=e.split(We),r=vr(t[0]),n=vr(t[1]),i=Lu(t[2]),o=ye(t.slice(0,2).join(We),nn);return{header:r,payload:n,signature:i,data:o}}function pf(e=qr(bs)){const t=tn.getPublicKey(e);return{secretKey:sn([e,t]),publicKey:t}}async function Df(e,t,r,n,i=Ve.fromMiliseconds(Date.now())){const o={alg:us,typ:as},s=Uu(n.publicKey),a=i+r,u={iss:s,sub:e,aud:t,iat:i,exp:a},c=ju({header:o,payload:u}),f=tn.sign(c,n.secretKey.slice(0,32));return Mu({header:o,payload:u,signature:f})}var _r=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))},zu=function(){function e(t,r,n){this.name=t,this.version=r,this.os=n,this.type="browser"}return e}(),ku=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=process.platform}return e}(),Wu=function(){function e(t,r,n,i){this.name=t,this.version=r,this.os=n,this.bot=i,this.type="bot-device"}return e}(),Hu=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),Vu=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),qu=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Yu=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Fr=3,Gu=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",qu]],Sr=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function gf(e){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Vu:typeof navigator<"u"?$u(navigator.userAgent):Zu()}function Ku(e){return e!==""&&Gu.reduce(function(t,r){var n=r[0],i=r[1];if(t)return t;var o=i.exec(e);return!!o&&[n,o]},!1)}function $u(e){var t=Ku(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new Hu;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<Fr&&(i=_r(_r([],i,!0),Xu(Fr-i.length),!0)):i=[];var o=i.join("."),s=Ju(e),a=Yu.exec(e);return a&&a[1]?new Wu(r,o,s,a[1]):new zu(r,o,s)}function Ju(e){for(var t=0,r=Sr.length;t<r;t++){var n=Sr[t],i=n[0],o=n[1],s=o.exec(e);if(s)return i}return null}function Zu(){var e=typeof process<"u"&&process.version;return e?new ku(process.version.slice(1)):null}function Xu(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}var I={};Object.defineProperty(I,"__esModule",{value:!0});I.getLocalStorage=I.getLocalStorageOrThrow=I.getCrypto=I.getCryptoOrThrow=ua=I.getLocation=I.getLocationOrThrow=oa=I.getNavigator=I.getNavigatorOrThrow=ta=I.getDocument=I.getDocumentOrThrow=I.getFromWindowOrThrow=I.getFromWindow=void 0;function fe(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}I.getFromWindow=fe;function Ee(e){const t=fe(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}I.getFromWindowOrThrow=Ee;function Qu(){return Ee("document")}I.getDocumentOrThrow=Qu;function ea(){return fe("document")}var ta=I.getDocument=ea;function ra(){return Ee("navigator")}I.getNavigatorOrThrow=ra;function na(){return fe("navigator")}var oa=I.getNavigator=na;function ia(){return Ee("location")}I.getLocationOrThrow=ia;function sa(){return fe("location")}var ua=I.getLocation=sa;function aa(){return Ee("crypto")}I.getCryptoOrThrow=aa;function ca(){return fe("crypto")}I.getCrypto=ca;function fa(){return Ee("localStorage")}I.getLocalStorageOrThrow=fa;function la(){return fe("localStorage")}I.getLocalStorage=la;var It={};Object.defineProperty(It,"__esModule",{value:!0});var ha=It.getWindowMetadata=void 0;const Or=I;function da(){let e,t;try{e=Or.getDocumentOrThrow(),t=Or.getLocationOrThrow()}catch{return null}function r(){const h=e.getElementsByTagName("link"),b=[];for(let d=0;d<h.length;d++){const l=h[d],g=l.getAttribute("rel");if(g&&g.toLowerCase().indexOf("icon")>-1){const w=l.getAttribute("href");if(w)if(w.toLowerCase().indexOf("https:")===-1&&w.toLowerCase().indexOf("http:")===-1&&w.indexOf("//")!==0){let m=t.protocol+"//"+t.host;if(w.indexOf("/")===0)m+=w;else{const S=t.pathname.split("/");S.pop();const p=S.join("/");m+=p+"/"+w}b.push(m)}else if(w.indexOf("//")===0){const m=t.protocol+w;b.push(m)}else b.push(w)}}return b}function n(...h){const b=e.getElementsByTagName("meta");for(let d=0;d<b.length;d++){const l=b[d],g=["itemprop","property","name"].map(w=>l.getAttribute(w)).filter(w=>w?h.includes(w):!1);if(g.length&&g){const w=l.getAttribute("content");if(w)return w}}return""}function i(){let h=n("name","og:site_name","og:title","twitter:title");return h||(h=e.title),h}function o(){return n("description","og:description","twitter:description","keywords")}const s=i(),a=o(),u=t.origin,c=r();return{description:a,url:u,icons:c,name:s}}ha=It.getWindowMetadata=da;function ba(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(r[s]!==255)throw new TypeError(o+" is ambiguous");r[s]=i}var a=e.length,u=e.charAt(0),c=Math.log(a)/Math.log(256),f=Math.log(256)/Math.log(a);function h(l){if(l instanceof Uint8Array||(ArrayBuffer.isView(l)?l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength):Array.isArray(l)&&(l=Uint8Array.from(l))),!(l instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(l.length===0)return"";for(var g=0,w=0,m=0,S=l.length;m!==S&&l[m]===0;)m++,g++;for(var p=(S-m)*f+1>>>0,E=new Uint8Array(p);m!==S;){for(var O=l[m],N=0,B=p-1;(O!==0||N<w)&&B!==-1;B--,N++)O+=256*E[B]>>>0,E[B]=O%a>>>0,O=O/a>>>0;if(O!==0)throw new Error("Non-zero carry");w=N,m++}for(var C=p-w;C!==p&&E[C]===0;)C++;for(var U=u.repeat(g);C<p;++C)U+=e.charAt(E[C]);return U}function b(l){if(typeof l!="string")throw new TypeError("Expected String");if(l.length===0)return new Uint8Array;var g=0;if(l[g]!==" "){for(var w=0,m=0;l[g]===u;)w++,g++;for(var S=(l.length-g)*c+1>>>0,p=new Uint8Array(S);l[g];){var E=r[l.charCodeAt(g)];if(E===255)return;for(var O=0,N=S-1;(E!==0||O<m)&&N!==-1;N--,O++)E+=a*p[N]>>>0,p[N]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");m=O,g++}if(l[g]!==" "){for(var B=S-m;B!==S&&p[B]===0;)B++;for(var C=new Uint8Array(w+(S-B)),U=w;B!==S;)C[U++]=p[B++];return C}}}function d(l){var g=b(l);if(g)return g;throw new Error(`Non-${t} character`)}return{encode:h,decodeUnsafe:b,decode:d}}var pa=ba,Da=pa;const ga=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},wa=e=>new TextEncoder().encode(e),ya=e=>new TextDecoder().decode(e);class Ea{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class ma{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return wn(this,t)}}class va{constructor(t){this.decoders=t}or(t){return wn(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const wn=(e,t)=>new va({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class _a{constructor(t,r,n,i){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new Ea(t,r,n),this.decoder=new ma(t,r,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const Je=({name:e,prefix:t,encode:r,decode:n})=>new _a(e,t,r,n),Ne=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=Da(r,t);return Je({prefix:e,name:t,encode:n,decode:o=>ga(i(o))})},Fa=(e,t,r,n)=>{const i={};for(let f=0;f<t.length;++f)i[t[f]]=f;let o=e.length;for(;e[o-1]==="=";)--o;const s=new Uint8Array(o*r/8|0);let a=0,u=0,c=0;for(let f=0;f<o;++f){const h=i[e[f]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);u=u<<r|h,a+=r,a>=8&&(a-=8,s[c++]=255&u>>a)}if(a>=r||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s},Sa=(e,t,r)=>{const n=t[t.length-1]==="=",i=(1<<r)-1;let o="",s=0,a=0;for(let u=0;u<e.length;++u)for(a=a<<8|e[u],s+=8;s>r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o},H=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>Je({prefix:t,name:e,encode(i){return Sa(i,n,r)},decode(i){return Fa(i,n,r,e)}}),Oa=Je({prefix:"\0",name:"identity",encode:e=>ya(e),decode:e=>wa(e)}),Ca=Object.freeze(Object.defineProperty({__proto__:null,identity:Oa},Symbol.toStringTag,{value:"Module"})),Aa=H({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),xa=Object.freeze(Object.defineProperty({__proto__:null,base2:Aa},Symbol.toStringTag,{value:"Module"})),Ba=H({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Ta=Object.freeze(Object.defineProperty({__proto__:null,base8:Ba},Symbol.toStringTag,{value:"Module"})),Na=Ne({prefix:"9",name:"base10",alphabet:"0123456789"}),Ra=Object.freeze(Object.defineProperty({__proto__:null,base10:Na},Symbol.toStringTag,{value:"Module"})),Ia=H({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ua=H({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Pa=Object.freeze(Object.defineProperty({__proto__:null,base16:Ia,base16upper:Ua},Symbol.toStringTag,{value:"Module"})),La=H({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),ja=H({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Ma=H({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),za=H({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ka=H({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Wa=H({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Ha=H({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Va=H({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),qa=H({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Ya=Object.freeze(Object.defineProperty({__proto__:null,base32:La,base32hex:ka,base32hexpad:Ha,base32hexpadupper:Va,base32hexupper:Wa,base32pad:Ma,base32padupper:za,base32upper:ja,base32z:qa},Symbol.toStringTag,{value:"Module"})),Ga=Ne({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ka=Ne({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),$a=Object.freeze(Object.defineProperty({__proto__:null,base36:Ga,base36upper:Ka},Symbol.toStringTag,{value:"Module"})),Ja=Ne({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Za=Ne({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Xa=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Ja,base58flickr:Za},Symbol.toStringTag,{value:"Module"})),Qa=H({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),ec=H({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),tc=H({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),rc=H({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),nc=Object.freeze(Object.defineProperty({__proto__:null,base64:Qa,base64pad:ec,base64url:tc,base64urlpad:rc},Symbol.toStringTag,{value:"Module"})),yn=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),oc=yn.reduce((e,t,r)=>(e[r]=t,e),[]),ic=yn.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function sc(e){return e.reduce((t,r)=>(t+=oc[r],t),"")}function uc(e){const t=[];for(const r of e){const n=ic[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const ac=Je({prefix:"🚀",name:"base256emoji",encode:sc,decode:uc}),cc=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:ac},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const wf={...Ca,...xa,...Ta,...Ra,...Pa,...Ya,...$a,...Xa,...nc,...cc},yf={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}},fc="PARSE_ERROR",lc="INVALID_REQUEST",hc="METHOD_NOT_FOUND",dc="INVALID_PARAMS",En="INTERNAL_ERROR",Ut="SERVER_ERROR",bc=[-32700,-32600,-32601,-32602,-32603],Se={[fc]:{code:-32700,message:"Parse error"},[lc]:{code:-32600,message:"Invalid Request"},[hc]:{code:-32601,message:"Method not found"},[dc]:{code:-32602,message:"Invalid params"},[En]:{code:-32603,message:"Internal error"},[Ut]:{code:-32e3,message:"Server error"}},mn=Ut;function pc(e){return bc.includes(e)}function Cr(e){return Object.keys(Se).includes(e)?Se[e]:Se[mn]}function Dc(e){const t=Object.values(Se).find(r=>r.code===e);return t||Se[mn]}function gc(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var vn={};/*! *****************************************************************************
15
+ Copyright (c) Microsoft Corporation.
16
+
17
+ Permission to use, copy, modify, and/or distribute this software for any
18
+ purpose with or without fee is hereby granted.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
21
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
22
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
23
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
24
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
25
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
26
+ PERFORMANCE OF THIS SOFTWARE.
27
+ ***************************************************************************** */var vt=function(e,t){return vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},vt(e,t)};function wc(e,t){vt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var _t=function(){return _t=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},_t.apply(this,arguments)};function yc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Ec(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function mc(e,t){return function(r,n){t(r,n,e)}}function vc(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function _c(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(f){try{c(n.next(f))}catch(h){s(h)}}function u(f){try{c(n.throw(f))}catch(h){s(h)}}function c(f){f.done?o(f.value):i(f.value).then(a,u)}c((n=n.apply(e,t||[])).next())})}function Fc(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(f){return u([c,f])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(f){c=[6,f],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Sc(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}function Oc(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function Ft(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _n(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function Cc(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_n(arguments[t]));return e}function Ac(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function xe(e){return this instanceof xe?(this.v=e,this):new xe(e)}function xc(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(b){n[b]&&(i[b]=function(d){return new Promise(function(l,g){o.push([b,d,l,g])>1||a(b,d)})})}function a(b,d){try{u(n[b](d))}catch(l){h(o[0][3],l)}}function u(b){b.value instanceof xe?Promise.resolve(b.value.v).then(c,f):h(o[0][2],b)}function c(b){a("next",b)}function f(b){a("throw",b)}function h(b,d){b(d),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Bc(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(s){return(r=!r)?{value:xe(e[i](s)),done:i==="return"}:o?o(s):s}:o}}function Tc(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ft=="function"?Ft(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(s){return new Promise(function(a,u){s=e[o](s),i(a,u,s.done,s.value)})}}function i(o,s,a,u){Promise.resolve(u).then(function(c){o({value:c,done:a})},s)}}function Nc(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Rc(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function Ic(e){return e&&e.__esModule?e:{default:e}}function Uc(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Pc(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const Lc=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return _t},__asyncDelegator:Bc,__asyncGenerator:xc,__asyncValues:Tc,__await:xe,__awaiter:_c,__classPrivateFieldGet:Uc,__classPrivateFieldSet:Pc,__createBinding:Sc,__decorate:Ec,__exportStar:Oc,__extends:wc,__generator:Fc,__importDefault:Ic,__importStar:Rc,__makeTemplateObject:Nc,__metadata:vc,__param:mc,__read:_n,__rest:yc,__spread:Cc,__spreadArrays:Ac,__values:Ft},Symbol.toStringTag,{value:"Module"})),jc=Ir(Lc);var ee={},Ar;function Mc(){if(Ar)return ee;Ar=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.isBrowserCryptoAvailable=ee.getSubtleCrypto=ee.getBrowerCrypto=void 0;function e(){return(de===null||de===void 0?void 0:de.crypto)||(de===null||de===void 0?void 0:de.msCrypto)||{}}ee.getBrowerCrypto=e;function t(){const n=e();return n.subtle||n.webkitSubtle}ee.getSubtleCrypto=t;function r(){return!!e()&&!!t()}return ee.isBrowserCryptoAvailable=r,ee}var te={},xr;function zc(){if(xr)return te;xr=1,Object.defineProperty(te,"__esModule",{value:!0}),te.isBrowser=te.isNode=te.isReactNative=void 0;function e(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}te.isReactNative=e;function t(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}te.isNode=t;function r(){return!e()&&!t()}return te.isBrowser=r,te}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=jc;t.__exportStar(Mc(),e),t.__exportStar(zc(),e)})(vn);function Fn(e=3){const t=Date.now()*Math.pow(10,e),r=Math.floor(Math.random()*Math.pow(10,e));return t+r}function kc(e=6){return BigInt(Fn(e))}function Wc(e,t,r){return{id:r||Fn(),jsonrpc:"2.0",method:e,params:t}}function Ef(e,t){return{id:e,jsonrpc:"2.0",result:t}}function Hc(e,t,r){return{id:e,jsonrpc:"2.0",error:Vc(t)}}function Vc(e,t){return typeof e>"u"?Cr(En):(typeof e=="string"&&(e=Object.assign(Object.assign({},Cr(Ut)),{message:e})),pc(e.code)&&(e=Dc(e.code)),e)}class qc{}class Yc extends qc{constructor(){super()}}class Gc extends Yc{constructor(t){super()}}const Kc="^https?:",$c="^wss?:";function Jc(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function Sn(e,t){const r=Jc(e);return typeof r>"u"?!1:new RegExp(t).test(r)}function mf(e){return Sn(e,Kc)}function Br(e){return Sn(e,$c)}function Zc(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function On(e){return typeof e=="object"&&"id"in e&&"jsonrpc"in e&&e.jsonrpc==="2.0"}function vf(e){return On(e)&&"method"in e}function Xc(e){return On(e)&&(Qc(e)||Cn(e))}function Qc(e){return"result"in e}function Cn(e){return"error"in e}class _f extends Gc{constructor(t){super(t),this.events=new St.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async request(t,r){return this.requestStrict(Wc(t.method,t.params||[],t.id||kc().toString()),r)}async requestStrict(t,r){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(o){i(o)}this.events.on(`${t.id}`,o=>{Cn(o)?i(o.error):n(o.result)});try{await this.connection.send(t,r)}catch(o){i(o)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),Xc(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}var ht,Tr;function ef(){return Tr||(Tr=1,ht=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),ht}const tf=()=>typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:ef(),rf=()=>typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",Nr=e=>e.split("?")[0],Rr=10,nf=tf();class Ff{constructor(t){if(this.url=t,this.events=new St.EventEmitter,this.registering=!1,!Br(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);this.url=t}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async open(t=this.url){await this.register(t)}async close(){return new Promise((t,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),t()},this.socket.close()})}async send(t){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Me(t))}catch(r){this.onError(t.id,r)}}register(t=this.url){if(!Br(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),i(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=t,this.registering=!0,new Promise((r,n)=>{const i=vn.isReactNative()?void 0:{rejectUnauthorized:!Zc(t)},o=new nf(t,[],i);rf()?o.onerror=s=>{const a=s;n(this.emitError(a.error))}:o.on("error",s=>{n(this.emitError(s))}),o.onopen=()=>{this.onOpen(o),r(o)}})}onOpen(t){t.onmessage=r=>this.onPayload(r),t.onclose=r=>this.onClose(r),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if(typeof t.data>"u")return;const r=typeof t.data=="string"?jr(t.data):t.data;this.events.emit("payload",r)}onError(t,r){const n=this.parseError(r),i=n.message||n.toString(),o=Hc(t,i);this.events.emit("payload",o)}parseError(t,r=this.url){return gc(t,Nr(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>Rr&&this.events.setMaxListeners(Rr)}emitError(t){const r=this.parseError(new Error(t?.message||`WebSocket connection failed for host: ${Nr(this.url)}`));return this.events.emit("register_error",r),r}}export{df as A,Qc as B,yf as C,Cn as D,hf as E,Fn as F,lo as I,kr as O,pf as P,Uu as Q,Wc as a,jr as b,Hc as c,wf as d,Ve as e,Ef as f,ha as g,ta as h,mf as i,oa as j,lf as k,gf as l,ua as m,bf as n,_f as o,gc as p,cf as q,af as r,Me as s,bo as t,Ff as u,vf as v,Xc as w,Df as x,Yo as y,kc as z};
@@ -0,0 +1,2 @@
1
+ import{e as $}from"./events-B5inrCVE.js";import{a as ee,c as A}from"./_commonjsHelpers-C4iS2aBk.js";import{i as H,s as L,b as te,c as re,p as se}from"./index.es-D3pP9hN4.js";var x={exports:{}};(function(y,r){var s=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof A<"u"&&A,c=function(){function v(){this.fetch=!1,this.DOMException=s.DOMException}return v.prototype=s,new v}();(function(v){(function(d){var h=typeof v<"u"&&v||typeof self<"u"&&self||typeof A<"u"&&A||{},l={searchParams:"URLSearchParams"in h,iterable:"Symbol"in h&&"iterator"in Symbol,blob:"FileReader"in h&&"Blob"in h&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in h,arrayBuffer:"ArrayBuffer"in h};function k(e){return e&&DataView.prototype.isPrototypeOf(e)}if(l.arrayBuffer)var G=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],V=ArrayBuffer.isView||function(e){return e&&G.indexOf(Object.prototype.toString.call(e))>-1};function g(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function T(e){return typeof e!="string"&&(e=String(e)),e}function _(e){var t={next:function(){var i=e.shift();return{done:i===void 0,value:i}}};return l.iterable&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach(function(t,i){this.append(i,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}f.prototype.append=function(e,t){e=g(e),t=T(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},f.prototype.delete=function(e){delete this.map[g(e)]},f.prototype.get=function(e){return e=g(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(g(e))},f.prototype.set=function(e,t){this.map[g(e)]=T(t)},f.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},f.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),_(e)},f.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),_(e)},f.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),_(e)},l.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);function P(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function R(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function z(e){var t=new FileReader,i=R(t);return t.readAsArrayBuffer(e),i}function J(e){var t=new FileReader,i=R(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),a=n?n[1]:"utf-8";return t.readAsText(e,a),i}function X(e){for(var t=new Uint8Array(e),i=new Array(t.length),n=0;n<t.length;n++)i[n]=String.fromCharCode(t[n]);return i.join("")}function D(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function j(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:l.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:l.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():l.arrayBuffer&&l.blob&&k(e)?(this._bodyArrayBuffer=D(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||V(e))?this._bodyArrayBuffer=D(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var e=P(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=P(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(l.blob)return this.blob().then(z);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=P(this);if(e)return e;if(this._bodyBlob)return J(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(X(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(Q)}),this.json=function(){return this.text().then(JSON.parse)},this}var Z=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function K(e){var t=e.toUpperCase();return Z.indexOf(t)>-1?t:e}function m(e,t){if(!(this instanceof m))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var i=t.body;if(e instanceof m){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!i&&e._bodyInit!=null&&(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new f(t.headers)),this.method=K(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in h){var o=new AbortController;return o.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var a=/\?/;this.url+=(a.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})};function Q(e){var t=new FormData;return e.trim().split("&").forEach(function(i){if(i){var n=i.split("="),a=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(o))}}),t}function W(e){var t=new f,i=e.replace(/\r?\n[\t ]+/g," ");return i.split("\r").map(function(n){return n.indexOf(`
2
+ `)===0?n.substr(1,n.length):n}).forEach(function(n){var a=n.split(":"),o=a.shift().trim();if(o){var E=a.join(":").trim();try{t.append(o,E)}catch(B){console.warn("Response "+B.message)}}}),t}j.call(m.prototype);function b(e,t){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}j.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var Y=[301,302,303,307,308];b.redirect=function(e,t){if(Y.indexOf(t)===-1)throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},d.DOMException=h.DOMException;try{new d.DOMException}catch{d.DOMException=function(t,i){this.message=t,this.name=i;var n=Error(t);this.stack=n.stack},d.DOMException.prototype=Object.create(Error.prototype),d.DOMException.prototype.constructor=d.DOMException}function O(e,t){return new Promise(function(i,n){var a=new m(e,t);if(a.signal&&a.signal.aborted)return n(new d.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function E(){o.abort()}o.onload=function(){var u={statusText:o.statusText,headers:W(o.getAllResponseHeaders()||"")};a.url.indexOf("file://")===0&&(o.status<200||o.status>599)?u.status=200:u.status=o.status,u.url="responseURL"in o?o.responseURL:u.headers.get("X-Request-URL");var w="response"in o?o.response:o.responseText;setTimeout(function(){i(new b(w,u))},0)},o.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request timed out"))},0)},o.onabort=function(){setTimeout(function(){n(new d.DOMException("Aborted","AbortError"))},0)};function B(u){try{return u===""&&h.location.href?h.location.href:u}catch{return u}}if(o.open(a.method,B(a.url),!0),a.credentials==="include"?o.withCredentials=!0:a.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(l.blob?o.responseType="blob":l.arrayBuffer&&(o.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof f||h.Headers&&t.headers instanceof h.Headers)){var U=[];Object.getOwnPropertyNames(t.headers).forEach(function(u){U.push(g(u)),o.setRequestHeader(u,T(t.headers[u]))}),a.headers.forEach(function(u,w){U.indexOf(w)===-1&&o.setRequestHeader(w,u)})}else a.headers.forEach(function(u,w){o.setRequestHeader(w,u)});a.signal&&(a.signal.addEventListener("abort",E),o.onreadystatechange=function(){o.readyState===4&&a.signal.removeEventListener("abort",E)}),o.send(typeof a._bodyInit>"u"?null:a._bodyInit)})}return O.polyfill=!0,h.fetch||(h.fetch=O,h.Headers=f,h.Request=m,h.Response=b),d.Headers=f,d.Request=m,d.Response=b,d.fetch=O,Object.defineProperty(d,"__esModule",{value:!0}),d})({})})(c),c.fetch.ponyfill=!0,delete c.fetch.polyfill;var p=s.fetch?s:c;r=p.fetch,r.default=p.fetch,r.fetch=p.fetch,r.Headers=p.Headers,r.Request=p.Request,r.Response=p.Response,y.exports=r})(x,x.exports);var ie=x.exports;const C=ee(ie);var oe=Object.defineProperty,ne=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,S=(y,r,s)=>r in y?oe(y,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):y[r]=s,F=(y,r)=>{for(var s in r||(r={}))fe.call(r,s)&&S(y,s,r[s]);if(M)for(var s of M(r))he.call(r,s)&&S(y,s,r[s]);return y},I=(y,r)=>ne(y,ae(r));const ue={Accept:"application/json","Content-Type":"application/json"},le="POST",q={headers:ue,method:le},N=10;class pe{constructor(r,s=!1){if(this.url=r,this.disableProviderPing=s,this.events=new $.EventEmitter,this.isAvailable=!1,this.registering=!1,!H(r))throw new Error(`Provided URL is not compatible with HTTP connection: ${r}`);this.url=r,this.disableProviderPing=s}get connected(){return this.isAvailable}get connecting(){return this.registering}on(r,s){this.events.on(r,s)}once(r,s){this.events.once(r,s)}off(r,s){this.events.off(r,s)}removeListener(r,s){this.events.removeListener(r,s)}async open(r=this.url){await this.register(r)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(r){this.isAvailable||await this.register();try{const s=L(r),c=await(await C(this.url,I(F({},q),{body:s}))).json();this.onPayload({data:c})}catch(s){this.onError(r.id,s)}}async register(r=this.url){if(!H(r))throw new Error(`Provided URL is not compatible with HTTP connection: ${r}`);if(this.registering){const s=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=s||this.events.listenerCount("open")>=s)&&this.events.setMaxListeners(s+1),new Promise((c,p)=>{this.events.once("register_error",v=>{this.resetMaxListeners(),p(v)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return p(new Error("HTTP connection is missing or invalid"));c()})})}this.url=r,this.registering=!0;try{if(!this.disableProviderPing){const s=L({id:1,jsonrpc:"2.0",method:"test",params:[]});await C(r,I(F({},q),{body:s}))}this.onOpen()}catch(s){const c=this.parseError(s);throw this.events.emit("register_error",c),this.onClose(),c}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(r){if(typeof r.data>"u")return;const s=typeof r.data=="string"?te(r.data):r.data;this.events.emit("payload",s)}onError(r,s){const c=this.parseError(s),p=c.message||c.toString(),v=re(r,p);this.events.emit("payload",v)}parseError(r,s=this.url){return se(r,s,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>N&&this.events.setMaxListeners(N)}}export{pe as f};
@@ -0,0 +1 @@
1
+ import{a as _}from"./_commonjsHelpers-C4iS2aBk.js";function I(g,S){for(var y=0;y<S.length;y++){const l=S[y];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in g)){const i=Object.getOwnPropertyDescriptor(l,o);i&&Object.defineProperty(g,o,i.get?i:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var w={exports:{}};(function(g,S){(function(y,l){g.exports=l()})(window,function(){return function(y){var l={};function o(i){if(l[i])return l[i].exports;var u=l[i]={i,l:!1,exports:{}};return y[i].call(u.exports,u,u.exports,o),u.l=!0,u.exports}return o.m=y,o.c=l,o.d=function(i,u,c){o.o(i,u)||Object.defineProperty(i,u,{enumerable:!0,get:c})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,u){if(1&u&&(i=o(i)),8&u||4&u&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&u&&typeof i!="string")for(var d in i)o.d(c,d,function(f){return i[f]}.bind(null,d));return c},o.n=function(i){var u=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(u,"a",u),u},o.o=function(i,u){return Object.prototype.hasOwnProperty.call(i,u)},o.p="",o(o.s=2)}([function(y,l,o){o.r(l);var i=typeof fetch=="function"?fetch.bind():function(u,c){return c=c||{},new Promise(function(d,f){var r=new XMLHttpRequest;for(var a in r.open(c.method||"get",u,!0),c.headers)r.setRequestHeader(a,c.headers[a]);function t(){var e,n=[],s=[],p={};return r.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(h,m,b){n.push(m=m.toLowerCase()),s.push([m,b]),e=p[m],p[m]=e?e+","+b:b}),{ok:(r.status/100|0)==2,status:r.status,statusText:r.statusText,url:r.responseURL,clone:t,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(r.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([r.response]))},headers:{keys:function(){return n},entries:function(){return s},get:function(h){return p[h.toLowerCase()]},has:function(h){return h.toLowerCase()in p}}}}r.withCredentials=c.credentials=="include",r.onload=function(){d(t())},r.onerror=f,r.send(c.body)})};l.default=i},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function c(d,f){for(var r=0;r<f.length;r++){var a=f[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,f,r){return f&&c(d.prototype,f),r&&c(d,r),d}}(),u=function(){function c(d,f){(function(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")})(this,c),this.pluginName=d}return i(c,[{key:"track",value:function(d,f){window.analytics.track(d,f,{integration:{name:this.pluginName}})}}]),c}();l.default=u},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0}),l.YouTubeAnalytics=l.VimeoAnalytics=void 0;var i=c(o(3)),u=c(o(4));function c(d){return d&&d.__esModule?d:{default:d}}l.VimeoAnalytics=i.default,l.YouTubeAnalytics=u.default},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function f(r,a){for(var t=0;t<a.length;t++){var e=a[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}return function(r,a,t){return a&&f(r.prototype,a),t&&f(r,t),r}}(),u=c(o(0));function c(f){return f&&f.__esModule?f:{default:f}}var d=function(f){function r(a,t){(function(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r);var e=function(n,s){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||typeof s!="object"&&typeof s!="function"?n:s}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,"VimeoAnalytics"));return e.authToken=t,e.player=a,e.metadata={content:{},playback:{videoPlayer:"Vimeo"}},e.mostRecentHeartbeat=0,e.isPaused=!1,e}return function(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(a,t):a.__proto__=t)}(r,f),i(r,[{key:"initialize",value:function(){var a=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var e in t)this.registerHandler(e,t[e]);this.player.getVideoId().then(function(n){a.retrieveMetadata({id:n})}).catch(console.error)}},{key:"registerHandler",value:function(a,t){var e=this;this.player.on(a,function(n){e.updateMetadata(n),t.call(e,n)})}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var a=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==a&&t-a>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(a){var t=this;return new Promise(function(e,n){var s=a.id;(0,u.default)("https://api.vimeo.com/videos/"+s,{headers:{Authorization:"Bearer "+t.authToken}}).then(function(p){return p.ok?p.json():n(p)}).then(function(p){t.metadata.content.title=p.name,t.metadata.content.description=p.description,t.metadata.content.publisher=p.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=p.duration}).catch(function(p){return console.error("Request to Vimeo API Failed with: ",p),n(p)})})}},{key:"updateMetadata",value:function(a){var t=this;return new Promise(function(e,n){t.player.getVolume().then(function(s){s&&(t.metadata.playback.sound=100*s),t.metadata.playback.position=a.seconds,e()}).catch(n)})}}]),r}(c(o(1)).default);l.default=d},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function a(t,e){for(var n=0;n<e.length;n++){var s=e[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}}(),u=d(o(0)),c=d(o(1));function d(a){return a&&a.__esModule?a:{default:a}}var f=function(a){function t(e,n){(function(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t);var s=function(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!h||typeof h!="object"&&typeof h!="function"?p:h}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return s.player=e,s.apiKey=n,s.playerLoaded=!1,s.playbackStarted=!1,s.contentStarted=!1,s.isPaused=!1,s.isBuffering=!1,s.isSeeking=!1,s.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},s.metadata=[{playback:{video_player:"youtube"},content:{}}],s.playlistIndex=0,s}return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(t,a),i(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var n=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=n,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise(function(n,s){var p=e.player.getVideoData(),h=e.player.getPlaylist()||[p.video_id],m=h.join();(0,u.default)("https://www.googleapis.com/youtube/v3/videos?id="+m+"&part=snippet,contentDetails&key="+e.apiKey).then(function(b){if(!b.ok){var v=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw v.response=b,v}return b.json()}).then(function(b){e.metadata=[];for(var v=0,k=0;k<h.length;k++){var P=b.items[k];e.metadata.push({content:{title:P.snippet.title,description:P.snippet.description,keywords:P.snippet.tags,channel:P.snippet.channelTitle,airdate:P.snippet.publishedAt}}),v+=r(P.contentDetails.duration)}for(k=0;k<h.length;k++)e.metadata[k].playback={total_length:v,video_player:"youtube"};n()}).catch(function(b){e.metadata=h.map(function(v){return{playback:{video_player:"youtube"},content:{}}}),s(b)})})}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var n=this.player.getPlaylist();n&&this.player.getCurrentTime()===0&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===n.length-1&&this.player.getPlaylistIndex()===0&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),this.playlistIndex===-1&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),n=this.player.getPlaylist();(n&&e===n.length-1||e===-1)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,n=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-n)>2e3}}]),t}(c.default);function r(a){var t=a.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map(function(e){if(e!=null)return e.replace(/\D/,"")}),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}l.default=f}])})})(w);var x=w.exports;const O=_(x),C=I({__proto__:null,default:O},[x]);export{C as i};
@@ -1,3 +1,3 @@
1
- import{w as C}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const w=C`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ import{w as C}from"./core-Bn8Mr-tS.js";const t=C`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z" fill="currentColor"/>
3
- </svg>`;export{w as infoSvg};
3
+ </svg>`;export{t as infoSvg};
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const m=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as l}from"./core-Bn8Mr-tS.js";const e=l`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  d="M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
@@ -9,4 +9,4 @@ import{w as o}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./even
9
9
  d="M7 14.99a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"
10
10
  clip-rule="evenodd"
11
11
  />
12
- </svg>`;export{m as infoCircleSvg};
12
+ </svg>`;export{e as infoCircleSvg};
@@ -0,0 +1 @@
1
+ function l(e,d){var o,i;return typeof d?.enabled=="boolean"?d.enabled:(i=(o=e?.__default)===null||o===void 0?void 0:o.enabled)!==null&&i!==void 0?i:!0}export{l as i};
@@ -0,0 +1 @@
1
+ function e(o,n,r){return JSON.stringify(o,(f,t)=>{const i=typeof t=="bigint"?t.toString():t;return typeof n=="function"?n(f,i):i},r)}export{e as stringify};
@@ -0,0 +1 @@
1
+ let r;if(globalThis.__federation_shared__?.default?.["react"]){const{importShared:s}=await import("./__federation_fn_import-C51lglKS.js");const R=await s("react");const I=R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;const m=Symbol.for("react.element"),x=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,v={key:!0,ref:!0,__self:!0,__source:!0};function jsx(t,p,k){var e,o={},s=null,f=null;k!==void 0&&(s=""+k);p.key!==void 0&&(s=""+p.key);p.ref!==void 0&&(f=p.ref);for(e in p)y.call(p,e)&&!v.hasOwnProperty(e)&&(o[e]=p[e]);if(t&&t.defaultProps)for(e in t.defaultProps)o[e]===void 0&&(o[e]=t.defaultProps[e]);return{$$typeof:m,type:t,key:s,ref:f,props:o,_owner:I.ReactCurrentOwner.current}}r={jsx,jsxs:jsx,Fragment:x,default:{jsx,jsxs:jsx,Fragment:x}};}else{r=await import("./jsx-runtime-DncYoG30__bundled.js");}export const j=r.j??r;
@@ -0,0 +1,9 @@
1
+ import{r as i}from"./index-Dy0yjznp.js";var f={exports:{}},n={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var l=i,m=Symbol.for("react.element"),x=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,a=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function u(t,r,p){var e,o={},s=null,_=null;p!==void 0&&(s=""+p),r.key!==void 0&&(s=""+r.key),r.ref!==void 0&&(_=r.ref);for(e in r)y.call(r,e)&&!v.hasOwnProperty(e)&&(o[e]=r[e]);if(t&&t.defaultProps)for(e in r=t.defaultProps,r)o[e]===void 0&&(o[e]=r[e]);return{$$typeof:m,type:t,key:s,ref:_,props:o,_owner:a.current}}n.Fragment=x;n.jsx=u;n.jsxs=u;f.exports=n;var d=f.exports;export{d as j};
@@ -1,3 +1,3 @@
1
- import{w as C}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const p=C`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ import{w as C}from"./core-Bn8Mr-tS.js";const e=C`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
3
- </svg>`;export{p as lightbulbSvg};
3
+ </svg>`;export{e as lightbulbSvg};
@@ -0,0 +1 @@
1
+ import{f as l,t as w,h as b,A,j as y,k as g,l as h,m as F,e as E,n as N,o as m,p as P,I,q as f,r as R}from"./uid-D00jCazq.js";function q(n){const{abi:r,data:a}=n,e=l(a,0,4),t=r.find(o=>o.type==="function"&&e===w(b(o)));if(!t)throw new A(e,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?y(t.inputs,l(a,4)):void 0}}const u="/docs/contract/encodeErrorResult";function p(n){const{abi:r,errorName:a,args:e}=n;let t=r[0];if(a){const c=g({abi:r,args:e,name:a});if(!c)throw new h(a,{docsPath:u});t=c}if(t.type!=="error")throw new h(void 0,{docsPath:u});const o=b(t),s=w(o);let i="0x";if(e&&e.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=E(t.inputs,e)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function x(n){const{abi:r,functionName:a,result:e}=n;let t=r[0];if(a){const s=g({abi:r,name:a});if(!s)throw new m(a,{docsPath:d});t=s}if(t.type!=="function")throw new m(void 0,{docsPath:d});if(!t.outputs)throw new P(t.name,{docsPath:d});const o=(()=>{if(t.outputs.length===0)return[];if(t.outputs.length===1)return[e];if(Array.isArray(e))return e;throw new I(e)})();return E(t.outputs,o)}const G="x-batch-gateway:true";async function H(n){const{data:r,ccipRequest:a}=n,{args:[e]}=q({abi:f,data:r}),t=[],o=[];return await Promise.all(e.map(async(s,i)=>{try{o[i]=s.urls.includes(G)?await H({data:s.data,ccipRequest:a}):await a(s),t[i]=!1}catch(c){t[i]=!0,o[i]=M(c)}})),x({abi:f,functionName:"query",result:[t,o]})}function M(n){return n.name==="HttpRequestError"&&n.status?p({abi:f,errorName:"HttpError",args:[n.status,n.shortMessage]}):p({abi:[R],errorName:"Error",args:["shortMessage"in n?n.shortMessage:n.message]})}export{H as a,x as b,q as d,p as e,G as l};
@@ -1,8 +1,8 @@
1
- import{w as o}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const v=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as c}from"./core-Bn8Mr-tS.js";const e=c`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
5
5
  d="M4.83 1.34h6.34c.68 0 1.26 0 1.73.04.5.05.97.15 1.42.4.52.3.95.72 1.24 1.24.26.45.35.92.4 1.42.04.47.04 1.05.04 1.73v3.71c0 .69 0 1.26-.04 1.74-.05.5-.14.97-.4 1.41-.3.52-.72.95-1.24 1.25-.45.25-.92.35-1.42.4-.47.03-1.05.03-1.73.03H4.83c-.68 0-1.26 0-1.73-.04-.5-.04-.97-.14-1.42-.4-.52-.29-.95-.72-1.24-1.24a3.39 3.39 0 0 1-.4-1.41A20.9 20.9 0 0 1 0 9.88v-3.7c0-.7 0-1.27.04-1.74.05-.5.14-.97.4-1.42.3-.52.72-.95 1.24-1.24.45-.25.92-.35 1.42-.4.47-.04 1.05-.04 1.73-.04ZM3.28 3.38c-.36.03-.51.08-.6.14-.21.11-.39.29-.5.5a.8.8 0 0 0-.08.19l5.16 3.44c.45.3 1.03.3 1.48 0L13.9 4.2a.79.79 0 0 0-.08-.2c-.11-.2-.29-.38-.5-.5-.09-.05-.24-.1-.6-.13-.37-.04-.86-.04-1.6-.04H4.88c-.73 0-1.22 0-1.6.04ZM14 6.54 9.85 9.31a3.33 3.33 0 0 1-3.7 0L2 6.54v3.3c0 .74 0 1.22.03 1.6.04.36.1.5.15.6.11.2.29.38.5.5.09.05.24.1.6.14.37.03.86.03 1.6.03h6.25c.73 0 1.22 0 1.6-.03.35-.03.5-.09.6-.14.2-.12.38-.3.5-.5.05-.1.1-.24.14-.6.03-.38.03-.86.03-1.6v-3.3Z"
6
6
  clip-rule="evenodd"
7
7
  />
8
- </svg>`;export{v as mailSvg};
8
+ </svg>`;export{e as mailSvg};
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const m=o`<svg fill="none" viewBox="0 0 20 20">
1
+ import{w as l}from"./core-Bn8Mr-tS.js";const e=l`<svg fill="none" viewBox="0 0 20 20">
2
2
  <path fill="currentColor" d="M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" />
3
3
  <path
4
4
  fill="currentColor"
@@ -6,4 +6,4 @@ import{w as o}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./even
6
6
  d="M3 4.75A4.75 4.75 0 0 1 7.75 0h4.5A4.75 4.75 0 0 1 17 4.75v10.5A4.75 4.75 0 0 1 12.25 20h-4.5A4.75 4.75 0 0 1 3 15.25V4.75ZM7.75 2A2.75 2.75 0 0 0 5 4.75v10.5A2.75 2.75 0 0 0 7.75 18h4.5A2.75 2.75 0 0 0 15 15.25V4.75A2.75 2.75 0 0 0 12.25 2h-4.5Z"
7
7
  clip-rule="evenodd"
8
8
  />
9
- </svg>`;export{m as mobileSvg};
9
+ </svg>`;export{e as mobileSvg};
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const m=o`<svg fill="none" viewBox="0 0 41 40">
1
+ import{w as l}from"./core-Bn8Mr-tS.js";const a=l`<svg fill="none" viewBox="0 0 41 40">
2
2
  <path
3
3
  style="fill: var(--wui-color-fg-100);"
4
4
  fill-opacity=".05"
@@ -8,4 +8,4 @@ import{w as o}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./even
8
8
  fill="#949E9E"
9
9
  d="M15.6 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM23.1 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM28.1 22.81a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"
10
10
  />
11
- </svg>`;export{m as moreSvg};
11
+ </svg>`;export{a as moreSvg};
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const v=l`<svg fill="none" viewBox="0 0 22 20">
1
+ import{w as l}from"./core-Bn8Mr-tS.js";const e=l`<svg fill="none" viewBox="0 0 22 20">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -11,4 +11,4 @@ import{w as l}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./even
11
11
  d="M4.63 9.43a1.5 1.5 0 1 0 1.5-2.6 1.5 1.5 0 0 0-1.5 2.6Zm.32-1.55a.5.5 0 0 1 .68-.19.5.5 0 0 1 .18.68.5.5 0 0 1-.68.19.5.5 0 0 1-.18-.68ZM17.94 8.88a1.5 1.5 0 1 1-2.6-1.5 1.5 1.5 0 1 1 2.6 1.5ZM16.9 7.69a.5.5 0 0 0-.68.19.5.5 0 0 0 .18.68.5.5 0 0 0 .68-.19.5.5 0 0 0-.18-.68ZM9.75 17.75a1.5 1.5 0 1 1 2.6 1.5 1.5 1.5 0 1 1-2.6-1.5Zm1.05 1.18a.5.5 0 0 0 .68-.18.5.5 0 0 0-.18-.68.5.5 0 0 0-.68.18.5.5 0 0 0 .18.68Z"
12
12
  clip-rule="evenodd"
13
13
  />
14
- </svg>`;export{v as networkPlaceholderSvg};
14
+ </svg>`;export{e as networkPlaceholderSvg};