@dcl/account-site 6.4.2 → 6.4.3-23021761892.commit-95cb21d

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 (1228) hide show
  1. package/assets/CoinbaseSDKConnection-0Z70hEdE.js +1 -0
  2. package/assets/{ConstantsUtil-C65qLg9H.js → ConstantsUtil-IfUBwsBT.js} +1 -1
  3. package/assets/{ExchangeController-4bTbfXop.js → ExchangeController-DePb1GFL.js} +1 -1
  4. package/assets/{HelpersUtil-CMuaKvr0.js → HelpersUtil-C84DgUhp.js} +1 -1
  5. package/assets/InAppWalletConnectUI-DUi7oMdq.js +1 -0
  6. package/assets/{NetworkUtil-D77Jgx6s.js → NetworkUtil-Bgt2ITuu.js} +1 -1
  7. package/assets/QRCodeRenderer-dTVEF8IB.js +1 -0
  8. package/assets/{SwapController-B-cT0HaV.js → SwapController-UYZQN7tl.js} +1 -1
  9. package/assets/ThirdwebWalletManager-Dz4m7qO_.js +326 -0
  10. package/assets/biconomy-C4KjX8zf.js +1 -0
  11. package/assets/{biconomy-C13HiZKh.js → biconomy-LixggspG.js} +1 -1
  12. package/assets/br-B9BLCi07.js +1 -0
  13. package/assets/br-Bh5kquYi.js +1 -0
  14. package/assets/br-Bzf0kdCg.js +1 -0
  15. package/assets/br-OOdQ3ULT.js +1 -0
  16. package/assets/{ccip-BUGHDwrn.js → ccip-BM_vcm7R.js} +1 -1
  17. package/assets/ccip-CPEo6pFI.js +1 -0
  18. package/assets/{ccip-DXvrQeZe.js → ccip-Dar4BgqF.js} +1 -1
  19. package/assets/{chains-CewUlEiN.js → chains-BDyPLjuo.js} +1 -1
  20. package/assets/{common-DEDzDfZK.js → common-CqAIBo6K.js} +1 -1
  21. package/assets/common-Q4hcJSiz.js +1 -0
  22. package/assets/concat-hex-lIlH2McC.js +1 -0
  23. package/assets/controller-CcgJ61Ea.js +2 -0
  24. package/assets/controller-Czxst7w9.js +2 -0
  25. package/assets/{data-capture-DI_V8eEB.js → data-capture-BuKEn85Z.js} +1 -1
  26. package/assets/de-BIWVAXLP.js +1 -0
  27. package/assets/de-CGYpD2SG.js +1 -0
  28. package/assets/de-DxwDt0Si.js +1 -0
  29. package/assets/de-HLnDQwsk.js +1 -0
  30. package/assets/{decimals-BvtkSwrR.js → decimals-CVPnxmh7.js} +1 -1
  31. package/assets/decimals-zuJ3wlEU.js +1 -0
  32. package/assets/{detectExtension-B8HFcF7g.js → detectExtension-DXdFDVgv.js} +1 -1
  33. package/assets/detectExtension-Dz1kVH7_.js +1 -0
  34. package/assets/{email-4msbmfxW.js → email-DURckrbq.js} +1 -1
  35. package/assets/{embedded-wallet-DO1o5bel.js → embedded-wallet-BIUcDVNf.js} +1 -1
  36. package/assets/en-C9j038gl.js +1 -0
  37. package/assets/en-lXclJmNl.js +1 -0
  38. package/assets/en-wiTKdR4T.js +1 -0
  39. package/assets/{engine-BvEVVPO2.js → engine-DHtQmgio.js} +1 -1
  40. package/assets/engine-DpU8cZCi.js +1 -0
  41. package/assets/es-BoeWNXZK.js +1 -0
  42. package/assets/es-D1JvwHmW.js +1 -0
  43. package/assets/es-Dar-xg4p.js +1 -0
  44. package/assets/es-VJyYb90S.js +1 -0
  45. package/assets/{estimate-l1-fee-DYkQJOay.js → estimate-l1-fee-BkW_txp7.js} +1 -1
  46. package/assets/estimate-l1-fee-CU3YnFil.js +2 -0
  47. package/assets/eth_estimateGas-G_xcfVsZ.js +1 -0
  48. package/assets/eth_estimateGas-m2_--02H.js +1 -0
  49. package/assets/{eth_getStorageAt-GEFAClkO.js → eth_getStorageAt-VsQtq0Uz.js} +1 -1
  50. package/assets/eth_getTransactionCount-CEP3s4C1.js +1 -0
  51. package/assets/{eth_getTransactionCount-C3JnIYXb.js → eth_getTransactionCount-PcXWvj1j.js} +1 -1
  52. package/assets/eth_sendRawTransaction-DPdnXbFR.js +1 -0
  53. package/assets/{ethereum-C_Cy8XKf.js → ethereum-dihBYRnT.js} +1 -1
  54. package/assets/{extractIPFS-ClmYMTcl.js → extractIPFS-DklwHe-O.js} +1 -1
  55. package/assets/extractIPFS-JN46N2o7.js +1 -0
  56. package/assets/{features-D8Pi0wtw.js → features-_wzOnFY-.js} +1 -1
  57. package/assets/fetchTokenMetadata-B9BbNcLj.js +2 -0
  58. package/assets/{fetchTokenMetadata-QxcG1_Db.js → fetchTokenMetadata-C2LpxJUF.js} +2 -2
  59. package/assets/{fortmatic-CKI3vz2q.js → fortmatic-DBwa9kBS.js} +1 -1
  60. package/assets/fr-Biip2F0B.js +1 -0
  61. package/assets/fr-Cl9YKZtN.js +1 -0
  62. package/assets/fr-DQrXBak2.js +1 -0
  63. package/assets/fr-Dw9xCc6Y.js +1 -0
  64. package/assets/get-ecosystem-wallet-info-B4GMaUQL.js +1 -0
  65. package/assets/get-ecosystem-wallet-info-Dw7REpCN.js +1 -0
  66. package/assets/{getBalance-DnUZbXB_.js → getBalance-JHGD-cET.js} +2 -2
  67. package/assets/getBalance-cs-XLy8M.js +1 -0
  68. package/assets/getCurrencyMetadata-xziMh2zt.js +2 -0
  69. package/assets/{getInstalledModules-D9jzoYzG.js → getInstalledModules-BflLi-Ze.js} +1 -1
  70. package/assets/getInstalledModules-DQg0aCv5.js +1 -0
  71. package/assets/getNFT-BHbjbl1M.js +2 -0
  72. package/assets/{getNFT-DZtuF0Qb.js → getNFT-BOH0M19a.js} +1 -1
  73. package/assets/{getNFT-BWlrX7BO.js → getNFT-DetmgL-D.js} +2 -2
  74. package/assets/getNFT-buPGFTfQ.js +1 -0
  75. package/assets/{hashTypedData-DBp5vFy4.js → hashTypedData-DE5BevgH.js} +1 -1
  76. package/assets/hooks.module-BNtNDAZY.js +1 -0
  77. package/assets/{if-defined-DxgE-evn.js → if-defined-C9rr67g8.js} +1 -1
  78. package/assets/image--B48iF6N.js +1 -0
  79. package/assets/image-0QbZculn.js +1 -0
  80. package/assets/image-0Rb-Alqp.js +1 -0
  81. package/assets/image-0WA94JvO.js +1 -0
  82. package/assets/image-1PFF0msR.js +1 -0
  83. package/assets/image-1Q7meMlv.js +1 -0
  84. package/assets/image-1uQAVoCP.js +1 -0
  85. package/assets/image-2TZb5wm0.js +1 -0
  86. package/assets/image-2_1YP_wN.js +1 -0
  87. package/assets/image-2gXaVQKJ.js +1 -0
  88. package/assets/image-5AG089cB.js +1 -0
  89. package/assets/image-5Sau-rLk.js +1 -0
  90. package/assets/image-6D1EQPfl.js +1 -0
  91. package/assets/image-72qBnfEq.js +1 -0
  92. package/assets/image-7gNoXkuv.js +1 -0
  93. package/assets/image-7ve6a-pZ.js +1 -0
  94. package/assets/image-982I_LqG.js +1 -0
  95. package/assets/image-9P9l0zV_.js +1 -0
  96. package/assets/image-9QI9sTH5.js +1 -0
  97. package/assets/image-9mjTTt3Y.js +1 -0
  98. package/assets/image-A5Pisxzq.js +1 -0
  99. package/assets/image-AC1H6ZPE.js +1 -0
  100. package/assets/image-AK02cNa4.js +1 -0
  101. package/assets/image-AMwbpknG.js +1 -0
  102. package/assets/image-ATPgDDWr.js +1 -0
  103. package/assets/image-AWdU8VV0.js +1 -0
  104. package/assets/image-AczLW1TP.js +1 -0
  105. package/assets/image-AnfmMqaq.js +1 -0
  106. package/assets/image-B-Cy6KkY.js +1 -0
  107. package/assets/image-B-Dq4f8l.js +1 -0
  108. package/assets/image-B-j6X2ua.js +1 -0
  109. package/assets/image-B0gwpZUx.js +1 -0
  110. package/assets/image-B0xghz9F.js +1 -0
  111. package/assets/image-B264ar_O.js +1 -0
  112. package/assets/image-B29oqZFQ.js +1 -0
  113. package/assets/image-B2nNrUDP.js +1 -0
  114. package/assets/image-B32QPavX.js +1 -0
  115. package/assets/image-B33xp9CQ.js +1 -0
  116. package/assets/image-B3Rrn7dP.js +1 -0
  117. package/assets/image-B3gcDEsF.js +1 -0
  118. package/assets/image-B3qkm1hD.js +1 -0
  119. package/assets/image-B3vFiCTL.js +1 -0
  120. package/assets/image-B5zGMb7x.js +1 -0
  121. package/assets/image-B6eNElEj.js +1 -0
  122. package/assets/image-B79qVkMd.js +1 -0
  123. package/assets/image-B7f6OOFe.js +1 -0
  124. package/assets/image-B7qmT8Ca.js +1 -0
  125. package/assets/image-B9-WC9qz.js +1 -0
  126. package/assets/image-B94WiSPl.js +1 -0
  127. package/assets/image-B9EV7DkB.js +1 -0
  128. package/assets/image-B9i2YHdN.js +1 -0
  129. package/assets/image-B9xCKEQ5.js +1 -0
  130. package/assets/image-B9zDzj_n.js +1 -0
  131. package/assets/image-BB74R1v0.js +1 -0
  132. package/assets/image-BC-ISwXb.js +1 -0
  133. package/assets/image-BC0xyU5O.js +1 -0
  134. package/assets/image-BCZn_efw.js +1 -0
  135. package/assets/image-BC_7FxFG.js +1 -0
  136. package/assets/image-BDK4RXKk.js +1 -0
  137. package/assets/image-BEDiadVJ.js +1 -0
  138. package/assets/image-BEeNARTM.js +1 -0
  139. package/assets/image-BFZzUxQN.js +1 -0
  140. package/assets/image-BGGL-U5y.js +1 -0
  141. package/assets/image-BHWhxIRJ.js +1 -0
  142. package/assets/image-BHsLcCY-.js +1 -0
  143. package/assets/image-BI56qXQ0.js +1 -0
  144. package/assets/image-BIXNfpi0.js +1 -0
  145. package/assets/image-BJ7E9wJj.js +1 -0
  146. package/assets/image-BJTIIH0l.js +1 -0
  147. package/assets/image-BJZxT49R.js +1 -0
  148. package/assets/image-BKRBGzRA.js +1 -0
  149. package/assets/image-BKzTjD_x.js +1 -0
  150. package/assets/image-BLwps_AU.js +1 -0
  151. package/assets/image-BN9yS9ct.js +1 -0
  152. package/assets/image-BNMU4MrK.js +1 -0
  153. package/assets/image-BO752L4A.js +1 -0
  154. package/assets/image-BO9Hp1NS.js +1 -0
  155. package/assets/image-BOYYXbZD.js +1 -0
  156. package/assets/image-BOnGX8Q5.js +1 -0
  157. package/assets/image-BOsaNxhb.js +1 -0
  158. package/assets/image-BPSy6QXe.js +1 -0
  159. package/assets/image-BPo0OIev.js +1 -0
  160. package/assets/image-BPwT6MdF.js +1 -0
  161. package/assets/image-BQnyjyHr.js +1 -0
  162. package/assets/image-BR5h2SHU.js +1 -0
  163. package/assets/image-BS7uclVJ.js +1 -0
  164. package/assets/image-BSsXAyde.js +1 -0
  165. package/assets/image-BV0ZeCAx.js +1 -0
  166. package/assets/image-BVxPoHQF.js +1 -0
  167. package/assets/image-BW8rKOXQ.js +1 -0
  168. package/assets/image-BW_e3-dJ.js +1 -0
  169. package/assets/image-BX0R5Ldt.js +1 -0
  170. package/assets/image-BXDrqmSz.js +1 -0
  171. package/assets/image-BYiwuy-U.js +1 -0
  172. package/assets/image-BZAeII_Q.js +1 -0
  173. package/assets/image-BZaRgIwq.js +1 -0
  174. package/assets/image-BZqe_XdR.js +1 -0
  175. package/assets/image-B_3kPYuE.js +1 -0
  176. package/assets/image-B_6frjN-.js +1 -0
  177. package/assets/image-BaHqSwQx.js +1 -0
  178. package/assets/image-Balnt-Cz.js +1 -0
  179. package/assets/image-BbMnRQvP.js +1 -0
  180. package/assets/image-BbZlFk1s.js +1 -0
  181. package/assets/image-BbnwlM1P.js +1 -0
  182. package/assets/image-BcFBvVbI.js +1 -0
  183. package/assets/image-BcwKGbKI.js +1 -0
  184. package/assets/image-Bd0hgt6c.js +1 -0
  185. package/assets/image-BdlxKsqN.js +1 -0
  186. package/assets/image-BebTTEqp.js +1 -0
  187. package/assets/image-BenqI60j.js +1 -0
  188. package/assets/image-BfqQ3_FM.js +1 -0
  189. package/assets/image-Bg-Ezchh.js +1 -0
  190. package/assets/image-Bg5cmMOq.js +1 -0
  191. package/assets/image-BgTI1Mr2.js +1 -0
  192. package/assets/image-Bgjg8hNQ.js +1 -0
  193. package/assets/image-Bgyn7Edx.js +1 -0
  194. package/assets/image-Bh9RaAFE.js +1 -0
  195. package/assets/image-Bh9Vac4W.js +1 -0
  196. package/assets/image-BhyLUXmC.js +1 -0
  197. package/assets/image-Bj3Vau0H.js +1 -0
  198. package/assets/image-BjNYHzYo.js +1 -0
  199. package/assets/image-BkQn-eFE.js +1 -0
  200. package/assets/image-BkXrnCqT.js +1 -0
  201. package/assets/image-BlhMSU_w.js +1 -0
  202. package/assets/image-BlxEEUgA.js +1 -0
  203. package/assets/image-BmT8QXyE.js +1 -0
  204. package/assets/image-Bmkur-sE.js +1 -0
  205. package/assets/image-Bn-Yp1MK.js +1 -0
  206. package/assets/image-BnILE5Nd.js +1 -0
  207. package/assets/image-BnnBPaYj.js +1 -0
  208. package/assets/image-Bnt5C7zC.js +1 -0
  209. package/assets/image-BoPDznhr.js +1 -0
  210. package/assets/image-BoYSclA6.js +1 -0
  211. package/assets/image-Bq5dNCvj.js +1 -0
  212. package/assets/image-BqmoDhq4.js +1 -0
  213. package/assets/image-BrBkAmMh.js +1 -0
  214. package/assets/image-Brf-M6Eo.js +1 -0
  215. package/assets/image-BriecT_A.js +1 -0
  216. package/assets/image-Bs-ggdFz.js +1 -0
  217. package/assets/image-BsBvd3sv.js +1 -0
  218. package/assets/image-BsZmggWw.js +1 -0
  219. package/assets/image-Bt0VMJN5.js +1 -0
  220. package/assets/image-Bt794qKF.js +1 -0
  221. package/assets/image-BtCfBTZq.js +1 -0
  222. package/assets/image-BtDMB-2P.js +1 -0
  223. package/assets/image-BtTEqc7_.js +1 -0
  224. package/assets/image-Bt_TYk3Z.js +1 -0
  225. package/assets/image-Bu5z-R3j.js +1 -0
  226. package/assets/image-BuK74v8C.js +1 -0
  227. package/assets/image-Bve_kItK.js +1 -0
  228. package/assets/image-BvknIf7o.js +1 -0
  229. package/assets/image-Bvz63dRa.js +1 -0
  230. package/assets/image-Bw4AoMkM.js +1 -0
  231. package/assets/image-Bwc5B3nF.js +1 -0
  232. package/assets/image-Bx8CuGbg.js +1 -0
  233. package/assets/image-BxZLlxGO.js +1 -0
  234. package/assets/image-BxnxblQ1.js +1 -0
  235. package/assets/image-ByILNqlH.js +1 -0
  236. package/assets/image-BylgX2RN.js +1 -0
  237. package/assets/image-Bz7vfc72.js +1 -0
  238. package/assets/image-BzMshtv_.js +1 -0
  239. package/assets/image-BzcRZ3z_.js +1 -0
  240. package/assets/image-C-1BYDS8.js +1 -0
  241. package/assets/image-C-F3MXbl.js +1 -0
  242. package/assets/image-C-_OpeOv.js +1 -0
  243. package/assets/image-C-h7t_1F.js +1 -0
  244. package/assets/image-C-jy5_uw.js +1 -0
  245. package/assets/image-C-l2o06T.js +1 -0
  246. package/assets/image-C19BC9_z.js +1 -0
  247. package/assets/image-C1H-7cB7.js +1 -0
  248. package/assets/image-C3CekdMS.js +1 -0
  249. package/assets/image-C3CgzYTf.js +1 -0
  250. package/assets/image-C4G5noc2.js +1 -0
  251. package/assets/image-C4MrlFC9.js +1 -0
  252. package/assets/image-C4YFvx9h.js +1 -0
  253. package/assets/image-C4kRcwMC.js +1 -0
  254. package/assets/image-C5BUR1H0.js +1 -0
  255. package/assets/image-C5K8o_QO.js +1 -0
  256. package/assets/image-C6JZ7WuV.js +1 -0
  257. package/assets/image-C6_rXHSy.js +1 -0
  258. package/assets/image-C6e4H5Qk.js +1 -0
  259. package/assets/image-C7KIwDbC.js +1 -0
  260. package/assets/image-C8W_4ZM6.js +1 -0
  261. package/assets/image-CAFLdE57.js +1 -0
  262. package/assets/image-CAO8bP71.js +1 -0
  263. package/assets/image-CAb3G_S1.js +1 -0
  264. package/assets/image-CAiqBiB7.js +1 -0
  265. package/assets/image-CAyyni45.js +1 -0
  266. package/assets/image-CBEV_Ymj.js +1 -0
  267. package/assets/image-CBk1BMR-.js +1 -0
  268. package/assets/image-CBv_A54z.js +1 -0
  269. package/assets/image-CCpZhmeV.js +1 -0
  270. package/assets/image-CD-9cKzY.js +1 -0
  271. package/assets/image-CDQQ8H3a.js +1 -0
  272. package/assets/image-CDZQNGIA.js +1 -0
  273. package/assets/image-CE5zhWMG.js +1 -0
  274. package/assets/image-CF0jVIb9.js +1 -0
  275. package/assets/image-CFT4k-B4.js +1 -0
  276. package/assets/image-CFVYHfGR.js +1 -0
  277. package/assets/image-CG2L-E9e.js +1 -0
  278. package/assets/image-CGMwpiJi.js +1 -0
  279. package/assets/image-CGjM8vV0.js +1 -0
  280. package/assets/image-CGnQwBYH.js +1 -0
  281. package/assets/image-CHHWDf3g.js +1 -0
  282. package/assets/image-CI9-uvbv.js +1 -0
  283. package/assets/image-CIV6mRvx.js +1 -0
  284. package/assets/image-CJ_LMWeW.js +1 -0
  285. package/assets/image-CJcZQ4qy.js +1 -0
  286. package/assets/image-CJoENcT7.js +1 -0
  287. package/assets/image-CKVXVlPY.js +1 -0
  288. package/assets/image-CKgTbGoy.js +1 -0
  289. package/assets/image-CLYJx-Lt.js +1 -0
  290. package/assets/image-CLkcT8o9.js +1 -0
  291. package/assets/image-CMMSxKCI.js +1 -0
  292. package/assets/image-CMq0qq2T.js +1 -0
  293. package/assets/image-COolNucr.js +1 -0
  294. package/assets/image-CPTr6dkg.js +1 -0
  295. package/assets/image-CQQCUqCR.js +1 -0
  296. package/assets/image-CQvGfQex.js +1 -0
  297. package/assets/image-CR0aTzS0.js +1 -0
  298. package/assets/image-CR2oRmyx.js +1 -0
  299. package/assets/image-CSqTAqqQ.js +1 -0
  300. package/assets/image-CTIN0s1B.js +1 -0
  301. package/assets/image-CTIpcfmx.js +1 -0
  302. package/assets/image-CTjG3MUk.js +1 -0
  303. package/assets/image-CUg3Cnww.js +1 -0
  304. package/assets/image-CVhRaM7j.js +1 -0
  305. package/assets/image-CViScAsQ.js +1 -0
  306. package/assets/image-CVijw__b.js +1 -0
  307. package/assets/image-CWHyXFR4.js +1 -0
  308. package/assets/image-CW_1GHb7.js +1 -0
  309. package/assets/image-CX5Rh8VB.js +1 -0
  310. package/assets/image-CXCMuT4A.js +1 -0
  311. package/assets/image-CXmskFGu.js +1 -0
  312. package/assets/image-CXq-Cxbd.js +1 -0
  313. package/assets/image-CYPCjBfV.js +1 -0
  314. package/assets/image-CZoAF_IO.js +1 -0
  315. package/assets/image-C_araf9B.js +1 -0
  316. package/assets/image-C_d1pRRI.js +1 -0
  317. package/assets/image-Cacm9krt.js +1 -0
  318. package/assets/image-CbgyrC3w.js +1 -0
  319. package/assets/image-CcKLaZOY.js +1 -0
  320. package/assets/image-CdPK8hWD.js +1 -0
  321. package/assets/image-Ce4eMMpY.js +1 -0
  322. package/assets/image-CeeH5SSM.js +1 -0
  323. package/assets/image-Ceksqz1-.js +1 -0
  324. package/assets/image-CfdpAcNJ.js +1 -0
  325. package/assets/image-CfkILL-h.js +1 -0
  326. package/assets/image-CggT8fcC.js +1 -0
  327. package/assets/image-Ch_ktfcX.js +1 -0
  328. package/assets/image-Cj-WnBuG.js +1 -0
  329. package/assets/image-Cj5FK2LF.js +1 -0
  330. package/assets/image-Ck3Eh6O7.js +1 -0
  331. package/assets/image-Ck4D7BzK.js +1 -0
  332. package/assets/image-CkIE5GW_.js +1 -0
  333. package/assets/image-Cki_h5H8.js +1 -0
  334. package/assets/image-CkzfH2rK.js +1 -0
  335. package/assets/image-Cl79QoOA.js +1 -0
  336. package/assets/image-ClMsEpOA.js +1 -0
  337. package/assets/image-ClaYyDQX.js +1 -0
  338. package/assets/image-ClfNqwc4.js +1 -0
  339. package/assets/image-CmemWtNq.js +1 -0
  340. package/assets/image-CnHP8wCa.js +1 -0
  341. package/assets/image-CoVfVQ2N.js +1 -0
  342. package/assets/image-Co_-a15C.js +1 -0
  343. package/assets/image-Cq9CxI0T.js +1 -0
  344. package/assets/image-CqMUpFKn.js +1 -0
  345. package/assets/image-CqVlNOfi.js +1 -0
  346. package/assets/image-CqvokakT.js +1 -0
  347. package/assets/image-CqwlZgVk.js +1 -0
  348. package/assets/image-CrDo15dd.js +1 -0
  349. package/assets/image-CrwfI0sg.js +1 -0
  350. package/assets/image-CsDGOmEX.js +1 -0
  351. package/assets/image-CsXZJdXn.js +1 -0
  352. package/assets/image-Csi8zv8i.js +1 -0
  353. package/assets/image-CtPX3k8b.js +1 -0
  354. package/assets/image-CtzrXm6T.js +1 -0
  355. package/assets/image-CuH_nXcV.js +1 -0
  356. package/assets/image-CurSdKvd.js +1 -0
  357. package/assets/image-CwCfHO2C.js +1 -0
  358. package/assets/image-CwFxLfDc.js +1 -0
  359. package/assets/image-CyB_F_3i.js +1 -0
  360. package/assets/image-CyT4cot7.js +1 -0
  361. package/assets/image-CzDMlkmp.js +1 -0
  362. package/assets/image-D-N6lJzn.js +1 -0
  363. package/assets/image-D-l0_TY5.js +1 -0
  364. package/assets/image-D-u8N4-J.js +1 -0
  365. package/assets/image-D0EvVh0U.js +1 -0
  366. package/assets/image-D0XkC_cA.js +1 -0
  367. package/assets/image-D1DsrpO_.js +1 -0
  368. package/assets/image-D1LhuZVG.js +1 -0
  369. package/assets/image-D2OcPCwL.js +1 -0
  370. package/assets/image-D2pp6L6Y.js +1 -0
  371. package/assets/image-D3W98SRi.js +1 -0
  372. package/assets/image-D3yhzjwN.js +1 -0
  373. package/assets/image-D4996xLS.js +1 -0
  374. package/assets/image-D4n4fDBI.js +1 -0
  375. package/assets/image-D5eIt9w3.js +1 -0
  376. package/assets/image-D6CcyX2K.js +1 -0
  377. package/assets/image-D72C3rOt.js +1 -0
  378. package/assets/image-D7UG6IdA.js +1 -0
  379. package/assets/image-D7e0j8-5.js +1 -0
  380. package/assets/image-D7kLqgEy.js +1 -0
  381. package/assets/image-D84iATu3.js +1 -0
  382. package/assets/image-D89rnuSD.js +1 -0
  383. package/assets/image-D8LYDHPh.js +1 -0
  384. package/assets/image-D8u0coXq.js +1 -0
  385. package/assets/image-D9BJV0RO.js +1 -0
  386. package/assets/image-D9EUqNLw.js +1 -0
  387. package/assets/image-D9kD-3RI.js +1 -0
  388. package/assets/image-DBRyH_Rh.js +1 -0
  389. package/assets/image-DBTtOr0A.js +1 -0
  390. package/assets/image-DBVezoYp.js +1 -0
  391. package/assets/image-DBfe_vfK.js +1 -0
  392. package/assets/image-DCd2Ym7s.js +1 -0
  393. package/assets/image-DCe7pzXg.js +1 -0
  394. package/assets/image-DCu5LmP3.js +1 -0
  395. package/assets/image-DD3TEXBm.js +1 -0
  396. package/assets/image-DDvpwoJM.js +1 -0
  397. package/assets/image-DEWYzY44.js +1 -0
  398. package/assets/image-DFJ9V7d6.js +1 -0
  399. package/assets/image-DG2A0pp3.js +1 -0
  400. package/assets/image-DGb_hLx6.js +1 -0
  401. package/assets/image-DGt7Rmz0.js +1 -0
  402. package/assets/image-DIOD3I9G.js +1 -0
  403. package/assets/image-DJWswcCh.js +1 -0
  404. package/assets/image-DK9H4-Ad.js +1 -0
  405. package/assets/image-DKASljuV.js +1 -0
  406. package/assets/image-DKGPCmzR.js +1 -0
  407. package/assets/image-DKIjfVu7.js +1 -0
  408. package/assets/image-DKzTIzax.js +1 -0
  409. package/assets/image-DLNyVKh7.js +1 -0
  410. package/assets/image-DMShxJ4p.js +1 -0
  411. package/assets/image-DNK-Wi5D.js +1 -0
  412. package/assets/image-DNqAGFzc.js +1 -0
  413. package/assets/image-DO0rKwK5.js +1 -0
  414. package/assets/image-DO9smEJD.js +1 -0
  415. package/assets/image-DOl7zD0B.js +1 -0
  416. package/assets/image-DP3-AKgU.js +1 -0
  417. package/assets/image-DRIx4y_P.js +1 -0
  418. package/assets/image-DRTCa3VU.js +1 -0
  419. package/assets/image-DR_z7tXV.js +1 -0
  420. package/assets/image-DRkgy69L.js +1 -0
  421. package/assets/image-DS02lLXY.js +1 -0
  422. package/assets/image-DSJKsPTa.js +1 -0
  423. package/assets/image-DTBDlZkw.js +1 -0
  424. package/assets/image-DTI3p9-Y.js +1 -0
  425. package/assets/image-DTjGzWem.js +1 -0
  426. package/assets/image-DTvFXF0X.js +1 -0
  427. package/assets/image-DU11lzrk.js +1 -0
  428. package/assets/image-DU5rwGF4.js +1 -0
  429. package/assets/image-DU8NyouV.js +1 -0
  430. package/assets/image-DUF566Oh.js +1 -0
  431. package/assets/image-DW-QsWzn.js +1 -0
  432. package/assets/image-DW2MUS3y.js +1 -0
  433. package/assets/image-DXXDq1SV.js +1 -0
  434. package/assets/image-DY9y4Zuj.js +1 -0
  435. package/assets/image-DYjHGArM.js +1 -0
  436. package/assets/image-DYpL4EaL.js +1 -0
  437. package/assets/image-DZnDK-Xj.js +1 -0
  438. package/assets/image-D_F9G8qf.js +1 -0
  439. package/assets/image-DapXhx3l.js +1 -0
  440. package/assets/image-DarW8a9S.js +1 -0
  441. package/assets/image-Db2mz7AE.js +1 -0
  442. package/assets/image-Dbjepryy.js +1 -0
  443. package/assets/image-Dblzndv0.js +1 -0
  444. package/assets/image-DbxthKzd.js +1 -0
  445. package/assets/image-Dc4UaoeV.js +1 -0
  446. package/assets/image-DcDvrdXW.js +1 -0
  447. package/assets/image-DcHAlJFf.js +1 -0
  448. package/assets/image-DdG87PRE.js +1 -0
  449. package/assets/image-DdS639hK.js +1 -0
  450. package/assets/image-DdhciWs2.js +1 -0
  451. package/assets/image-Ded2cDkb.js +1 -0
  452. package/assets/image-Dg0N1g6c.js +1 -0
  453. package/assets/image-DhEatMPL.js +1 -0
  454. package/assets/image-DhRoVn_A.js +1 -0
  455. package/assets/image-DhkFzAlB.js +1 -0
  456. package/assets/image-Di_xLdyX.js +1 -0
  457. package/assets/image-DigckmBu.js +1 -0
  458. package/assets/image-Diy5ggOd.js +1 -0
  459. package/assets/image-DjUJV6x7.js +1 -0
  460. package/assets/image-Dm6aqzLa.js +1 -0
  461. package/assets/image-DmF82yDT.js +1 -0
  462. package/assets/image-DmNtyNJi.js +1 -0
  463. package/assets/image-DmVdrg9x.js +1 -0
  464. package/assets/image-DnOc4PLu.js +1 -0
  465. package/assets/image-DnR4Lmm2.js +1 -0
  466. package/assets/image-DnrDonCs.js +1 -0
  467. package/assets/image-Dnxw18r0.js +1 -0
  468. package/assets/image-DpEXid6P.js +1 -0
  469. package/assets/image-DpuchfOi.js +1 -0
  470. package/assets/image-Dq2YJAiu.js +1 -0
  471. package/assets/image-DqECxs5-.js +1 -0
  472. package/assets/image-DqZNaegF.js +1 -0
  473. package/assets/image-DrSeWkD2.js +1 -0
  474. package/assets/image-DrYWWKEd.js +1 -0
  475. package/assets/image-DraNAXbA.js +1 -0
  476. package/assets/image-Dts-dWM_.js +1 -0
  477. package/assets/image-Dubw5heQ.js +1 -0
  478. package/assets/image-DueZWGGJ.js +1 -0
  479. package/assets/image-Dv-zloMU.js +1 -0
  480. package/assets/image-DwT8NU8o.js +1 -0
  481. package/assets/image-Dx3svzxu.js +1 -0
  482. package/assets/image-DyAVMMp6.js +1 -0
  483. package/assets/image-DzEk34N9.js +1 -0
  484. package/assets/image-EV0HMtku.js +1 -0
  485. package/assets/image-Eet5vkQN.js +1 -0
  486. package/assets/image-Eq0Swt8O.js +1 -0
  487. package/assets/image-F1X0Jqxn.js +1 -0
  488. package/assets/image-F3HgBsB-.js +1 -0
  489. package/assets/image-FsYj6Ipw.js +1 -0
  490. package/assets/image-GC2hQOZY.js +1 -0
  491. package/assets/image-GJh-xUBh.js +1 -0
  492. package/assets/image-H2IFlJwk.js +1 -0
  493. package/assets/image-HX_Cc3WE.js +1 -0
  494. package/assets/image-IE8YXerr.js +1 -0
  495. package/assets/image-IV7Ly6tc.js +1 -0
  496. package/assets/image-JETMQh4S.js +1 -0
  497. package/assets/image-KuSQ9Dwa.js +1 -0
  498. package/assets/image-LKLppsLU.js +1 -0
  499. package/assets/image-Ljm9Bz3n.js +1 -0
  500. package/assets/image-Ln3_5Zss.js +1 -0
  501. package/assets/image-LrnAZqig.js +1 -0
  502. package/assets/image-N5WHiU5_.js +1 -0
  503. package/assets/image-OB6MEQB3.js +1 -0
  504. package/assets/image-OZ1AOwbT.js +1 -0
  505. package/assets/image-Obx6ILaM.js +1 -0
  506. package/assets/image-PE3NuFOk.js +1 -0
  507. package/assets/image-PmH-IhRa.js +1 -0
  508. package/assets/image-Pyla20aw.js +1 -0
  509. package/assets/image-Q84BS-gC.js +1 -0
  510. package/assets/image-QiSwBpPD.js +1 -0
  511. package/assets/image-QsHphgJe.js +1 -0
  512. package/assets/image-R9RXoc8s.js +1 -0
  513. package/assets/image-RaAvmTda.js +1 -0
  514. package/assets/image-Rvq3ddXP.js +1 -0
  515. package/assets/image-S1B0Gp4I.js +1 -0
  516. package/assets/image-S9984bPS.js +1 -0
  517. package/assets/image-SecrmBNd.js +1 -0
  518. package/assets/image-T5Lr0jNA.js +1 -0
  519. package/assets/image-TCU-3JIq.js +1 -0
  520. package/assets/image-TDSuOHNU.js +1 -0
  521. package/assets/image-TqYEE834.js +1 -0
  522. package/assets/image-Ua30yTgk.js +1 -0
  523. package/assets/image-UedJVRUu.js +1 -0
  524. package/assets/image-Uvntzjzd.js +1 -0
  525. package/assets/image-VMDTb4vT.js +1 -0
  526. package/assets/image-VRkR1FSv.js +1 -0
  527. package/assets/image-VX9kj-L4.js +1 -0
  528. package/assets/image-W4tnKhU5.js +1 -0
  529. package/assets/image-WE5WO1oI.js +1 -0
  530. package/assets/image-WVTBQdo8.js +1 -0
  531. package/assets/image-WgGILhOH.js +1 -0
  532. package/assets/image-Y1vaco4M.js +1 -0
  533. package/assets/image-YrUQjQfX.js +1 -0
  534. package/assets/image-ZX9AyZf9.js +1 -0
  535. package/assets/image-ZwVZp8I-.js +1 -0
  536. package/assets/image-_ytDCtdN.js +1 -0
  537. package/assets/image-a7JzCm8c.js +1 -0
  538. package/assets/image-aLir34M2.js +1 -0
  539. package/assets/image-ac_iWcfz.js +1 -0
  540. package/assets/image-bGkpV8Yz.js +1 -0
  541. package/assets/image-bx7t2tFM.js +1 -0
  542. package/assets/image-cLgiWKUl.js +1 -0
  543. package/assets/image-ds_DS45D.js +1 -0
  544. package/assets/image-eNFpMOAS.js +1 -0
  545. package/assets/image-eXgCeXYC.js +1 -0
  546. package/assets/image-egfxQb8o.js +1 -0
  547. package/assets/image-g8OkL-iB.js +1 -0
  548. package/assets/image-gPjUdZvh.js +1 -0
  549. package/assets/image-gTlOw189.js +1 -0
  550. package/assets/image-gZn57b3d.js +1 -0
  551. package/assets/image-ioijj4TO.js +1 -0
  552. package/assets/image-jU3weE_L.js +1 -0
  553. package/assets/image-keSuKx3L.js +1 -0
  554. package/assets/image-lj2MXbSM.js +1 -0
  555. package/assets/image-mUn2Nmwd.js +1 -0
  556. package/assets/image-mo-MZ3QJ.js +1 -0
  557. package/assets/image-mtAAp4l3.js +1 -0
  558. package/assets/image-nGg2NUr5.js +1 -0
  559. package/assets/image-nnLbNJXY.js +1 -0
  560. package/assets/image-nuAuj_Jk.js +1 -0
  561. package/assets/image-o13bTCjN.js +1 -0
  562. package/assets/image-ocD-m7Q3.js +1 -0
  563. package/assets/image-pWd800uA.js +1 -0
  564. package/assets/image-ponfuhgz.js +1 -0
  565. package/assets/image-qL02cf1Y.js +1 -0
  566. package/assets/image-qbZML0jD.js +1 -0
  567. package/assets/image-sEmhdTY-.js +1 -0
  568. package/assets/image-tsyLyK5O.js +1 -0
  569. package/assets/image-u8DQucgw.js +1 -0
  570. package/assets/image-ubhPU-df.js +1 -0
  571. package/assets/image-ubiaz4Ce.js +1 -0
  572. package/assets/image-v60dFJ72.js +1 -0
  573. package/assets/image-vBCicR5m.js +1 -0
  574. package/assets/image-wCxGp5DI.js +1 -0
  575. package/assets/image-wxMjTeKK.js +1 -0
  576. package/assets/image-xqIoPugN.js +1 -0
  577. package/assets/image-y8DPTS4d.js +1 -0
  578. package/assets/image-yTAVsfm3.js +1 -0
  579. package/assets/in-app-wallet-calls-Dhx0WdY-.js +1 -0
  580. package/assets/in-app-wallet-calls-hmGpEqXh.js +1 -0
  581. package/assets/index--Gdut-6F.js +1 -0
  582. package/assets/index--a3iuiww.js +1 -0
  583. package/assets/index-01H7hL5P.js +1 -0
  584. package/assets/{index-DcRvDVZ1.js → index-0nTzO_qt.js} +1 -1
  585. package/assets/index-1dvjnqEQ.js +16 -0
  586. package/assets/index-1j0V944m.js +1 -0
  587. package/assets/index-3AGQkopq.js +1 -0
  588. package/assets/index-3Cvg-OXh.js +1 -0
  589. package/assets/index-3Hrik3MN.js +1 -0
  590. package/assets/index-3b4FPnNt.js +1 -0
  591. package/assets/index-3mfJd8aA.js +1 -0
  592. package/assets/index-4Gkxn9a_.js +1 -0
  593. package/assets/index-4l3b14FK.js +1 -0
  594. package/assets/index-5DvAcfYw.js +1 -0
  595. package/assets/index-5MfyGNXX.js +1 -0
  596. package/assets/index-5MqcAe3C.js +1 -0
  597. package/assets/index-60aSyGqb.js +1 -0
  598. package/assets/index-6xhBK11g.js +1 -0
  599. package/assets/index-7HfmIPvC.js +1 -0
  600. package/assets/{index-B_eiQKAu.js → index-7RWfUOm9.js} +1 -1
  601. package/assets/index-7YYggeeW.js +1 -0
  602. package/assets/index-9urBw4jN.js +1 -0
  603. package/assets/index-B-g1VAOO.js +1 -0
  604. package/assets/index-B01hsCSm.js +1 -0
  605. package/assets/index-B0wYo_zG.js +1 -0
  606. package/assets/index-B18M8pMG.js +1 -0
  607. package/assets/index-B1EcH1c7.js +1 -0
  608. package/assets/index-B1UaaLNv.js +1 -0
  609. package/assets/index-B1lRIgux.js +1 -0
  610. package/assets/index-B3ylAWHD.js +1 -0
  611. package/assets/index-B4NjVdaz.js +1 -0
  612. package/assets/index-B5YMdPlv.js +1 -0
  613. package/assets/index-B5dYTApw.js +3 -0
  614. package/assets/index-B5mnNH8U.js +1 -0
  615. package/assets/index-B5oClu2g.js +1 -0
  616. package/assets/index-B5qFvytG.js +1 -0
  617. package/assets/index-B6he1NFn.js +1 -0
  618. package/assets/index-B79hT9zU.js +1 -0
  619. package/assets/index-B7f-7qNF.js +1 -0
  620. package/assets/index-B7x0EPkI.js +1 -0
  621. package/assets/index-B7yCMw6f.js +1 -0
  622. package/assets/index-B82mCN3i.js +1 -0
  623. package/assets/index-B8F2-SGp.js +1 -0
  624. package/assets/index-B8FJWq2b.js +1 -0
  625. package/assets/index-B8M5fchQ.js +1 -0
  626. package/assets/{index-BlQHD0NB.js → index-B8W1B15Q.js} +1 -1
  627. package/assets/{index-DtWapT_q.js → index-B9RtPRFB.js} +1 -1
  628. package/assets/index-B9VmLLfu.js +1 -0
  629. package/assets/index-BAFdi-Xy.js +1 -0
  630. package/assets/index-BAmym71D.js +1 -0
  631. package/assets/{index-goUhewij.js → index-BBEYFb0K.js} +1 -1
  632. package/assets/index-BBSqe2Yu.js +1 -0
  633. package/assets/index-BBZBr17n.js +1 -0
  634. package/assets/index-BBhuy_-9.js +1 -0
  635. package/assets/index-BBjyHWpu.js +2 -0
  636. package/assets/index-BCgIOWHy.js +1 -0
  637. package/assets/index-BCjMsn_g.js +1 -0
  638. package/assets/index-BCmub21b.js +1 -0
  639. package/assets/index-BDZlq0qh.js +1 -0
  640. package/assets/index-BDxaD6BF.js +1 -0
  641. package/assets/index-BEvs-KDU.js +1 -0
  642. package/assets/index-BF0upGcQ.js +1 -0
  643. package/assets/index-BFO7EK1h.js +1 -0
  644. package/assets/index-BFmXTuTI.js +1 -0
  645. package/assets/index-BG7XICd4.js +1 -0
  646. package/assets/index-BGXhyrjQ.js +1 -0
  647. package/assets/index-BGdrC_Sh.js +1 -0
  648. package/assets/index-BGmtW5WT.js +1 -0
  649. package/assets/{index-HAFKHNrB.js → index-BHHvUivu.js} +1 -1
  650. package/assets/index-BHpZ5apY.js +1 -0
  651. package/assets/{index-Bp7JvHeI.js → index-BJB6bQRp.js} +1 -1
  652. package/assets/index-BK3hD_Aq.js +1 -0
  653. package/assets/index-BKOOtGSa.js +1 -0
  654. package/assets/{index-DvygrAbU.js → index-BKQlQfxz.js} +1 -1
  655. package/assets/index-BKc1f5vZ.js +1 -0
  656. package/assets/index-BKhtDnEy.js +1 -0
  657. package/assets/index-BLJlEky2.js +1 -0
  658. package/assets/index-BLXzYE6a.js +1 -0
  659. package/assets/index-BLslmGSA.js +1 -0
  660. package/assets/index-BNb0BNpv.js +1 -0
  661. package/assets/index-BNcgD_Jo.js +1 -0
  662. package/assets/index-BNxqavL8.js +1 -0
  663. package/assets/index-BNz6smeL.js +1 -0
  664. package/assets/index-BOGFyBZY.js +1 -0
  665. package/assets/index-BPIHBKg2.js +1 -0
  666. package/assets/index-BQfRnOEk.js +1 -0
  667. package/assets/{index-BPFffsgB.js → index-BS0_vd44.js} +1 -1
  668. package/assets/index-BSQg7iBu.js +1 -0
  669. package/assets/index-BSsQ8WTt.js +1 -0
  670. package/assets/{index-CODceU7b.css → index-BTGGjpkN.css} +3 -3
  671. package/assets/index-BUFTsMrI.js +1 -0
  672. package/assets/index-BUPzw_YU.js +1 -0
  673. package/assets/index-BV6FLPiR.js +1 -0
  674. package/assets/index-BVz0emY4.js +1 -0
  675. package/assets/index-BW67UrrV.js +1 -0
  676. package/assets/index-BWc71RqF.js +1 -0
  677. package/assets/index-BXLtaWeF.js +1 -0
  678. package/assets/index-BXMj9soJ.js +1 -0
  679. package/assets/index-BYdDyzxC.js +1 -0
  680. package/assets/index-BYkyq-Fh.js +1 -0
  681. package/assets/{index-Cx-bBVtG.js → index-BZRwFbHL.js} +1 -1
  682. package/assets/index-BZcoU6Z0.js +1 -0
  683. package/assets/index-BZprotv2.js +1 -0
  684. package/assets/index-B_5Z_DKz.js +1 -0
  685. package/assets/index-B_uKoT3A.js +1 -0
  686. package/assets/index-BbFO227e.js +1 -0
  687. package/assets/index-BbT33_dP.js +1 -0
  688. package/assets/index-BbblI1cW.js +1 -0
  689. package/assets/{index-DdEEbDq0.js → index-Bc4mvSuq.js} +1 -1
  690. package/assets/index-Bd679tWT.js +1 -0
  691. package/assets/index-BeSxOizm.js +1 -0
  692. package/assets/index-BemdfzPz.js +1 -0
  693. package/assets/index-Beysbmyx.js +2 -0
  694. package/assets/index-Bf6aVU23.js +1 -0
  695. package/assets/index-Bg6yFg1o.js +1 -0
  696. package/assets/index-BgNRU-e0.js +1 -0
  697. package/assets/index-BhCLT0ad.js +1 -0
  698. package/assets/index-Bh_-A7Ja.js +1 -0
  699. package/assets/index-BhkOXeUI.js +1 -0
  700. package/assets/index-Bi3gSOdz.js +1 -0
  701. package/assets/index-BiQYxH3k.js +1 -0
  702. package/assets/index-Bj2cV2cj.js +1 -0
  703. package/assets/index-Bjaz41sN.js +1 -0
  704. package/assets/index-BjuDWcc8.js +1 -0
  705. package/assets/index-Bk78_cgg.js +1 -0
  706. package/assets/index-Bk7uX5j_.js +1 -0
  707. package/assets/index-BkT_Phju.js +1 -0
  708. package/assets/index-Bl90M3Oh.js +1 -0
  709. package/assets/index-BlKJ-JBj.js +1 -0
  710. package/assets/index-Blhav013.js +1 -0
  711. package/assets/index-BmyNUPMf.js +1 -0
  712. package/assets/index-BnZ9yt85.js +1 -0
  713. package/assets/index-BoWyXM61.js +1 -0
  714. package/assets/index-BomxN3NM.js +1 -0
  715. package/assets/index-Bp51oEV0.js +1 -0
  716. package/assets/index-BpHRNVJq.js +1 -0
  717. package/assets/index-BqfTsh6E.js +1 -0
  718. package/assets/index-Br2X_aBY.js +1 -0
  719. package/assets/index-BrmfNCsT.js +1 -0
  720. package/assets/index-BsPtMfti.js +1 -0
  721. package/assets/index-BsYaYokr.js +1 -0
  722. package/assets/index-BtXf6MK9.js +1 -0
  723. package/assets/index-BuRC3xsC.js +1 -0
  724. package/assets/index-Bw9O70Te.js +1 -0
  725. package/assets/index-BwPT1xVX.js +1 -0
  726. package/assets/index-BwWQILXK.js +1 -0
  727. package/assets/index-Bx-6M_VN.js +1 -0
  728. package/assets/index-BxdOFUPP.js +1 -0
  729. package/assets/index-BxoamgAt.js +1 -0
  730. package/assets/index-ByCnomey.js +1 -0
  731. package/assets/index-Byv2UG3B.js +1 -0
  732. package/assets/index-Byy_fx6M.js +1 -0
  733. package/assets/{index-BrSxWtTK.js → index-BzArFYlw.js} +1 -1
  734. package/assets/index-BzHMIBCY.js +1 -0
  735. package/assets/index-Bzae-fTw.js +1 -0
  736. package/assets/index-C-C8iqy7.js +1 -0
  737. package/assets/{index-iAuyHihw.js → index-C-_SQA8J.js} +1 -1
  738. package/assets/index-C01qJiwG.js +1 -0
  739. package/assets/index-C0S3Jw0J.js +1 -0
  740. package/assets/index-C15ioynp.js +1 -0
  741. package/assets/index-C1HmbNh1.js +1 -0
  742. package/assets/{index-C_6SxrOL.js → index-C1VvoXRq.js} +1 -1
  743. package/assets/index-C21V-qUV.js +1 -0
  744. package/assets/index-C28bWeia.js +1 -0
  745. package/assets/index-C3TfYb1F.js +1 -0
  746. package/assets/index-C3Ud76aq.js +1 -0
  747. package/assets/index-C3gWBSK8.js +1 -0
  748. package/assets/index-C4kxCSEw.js +1 -0
  749. package/assets/index-C5LJPbHN.js +1 -0
  750. package/assets/index-C5pmmrHC.js +1 -0
  751. package/assets/{index-BciRn1i6.js → index-C6lO61o8.js} +1 -1
  752. package/assets/index-C7MfWFoK.js +1 -0
  753. package/assets/index-C7Y-Vt-H.js +1 -0
  754. package/assets/index-C9KeS2NO.js +1 -0
  755. package/assets/index-C9QluAH0.js +1 -0
  756. package/assets/index-C9s7a0Ez.js +1 -0
  757. package/assets/index-CAbUuCad.js +1 -0
  758. package/assets/index-CBEChUnX.js +1 -0
  759. package/assets/index-CBtcz4_T.js +1 -0
  760. package/assets/index-CCH4Lm0k.js +1 -0
  761. package/assets/index-CCHSY1Ig.js +1 -0
  762. package/assets/index-CCMe_tjP.js +1 -0
  763. package/assets/index-CCYs1NTS.js +1 -0
  764. package/assets/index-CCcCf_zM.js +1 -0
  765. package/assets/index-CCmQEc5F.js +1 -0
  766. package/assets/index-CCoUqMcq.js +1 -0
  767. package/assets/index-CD-c0Pwx.js +1 -0
  768. package/assets/index-CDBO4Wxt.js +1 -0
  769. package/assets/index-CDSsehUH.js +1 -0
  770. package/assets/index-CEQTfzyW.js +1 -0
  771. package/assets/index-CEiupjfk.js +1 -0
  772. package/assets/index-CFS3GV0-.js +1 -0
  773. package/assets/index-CHGmRGs1.js +1 -0
  774. package/assets/index-CHj5uoB4.js +1 -0
  775. package/assets/index-CHtlbymW.js +1 -0
  776. package/assets/index-CI0o0_5P.js +1 -0
  777. package/assets/index-CIEKStke.js +1 -0
  778. package/assets/index-CIJwg7x2.js +1 -0
  779. package/assets/index-CIXsaBn0.js +1 -0
  780. package/assets/index-CIqB4GcC.js +1 -0
  781. package/assets/index-CJLOVPEY.js +1 -0
  782. package/assets/index-CJOIpO0D.js +1 -0
  783. package/assets/index-CJUw-x2B.js +1 -0
  784. package/assets/index-CJWMUHO2.js +1 -0
  785. package/assets/index-CJjptfiA.js +1 -0
  786. package/assets/index-CKbNEeVv.js +1 -0
  787. package/assets/index-CLDRRTfd.js +1 -0
  788. package/assets/index-CLmRyFMq.js +1 -0
  789. package/assets/index-CLuOEfyi.js +1 -0
  790. package/assets/index-CM1LA8OI.js +1 -0
  791. package/assets/index-CMLf1O57.js +1 -0
  792. package/assets/index-CMXgyf5r.js +1 -0
  793. package/assets/index-CMZLDlaA.js +1 -0
  794. package/assets/index-CMs5X7O_.js +1 -0
  795. package/assets/index-CMwU9_9b.js +1 -0
  796. package/assets/index-CN5jCnO7.js +1 -0
  797. package/assets/index-CNMUmwOO.js +1 -0
  798. package/assets/index-CNUn3cep.js +1 -0
  799. package/assets/index-CNa4H4iF.js +1 -0
  800. package/assets/index-CNtQA9K3.js +1 -0
  801. package/assets/index-CO5X7F-R.js +1 -0
  802. package/assets/index-COjO7y4b.js +1 -0
  803. package/assets/index-COyOD9UG.js +1 -0
  804. package/assets/index-CPsQ8NHN.js +1 -0
  805. package/assets/index-CQYWT8jy.js +1 -0
  806. package/assets/index-CQcA9NQy.js +1 -0
  807. package/assets/{index-BZcpG6tT.js → index-CR8uPp6r.js} +1 -1
  808. package/assets/index-CRpuavSs.js +1 -0
  809. package/assets/{index-DjKx0U6o.js → index-CSLYlLzb.js} +1 -1
  810. package/assets/index-CSM6DsXg.js +1 -0
  811. package/assets/index-CS_r9DbU.js +1 -0
  812. package/assets/index-CT7qvsrD.js +1 -0
  813. package/assets/{index-Uuvg_32q.js → index-CTMN1OiK.js} +1 -1
  814. package/assets/index-CUrSGAWv.js +1 -0
  815. package/assets/index-CUruswiz.js +1 -0
  816. package/assets/index-CVbWxVgo.js +1 -0
  817. package/assets/index-CVzxUbsV.js +1 -0
  818. package/assets/index-CWJEGR1b.js +1 -0
  819. package/assets/index-CWLh9ort.js +1 -0
  820. package/assets/index-CWMJI89u.js +1 -0
  821. package/assets/index-CWP7CAYR.js +1 -0
  822. package/assets/index-CWRHM42y.js +1 -0
  823. package/assets/index-CWcfCu8_.js +1 -0
  824. package/assets/index-CXMLwLSL.js +1 -0
  825. package/assets/index-CY9mq6Ws.js +1 -0
  826. package/assets/index-CYFQ1qjY.js +1 -0
  827. package/assets/index-CYWQaahL.js +1 -0
  828. package/assets/index-CZ1QIkWn.js +1 -0
  829. package/assets/index-CZ_a5e1G.js +1 -0
  830. package/assets/index-C_0gheI4.js +1 -0
  831. package/assets/index-C_QhTFPr.js +1 -0
  832. package/assets/index-C_xRuElA.js +1 -0
  833. package/assets/index-Cb3GRnFH.js +1 -0
  834. package/assets/index-CcMwGV5f.js +1 -0
  835. package/assets/index-Cca-XDRc.js +1 -0
  836. package/assets/index-Ccilo5se.js +1 -0
  837. package/assets/{index-BLW01gt5.js → index-CdxpK6eg.js} +1 -1
  838. package/assets/index-CeIV1F82.js +1 -0
  839. package/assets/index-CeRPZA_a.js +1 -0
  840. package/assets/index-CeX49D2O.js +1 -0
  841. package/assets/index-CeoeXAWS.js +1 -0
  842. package/assets/index-CfvJYRh3.js +1 -0
  843. package/assets/index-CgAK97ik.js +1 -0
  844. package/assets/{index-lQAVUcJ_.js → index-CiiICg0u.js} +1 -1
  845. package/assets/index-CjviSBad.js +1 -0
  846. package/assets/index-Ck1HFtJO.js +1 -0
  847. package/assets/index-CkUX-IzZ.js +1 -0
  848. package/assets/index-ClREn2mR.js +1 -0
  849. package/assets/index-CmL6gP_y.js +1 -0
  850. package/assets/{index-DztUGues.js → index-CmahChMJ.js} +1 -1
  851. package/assets/index-CnESNHyu.js +1 -0
  852. package/assets/index-CnPAMI6s.js +1 -0
  853. package/assets/index-Cnl_JyCd.js +1 -0
  854. package/assets/{index-XZrkqNWI.js → index-CoFTFukW.js} +1 -1
  855. package/assets/index-CocmFQPB.js +1 -0
  856. package/assets/index-CpizqJi3.js +1 -0
  857. package/assets/index-CqG7x8Pr.js +1 -0
  858. package/assets/index-CqsWR9GD.js +1 -0
  859. package/assets/index-Cr_bAMhu.js +1 -0
  860. package/assets/index-CrhmmIqA.js +1 -0
  861. package/assets/index-CsOh37JV.js +1 -0
  862. package/assets/index-CsrGDi9G.js +1 -0
  863. package/assets/index-CtkUWqve.js +1 -0
  864. package/assets/index-CtrwXvyj.js +1 -0
  865. package/assets/index-Cu7IM6b-.js +1 -0
  866. package/assets/index-CufUEtrW.js +1 -0
  867. package/assets/index-CupY10KR.js +1 -0
  868. package/assets/index-CvmJGI4m.js +1 -0
  869. package/assets/index-Cw_4ZjJn.js +1 -0
  870. package/assets/index-Cw_t_6u-.js +1 -0
  871. package/assets/index-CxAdVXlx.js +1 -0
  872. package/assets/index-CxpTZ-IG.js +1 -0
  873. package/assets/index-Cyniq_vs.js +1 -0
  874. package/assets/{index-BpYijg-9.js → index-Cz8fLqSm.js} +1 -1
  875. package/assets/index-CzCBPhT0.js +1 -0
  876. package/assets/index-D-0oKenN.js +1 -0
  877. package/assets/index-D-YZvb-d.js +1 -0
  878. package/assets/index-D-cUTPXD.js +1 -0
  879. package/assets/index-D06yDGlI.js +1 -0
  880. package/assets/index-D09tH-_p.js +1 -0
  881. package/assets/index-D3-ragvp.js +1 -0
  882. package/assets/index-D3CZdDyo.js +1 -0
  883. package/assets/index-D3V2-WKd.js +1 -0
  884. package/assets/index-D3xs2XN5.js +1 -0
  885. package/assets/index-D4kRIh3X.js +1 -0
  886. package/assets/index-D4qmgJzl.js +1 -0
  887. package/assets/index-D5HkZlJ0.js +1 -0
  888. package/assets/index-D5OfgCAv.js +1 -0
  889. package/assets/index-D5XbboPy.js +1 -0
  890. package/assets/index-D5zmTuuZ.js +1 -0
  891. package/assets/index-D7-VEloj.js +1 -0
  892. package/assets/{index-BklFrcZw.js → index-D7Vm1lDs.js} +1 -1
  893. package/assets/index-D7fJW09r.js +1 -0
  894. package/assets/index-D98A1qt-.js +1 -0
  895. package/assets/index-D9LT89OI.js +1 -0
  896. package/assets/index-D9OjbU6W.js +1 -0
  897. package/assets/index-DA-8j4Lu.js +1 -0
  898. package/assets/index-DA2atyII.js +1 -0
  899. package/assets/index-DA5yAy1K.js +1 -0
  900. package/assets/index-DAvwKHX9.js +1 -0
  901. package/assets/{index-BFDVyHZp.js → index-DAxajamR.js} +1 -1
  902. package/assets/index-DBBjFUrh.js +1 -0
  903. package/assets/index-DBjSfZvB.js +1 -0
  904. package/assets/index-DC6eto0o.js +1 -0
  905. package/assets/index-DCCkUyPX.js +1 -0
  906. package/assets/index-DDOKzdz4.js +1 -0
  907. package/assets/index-DDY5PRF0.js +1 -0
  908. package/assets/index-DEKXKw0a.js +1 -0
  909. package/assets/index-DF3I6ohZ.js +1 -0
  910. package/assets/index-DFMDLTUW.js +1 -0
  911. package/assets/index-DFgt2jBx.js +1 -0
  912. package/assets/index-DGIafVOM.js +1 -0
  913. package/assets/index-DGJr_A1x.js +1 -0
  914. package/assets/index-DG_CsZ_L.js +1 -0
  915. package/assets/index-DGbXzX8-.js +1 -0
  916. package/assets/index-DGzea1yQ.js +1 -0
  917. package/assets/index-DH7rY4T1.js +1 -0
  918. package/assets/index-DHDeZN7S.js +1 -0
  919. package/assets/index-DHjyikOS.js +1 -0
  920. package/assets/index-DIQXVD2E.js +1 -0
  921. package/assets/index-DJ38lxUa.js +1 -0
  922. package/assets/index-DJaj65I0.js +1 -0
  923. package/assets/index-DJowGey-.js +1 -0
  924. package/assets/index-DK3fb1zE.js +1 -0
  925. package/assets/index-DKILMXwW.js +1 -0
  926. package/assets/index-DKe_tqaK.js +1 -0
  927. package/assets/index-DLIbM3lV.js +1 -0
  928. package/assets/index-DM2yaKtc.js +1 -0
  929. package/assets/index-DMB3d6tz.js +1 -0
  930. package/assets/index-DMVhtS8w.js +1 -0
  931. package/assets/index-DMa3aE-k.js +1 -0
  932. package/assets/index-DNfPkY9K.js +1 -0
  933. package/assets/index-DNwbsPLB.js +1 -0
  934. package/assets/{index-CsxIMu1J.js → index-DO1z5D8-.js} +1 -1
  935. package/assets/{index-DtMyNBRR.js → index-DOL0GnIq.js} +1 -1
  936. package/assets/index-DOvMMOii.js +1 -0
  937. package/assets/index-DP05FHXN.js +1 -0
  938. package/assets/index-DPDDihVu.js +1 -0
  939. package/assets/{index-C3_Vdp-K.js → index-DPowawyA.js} +1 -1
  940. package/assets/index-DQErdPlT.js +1 -0
  941. package/assets/index-DQX7gmmD.js +1 -0
  942. package/assets/index-DQgBEjQv.js +1 -0
  943. package/assets/index-DQv3qKxR.js +1 -0
  944. package/assets/index-DQzq_sef.js +1 -0
  945. package/assets/index-DRKmorNl.js +1 -0
  946. package/assets/index-DRMQsmmg.js +1 -0
  947. package/assets/index-DSfHTVO4.js +1 -0
  948. package/assets/index-DSj56DPA.js +1 -0
  949. package/assets/index-DTTPaYVe.js +1 -0
  950. package/assets/index-DVU2i8-9.js +1 -0
  951. package/assets/index-DW3P0esM.js +1 -0
  952. package/assets/{index-raWj9ugs.js → index-DWCZRA7n.js} +1 -1
  953. package/assets/index-DWEPmLGL.js +1 -0
  954. package/assets/{index-DdoNSnPZ.js → index-DWNmSOig.js} +18 -18
  955. package/assets/index-DWUn3xTJ.js +1 -0
  956. package/assets/index-DX2vH8ZR.js +1 -0
  957. package/assets/{index-C-6kSUz0.js → index-DXVbOK22.js} +1 -1
  958. package/assets/index-DXWCd209.js +1 -0
  959. package/assets/index-DXyPnzZX.js +1 -0
  960. package/assets/index-DYjaueYq.js +1 -0
  961. package/assets/index-DYoxAMAI.js +1 -0
  962. package/assets/index-DZ9mCxwq.js +1 -0
  963. package/assets/index-DaqgY28G.js +1 -0
  964. package/assets/index-DatBJWXi.js +1 -0
  965. package/assets/index-DatayTYV.js +1 -0
  966. package/assets/index-DbF84wMV.js +1 -0
  967. package/assets/index-DbOEUjNQ.js +1 -0
  968. package/assets/index-DbhRZmkB.js +1 -0
  969. package/assets/index-DcfiRGq8.js +1 -0
  970. package/assets/index-DcqBR87a.js +1 -0
  971. package/assets/index-DdQ2QlTJ.js +1 -0
  972. package/assets/index-DdpNYj5B.js +1 -0
  973. package/assets/index-DePwUFvF.js +1 -0
  974. package/assets/{index-CJSrkfvs.js → index-DfA8vzD1.js} +1 -1
  975. package/assets/index-DfOp93tH.js +1 -0
  976. package/assets/index-DgG_G6mi.js +1 -0
  977. package/assets/index-Dhf5ESfd.js +1 -0
  978. package/assets/index-DhgLjA_l.js +1 -0
  979. package/assets/index-DhglES_R.js +1 -0
  980. package/assets/index-DhlU5IqG.js +1 -0
  981. package/assets/index-DhvSUS0J.js +1 -0
  982. package/assets/index-DiP3XxxX.js +1 -0
  983. package/assets/index-DiYqUBGF.js +1 -0
  984. package/assets/index-DiywNzXF.js +1 -0
  985. package/assets/index-Dj4HncvX.js +1 -0
  986. package/assets/index-DjBbIJjj.js +1 -0
  987. package/assets/index-DjdLeYmK.js +1 -0
  988. package/assets/index-DjjVwGb1.js +1 -0
  989. package/assets/index-DkHeUbcp.js +1 -0
  990. package/assets/index-DkSjxVHF.js +1 -0
  991. package/assets/index-Dkkrt5IR.js +1 -0
  992. package/assets/index-DmZNtM-R.js +1 -0
  993. package/assets/index-DntehBUo.js +1 -0
  994. package/assets/index-Do5UpbR4.js +1 -0
  995. package/assets/index-DoDmQ6s0.js +1 -0
  996. package/assets/index-DoEa8sok.js +1 -0
  997. package/assets/index-DoLyLIiv.js +1 -0
  998. package/assets/index-DovxLsNV.js +1 -0
  999. package/assets/index-DphUbohB.js +1 -0
  1000. package/assets/index-DpmgAexj.js +1 -0
  1001. package/assets/index-Dq3AkWuf.js +1 -0
  1002. package/assets/{index-3_gX-aBQ.js → index-DqDeelBC.js} +1 -1
  1003. package/assets/index-DrVtwvSv.js +1 -0
  1004. package/assets/{index-BZhrEz4k.js → index-DrWK5GwZ.js} +2 -2
  1005. package/assets/index-DreOZR2Q.js +1 -0
  1006. package/assets/index-DrxHpbC_.js +1 -0
  1007. package/assets/index-Ds8RjPXm.js +1 -0
  1008. package/assets/index-DsAnwcI8.js +1 -0
  1009. package/assets/index-DsKtpcc2.js +1 -0
  1010. package/assets/index-DsKyOM-e.js +1 -0
  1011. package/assets/index-DuYSq0vM.js +1 -0
  1012. package/assets/index-Dvtv553D.js +1 -0
  1013. package/assets/{index-ChsPLSWT.js → index-DvxHgpeA.js} +1 -1
  1014. package/assets/index-DwI6Aho1.js +1 -0
  1015. package/assets/index-DwgGCnoU.js +1 -0
  1016. package/assets/index-DwvFwGye.js +1 -0
  1017. package/assets/index-DxaY4K6c.js +1 -0
  1018. package/assets/index-Dy08-O43.js +1 -0
  1019. package/assets/index-DyIhQvc9.js +1 -0
  1020. package/assets/index-DyKMC2z8.js +1 -0
  1021. package/assets/index-DyMe2909.js +1 -0
  1022. package/assets/index-Dyr2ZfAb.js +1 -0
  1023. package/assets/index-DzZiRHPP.js +1 -0
  1024. package/assets/index-Dzz3Ux1P.js +1 -0
  1025. package/assets/index-E_TvYm_u.js +1 -0
  1026. package/assets/index-FAz89-B7.js +1 -0
  1027. package/assets/index-Fk0P5t9a.js +1 -0
  1028. package/assets/index-GazkMlKm.js +1 -0
  1029. package/assets/index-H3IjI5-5.js +1 -0
  1030. package/assets/index-HkGLvX7o.js +1 -0
  1031. package/assets/index-I0tHaeSb.js +1 -0
  1032. package/assets/index-I2Tu6nVy.js +1 -0
  1033. package/assets/index-IVGt0iH4.js +1 -0
  1034. package/assets/index-JKQyAdFy.js +1 -0
  1035. package/assets/{index-CawoDqBV.js → index-JfBdHn0q.js} +4 -4
  1036. package/assets/index-Jtyxv-aY.js +1 -0
  1037. package/assets/index-K9_ezyO0.js +1 -0
  1038. package/assets/index-KBxYL2Hq.js +1 -0
  1039. package/assets/{index-GkDjeW87.js → index-KHR-k9OK.js} +1 -1
  1040. package/assets/index-KcbqAAb7.js +1 -0
  1041. package/assets/index-Kpt7iZg5.js +1 -0
  1042. package/assets/index-KxQNzhUS.js +1 -0
  1043. package/assets/index-L98tcAPA.js +1 -0
  1044. package/assets/index-LNb19jou.js +1 -0
  1045. package/assets/index-Lowl7Qx7.js +1 -0
  1046. package/assets/index-LtZ_xWcO.js +1 -0
  1047. package/assets/index-LzRKH3D3.js +1 -0
  1048. package/assets/index-Mc-mIuS3.js +1 -0
  1049. package/assets/index-N8lMWapZ.js +1 -0
  1050. package/assets/index-N_5htzMA.js +1 -0
  1051. package/assets/index-OUxzqq8e.js +1 -0
  1052. package/assets/index-OrvSEOrD.js +1 -0
  1053. package/assets/index-OxTQHzjd.js +1 -0
  1054. package/assets/index-Q0EiqGJA.js +1 -0
  1055. package/assets/index-QNOqUF4K.js +1 -0
  1056. package/assets/index-QgklQrvI.js +1 -0
  1057. package/assets/index-R6JShJLJ.js +1 -0
  1058. package/assets/index-RFNw1zDI.js +1 -0
  1059. package/assets/{index-CTY8gJAp.js → index-RNtaCqcC.js} +1 -1
  1060. package/assets/index-RftHbEJr.js +1 -0
  1061. package/assets/index-RjHECb4a.js +1 -0
  1062. package/assets/index-RoCEXaRu.js +1 -0
  1063. package/assets/index-TVPnfEz9.js +1 -0
  1064. package/assets/index-Tn6RRkjq.js +1 -0
  1065. package/assets/index-USdA4g97.js +1 -0
  1066. package/assets/index-UbUXcYI1.js +1 -0
  1067. package/assets/index-Uztr5Jgj.js +1 -0
  1068. package/assets/index-VhOPKpLQ.js +1 -0
  1069. package/assets/index-VoB5PA0C.js +1 -0
  1070. package/assets/index-Wki7z4v7.js +1 -0
  1071. package/assets/index-X6Icwh-t.js +1 -0
  1072. package/assets/index-XPcis1Hk.js +1 -0
  1073. package/assets/index-Y-7zWyQJ.js +1 -0
  1074. package/assets/index-Y-iqvqQm.js +1 -0
  1075. package/assets/index-YIjtC3K-.js +1 -0
  1076. package/assets/index-Yhb_AR5X.js +1 -0
  1077. package/assets/{index-CQ65bXVv.js → index-Z67jmPfi.js} +1 -1
  1078. package/assets/index-ZMR3O7_V.js +1 -0
  1079. package/assets/index-ZvCZJ82x.js +1 -0
  1080. package/assets/index-_4gOTVBT.js +1 -0
  1081. package/assets/index-_NpfTDRk.js +1 -0
  1082. package/assets/index-_j8eviyU.js +1 -0
  1083. package/assets/index-bXsRal1P.js +1 -0
  1084. package/assets/index-bb2W2i3i.js +1 -0
  1085. package/assets/index-bnomx8Dl.js +1 -0
  1086. package/assets/index-bwODdJd_.js +1 -0
  1087. package/assets/index-cT-bgULX.js +1 -0
  1088. package/assets/index-cXlHoOhe.js +1 -0
  1089. package/assets/index-d1Bi4Y3G.js +1 -0
  1090. package/assets/index-ecg_2Bkp.js +1 -0
  1091. package/assets/index-f3TfD4S5.js +1 -0
  1092. package/assets/index-fLuuaL2F.js +1 -0
  1093. package/assets/index-hEFZFzVq.js +1 -0
  1094. package/assets/index-hkKPuWG8.js +1 -0
  1095. package/assets/index-i5HAwWW2.js +1 -0
  1096. package/assets/index-iIYRP3A2.js +1 -0
  1097. package/assets/index-iN0t9HsN.js +1 -0
  1098. package/assets/index-ivmWWMeT.js +1 -0
  1099. package/assets/index-jAmOB9mf.js +1 -0
  1100. package/assets/index-kvEY65i6.js +1 -0
  1101. package/assets/index-m2MsoiHM.js +1 -0
  1102. package/assets/index-mDTTSKTd.js +1 -0
  1103. package/assets/index-mW9xQNOt.js +1 -0
  1104. package/assets/index-n485xKg2.js +1 -0
  1105. package/assets/{index-CfcNhWEg.js → index-nsb2Kk7z.js} +1 -1
  1106. package/assets/index-qJF1Ni0x.js +1 -0
  1107. package/assets/index-qfQgSHHm.js +1 -0
  1108. package/assets/index-qjmsKc9v.js +1 -0
  1109. package/assets/index-qqhEcO_P.js +1 -0
  1110. package/assets/index-raYbXl7C.js +1 -0
  1111. package/assets/index-rm_ORFAd.js +1 -0
  1112. package/assets/index-rngE6ltw.js +1 -0
  1113. package/assets/index-sMQpixIY.js +1 -0
  1114. package/assets/index-skREueKQ.js +1 -0
  1115. package/assets/index-u12pzcuy.js +1 -0
  1116. package/assets/index-uBBwnPjF.js +1 -0
  1117. package/assets/index-usaXkbHq.js +1 -0
  1118. package/assets/index-vIU3bmo3.js +1 -0
  1119. package/assets/index-vLEo3QS7.js +2 -0
  1120. package/assets/index-wECDJ3NE.js +1 -0
  1121. package/assets/index-weHMZi5B.js +1 -0
  1122. package/assets/index-whsFZACg.js +1 -0
  1123. package/assets/index-y-fv5WSz.js +1 -0
  1124. package/assets/index-y1BukHtY.js +1 -0
  1125. package/assets/{index-DAR-5YLY.js → index-yosKnFoR.js} +1 -1
  1126. package/assets/index-zY1FByDs.js +1 -0
  1127. package/assets/index-zbt41C9e.js +1 -0
  1128. package/assets/index-zdYI4P64.js +1 -0
  1129. package/assets/index-zfxUsesj.js +1 -0
  1130. package/assets/{index.es-CZG_xqg1.js → index.es-CJCjj4D5.js} +1 -1
  1131. package/assets/index.es-CcfXudt8.js +1 -0
  1132. package/assets/{index.es-CZb_6NO4.js → index.es-DjT_e1lJ.js} +1 -1
  1133. package/assets/index.es-s8EqqLvH.js +1 -0
  1134. package/assets/ja-B_14a7-i.js +1 -0
  1135. package/assets/ja-DI56VDCk.js +1 -0
  1136. package/assets/ja-DJMSrON6.js +1 -0
  1137. package/assets/ja-qsQcCBfK.js +1 -0
  1138. package/assets/kr-5lmSzexK.js +1 -0
  1139. package/assets/kr-BP_x8d-4.js +1 -0
  1140. package/assets/kr-C28WMrvF.js +1 -0
  1141. package/assets/kr-CBFJeZbH.js +1 -0
  1142. package/assets/{native-DZFSJ4i3.js → native-B2Hyw1I8.js} +1 -1
  1143. package/assets/{networks-0i4bnC2P.js → networks-BJaWSBT-.js} +1 -1
  1144. package/assets/{onramp-vM5KdI1r.js → onramp-DtPBVTAX.js} +1 -1
  1145. package/assets/openzeppelin-2loxNe8p.js +1 -0
  1146. package/assets/{openzeppelin-B8QUtuwi.js → openzeppelin-DinUnglE.js} +1 -1
  1147. package/assets/{ownerOf-DAy84guz.js → ownerOf-C_iy29-Y.js} +1 -1
  1148. package/assets/ownerOf-ZgPNH7fU.js +1 -0
  1149. package/assets/{parseNft-BmhktdtS.js → parseNft-Bx8LYMQi.js} +2 -2
  1150. package/assets/parseSignature-Bj6kIf2F.js +24 -0
  1151. package/assets/{parseSignature-pe5xOrUo.js → parseSignature-BuNt5p3s.js} +3 -3
  1152. package/assets/passkeys-SEFvaSvR.js +1 -0
  1153. package/assets/{pay-with-exchange-VEz5NF62.js → pay-with-exchange-Bnt8addE.js} +1 -1
  1154. package/assets/{qr-overlay-BjpCgPqe.js → qr-overlay-CmPeXbUF.js} +1 -1
  1155. package/assets/qr-overlay-DXzL7fWi.js +76 -0
  1156. package/assets/{receive-7ceseJMP.js → receive-bimmaEqx.js} +1 -1
  1157. package/assets/{ref-C54w4b0j.js → ref-BqQZiIC6.js} +1 -1
  1158. package/assets/resolveImplementation-GIw27GK7.js +1 -0
  1159. package/assets/{resolveImplementation-DUlZ-rCt.js → resolveImplementation-I40X9wTp.js} +1 -1
  1160. package/assets/{rpc-BGBe81Ju.js → rpc-BG0Pk4UR.js} +1 -1
  1161. package/assets/rpc-D0EopFXw.js +3 -0
  1162. package/assets/ru-BDcqn2vv.js +1 -0
  1163. package/assets/ru-BiwauFaO.js +1 -0
  1164. package/assets/ru-CRpUAoj9.js +1 -0
  1165. package/assets/ru-ov3iIk3P.js +1 -0
  1166. package/assets/secp256k1-MOORasZn.js +1 -0
  1167. package/assets/secp256k1-r5tEV53R.js +1 -0
  1168. package/assets/{send--yEjr9IG.js → send-bIYI4awX.js} +1 -1
  1169. package/assets/send-batch-transaction-C1RDZpKq.js +1 -0
  1170. package/assets/{send-batch-transaction-BHCPQqMU.js → send-batch-transaction-n-ui8-LI.js} +1 -1
  1171. package/assets/send-eip712-transaction-D88fU9U2.js +2 -0
  1172. package/assets/{send-eip712-transaction-BZPqvG7o.js → send-eip712-transaction-DRu8yo6d.js} +2 -2
  1173. package/assets/send-gasless-transaction-BCU2Zrfm.js +2 -0
  1174. package/assets/{send-gasless-transaction-qd4_Tx37.js → send-gasless-transaction-DULqTN5p.js} +2 -2
  1175. package/assets/session-proposal-CgSgZiFG.js +1 -0
  1176. package/assets/session-proposal-DpLYOZnc.js +1 -0
  1177. package/assets/session-request-BOw5DN3t.js +2 -0
  1178. package/assets/session-request-D9OBe44U.js +2 -0
  1179. package/assets/{sha256-DgLKZ9Bx.js → sha256-7fBhmRUn.js} +1 -1
  1180. package/assets/sha256-BDhUJM1b.js +1 -0
  1181. package/assets/sign-login-payload-BKykauFw.js +8 -0
  1182. package/assets/{signing-WcNp-1pu.js → signing-BTssaCk0.js} +6 -6
  1183. package/assets/signing-D2rOFgrP.js +2 -0
  1184. package/assets/{socials-OZ-9Vq_T.js → socials-BB9j0tMw.js} +1 -1
  1185. package/assets/store-CraP4F4Y.js +1 -0
  1186. package/assets/{swaps-CxXfFAWo.js → swaps-B1HFXP9m.js} +1 -1
  1187. package/assets/switch-chain-1RJMEuL3.js +1 -0
  1188. package/assets/{thirdweb-BQL6aWra.js → thirdweb-CsQBcecB.js} +3 -3
  1189. package/assets/tl-CRo3FF6E.js +1 -0
  1190. package/assets/tl-DNpoqKxi.js +1 -0
  1191. package/assets/tl-DgU76fWy.js +1 -0
  1192. package/assets/tl-LjGyFSL6.js +1 -0
  1193. package/assets/{totalSupply-Bc4pGc4c.js → totalSupply-BDJ-8q2H.js} +1 -1
  1194. package/assets/totalSupply-DTUooqpt.js +1 -0
  1195. package/assets/{transactionReceipt-Ufygp-9B.js → transactionReceipt-HPWYUddy.js} +1 -1
  1196. package/assets/{transactions-ClBg7e6V.js → transactions-CDY0CpFM.js} +1 -1
  1197. package/assets/{utils-3XaFMbFH.js → utils-Dvpw9MD5.js} +1 -1
  1198. package/assets/{verifyHash-DWUT00B8.js → verifyHash-DD9wdoLy.js} +3 -3
  1199. package/assets/vi-BmXdTnDJ.js +1 -0
  1200. package/assets/vi-CeeFZUD3.js +1 -0
  1201. package/assets/vi-UZskHqr3.js +1 -0
  1202. package/assets/vi-rl4iq8bS.js +1 -0
  1203. package/assets/{w3m-modal-BAoOk02r.js → w3m-modal-CnW3Paz2.js} +1 -1
  1204. package/assets/{wait-for-tx-receipt-BD1QxGfa.js → wait-for-tx-receipt-ByEwSjsF.js} +1 -1
  1205. package/assets/wallets-C6uJfx_m.js +15 -0
  1206. package/assets/web-connector-BVPZhMLu.js +9 -0
  1207. package/assets/web-connector-DDEmzUHA.js +2 -0
  1208. package/assets/webauthn.min-CGpVStYZ.js +1 -0
  1209. package/assets/zh-8Oiy2Jay.js +1 -0
  1210. package/assets/zh-DNrmKyYe.js +1 -0
  1211. package/assets/zh-DrVkc5qI.js +1 -0
  1212. package/assets/zh-uWVXxi-t.js +1 -0
  1213. package/assets/{zora-sepolia-B3X_ihxr.js → zora-sepolia-Bl3ucROa.js} +1 -1
  1214. package/index.html +2 -2
  1215. package/package.json +3 -3
  1216. package/assets/controller-DNPxyM0w.js +0 -2
  1217. package/assets/decimals-2D-Y9cW-.js +0 -1
  1218. package/assets/eth_estimateGas-D2ryZZPl.js +0 -1
  1219. package/assets/get-ecosystem-wallet-info-DZaItz06.js +0 -1
  1220. package/assets/in-app-wallet-calls-C3_9LLpN.js +0 -1
  1221. package/assets/index-C_KXbDr5.js +0 -2
  1222. package/assets/index.es-ccu72RLB.js +0 -1
  1223. package/assets/passkeys-C1wTOzLk.js +0 -1
  1224. package/assets/secp256k1-CBOPmL7c.js +0 -1
  1225. package/assets/session-proposal-0wiDsNgD.js +0 -1
  1226. package/assets/session-request-CZavuRgD.js +0 -2
  1227. package/assets/wallets-BHgcP8rz.js +0 -15
  1228. package/assets/web-connector-DZYEnUXN.js +0 -9
@@ -0,0 +1,326 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/concat-hex-lIlH2McC.js","assets/index-DWNmSOig.js","assets/index-BTGGjpkN.css","assets/store-CraP4F4Y.js","assets/webauthn.min-CGpVStYZ.js","assets/index.es-CJCjj4D5.js","assets/resolveImplementation-GIw27GK7.js","assets/extractIPFS-JN46N2o7.js","assets/getInstalledModules-DQg0aCv5.js","assets/eth_estimateGas-m2_--02H.js","assets/send-eip712-transaction-D88fU9U2.js","assets/eth_sendRawTransaction-DPdnXbFR.js","assets/sha256-BDhUJM1b.js","assets/eth_getTransactionCount-CEP3s4C1.js","assets/common-Q4hcJSiz.js","assets/index-BBjyHWpu.js","assets/parseSignature-Bj6kIf2F.js","assets/rpc-D0EopFXw.js","assets/ccip-CPEo6pFI.js","assets/totalSupply-DTUooqpt.js","assets/detectExtension-Dz1kVH7_.js","assets/estimate-l1-fee-CU3YnFil.js","assets/send-gasless-transaction-BCU2Zrfm.js","assets/getBalance-cs-XLy8M.js","assets/getCurrencyMetadata-xziMh2zt.js","assets/getNFT-BHbjbl1M.js","assets/fetchTokenMetadata-B9BbNcLj.js","assets/getNFT-buPGFTfQ.js","assets/get-ecosystem-wallet-info-B4GMaUQL.js","assets/index-1dvjnqEQ.js","assets/hooks.module-BNtNDAZY.js","assets/index-CiiICg0u.js","assets/index-B5dYTApw.js","assets/web-connector-DDEmzUHA.js","assets/sign-login-payload-BKykauFw.js","assets/index-Beysbmyx.js","assets/controller-Czxst7w9.js","assets/qr-overlay-DXzL7fWi.js","assets/in-app-wallet-calls-hmGpEqXh.js","assets/send-batch-transaction-C1RDZpKq.js","assets/QRCodeRenderer-dTVEF8IB.js","assets/CoinbaseSDKConnection-0Z70hEdE.js","assets/InAppWalletConnectUI-DUi7oMdq.js","assets/secp256k1-MOORasZn.js","assets/session-proposal-CgSgZiFG.js","assets/session-request-D9OBe44U.js"])))=>i.map(i=>d[i]);
2
+ var uy=e=>{throw TypeError(e)};var Td=(e,t,n)=>t.has(e)||uy("Cannot "+n);var S=(e,t,n)=>(Td(e,t,"read from private field"),n?n.call(e):t.get(e)),oe=(e,t,n)=>t.has(e)?uy("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),K=(e,t,n,i)=>(Td(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),ye=(e,t,n)=>(Td(e,t,"access private method"),n);var Hc=(e,t,n,i)=>({set _(r){K(e,t,r,n)},get _(){return S(e,t,i)}});import{r as w,A as u4,b as Ui,_ as h,j as c,C as $t,D as PI,E as kI,F as zI,T as RI,G as UI,H as $I,I as BI,J as VI,K as WI,R as d4,L as FI,M as Mr,N as h4,O as YI,g as QI,a as _e,B as De,e as Ws,k as f4,P as HI}from"./index-DWNmSOig.js";import{c as GI}from"./store-CraP4F4Y.js";import{C as jd,l as ZI}from"./webauthn.min-CGpVStYZ.js";import{q as qI,s as Wh,I as Zo,g as KI,d as Pn,t as ln,e as ee,h as ko,C as JI,j as m4,k as XI,l as e6,m as Ra,n as Fh,r as Ic,u as t6,v as n6,w as i6,x as r6,y as s6,z as o6,a as pr,A as qo,o as a6,B as c6,D as B0,E as V0,f as Ol,P as dy,Q as l6,F as u6,b as hy,G as fs,c as y4,H as Ai,J as fi,K as nr}from"./index.es-CJCjj4D5.js";const d6=["top","right","bottom","left"],Wr=Math.min,mn=Math.max,Pl=Math.round,Gc=Math.floor,_i=e=>({x:e,y:e}),h6={left:"right",right:"left",bottom:"top",top:"bottom"},f6={start:"end",end:"start"};function Yh(e,t,n){return mn(e,Wr(t,n))}function Vi(e,t){return typeof e=="function"?e(t):e}function Wi(e){return e.split("-")[0]}function Ko(e){return e.split("-")[1]}function W0(e){return e==="x"?"y":"x"}function F0(e){return e==="y"?"height":"width"}const m6=new Set(["top","bottom"]);function pi(e){return m6.has(Wi(e))?"y":"x"}function Y0(e){return W0(pi(e))}function y6(e,t,n){n===void 0&&(n=!1);const i=Ko(e),r=Y0(e),s=F0(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=kl(o)),[o,kl(o)]}function g6(e){const t=kl(e);return[Qh(e),t,Qh(t)]}function Qh(e){return e.replace(/start|end/g,t=>f6[t])}const fy=["left","right"],my=["right","left"],p6=["top","bottom"],w6=["bottom","top"];function x6(e,t,n){switch(e){case"top":case"bottom":return n?t?my:fy:t?fy:my;case"left":case"right":return t?p6:w6;default:return[]}}function _6(e,t,n,i){const r=Ko(e);let s=x6(Wi(e),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),t&&(s=s.concat(s.map(Qh)))),s}function kl(e){return e.replace(/left|right|bottom|top/g,t=>h6[t])}function b6(e){return{top:0,right:0,bottom:0,left:0,...e}}function g4(e){return typeof e!="number"?b6(e):{top:e,right:e,bottom:e,left:e}}function zl(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function yy(e,t,n){let{reference:i,floating:r}=e;const s=pi(t),o=Y0(t),a=F0(o),l=Wi(t),u=s==="y",d=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,m=i[a]/2-r[a]/2;let y;switch(l){case"top":y={x:d,y:i.y-r.height};break;case"bottom":y={x:d,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:f};break;case"left":y={x:i.x-r.width,y:f};break;default:y={x:i.x,y:i.y}}switch(Ko(t)){case"start":y[o]-=m*(n&&u?-1:1);break;case"end":y[o]+=m*(n&&u?-1:1);break}return y}const M6=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=yy(u,i,l),m=i,y={},p=0;for(let g=0;g<a.length;g++){const{name:x,fn:_}=a[g],{x:b,y:I,data:E,reset:C}=await _({x:d,y:f,initialPlacement:i,placement:m,strategy:r,middlewareData:y,rects:u,platform:o,elements:{reference:e,floating:t}});d=b??d,f=I??f,y={...y,[x]:{...y[x],...E}},C&&p<=50&&(p++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):C.rects),{x:d,y:f}=yy(u,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:r,middlewareData:y}};async function Qa(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:y=0}=Vi(t,e),p=g4(y),x=a[m?f==="floating"?"reference":"floating":f],_=zl(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),b=f==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(I))?await(s.getScale==null?void 0:s.getScale(I))||{x:1,y:1}:{x:1,y:1},C=zl(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:I,strategy:l}):b);return{top:(_.top-C.top+p.top)/E.y,bottom:(C.bottom-_.bottom+p.bottom)/E.y,left:(_.left-C.left+p.left)/E.x,right:(C.right-_.right+p.right)/E.x}}const I6=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=Vi(e,t)||{};if(u==null)return{};const f=g4(d),m={x:n,y:i},y=Y0(r),p=F0(y),g=await o.getDimensions(u),x=y==="y",_=x?"top":"left",b=x?"bottom":"right",I=x?"clientHeight":"clientWidth",E=s.reference[p]+s.reference[y]-m[y]-s.floating[p],C=m[y]-s.reference[y],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let j=T?T[I]:0;(!j||!await(o.isElement==null?void 0:o.isElement(T)))&&(j=a.floating[I]||s.floating[p]);const O=E/2-C/2,L=j/2-g[p]/2-1,N=Wr(f[_],L),v=Wr(f[b],L),D=N,k=j-g[p]-v,U=j/2-g[p]/2+O,R=Yh(D,U,k),B=!l.arrow&&Ko(r)!=null&&U!==R&&s.reference[p]/2-(U<D?N:v)-g[p]/2<0,F=B?U<D?U-D:U-k:0;return{[y]:m[y]+F,data:{[y]:R,centerOffset:U-R-F,...B&&{alignmentOffset:F}},reset:B}}}),E6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...x}=Vi(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const _=Wi(r),b=pi(a),I=Wi(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(I||!g?[kl(a)]:g6(a)),T=p!=="none";!m&&T&&C.push(..._6(a,g,p,E));const j=[a,...C],O=await Qa(t,x),L=[];let N=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&L.push(O[_]),f){const U=y6(r,o,E);L.push(O[U[0]],O[U[1]])}if(N=[...N,{placement:r,overflows:L}],!L.every(U=>U<=0)){var v,D;const U=(((v=s.flip)==null?void 0:v.index)||0)+1,R=j[U];if(R&&(!(f==="alignment"?b!==pi(R):!1)||N.every(W=>pi(W.placement)===b?W.overflows[0]>0:!0)))return{data:{index:U,overflows:N},reset:{placement:R}};let B=(D=N.filter(F=>F.overflows[0]<=0).sort((F,W)=>F.overflows[1]-W.overflows[1])[0])==null?void 0:D.placement;if(!B)switch(y){case"bestFit":{var k;const F=(k=N.filter(W=>{if(T){const V=pi(W.placement);return V===b||V==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(V=>V>0).reduce((V,Y)=>V+Y,0)]).sort((W,V)=>W[1]-V[1])[0])==null?void 0:k[0];F&&(B=F);break}case"initialPlacement":B=a;break}if(r!==B)return{reset:{placement:B}}}return{}}}};function gy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function py(e){return d6.some(t=>e[t]>=0)}const C6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...r}=Vi(e,t);switch(i){case"referenceHidden":{const s=await Qa(t,{...r,elementContext:"reference"}),o=gy(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:py(o)}}}case"escaped":{const s=await Qa(t,{...r,altBoundary:!0}),o=gy(s,n.floating);return{data:{escapedOffsets:o,escaped:py(o)}}}default:return{}}}}},p4=new Set(["left","top"]);async function L6(e,t){const{placement:n,platform:i,elements:r}=e,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Wi(n),a=Ko(n),l=pi(n)==="y",u=p4.has(o)?-1:1,d=s&&l?-1:1,f=Vi(t,e);let{mainAxis:m,crossAxis:y,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof p=="number"&&(y=a==="end"?p*-1:p),l?{x:y*d,y:m*u}:{x:m*u,y:y*d}}const T6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=t,l=await L6(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}},j6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:_,y:b}=x;return{x:_,y:b}}},...l}=Vi(e,t),u={x:n,y:i},d=await Qa(t,l),f=pi(Wi(r)),m=W0(f);let y=u[m],p=u[f];if(s){const x=m==="y"?"top":"left",_=m==="y"?"bottom":"right",b=y+d[x],I=y-d[_];y=Yh(b,y,I)}if(o){const x=f==="y"?"top":"left",_=f==="y"?"bottom":"right",b=p+d[x],I=p-d[_];p=Yh(b,p,I)}const g=a.fn({...t,[m]:y,[f]:p});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[m]:s,[f]:o}}}}}},v6=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Vi(e,t),d={x:n,y:i},f=pi(r),m=W0(f);let y=d[m],p=d[f];const g=Vi(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const I=m==="y"?"height":"width",E=s.reference[m]-s.floating[I]+x.mainAxis,C=s.reference[m]+s.reference[I]-x.mainAxis;y<E?y=E:y>C&&(y=C)}if(u){var _,b;const I=m==="y"?"width":"height",E=p4.has(Wi(r)),C=s.reference[f]-s.floating[I]+(E&&((_=o.offset)==null?void 0:_[f])||0)+(E?0:x.crossAxis),T=s.reference[f]+s.reference[I]+(E?0:((b=o.offset)==null?void 0:b[f])||0)-(E?x.crossAxis:0);p<C?p=C:p>T&&(p=T)}return{[m]:y,[f]:p}}}},N6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Vi(e,t),d=await Qa(t,u),f=Wi(r),m=Ko(r),y=pi(r)==="y",{width:p,height:g}=s.floating;let x,_;f==="top"||f==="bottom"?(x=f,_=m===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=f,x=m==="end"?"top":"bottom");const b=g-d.top-d.bottom,I=p-d.left-d.right,E=Wr(g-d[x],b),C=Wr(p-d[_],I),T=!t.middlewareData.shift;let j=E,O=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=I),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(j=b),T&&!m){const N=mn(d.left,0),v=mn(d.right,0),D=mn(d.top,0),k=mn(d.bottom,0);y?O=p-2*(N!==0||v!==0?N+v:mn(d.left,d.right)):j=g-2*(D!==0||k!==0?D+k:mn(d.top,d.bottom))}await l({...t,availableWidth:O,availableHeight:j});const L=await o.getDimensions(a.floating);return p!==L.width||g!==L.height?{reset:{rects:!0}}:{}}}};function mu(){return typeof window<"u"}function Jo(e){return w4(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Li(e){var t;return(t=(w4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function w4(e){return mu()?e instanceof Node||e instanceof wn(e).Node:!1}function ei(e){return mu()?e instanceof Element||e instanceof wn(e).Element:!1}function Ei(e){return mu()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function wy(e){return!mu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}const S6=new Set(["inline","contents"]);function Ec(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=ti(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!S6.has(r)}const A6=new Set(["table","td","th"]);function D6(e){return A6.has(Jo(e))}const O6=[":popover-open",":modal"];function yu(e){return O6.some(t=>{try{return e.matches(t)}catch{return!1}})}const P6=["transform","translate","scale","rotate","perspective"],k6=["transform","translate","scale","rotate","perspective","filter"],z6=["paint","layout","strict","content"];function Q0(e){const t=H0(),n=ei(e)?ti(e):e;return P6.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||k6.some(i=>(n.willChange||"").includes(i))||z6.some(i=>(n.contain||"").includes(i))}function R6(e){let t=Fr(e);for(;Ei(t)&&!zo(t);){if(Q0(t))return t;if(yu(t))return null;t=Fr(t)}return null}function H0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const U6=new Set(["html","body","#document"]);function zo(e){return U6.has(Jo(e))}function ti(e){return wn(e).getComputedStyle(e)}function gu(e){return ei(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fr(e){if(Jo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wy(e)&&e.host||Li(e);return wy(t)?t.host:t}function x4(e){const t=Fr(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ei(t)&&Ec(t)?t:x4(t)}function Ha(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=x4(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),o=wn(r);if(s){const a=Hh(o);return t.concat(o,o.visualViewport||[],Ec(r)?r:[],a&&n?Ha(a):[])}return t.concat(r,Ha(r,[],n))}function Hh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _4(e){const t=ti(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=Ei(e),s=r?e.offsetWidth:n,o=r?e.offsetHeight:i,a=Pl(n)!==s||Pl(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function G0(e){return ei(e)?e:e.contextElement}function po(e){const t=G0(e);if(!Ei(t))return _i(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:s}=_4(t);let o=(s?Pl(n.width):n.width)/i,a=(s?Pl(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const $6=_i(0);function b4(e){const t=wn(e);return!H0()||!t.visualViewport?$6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function B6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==wn(e)?!1:t}function Ds(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=G0(e);let o=_i(1);t&&(i?ei(i)&&(o=po(i)):o=po(e));const a=B6(s,n,i)?b4(s):_i(0);let l=(r.left+a.x)/o.x,u=(r.top+a.y)/o.y,d=r.width/o.x,f=r.height/o.y;if(s){const m=wn(s),y=i&&ei(i)?wn(i):i;let p=m,g=Hh(p);for(;g&&i&&y!==p;){const x=po(g),_=g.getBoundingClientRect(),b=ti(g),I=_.left+(g.clientLeft+parseFloat(b.paddingLeft))*x.x,E=_.top+(g.clientTop+parseFloat(b.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,f*=x.y,l+=I,u+=E,p=wn(g),g=Hh(p)}}return zl({width:d,height:f,x:l,y:u})}function pu(e,t){const n=gu(e).scrollLeft;return t?t.left+n:Ds(Li(e)).left+n}function M4(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-pu(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function V6(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const s=r==="fixed",o=Li(i),a=t?yu(t.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=_i(1);const d=_i(0),f=Ei(i);if((f||!f&&!s)&&((Jo(i)!=="body"||Ec(o))&&(l=gu(i)),Ei(i))){const y=Ds(i);u=po(i),d.x=y.x+i.clientLeft,d.y=y.y+i.clientTop}const m=o&&!f&&!s?M4(o,l):_i(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function W6(e){return Array.from(e.getClientRects())}function F6(e){const t=Li(e),n=gu(e),i=e.ownerDocument.body,r=mn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=mn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+pu(e);const a=-n.scrollTop;return ti(i).direction==="rtl"&&(o+=mn(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}const xy=25;function Y6(e,t){const n=wn(e),i=Li(e),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const d=H0();(!d||d&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const u=pu(i);if(u<=0){const d=i.ownerDocument,f=d.body,m=getComputedStyle(f),y=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(i.clientWidth-f.clientWidth-y);p<=xy&&(s-=p)}else u<=xy&&(s+=u);return{width:s,height:o,x:a,y:l}}const Q6=new Set(["absolute","fixed"]);function H6(e,t){const n=Ds(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=Ei(e)?po(e):_i(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=r*s.x,u=i*s.y;return{width:o,height:a,x:l,y:u}}function _y(e,t,n){let i;if(t==="viewport")i=Y6(e,n);else if(t==="document")i=F6(Li(e));else if(ei(t))i=H6(t,n);else{const r=b4(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return zl(i)}function I4(e,t){const n=Fr(e);return n===t||!ei(n)||zo(n)?!1:ti(n).position==="fixed"||I4(n,t)}function G6(e,t){const n=t.get(e);if(n)return n;let i=Ha(e,[],!1).filter(a=>ei(a)&&Jo(a)!=="body"),r=null;const s=ti(e).position==="fixed";let o=s?Fr(e):e;for(;ei(o)&&!zo(o);){const a=ti(o),l=Q0(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&Q6.has(r.position)||Ec(o)&&!l&&I4(e,o))?i=i.filter(d=>d!==o):r=a,o=Fr(o)}return t.set(e,i),i}function Z6(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[...n==="clippingAncestors"?yu(t)?[]:G6(t,this._c):[].concat(n),i],a=o[0],l=o.reduce((u,d)=>{const f=_y(t,d,r);return u.top=mn(f.top,u.top),u.right=Wr(f.right,u.right),u.bottom=Wr(f.bottom,u.bottom),u.left=mn(f.left,u.left),u},_y(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function q6(e){const{width:t,height:n}=_4(e);return{width:t,height:n}}function K6(e,t,n){const i=Ei(t),r=Li(t),s=n==="fixed",o=Ds(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=_i(0);function u(){l.x=pu(r)}if(i||!i&&!s)if((Jo(t)!=="body"||Ec(r))&&(a=gu(t)),i){const y=Ds(t,!0,s,t);l.x=y.x+t.clientLeft,l.y=y.y+t.clientTop}else r&&u();s&&!i&&r&&u();const d=r&&!i&&!s?M4(r,a):_i(0),f=o.left+a.scrollLeft-l.x-d.x,m=o.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:o.width,height:o.height}}function vd(e){return ti(e).position==="static"}function by(e,t){if(!Ei(e)||ti(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Li(e)===n&&(n=n.ownerDocument.body),n}function E4(e,t){const n=wn(e);if(yu(e))return n;if(!Ei(e)){let r=Fr(e);for(;r&&!zo(r);){if(ei(r)&&!vd(r))return r;r=Fr(r)}return n}let i=by(e,t);for(;i&&D6(i)&&vd(i);)i=by(i,t);return i&&zo(i)&&vd(i)&&!Q0(i)?n:i||R6(e)||n}const J6=async function(e){const t=this.getOffsetParent||E4,n=this.getDimensions,i=await n(e.floating);return{reference:K6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function X6(e){return ti(e).direction==="rtl"}const e8={convertOffsetParentRelativeRectToViewportRelativeRect:V6,getDocumentElement:Li,getClippingRect:Z6,getOffsetParent:E4,getElementRects:J6,getClientRects:W6,getDimensions:q6,getScale:po,isElement:ei,isRTL:X6};function C4(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function t8(e,t){let n=null,i;const r=Li(e);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:y}=u;if(a||t(),!m||!y)return;const p=Gc(f),g=Gc(r.clientWidth-(d+m)),x=Gc(r.clientHeight-(f+y)),_=Gc(d),I={rootMargin:-p+"px "+-g+"px "+-x+"px "+-_+"px",threshold:mn(0,Wr(1,l))||1};let E=!0;function C(T){const j=T[0].intersectionRatio;if(j!==l){if(!E)return o();j?o(!1,j):i=setTimeout(()=>{o(!1,1e-7)},1e3)}j===1&&!C4(u,e.getBoundingClientRect())&&o(),E=!1}try{n=new IntersectionObserver(C,{...I,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,I)}n.observe(e)}return o(!0),s}function n8(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=G0(e),d=r||s?[...u?Ha(u):[],...Ha(t)]:[];d.forEach(_=>{r&&_.addEventListener("scroll",n,{passive:!0}),s&&_.addEventListener("resize",n)});const f=u&&a?t8(u,n):null;let m=-1,y=null;o&&(y=new ResizeObserver(_=>{let[b]=_;b&&b.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),u&&!l&&y.observe(u),y.observe(t));let p,g=l?Ds(e):null;l&&x();function x(){const _=Ds(e);g&&!C4(g,_)&&n(),g=_,p=requestAnimationFrame(x)}return n(),()=>{var _;d.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(_=y)==null||_.disconnect(),y=null,l&&cancelAnimationFrame(p)}}const i8=T6,r8=j6,s8=E6,o8=N6,a8=C6,My=I6,c8=v6,l8=(e,t,n)=>{const i=new Map,r={platform:e8,...n},s={...r.platform,_c:i};return M6(e,t,{...r,platform:s})};var u8=typeof document<"u",d8=function(){},Il=u8?w.useLayoutEffect:d8;function Rl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Rl(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!(s==="_owner"&&e.$$typeof)&&!Rl(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function L4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Iy(e,t){const n=L4(e);return Math.round(t*n)/n}function Nd(e){const t=w.useRef(e);return Il(()=>{t.current=e}),t}function h8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,y]=w.useState(i);Rl(m,i)||y(i);const[p,g]=w.useState(null),[x,_]=w.useState(null),b=w.useCallback(W=>{W!==T.current&&(T.current=W,g(W))},[]),I=w.useCallback(W=>{W!==j.current&&(j.current=W,_(W))},[]),E=s||p,C=o||x,T=w.useRef(null),j=w.useRef(null),O=w.useRef(d),L=l!=null,N=Nd(l),v=Nd(r),D=Nd(u),k=w.useCallback(()=>{if(!T.current||!j.current)return;const W={placement:t,strategy:n,middleware:m};v.current&&(W.platform=v.current),l8(T.current,j.current,W).then(V=>{const Y={...V,isPositioned:D.current!==!1};U.current&&!Rl(O.current,Y)&&(O.current=Y,u4.flushSync(()=>{f(Y)}))})},[m,t,n,v,D]);Il(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[u]);const U=w.useRef(!1);Il(()=>(U.current=!0,()=>{U.current=!1}),[]),Il(()=>{if(E&&(T.current=E),C&&(j.current=C),E&&C){if(N.current)return N.current(E,C,k);k()}},[E,C,k,N,L]);const R=w.useMemo(()=>({reference:T,floating:j,setReference:b,setFloating:I}),[b,I]),B=w.useMemo(()=>({reference:E,floating:C}),[E,C]),F=w.useMemo(()=>{const W={position:n,left:0,top:0};if(!B.floating)return W;const V=Iy(B.floating,d.x),Y=Iy(B.floating,d.y);return a?{...W,transform:"translate("+V+"px, "+Y+"px)",...L4(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:Y}},[n,a,B.floating,d.x,d.y]);return w.useMemo(()=>({...d,update:k,refs:R,elements:B,floatingStyles:F}),[d,k,R,B,F])}const f8=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:r}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?My({element:i.current,padding:r}).fn(n):{}:i?My({element:i,padding:r}).fn(n):{}}}},m8=(e,t)=>({...i8(e),options:[e,t]}),y8=(e,t)=>({...r8(e),options:[e,t]}),g8=(e,t)=>({...c8(e),options:[e,t]}),p8=(e,t)=>({...s8(e),options:[e,t]}),w8=(e,t)=>({...o8(e),options:[e,t]}),x8=(e,t)=>({...a8(e),options:[e,t]}),_8=(e,t)=>({...f8(e),options:[e,t]}),wu="rpc.thirdweb.com",T4="social.thirdweb.com",j4="embedded-wallet.thirdweb.com",v4="pay.thirdweb.com",N4="storage.thirdweb.com",S4="bundler.thirdweb.com",A4="c.thirdweb.com",D4="insight.thirdweb.com",O4="engine.thirdweb.com",P4="bridge.thirdweb.com";let Z0={analytics:A4,bridge:P4,bundler:S4,engineCloud:O4,inAppWallet:j4,insight:D4,pay:v4,rpc:wu,social:T4,storage:N4};const b8=e=>{Z0={analytics:e.analytics??A4,bridge:e.bridge??P4,bundler:e.bundler??S4,engineCloud:e.engineCloud??O4,inAppWallet:e.inAppWallet??j4,insight:e.insight??D4,pay:e.pay??v4,rpc:e.rpc??wu,social:e.social??T4,storage:e.storage??N4}},Fs=()=>Z0,it=e=>{const t=Z0[e];return t.startsWith("localhost")?`http://${t}`:`https://${t}`};let k4=null;const M8=e=>{k4=e},z4=()=>k4,xu=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RPC_URL:wu,getServiceKey:z4,getThirdwebBaseUrl:it,getThirdwebDomains:Fs,setServiceKey:M8,setThirdwebDomains:b8},Symbol.toStringTag,{value:"Module"})),I8="5.118.0";let _u=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const i=this.keys().next().value;i&&this.delete(i)}return this}};const Ey=[["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 E8(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?"mobile":typeof navigator<"u"?"browser":"node"}function q0(e){for(let t=0,n=Ey.length;t<n;t++){const[i,r]=Ey[t];if(r.exec(e))return i}return null}function Gh(e){return e.split(".").length===3}var C8={};const L8=typeof Ui<"u"&&C8&&!1,T8=6e4;function He(e,t){async function n(i,r){const{requestTimeoutMs:s=T8,useAuthToken:o,...a}=r||{};let l=a.headers?new Headers(a.headers):typeof i=="object"?i.headers:void 0;const u=typeof i=="string"?i:i.url;if(K0(u)){l||(l=new Headers);const m=o&&e.secretKey&&Gh(e.secretKey)?e.secretKey:void 0,y=e.secretKey&&!Gh(e.secretKey)?e.secretKey:void 0,p=e.clientId;m&&S8(u)?(l.set("authorization",`Bearer ${m}`),e.teamId&&l.set("x-team-id",e.teamId),p&&l.set("x-client-id",p)):m&&!v8(u)&&!N8(u)?(l.set("authorization",`Bearer ${m}`),e.teamId&&l.set("x-team-id",e.teamId)):(y&&l.set("x-secret-key",y),p&&l.set("x-client-id",p)),t&&(l.set("x-ecosystem-id",t.id),t.partnerId&&l.set("x-ecosystem-partner-id",t.partnerId));for(const[x,_]of R4())l.set(x,_);const g=z4();g&&l.set("x-service-api-key",g)}let d,f;return s&&(d=new AbortController,f=setTimeout(()=>{d==null||d.abort("timeout")},s)),fetch(i,{...a,headers:l,signal:d==null?void 0:d.signal}).finally(()=>{f&&clearTimeout(f)})}return n}const j8=[".thirdweb.com",".ipfscdn.io",".thirdweb.dev",".thirdweb-dev.com",".thirdwebstorage-dev.com"],Aa=new _u(4096);function K0(e){if(Aa.has(e))return Aa.get(e);try{const{hostname:t}=new URL(e);try{}catch{}const n=j8.some(i=>t.endsWith(i));return Aa.set(e,n),n}catch{return Aa.set(e,!1),!1}}function v8(e){try{const{hostname:t}=new URL(e);return t.startsWith("pay.")}catch{return!1}}function N8(e){try{const{hostname:t}=new URL(e);return t.startsWith("in-app-wallet.")||t.startsWith("embedded-wallet.")}catch{return!1}}function S8(e){try{const{hostname:t}=new URL(e);return t.endsWith(".bundler.thirdweb.com")||t.endsWith(".bundler.thirdweb-dev.com")}catch{return!1}}const A8="unified-sdk";let Zc;function R4(){if(Zc)return Zc;let e=null;typeof navigator<"u"&&(e=q0(navigator.userAgent));let t;return typeof globalThis<"u"&&"Application"in globalThis&&(t=globalThis.Application.applicationId),Zc=Object.entries({"x-sdk-name":A8,"x-sdk-os":e?D8(e):"unknown","x-sdk-platform":E8(),"x-sdk-version":I8,...t?{"x-bundle-id":t}:{}}),Zc}function D8(e){const t=e.toLowerCase();if(t.startsWith("win"))return"win";switch(e){case"Mac OS":return"mac";case"iOS":return"ios";case"Android OS":return"android";default:return t.replace(/\s/gi,"_")}}const bu=Object.freeze(Object.defineProperty({__proto__:null,IS_THIRDWEB_URL_CACHE:Aa,getClientFetch:He,getPlatformHeaders:R4,isThirdwebUrl:K0},Symbol.toStringTag,{value:"Module"})),O8=new Map,P8=new Map;function k8(e){const t=(r,s)=>({clear:()=>s.delete(r),get:()=>s.get(r),set:o=>s.set(r,o)}),n=t(e,O8),i=t(e,P8);return{clear:()=>{n.clear(),i.clear()},promise:n,response:i}}async function Vn(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const i=k8(t),r=i.response.get();if(r&&n>0&&Date.now()-r.created.getTime()<n)return r.data;let s=i.promise.get();s||(s=e(),i.promise.set(s));try{const o=await s;return i.response.set({created:new Date,data:o}),o}finally{i.promise.clear()}}const Ro=new Map;function Qe(e){const t=Fs().rpc;if(typeof e=="number")return{id:e,rpc:`https://${e}.${t}`};if(R8(e))return B4(e);if(z8(e))return $4(e);let n=e.rpc;n||(n=`https://${e.id}.${t}`);const i={...e,rpc:n};return Ro.set(e.id,i),i}function U4(e){for(const t of e)Ro.set(t.id,t)}function Pe(e){if(Ro.has(e))return Ro.get(e);const t=Fs().rpc;return{id:e,rpc:`https://${e}.${t}`}}function Xo(e){return Ro.get(e)}function z8(e){return"rpc"in e&&Array.isArray(e.rpc)&&"slug"in e}function $4(e){var n;const t=Fs().rpc;return{blockExplorers:(n=e==null?void 0:e.explorers)==null?void 0:n.map(i=>({apiUrl:i.url,name:i.name,url:i.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpc[0]??`https://${e.chainId}.${t}`,testnet:e.testnet?!0:void 0}}function R8(e){return"rpcUrls"in e&&!("rpc"in e)}function B4(e){const t=Fs().rpc;return{blockExplorers:e!=null&&e.blockExplorers?Object.values(e==null?void 0:e.blockExplorers).map(n=>({apiUrl:n.apiUrl,name:n.name,url:n.url})):[],id:e.id,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpcUrls.default.http[0]??`https://${e.id}.${t}`,testnet:e.testnet?!0:void 0}}function V4(e){const t=Fs().rpc;if(typeof e.chain=="number")return`https://${e.chain}.${t}/${e.client.clientId}`;const{rpc:n}=e.chain;if(K0(n)){const i=new URL(e.chain.rpc.replace(wu,t));return(i.pathname==="/"||i.pathname.startsWith("/$"))&&(i.pathname=`/${e.client.clientId}`),i.toString()}return n}async function J0(e){var t;return(t=e.nativeCurrency)!=null&&t.symbol?e.nativeCurrency.symbol:xt(e).then(n=>n.nativeCurrency.symbol).catch(()=>"ETH")}async function X0(e){var t;return(t=e.nativeCurrency)!=null&&t.decimals?e.nativeCurrency.decimals:xt(e).then(n=>n.nativeCurrency.decimals).catch(()=>18)}async function e1(e){var t;return(t=e.nativeCurrency)!=null&&t.name?e.nativeCurrency.name:xt(e).then(n=>n.nativeCurrency.name).catch(()=>"ETH")}function xt(e){const t=e.id;return Vn(async()=>{try{const n=await fetch(`https://api.thirdweb.com/v1/chains/${t}`);if(!n.ok)throw new Error(`Failed to fetch chain data for chainId ${t}. ${n.status} ${n.statusText}`);const i=await n.json();if(i.error)throw new Error(`Failed to fetch chain data for chainId ${t}`);if(!i.data)throw new Error(`Failed to fetch chain data for chainId ${t}`);const r=i.data;return Cy(e,r)}catch{return Cy(e)}},{cacheKey:`chain:${t}`,cacheTime:5*60*1e3})}async function U8(){return Vn(async()=>{const e=await fetch("https://api.thirdweb.com/v1/chains/services?service=insight");if(!e.ok)throw new Error(`Failed to fetch services. ${e.status} ${e.statusText}`);const t=await e.json();return Object.keys(t.data).map(n=>Number(n))},{cacheKey:"chain:insight-enabled",cacheTime:24*60*60*1e3})}function Cc(e){var t;return{blockExplorers:(t=e.explorers)==null?void 0:t.map(n=>({apiUrl:n.url,name:n.name,url:n.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:e.nativeCurrency,rpc:e.rpc[0]||"",testnet:e.testnet===!0?!0:void 0}}function Cy(e,t){var i;const n=e.nativeCurrency?{...t==null?void 0:t.nativeCurrency,...e.nativeCurrency}:t==null?void 0:t.nativeCurrency;return{...t,chain:(t==null?void 0:t.chain)||e.name||"",chainId:e.id||(t==null?void 0:t.chainId)||-1,explorers:((i=e.blockExplorers)==null?void 0:i.map(r=>({name:r.name,standard:"EIP3091",url:r.url})))||(t==null?void 0:t.explorers),icon:e.icon||(t==null?void 0:t.icon),name:e.name||(t==null?void 0:t.name)||"",nativeCurrency:{decimals:(n==null?void 0:n.decimals)||18,name:(n==null?void 0:n.name)||"",symbol:(n==null?void 0:n.symbol)||""},rpc:e.rpc?[e.rpc]:(t==null?void 0:t.rpc)||[""],shortName:(t==null?void 0:t.shortName)||e.name||"",slug:(t==null?void 0:t.slug)||e.name||"",stackType:(t==null?void 0:t.stackType)||"",testnet:e.testnet||(t==null?void 0:t.testnet)||!1}}const t1=Object.freeze(Object.defineProperty({__proto__:null,CUSTOM_CHAIN_MAP:Ro,cacheChains:U4,convertApiChainToChain:Cc,convertLegacyChain:$4,convertViemChain:B4,defineChain:Qe,getCachedChain:Pe,getCachedChainIfExists:Xo,getChainDecimals:X0,getChainMetadata:xt,getChainNativeCurrencyName:e1,getChainSymbol:J0,getInsightEnabledChainIds:U8,getRpcUrlForChain:V4},Symbol.toStringTag,{value:"Module"}));function Me(e,t,n){return JSON.stringify(e,(r,s)=>{const o=typeof s=="bigint"?s.toString():s;return typeof t=="function"?t(r,o):o},n)}const n1=Object.freeze(Object.defineProperty({__proto__:null,stringify:Me},Symbol.toStringTag,{value:"Module"}));class pt extends Error{constructor(t){super(t.message),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"correlationId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"statusCode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.correlationId=t.correlationId,this.statusCode=t.statusCode}toString(){return Me({code:this.code,correlationId:this.correlationId,message:this.message,statusCode:this.statusCode})}}async function $8(e){const{originChainId:t,originTokenAddress:n,destinationChainId:i,destinationTokenAddress:r,sender:s,receiver:o,client:a,amount:l,purchaseData:u,maxSteps:d,paymentLinkId:f,slippageToleranceBps:m}=e,y=He(a),p=new URL(`${it("bridge")}/v1/buy/prepare`),g=await y(p.toString(),{body:Me({amount:l.toString(),buyAmountWei:l.toString(),destinationChainId:i.toString(),destinationTokenAddress:r,maxSteps:d,originChainId:t.toString(),originTokenAddress:n,paymentLinkId:f,purchaseData:u,receiver:o,sender:s,slippageToleranceBps:m}),headers:{"Content-Type":"application/json"},method:"POST"});if(!g.ok){const _=await g.json();throw new pt({code:_.code||"UNKNOWN_ERROR",correlationId:_.correlationId||void 0,message:_.message||g.statusText,statusCode:g.status})}const{data:x}=await g.json();return{blockNumber:x.blockNumber?BigInt(x.blockNumber):void 0,destinationAmount:BigInt(x.destinationAmount),estimatedExecutionTimeMs:x.estimatedExecutionTimeMs,intent:{amount:l,destinationChainId:i,destinationTokenAddress:r,originChainId:t,originTokenAddress:n,receiver:o,sender:s},originAmount:BigInt(x.originAmount),steps:x.steps.map(_=>({..._,transactions:_.transactions.map(b=>({...b,chain:Qe(b.chainId),client:a,value:b.value?BigInt(b.value):void 0}))})),timestamp:x.timestamp}}async function B8(e){const{client:t}=e;return Vn(async()=>{const n=He(t),i=new URL(`${it("bridge")}/v1/chains`);e.testnet&&i.searchParams.set("testnet",e.testnet.toString()),"type"in e&&e.type?i.searchParams.set("type",e.type):"originChainId"in e&&e.originChainId?i.searchParams.set("originChainId",e.originChainId.toString()):"destinationChainId"in e&&e.destinationChainId&&i.searchParams.set("destinationChainId",e.destinationChainId.toString());const r=await n(i.toString());if(!r.ok){const o=await r.json();throw new pt({code:o.code||"UNKNOWN_ERROR",correlationId:o.correlationId||void 0,message:o.message||r.statusText,statusCode:r.status})}const{data:s}=await r.json();return s},{cacheKey:`bridge-chains-${JSON.stringify(e)}`,cacheTime:1e3*60*60*1})}async function V8(e){const{id:t,client:n}=e,i=He(n),r=new URL(`${it("bridge")}/v1/onramp/status`);r.searchParams.set("id",t);const s=await i(r.toString());if(!s.ok){const a=await s.json();throw new pt({code:a.code||"UNKNOWN_ERROR",correlationId:a.correlationId||void 0,message:a.message||s.statusText,statusCode:s.status})}const{data:o}=await s.json();return o}async function i1(e){const{client:t,onramp:n,chainId:i,tokenAddress:r,receiver:s,amount:o,purchaseData:a,sender:l,onrampTokenAddress:u,onrampChainId:d,currency:f,maxSteps:m,excludeChainIds:y,paymentLinkId:p,country:g}=e,x=He(t),_=`${it("bridge")}/v1/onramp/prepare`,b={chainId:Number(i),onramp:n,receiver:s,tokenAddress:r};o!==void 0&&(b.amount=o.toString()),a!==void 0&&(b.purchaseData=a),l!==void 0&&(b.sender=l),u!==void 0&&(b.onrampTokenAddress=u),d!==void 0&&(b.onrampChainId=Number(d)),f!==void 0&&(b.currency=f),m!==void 0&&(b.maxSteps=m),y!==void 0&&(b.excludeChainIds=Array.isArray(y)?y.join(","):y),p!==void 0&&(b.paymentLinkId=p),g!==void 0&&(b.country=g);const I=await x(_,{body:Me(b),headers:{"Content-Type":"application/json"},method:"POST"});if(!I.ok){const j=await I.json();throw new pt({code:j.code||"UNKNOWN_ERROR",correlationId:j.correlationId||void 0,message:j.message||I.statusText,statusCode:I.status})}const{data:E}=await I.json(),C=E.steps.map(j=>({...j,destinationAmount:BigInt(j.destinationAmount),originAmount:BigInt(j.originAmount),transactions:j.transactions.map(O=>({...O,chain:Qe(O.chainId),client:t,value:O.value?BigInt(O.value):void 0}))})),T={...E.intent,amount:E.intent.amount?E.intent.amount:void 0};return{...E,destinationAmount:BigInt(E.destinationAmount),intent:T,steps:C}}const hK=Object.freeze(Object.defineProperty({__proto__:null,prepare:i1,status:V8},Symbol.toStringTag,{value:"Module"}));async function W8(e){const{originChainId:t,originTokenAddress:n,destinationChainId:i,destinationTokenAddress:r,amount:s,sender:o,receiver:a,client:l,purchaseData:u,maxSteps:d,paymentLinkId:f,slippageToleranceBps:m}=e,y=He(l),p=new URL(`${it("bridge")}/v1/sell/prepare`),g=await y(p.toString(),{body:Me({amount:s.toString(),destinationChainId:i.toString(),destinationTokenAddress:r,maxSteps:d,originChainId:t.toString(),originTokenAddress:n,paymentLinkId:f,purchaseData:u,receiver:a,sellAmountWei:s.toString(),sender:o,slippageToleranceBps:m}),headers:{"Content-Type":"application/json"},method:"POST"});if(!g.ok){const _=await g.json();throw new pt({code:_.code||"UNKNOWN_ERROR",correlationId:_.correlationId||void 0,message:_.message||g.statusText,statusCode:g.status})}const{data:x}=await g.json();return{blockNumber:x.blockNumber?BigInt(x.blockNumber):void 0,destinationAmount:BigInt(x.destinationAmount),estimatedExecutionTimeMs:x.estimatedExecutionTimeMs,expiration:x.expiration,intent:{amount:s,destinationChainId:i,destinationTokenAddress:r,originChainId:t,originTokenAddress:n,purchaseData:u,receiver:a,sender:o},originAmount:BigInt(x.originAmount),steps:x.steps.map(_=>({..._,transactions:_.transactions.map(b=>({...b,chain:Qe(b.chainId),client:l,value:b.value?BigInt(b.value):void 0}))})),timestamp:x.timestamp}}async function W4(e){const{client:t,chainId:n,tokenAddress:i,symbol:r,name:s,limit:o,offset:a,includePrices:l,sortBy:u,query:d}=e,f=He(t),m=new URL(`${it("bridge")}/v1/tokens`);n!=null&&m.searchParams.set("chainId",n.toString()),i&&m.searchParams.set("tokenAddress",i),r&&m.searchParams.set("symbol",r),s&&m.searchParams.set("name",s),o!==void 0&&m.searchParams.set("limit",o.toString()),a!=null&&m.searchParams.set("offset",a.toString()),l!==void 0&&m.searchParams.set("includePrices",l.toString()),u!==void 0&&m.searchParams.set("sortBy",u),d!==void 0&&m.searchParams.set("query",d);const y=await f(m.toString());if(!y.ok){const g=await y.json();throw new pt({code:g.code||"UNKNOWN_ERROR",correlationId:g.correlationId||void 0,message:g.message||y.statusText,statusCode:y.status})}const{data:p}=await y.json();return p}async function F8(e){const{client:t,chainId:n,tokenAddress:i}=e,r=He(t),s=`${it("bridge")}/v1/tokens`,a=await r(s,{body:JSON.stringify({chainId:n,tokenAddress:i}),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok){const u=await a.json();throw new pt({code:u.code||"UNKNOWN_ERROR",correlationId:u.correlationId||void 0,message:u.message||a.statusText,statusCode:a.status})}const{data:l}=await a.json();return l}async function Y8(e){const{chainId:t,tokenAddress:n,sender:i,receiver:r,client:s,amount:o,purchaseData:a,feePayer:l,paymentLinkId:u}=e,d=He(s),f=new URL(`${it("bridge")}/v1/transfer/prepare`),m=await d(f.toString(),{body:Me({amount:o.toString(),chainId:t.toString(),feePayer:l,paymentLinkId:u,purchaseData:a,receiver:r,sender:i,tokenAddress:n,transferAmountWei:o.toString()}),headers:{"Content-Type":"application/json"},method:"POST"});if(!m.ok){const p=await m.json();throw new pt({code:p.code||"UNKNOWN_ERROR",correlationId:p.correlationId||void 0,message:p.message||m.statusText,statusCode:m.status})}const{data:y}=await m.json();return{blockNumber:y.blockNumber?BigInt(y.blockNumber):void 0,destinationAmount:BigInt(y.destinationAmount),estimatedExecutionTimeMs:y.estimatedExecutionTimeMs,intent:{amount:o,chainId:t,feePayer:l,receiver:r,sender:i,tokenAddress:n},originAmount:BigInt(y.originAmount),steps:y.steps.map(p=>({...p,transactions:p.transactions.map(g=>({...g,chain:Qe(g.chainId),client:s,value:g.value?BigInt(g.value):void 0}))})),timestamp:y.timestamp}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r1=BigInt(0),Zh=BigInt(1);function s1(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function o1(e){if(!s1(e))throw new Error("Uint8Array expected")}function fK(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function mK(e){const t=e.toString(16);return t.length&1?"0"+t:t}function a1(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?r1:BigInt("0x"+e)}const F4=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Q8=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Y4(e){if(o1(e),F4)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Q8[e[n]];return t}const Ti={_0:48,_9:57,A:65,F:70,a:97,f:102};function Ly(e){if(e>=Ti._0&&e<=Ti._9)return e-Ti._0;if(e>=Ti.A&&e<=Ti.F)return e-(Ti.A-10);if(e>=Ti.a&&e<=Ti.f)return e-(Ti.a-10)}function Q4(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(F4)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(n);for(let r=0,s=0;r<n;r++,s+=2){const o=Ly(e.charCodeAt(s)),a=Ly(e.charCodeAt(s+1));if(o===void 0||a===void 0){const l=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+s)}i[r]=o*16+a}return i}function yK(e){return a1(Y4(e))}function gK(e){return o1(e),a1(Y4(Uint8Array.from(e).reverse()))}function H8(e,t){return Q4(e.toString(16).padStart(t*2,"0"))}function pK(e,t){return H8(e,t).reverse()}function wK(e,t,n){let i;if(typeof t=="string")try{i=Q4(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(s1(t))i=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const r=i.length;if(typeof n=="number"&&r!==n)throw new Error(e+" of length "+n+" expected, got "+r);return i}function G8(...e){let t=0;for(let i=0;i<e.length;i++){const r=e[i];o1(r),t+=r.length}const n=new Uint8Array(t);for(let i=0,r=0;i<e.length;i++){const s=e[i];n.set(s,r),r+=s.length}return n}const Sd=e=>typeof e=="bigint"&&r1<=e;function Z8(e,t,n){return Sd(e)&&Sd(t)&&Sd(n)&&t<=e&&e<n}function xK(e,t,n,i){if(!Z8(t,n,i))throw new Error("expected valid "+e+": "+n+" <= n < "+i+", got "+t)}function _K(e){let t;for(t=0;e>r1;e>>=Zh,t+=1);return t}const bK=e=>(Zh<<BigInt(e))-Zh,Ad=e=>new Uint8Array(e),Ty=e=>Uint8Array.from(e);function MK(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let i=Ad(e),r=Ad(e),s=0;const o=()=>{i.fill(1),r.fill(0),s=0},a=(...f)=>n(r,i,...f),l=(f=Ad(0))=>{r=a(Ty([0]),f),i=a(),f.length!==0&&(r=a(Ty([1]),f),i=a())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const m=[];for(;f<t;){i=a();const y=i.slice();m.push(y),f+=i.length}return G8(...m)};return(f,m)=>{o(),l(f);let y;for(;!(y=m(u()));)l();return o(),y}}const q8={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"||s1(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 IK(e,t,n={}){const i=(r,s,o)=>{const a=q8[s];if(typeof a!="function")throw new Error("invalid validator function");const l=e[r];if(!(o&&l===void 0)&&!a(l,e))throw new Error("param "+String(r)+" is invalid. Expected "+s+", got "+l)};for(const[r,s]of Object.entries(t))i(r,s,!1);for(const[r,s]of Object.entries(n))i(r,s,!0);return e}function EK(e){const t=new WeakMap;return(n,...i)=>{const r=t.get(n);if(r!==void 0)return r;const s=e(n,...i);return t.set(n,s),s}}const K8="0.1.1";function J8(){return K8}let ve=class qh extends Error{constructor(t,n={}){const i=(()=>{var l;if(n.cause instanceof qh){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(l=n.cause)!=null&&l.message?n.cause.message:n.details})(),r=n.cause instanceof qh&&n.cause.docsPath||n.docsPath,o=`https://oxlib.sh${r??""}`,a=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...i||r?["",i?`Details: ${i}`:void 0,r?`See: ${o}`:void 0]:[]].filter(l=>typeof l=="string").join(`
3
+ `);super(a,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${J8()}`}),this.cause=n.cause,this.details=i,this.docs=o,this.docsPath=r,this.shortMessage=t}walk(t){return H4(this,t)}};function H4(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?H4(e.cause,t):t?null:e}const X8="#__bigint";function Mu(e,t,n){return JSON.stringify(e,(i,r)=>typeof t=="function"?t(i,r):typeof r=="bigint"?r.toString()+X8:r,n)}function c1(e,t){if(Ay(e)>t)throw new _E({givenSize:Ay(e),maxSize:t})}const ji={zero:48,nine:57,A:65,F:70,a:97,f:102};function jy(e){if(e>=ji.zero&&e<=ji.nine)return e-ji.zero;if(e>=ji.A&&e<=ji.F)return e-(ji.A-10);if(e>=ji.a&&e<=ji.f)return e-(ji.a-10)}function G4(e,t={}){const{dir:n,size:i=32}=t;if(i===0)return e;if(e.length>i)throw new bE({size:e.length,targetSize:i,type:"Bytes"});const r=new Uint8Array(i);for(let s=0;s<i;s++){const o=n==="right";r[o?s:i-s-1]=e[o?s:e.length-s-1]}return r}function eE(e,t={}){const{dir:n="left"}=t;let i=e,r=0;for(let s=0;s<i.length-1&&i[n==="left"?s:i.length-s-1].toString()==="0";s++)r++;return i=n==="left"?i.slice(r):i.slice(0,i.length-r),i}function Iu(e,t){if(Zt(e)>t)throw new uE({givenSize:Zt(e),maxSize:t})}function tE(e,t){if(typeof t=="number"&&t>0&&t>Zt(e)-1)throw new X4({offset:t,position:"start",size:Zt(e)})}function nE(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Zt(e)!==n-t)throw new X4({offset:n,position:"end",size:Zt(e)})}function Z4(e,t={}){const{dir:n,size:i=32}=t;if(i===0)return e;const r=e.replace("0x","");if(r.length>i*2)throw new dE({size:Math.ceil(r.length/2),targetSize:i,type:"Hex"});return`0x${r[n==="right"?"padEnd":"padStart"](i*2,"0")}`}function iE(e,t={}){const{dir:n="left"}=t;let i=e.replace("0x",""),r=0;for(let s=0;s<i.length-1&&i[n==="left"?s:i.length-s-1].toString()==="0";s++)r++;return i=n==="left"?i.slice(r):i.slice(0,i.length-r),i==="0"?"0x":n==="right"&&i.length%2===1?`0x${i}0`:`0x${i}`}const rE=new TextEncoder,sE=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function oE(e,t={}){const{strict:n=!1}=t;if(!e)throw new Ny(e);if(typeof e!="string")throw new Ny(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Sy(e);if(!e.startsWith("0x"))throw new Sy(e)}function Gt(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function aE(e){return e instanceof Uint8Array?Os(e):Array.isArray(e)?Os(new Uint8Array(e)):e}function l1(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Iu(n,t.size),Yr(n,t.size)):n}function Os(e,t={}){let n="";for(let r=0;r<e.length;r++)n+=sE[e[r]];const i=`0x${n}`;return typeof t.size=="number"?(Iu(i,t.size),Qr(i,t.size)):i}function ft(e,t={}){const{signed:n,size:i}=t,r=BigInt(e);let s;i?n?s=(1n<<BigInt(i)*8n-1n)-1n:s=2n**(BigInt(i)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&n?-s-1n:0;if(s&&r>s||r<o){const u=typeof e=="bigint"?"n":"";throw new J4({max:s?`${s}${u}`:void 0,min:`${o}${u}`,signed:n,size:i,value:`${e}${u}`})}const l=`0x${(n&&r<0?(1n<<BigInt(i*8))+BigInt(r):r).toString(16)}`;return i?Yr(l,i):l}function Eu(e,t={}){return Os(rE.encode(e),t)}function Yr(e,t){return Z4(e,{dir:"left",size:t})}function Qr(e,t){return Z4(e,{dir:"right",size:t})}function Ul(e,t,n,i={}){const{strict:r}=i;tE(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&nE(s,t,n),s}function Zt(e){return Math.ceil((e.length-2)/2)}function vy(e){return iE(e,{dir:"left"})}function q4(e,t={}){const{signed:n}=t;t.size&&Iu(e,t.size);const i=BigInt(e);if(!n)return i;const r=(e.length-2)/2,s=(1n<<BigInt(r)*8n)-1n,o=s>>1n;return i<=o?i:i-s-1n}function cE(e,t={}){return ea(e,t)}function K4(e,t={}){const{signed:n,size:i}=t;return Number(!n&&!i?e:q4(e,t))}function lE(e,t={}){const{size:n}=t;let i=ea(e);return n&&(c1(i,n),i=xE(i)),new TextDecoder().decode(i)}function Uo(e,t={}){const{strict:n=!1}=t;try{return oE(e,{strict:n}),!0}catch{return!1}}let J4=class extends ve{constructor({max:t,min:n,signed:i,size:r,value:s}){super(`Number \`${s}\` is not in safe${r?` ${r*8}-bit`:""}${i?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}};class Ny extends ve{constructor(t){super(`Value \`${typeof t=="object"?Mu(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}let Sy=class extends ve{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}},uE=class extends ve{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}},X4=class extends ve{constructor({offset:t,position:n,size:i}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${i}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}},dE=class extends ve{constructor({size:t,targetSize:n,type:i}){super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}};const hE=new TextEncoder;function NK(...e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);for(let i=0,r=0;i<e.length;i++){const s=e[i];n.set(s,r),r+=s.length}return n}function fE(e){return e instanceof Uint8Array?e:typeof e=="string"?ea(e):mE(e)}function mE(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function yE(e,t={}){const{size:n}=t,i=new Uint8Array(1);return i[0]=Number(e),typeof n=="number"?(c1(i,n),pE(i,n)):i}function ea(e,t={}){const{size:n}=t;let i=e;n&&(Iu(e,n),i=Qr(e,n));let r=i.slice(2);r.length%2&&(r=`0${r}`);const s=r.length/2,o=new Uint8Array(s);for(let a=0,l=0;a<s;a++){const u=jy(r.charCodeAt(l++)),d=jy(r.charCodeAt(l++));if(u===void 0||d===void 0)throw new ve(`Invalid byte sequence ("${r[l-2]}${r[l-1]}" in "${r}").`);o[a]=u*16+d}return o}function gE(e,t){const n=ft(e,t);return ea(n)}function u1(e,t={}){const{size:n}=t,i=hE.encode(e);return typeof n=="number"?(c1(i,n),wE(i,n)):i}function pE(e,t){return G4(e,{dir:"left",size:t})}function wE(e,t){return G4(e,{dir:"right",size:t})}function Ay(e){return e.length}function xE(e){return eE(e,{dir:"right"})}let _E=class extends ve{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},bE=class extends ve{constructor({size:t,targetSize:n,type:i}){super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};function ts(e,t={}){return Uo(e,t)}function ME(e,t={}){switch(typeof e){case"number":case"bigint":return CE(e,t);case"boolean":return IE(e,t);default:return ts(e)?EE(e,t):js(e,t)}}function IE(e,t={}){return yE(e,t)}function EE(e,t={}){return ea(e,t)}function CE(e,t){return gE(e,t)}function js(e,t={}){return u1(e,t)}function $l(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function LE(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Lc(e,...t){if(!LE(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 DK(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");$l(e.outputLen),$l(e.blockLen)}function Bl(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 ew(e,t){Lc(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}const qc=BigInt(2**32-1),Dy=BigInt(32);function TE(e,t=!1){return t?{h:Number(e&qc),l:Number(e>>Dy&qc)}:{h:Number(e>>Dy&qc)|0,l:Number(e&qc)|0}}function jE(e,t=!1){let n=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let r=0;r<e.length;r++){const{h:s,l:o}=TE(e[r],t);[n[r],i[r]]=[s,o]}return[n,i]}const vE=(e,t,n)=>e<<n|t>>>32-n,NE=(e,t,n)=>t<<n|e>>>32-n,SE=(e,t,n)=>t<<n-32|e>>>64-n,AE=(e,t,n)=>e<<n-32|t>>>64-n,Xs=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function DE(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Dd(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ci(e,t){return e<<32-t|e>>>t}const Oy=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function OE(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Py(e){for(let t=0;t<e.length;t++)e[t]=OE(e[t])}const PE=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",kE=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function OK(e){if(Lc(e),PE)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=kE[e[n]];return t}function zE(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function Cu(e){return typeof e=="string"&&(e=zE(e)),Lc(e),e}function PK(...e){let t=0;for(let i=0;i<e.length;i++){const r=e[i];Lc(r),t+=r.length}const n=new Uint8Array(t);for(let i=0,r=0;i<e.length;i++){const s=e[i];n.set(s,r),r+=s.length}return n}let tw=class{clone(){return this._cloneInto()}};function nw(e){const t=i=>e().update(Cu(i)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function RE(e){const t=(i,r)=>e(r).update(Cu(i)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=i=>e(i),t}function zK(e=32){if(Xs&&typeof Xs.getRandomValues=="function")return Xs.getRandomValues(new Uint8Array(e));if(Xs&&typeof Xs.randomBytes=="function")return Uint8Array.from(Xs.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const iw=[],rw=[],sw=[],UE=BigInt(0),ya=BigInt(1),$E=BigInt(2),BE=BigInt(7),VE=BigInt(256),WE=BigInt(113);for(let e=0,t=ya,n=1,i=0;e<24;e++){[n,i]=[i,(2*n+3*i)%5],iw.push(2*(5*i+n)),rw.push((e+1)*(e+2)/2%64);let r=UE;for(let s=0;s<7;s++)t=(t<<ya^(t>>BE)*WE)%VE,t&$E&&(r^=ya<<(ya<<BigInt(s))-ya);sw.push(r)}const[FE,YE]=jE(sw,!0),ky=(e,t,n)=>n>32?SE(e,t,n):vE(e,t,n),zy=(e,t,n)=>n>32?AE(e,t,n):NE(e,t,n);function ow(e,t=24){const n=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,u=n[l],d=n[l+1],f=ky(u,d,1)^n[a],m=zy(u,d,1)^n[a+1];for(let y=0;y<50;y+=10)e[o+y]^=f,e[o+y+1]^=m}let r=e[2],s=e[3];for(let o=0;o<24;o++){const a=rw[o],l=ky(r,s,a),u=zy(r,s,a),d=iw[o];r=e[d],s=e[d+1],e[d]=l,e[d+1]=u}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=FE[i],e[1]^=YE[i]}n.fill(0)}let d1=class aw extends tw{constructor(t,n,i,r=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=i,this.enableXOF=r,this.rounds=s,$l(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=DE(this.state)}keccak(){Oy||Py(this.state32),ow(this.state32,this.rounds),Oy||Py(this.state32),this.posOut=0,this.pos=0}update(t){Bl(this);const{blockLen:n,state:i}=this;t=Cu(t);const r=t.length;for(let s=0;s<r;){const o=Math.min(n-this.pos,r-s);for(let a=0;a<o;a++)i[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:i,blockLen:r}=this;t[i]^=n,n&128&&i===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){Bl(this,!1),Lc(t),this.finish();const n=this.state,{blockLen:i}=this;for(let r=0,s=t.length;r<s;){this.posOut>=i&&this.keccak();const o=Math.min(i-this.posOut,s-r);t.set(n.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return $l(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(ew(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:i,outputLen:r,rounds:s,enableXOF:o}=this;return t||(t=new aw(n,i,r,o,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=i,t.outputLen=r,t.enableXOF=o,t.destroyed=this.destroyed,t}};const ns=(e,t,n)=>nw(()=>new d1(t,e,n)),QE=ns(6,144,224/8),HE=ns(6,136,256/8),GE=ns(6,104,384/8),ZE=ns(6,72,512/8),qE=ns(1,144,224/8),h1=ns(1,136,256/8),KE=ns(1,104,384/8),JE=ns(1,72,512/8),cw=(e,t,n)=>RE((i={})=>new d1(t,e,i.dkLen===void 0?n:i.dkLen,!0)),XE=cw(31,168,128/8),eC=cw(31,136,256/8),RK=Object.freeze(Object.defineProperty({__proto__:null,Keccak:d1,keccakP:ow,keccak_224:qE,keccak_256:h1,keccak_384:KE,keccak_512:JE,sha3_224:QE,sha3_256:HE,sha3_384:GE,sha3_512:ZE,shake128:XE,shake256:eC},Symbol.toStringTag,{value:"Module"}));function vs(e,t={}){const{dir:n,size:i=32}=t;return i===null?e:n==="right"?Qr(e,i):Yr(e,i)}function UK(e,t={}){return lE(e,t)}function on(e,t={}){return q4(e,t)}function lw(e,t={}){return K4(e,t)}function uw(e,t={}){return cE(e,t)}function dw(e,t={}){return l1(e,t)}function Ys(e,t={}){return Os(e,t)}function Ue(e,t={}){return ft(e,t)}function Tc(e,t={}){return Eu(e,t)}function Lu(e,t={}){switch(typeof e){case"number":case"bigint":return Ue(e,t);case"string":return Tc(e,t);case"boolean":return dw(e,t);default:return Ys(e,t)}}function Kh(e,t){const n=h1(ts(e,{strict:!1})?uw(e):e);return t==="bytes"?n:Ys(n)}const tC=/^0x[a-fA-F0-9]{40}$/,Od=new _u(4096);function ni(e){if(Od.has(e))return Od.get(e);const t=tC.test(e)&&(e.toLowerCase()===e||$o(e)===e);return Od.set(e,t),t}function $o(e){const t=e.substring(2).toLowerCase(),n=Kh(js(t),"bytes"),i=t.split("");for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&e[r]&&(i[r]=i[r].toUpperCase()),(n[r>>1]&15)>=8&&e[r+1]&&(i[r+1]=i[r+1].toUpperCase());return`0x${i.join("")}`}function me(e){if(!ni(e))throw new Error(`Invalid address: ${e}`);return $o(e)}function _n(e,t=4){const n=me(e);return Ga(n,t)}function Ga(e,t=4){return`${e.slice(0,t+2)}...${e.slice(-t)}`}function nC(e,t,n,i){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,i);const r=BigInt(32),s=BigInt(4294967295),o=Number(n>>r&s),a=Number(n&s),l=i?4:0,u=i?0:4;e.setUint32(t+l,o,i),e.setUint32(t+u,a,i)}function iC(e,t,n){return e&t^~e&n}function rC(e,t,n){return e&t^e&n^t&n}class sC extends tw{constructor(t,n,i,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=i,this.isLE=r,this.buffer=new Uint8Array(t),this.view=Dd(this.buffer)}update(t){Bl(this);const{view:n,buffer:i,blockLen:r}=this;t=Cu(t);const s=t.length;for(let o=0;o<s;){const a=Math.min(r-this.pos,s-o);if(a===r){const l=Dd(t);for(;r<=s-o;o+=r)this.process(l,o);continue}i.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===r&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Bl(this),ew(t,this),this.finished=!0;const{buffer:n,view:i,blockLen:r,isLE:s}=this;let{pos:o}=this;n[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>r-o&&(this.process(i,0),o=0);for(let f=o;f<r;f++)n[f]=0;nC(i,r-8,BigInt(this.length*8),s),this.process(i,0);const a=Dd(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<u;f++)a.setUint32(4*f,d[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const i=t.slice(0,n);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:i,length:r,finished:s,destroyed:o,pos:a}=this;return t.length=r,t.pos=a,t.finished=s,t.destroyed=o,r%n&&t.buffer.set(i),t}}const oC=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ir=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),rr=new Uint32Array(64);class aC extends sC{constructor(t=32){super(64,t,8,!1),this.A=ir[0]|0,this.B=ir[1]|0,this.C=ir[2]|0,this.D=ir[3]|0,this.E=ir[4]|0,this.F=ir[5]|0,this.G=ir[6]|0,this.H=ir[7]|0}get(){const{A:t,B:n,C:i,D:r,E:s,F:o,G:a,H:l}=this;return[t,n,i,r,s,o,a,l]}set(t,n,i,r,s,o,a,l){this.A=t|0,this.B=n|0,this.C=i|0,this.D=r|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=l|0}process(t,n){for(let f=0;f<16;f++,n+=4)rr[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const m=rr[f-15],y=rr[f-2],p=ci(m,7)^ci(m,18)^m>>>3,g=ci(y,17)^ci(y,19)^y>>>10;rr[f]=g+rr[f-7]+p+rr[f-16]|0}let{A:i,B:r,C:s,D:o,E:a,F:l,G:u,H:d}=this;for(let f=0;f<64;f++){const m=ci(a,6)^ci(a,11)^ci(a,25),y=d+m+iC(a,l,u)+oC[f]+rr[f]|0,g=(ci(i,2)^ci(i,13)^ci(i,22))+rC(i,r,s)|0;d=u,u=l,l=a,a=o+y|0,o=s,s=r,r=i,i=y+g|0}i=i+this.A|0,r=r+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(i,r,s,o,a,l,u,d)}roundClean(){rr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const cC=nw(()=>new aC);function lC(e,t){const n=cC(ts(e,{strict:!1})?uw(e):e);return Ys(n)}const Pd=new _u(4096);function uC(e){if(Pd.has(e))return Pd.get(e);const t=lC(js(e)).slice(2,34);return Pd.set(e,t),t}function dC(e){const{clientId:t,secretKey:n,...i}=e;let r=t;if(n)if(Gh(n)){if(!t)throw new Error("clientId must be provided when using a JWT secretKey")}else r=t??uC(n);if(!r)throw new Error("clientId or secretKey must be provided");return{...i,clientId:r,secretKey:n}}const Yt="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";function hC(e){return e.toLowerCase()===Yt}const fC="0x0000000000000000000000000000000000000000";function qt(e){if(!e.client)throw new Error(`getContract validation error - invalid client: ${e.client}`);if(!ni(e.address))throw new Error(`getContract validation error - invalid address: ${e.address}`);if(!e.chain||!e.chain.id)throw new Error(`getContract validation error - invalid chain: ${e.chain}`);return e}function mC(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const $K=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,BK=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,VK=/^\(.+?\).*?$/,Ry=/^tuple(?<array>(\[(\d*)\])*)$/;function Jh(e){let t=e.type;if(Ry.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let r=0;r<n;r++){const s=e.components[r];t+=Jh(s),r<n-1&&(t+=", ")}const i=mC(Ry,e.type);return t+=`)${(i==null?void 0:i.array)??""}`,Jh({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function ga(e){let t="";const n=e.length;for(let i=0;i<n;i++){const r=e[i];t+=Jh(r),i!==n-1&&(t+=", ")}return t}function yC(e){var t;return e.type==="function"?`function ${e.name}(${ga(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${ga(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${ga(e.inputs)})`:e.type==="error"?`error ${e.name}(${ga(e.inputs)})`:e.type==="constructor"?`constructor(${ga(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function Bo(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new TC(e.type);return`${e.name}(${Tu(e.inputs,{includeName:t})})`}function Tu(e,{includeName:t=!1}={}){return e?e.map(n=>gC(n,{includeName:t})).join(t?", ":","):""}function gC(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Tu(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function ta(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function ht(e){return ta(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const hw="2.39.0";let mo={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${hw}`};function WK(e){mo=e}let we=class Xh extends Error{constructor(t,n={}){var a;const i=(()=>{var l;return n.cause instanceof Xh?n.cause.details:(l=n.cause)!=null&&l.message?n.cause.message:n.details})(),r=n.cause instanceof Xh&&n.cause.docsPath||n.docsPath,s=(a=mo.getDocsUrl)==null?void 0:a.call(mo,{...n,docsPath:r}),o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...i?[`Details: ${i}`]:[],...mo.version?[`Version: ${mo.version}`]:[]].join(`
4
+ `);super(o,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=i,this.docsPath=r,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=hw}walk(t){return fw(this,t)}};function fw(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?fw(e.cause,t):t?null:e}class FK extends we{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
5
+ `),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class YK extends we{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
6
+ `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class QK extends we{constructor({data:t,size:n}){super([`Data size of ${n} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(`
7
+ `),{metaMessages:[`Data: ${t} (${n} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}class mw extends we{constructor({data:t,params:n,size:i}){super([`Data size of ${i} bytes is too small for given parameters.`].join(`
8
+ `),{metaMessages:[`Params: (${Tu(n,{includeName:!0})})`,`Data: ${t} (${i} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=i}}class yw extends we{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class pC extends we{constructor({expectedLength:t,givenLength:n,type:i}){super([`ABI encoding array length mismatch for type ${i}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
9
+ `),{name:"AbiEncodingArrayLengthMismatchError"})}}class wC extends we{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${ht(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class xC extends we{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
10
+ `),{name:"AbiEncodingLengthMismatchError"})}}class HK extends we{constructor(t,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
11
+ `),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class GK extends we{constructor(t,{docsPath:n}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
12
+ `),{docsPath:n,name:"AbiErrorNotFoundError"})}}class _C extends we{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
13
+ `),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class bC extends we{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class gw extends we{constructor(t,{docsPath:n}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
14
+ `),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class Uy extends we{constructor(t,{docsPath:n}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
15
+ `),{docsPath:n,name:"AbiEventNotFoundError"})}}class ZK extends we{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
16
+ `),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class qK extends we{constructor(t,{docsPath:n}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
17
+ `),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class KK extends we{constructor(t,{docsPath:n}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
18
+ `),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class MC extends we{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Bo(t.abiItem)}\`, and`,`\`${n.type}\` in \`${Bo(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let IC=class extends we{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}};class ef extends we{constructor({abiItem:t,data:n,params:i,size:r}){super([`Data size of ${r} bytes is too small for non-indexed event parameters.`].join(`
19
+ `),{metaMessages:[`Params: (${Tu(i,{includeName:!0})})`,`Data: ${n} (${r} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=n,this.params=i,this.size=r}}class pw extends we{constructor({abiItem:t,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${Bo(t,{includeName:!0})}".`].join(`
20
+ `),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class EC extends we{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
21
+ `),{docsPath:n,name:"InvalidAbiEncodingType"})}}class CC extends we{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
22
+ `),{docsPath:n,name:"InvalidAbiDecodingType"})}}let LC=class extends we{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
23
+ `),{name:"InvalidArrayError"})}};class TC extends we{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
24
+ `),{name:"InvalidDefinitionTypeError"})}}class eJ extends we{constructor(t){super(`Type "${t}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}class jC extends we{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}class ww extends we{constructor({offset:t,position:n,size:i}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${i}).`,{name:"SliceOffsetOutOfBoundsError"})}}let xw=class extends we{constructor({size:t,targetSize:n,type:i}){super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class nJ extends we{constructor({size:t,targetSize:n,type:i}){super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} is expected to be ${n} ${i} long, but is ${t} ${i} long.`,{name:"InvalidBytesLengthError"})}}function na(e,{dir:t,size:n=32}={}){return typeof e=="string"?Rr(e,{dir:t,size:n}):vC(e,{dir:t,size:n})}function Rr(e,{dir:t,size:n=32}={}){if(n===null)return e;const i=e.replace("0x","");if(i.length>n*2)throw new xw({size:Math.ceil(i.length/2),targetSize:n,type:"hex"});return`0x${i[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function vC(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new xw({size:e.length,targetSize:n,type:"bytes"});const i=new Uint8Array(n);for(let r=0;r<n;r++){const s=t==="right";i[s?r:n-r-1]=e[s?r:e.length-r-1]}return i}let _w=class extends we{constructor({max:t,min:n,signed:i,size:r,value:s}){super(`Number "${s}" is not in safe ${r?`${r*8}-bit ${i?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}};class NC extends we{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class SC extends we{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class rJ extends we{constructor(t){super(`Hex value "${t}" is an odd length (${t.length}). It must be an even length.`,{name:"InvalidHexValueError"})}}let AC=class extends we{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function Ns(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,i=0;for(let r=0;r<n.length-1&&n[t==="left"?r:n.length-r-1].toString()==="0";r++)i++;return n=t==="left"?n.slice(i):n.slice(0,n.length-i),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function Wn(e,{size:t}){if(ht(e)>t)throw new AC({givenSize:ht(e),maxSize:t})}function oJ(e,t){const n=typeof t=="string"?{to:t}:t,i=n.to;return i==="number"?Za(e,n):i==="bigint"?f1(e,n):i==="string"?OC(e,n):i==="boolean"?DC(e,n):jc(e,n)}function f1(e,t={}){const{signed:n}=t;t.size&&Wn(e,{size:t.size});const i=BigInt(e);if(!n)return i;const r=(e.length-2)/2,s=(1n<<BigInt(r)*8n-1n)-1n;return i<=s?i:i-BigInt(`0x${"f".padStart(r*2,"f")}`)-1n}function DC(e,t={}){let n=e;if(t.size&&(Wn(n,{size:t.size}),n=Ns(n)),Ns(n)==="0x00")return!1;if(Ns(n)==="0x01")return!0;throw new SC(n)}function Za(e,t={}){return Number(f1(e,t))}function OC(e,t={}){let n=jc(e);return t.size&&(Wn(n,{size:t.size}),n=Ns(n,{dir:"right"})),new TextDecoder().decode(n)}const PC=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function m1(e,t={}){return typeof e=="number"||typeof e=="bigint"?tt(e,t):typeof e=="string"?Mw(e,t):typeof e=="boolean"?bw(e,t):bn(e,t)}function bw(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Wn(n,{size:t.size}),na(n,{size:t.size})):n}function bn(e,t={}){let n="";for(let r=0;r<e.length;r++)n+=PC[e[r]];const i=`0x${n}`;return typeof t.size=="number"?(Wn(i,{size:t.size}),na(i,{dir:"right",size:t.size})):i}function tt(e,t={}){const{signed:n,size:i}=t,r=BigInt(e);let s;i?n?s=(1n<<BigInt(i)*8n-1n)-1n:s=2n**(BigInt(i)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&n?-s-1n:0;if(s&&r>s||r<o){const l=typeof e=="bigint"?"n":"";throw new _w({max:s?`${s}${l}`:void 0,min:`${o}${l}`,signed:n,size:i,value:`${e}${l}`})}const a=`0x${(n&&r<0?(1n<<BigInt(i*8))+BigInt(r):r).toString(16)}`;return i?na(a,{size:i}):a}const kC=new TextEncoder;function Mw(e,t={}){const n=kC.encode(e);return bn(n,t)}const zC=new TextEncoder;function ju(e,t={}){return typeof e=="number"||typeof e=="bigint"?UC(e,t):typeof e=="boolean"?RC(e,t):ta(e)?jc(e,t):y1(e,t)}function RC(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(Wn(n,{size:t.size}),na(n,{size:t.size})):n}const vi={zero:48,nine:57,A:65,F:70,a:97,f:102};function $y(e){if(e>=vi.zero&&e<=vi.nine)return e-vi.zero;if(e>=vi.A&&e<=vi.F)return e-(vi.A-10);if(e>=vi.a&&e<=vi.f)return e-(vi.a-10)}function jc(e,t={}){let n=e;t.size&&(Wn(n,{size:t.size}),n=na(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);const r=i.length/2,s=new Uint8Array(r);for(let o=0,a=0;o<r;o++){const l=$y(i.charCodeAt(a++)),u=$y(i.charCodeAt(a++));if(l===void 0||u===void 0)throw new we(`Invalid byte sequence ("${i[a-2]}${i[a-1]}" in "${i}").`);s[o]=l*16+u}return s}function UC(e,t){const n=tt(e,t);return jc(n)}function y1(e,t={}){const n=zC.encode(e);return typeof t.size=="number"?(Wn(n,{size:t.size}),na(n,{dir:"right",size:t.size})):n}const Kc=BigInt(2**32-1),By=BigInt(32);function $C(e,t=!1){return t?{h:Number(e&Kc),l:Number(e>>By&Kc)}:{h:Number(e>>By&Kc)|0,l:Number(e&Kc)|0}}function BC(e,t=!1){const n=e.length;let i=new Uint32Array(n),r=new Uint32Array(n);for(let s=0;s<n;s++){const{h:o,l:a}=$C(e[s],t);[i[s],r[s]]=[o,a]}return[i,r]}const VC=(e,t,n)=>e<<n|t>>>32-n,WC=(e,t,n)=>t<<n|e>>>32-n,FC=(e,t,n)=>t<<n-32|e>>>64-n,YC=(e,t,n)=>e<<n-32|t>>>64-n,eo=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function QC(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Vl(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function qa(e,...t){if(!QC(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 aJ(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Vl(e.outputLen),Vl(e.blockLen)}function Vy(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 HC(e,t){qa(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function GC(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Iw(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function cJ(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function lJ(e,t){return e<<32-t|e>>>t}function uJ(e,t){return e<<t|e>>>32-t>>>0}const ZC=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function qC(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function KC(e){for(let t=0;t<e.length;t++)e[t]=qC(e[t]);return e}const Wy=ZC?e=>e:KC;function JC(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Ew(e){return typeof e=="string"&&(e=JC(e)),qa(e),e}function dJ(...e){let t=0;for(let i=0;i<e.length;i++){const r=e[i];qa(r),t+=r.length}const n=new Uint8Array(t);for(let i=0,r=0;i<e.length;i++){const s=e[i];n.set(s,r),r+=s.length}return n}let XC=class{};function eL(e){const t=i=>e().update(Ew(i)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function fJ(e=32){if(eo&&typeof eo.getRandomValues=="function")return eo.getRandomValues(new Uint8Array(e));if(eo&&typeof eo.randomBytes=="function")return Uint8Array.from(eo.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const tL=BigInt(0),pa=BigInt(1),nL=BigInt(2),iL=BigInt(7),rL=BigInt(256),sL=BigInt(113),Cw=[],Lw=[],Tw=[];for(let e=0,t=pa,n=1,i=0;e<24;e++){[n,i]=[i,(2*n+3*i)%5],Cw.push(2*(5*i+n)),Lw.push((e+1)*(e+2)/2%64);let r=tL;for(let s=0;s<7;s++)t=(t<<pa^(t>>iL)*sL)%rL,t&nL&&(r^=pa<<(pa<<BigInt(s))-pa);Tw.push(r)}const jw=BC(Tw,!0),oL=jw[0],aL=jw[1],Fy=(e,t,n)=>n>32?FC(e,t,n):VC(e,t,n),Yy=(e,t,n)=>n>32?YC(e,t,n):WC(e,t,n);function cL(e,t=24){const n=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,u=n[l],d=n[l+1],f=Fy(u,d,1)^n[a],m=Yy(u,d,1)^n[a+1];for(let y=0;y<50;y+=10)e[o+y]^=f,e[o+y+1]^=m}let r=e[2],s=e[3];for(let o=0;o<24;o++){const a=Lw[o],l=Fy(r,s,a),u=Yy(r,s,a),d=Cw[o];r=e[d],s=e[d+1],e[d]=l,e[d+1]=u}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=oL[i],e[1]^=aL[i]}Iw(n)}let lL=class vw extends XC{constructor(t,n,i,r=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=i,this.enableXOF=r,this.rounds=s,Vl(i),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=GC(this.state)}clone(){return this._cloneInto()}keccak(){Wy(this.state32),cL(this.state32,this.rounds),Wy(this.state32),this.posOut=0,this.pos=0}update(t){Vy(this),t=Ew(t),qa(t);const{blockLen:n,state:i}=this,r=t.length;for(let s=0;s<r;){const o=Math.min(n-this.pos,r-s);for(let a=0;a<o;a++)i[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:i,blockLen:r}=this;t[i]^=n,n&128&&i===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){Vy(this,!1),qa(t),this.finish();const n=this.state,{blockLen:i}=this;for(let r=0,s=t.length;r<s;){this.posOut>=i&&this.keccak();const o=Math.min(i-this.posOut,s-r);t.set(n.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Vl(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(HC(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Iw(this.state)}_cloneInto(t){const{blockLen:n,suffix:i,outputLen:r,rounds:s,enableXOF:o}=this;return t||(t=new vw(n,i,r,o,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=i,t.outputLen=r,t.enableXOF=o,t.destroyed=this.destroyed,t}};const uL=(e,t,n)=>eL(()=>new lL(t,e,n)),dL=uL(1,136,256/8);function kn(e,t){const n=t||"hex",i=dL(ta(e,{strict:!1})?ju(e):e);return n==="bytes"?i:m1(i)}const hL=e=>kn(ju(e));function fL(e){return hL(e)}function mL(e){let t=!0,n="",i=0,r="",s=!1;for(let o=0;o<e.length;o++){const a=e[o];if(["(",")",","].includes(a)&&(t=!0),a==="("&&i++,a===")"&&i--,!!t){if(i===0){if(a===" "&&["event","function",""].includes(r))r="";else if(r+=a,a===")"){s=!0;break}continue}if(a===" "){e[o-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}r+=a,n+=a}}if(!s)throw new we("Unable to normalize signature.");return r}const yL=e=>{const t=typeof e=="string"?e:yC(e);return mL(t)};function g1(e){return fL(yL(e))}const vu=g1;let Ka=class extends we{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},Nw=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const i=this.keys().next().value;i&&this.delete(i)}return this}};const kd=new Nw(8192);function p1(e,t){if(kd.has(`${e}.${t}`))return kd.get(`${e}.${t}`);const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),i=kn(y1(n),"bytes"),r=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)i[o>>1]>>4>=8&&r[o]&&(r[o]=r[o].toUpperCase()),(i[o>>1]&15)>=8&&r[o+1]&&(r[o+1]=r[o+1].toUpperCase());const s=`0x${r.join("")}`;return kd.set(`${e}.${t}`,s),s}function gJ(e,t){if(!Hr(e,{strict:!1}))throw new Ka({address:e});return p1(e,t)}const gL=/^0x[a-fA-F0-9]{40}$/,zd=new Nw(8192);function Hr(e,t){const{strict:n=!0}=t??{},i=`${e}.${n}`;if(zd.has(i))return zd.get(i);const r=gL.test(e)?e.toLowerCase()===e?!0:n?p1(e)===e:!0:!1;return zd.set(i,r),r}function Gr(e){return typeof e[0]=="string"?wL(e):pL(e)}function pL(e){let t=0;for(const r of e)t+=r.length;const n=new Uint8Array(t);let i=0;for(const r of e)n.set(r,i),i+=r.length;return n}function wL(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Wl(e,t,n,{strict:i}={}){return ta(e,{strict:!1})?xL(e,t,n,{strict:i}):Dw(e,t,n,{strict:i})}function Sw(e,t){if(typeof t=="number"&&t>0&&t>ht(e)-1)throw new ww({offset:t,position:"start",size:ht(e)})}function Aw(e,t,n){if(typeof t=="number"&&typeof n=="number"&&ht(e)!==n-t)throw new ww({offset:n,position:"end",size:ht(e)})}function Dw(e,t,n,{strict:i}={}){Sw(e,t);const r=e.slice(t,n);return i&&Aw(r,t,n),r}function xL(e,t,n,{strict:i}={}){Sw(e,t);const r=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return i&&Aw(r,t,n),r}const pJ=/^(.*)\[([0-9]*)\]$/,_L=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ow=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function w1(e,t){if(e.length!==t.length)throw new xC({expectedLength:e.length,givenLength:t.length});const n=bL({params:e,values:t}),i=_1(n);return i.length===0?"0x":i}function bL({params:e,values:t}){const n=[];for(let i=0;i<e.length;i++)n.push(x1({param:e[i],value:t[i]}));return n}function x1({param:e,value:t}){const n=b1(e.type);if(n){const[i,r]=n;return IL(t,{length:i,param:{...e,type:r}})}if(e.type==="tuple")return jL(t,{param:e});if(e.type==="address")return ML(t);if(e.type==="bool")return CL(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const i=e.type.startsWith("int"),[,,r="256"]=Ow.exec(e.type)??[];return LL(t,{signed:i,size:Number(r)})}if(e.type.startsWith("bytes"))return EL(t,{param:e});if(e.type==="string")return TL(t);throw new EC(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function _1(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?t+=32:t+=ht(a)}const n=[],i=[];let r=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?(n.push(tt(t+r,{size:32})),i.push(a),r+=ht(a)):n.push(a)}return Gr([...n,...i])}function ML(e){if(!Hr(e))throw new Ka({address:e});return{dynamic:!1,encoded:Rr(e.toLowerCase())}}function IL(e,{length:t,param:n}){const i=t===null;if(!Array.isArray(e))throw new LC(e);if(!i&&e.length!==t)throw new pC({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let r=!1;const s=[];for(let o=0;o<e.length;o++){const a=x1({param:n,value:e[o]});a.dynamic&&(r=!0),s.push(a)}if(i||r){const o=_1(s);if(i){const a=tt(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?Gr([a,o]):a}}if(r)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:Gr(s.map(({encoded:o})=>o))}}function EL(e,{param:t}){const[,n]=t.type.split("bytes"),i=ht(e);if(!n){let r=e;return i%32!==0&&(r=Rr(r,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Gr([Rr(tt(i,{size:32})),r])}}if(i!==Number.parseInt(n,10))throw new wC({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Rr(e,{dir:"right"})}}function CL(e){if(typeof e!="boolean")throw new we(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Rr(bw(e))}}function LL(e,{signed:t,size:n=256}){if(typeof n=="number"){const i=2n**(BigInt(n)-(t?1n:0n))-1n,r=t?-i-1n:0n;if(e>i||e<r)throw new _w({max:i.toString(),min:r.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:tt(e,{size:32,signed:t})}}function TL(e){const t=Mw(e),n=Math.ceil(ht(t)/32),i=[];for(let r=0;r<n;r++)i.push(Rr(Wl(t,r*32,(r+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Gr([Rr(tt(ht(t),{size:32})),...i])}}function jL(e,{param:t}){let n=!1;const i=[];for(let r=0;r<t.components.length;r++){const s=t.components[r],o=Array.isArray(e)?r:s.name,a=x1({param:s,value:e[o]});i.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?_1(i):Gr(i.map(({encoded:r})=>r))}}function b1(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Nu=e=>Wl(g1(e),0,4);function vL(e){const{abi:t,args:n=[],name:i}=e,r=ta(i,{strict:!1}),s=t.filter(a=>r?a.type==="function"?Nu(a)===i:a.type==="event"?vu(a)===i:!1:"name"in a&&a.name===i);if(s.length===0)return;if(s.length===1)return s[0];let o;for(const a of s){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((u,d)=>{const f="inputs"in a&&a.inputs[d];return f?tf(u,f):!1})){if(o&&"inputs"in o&&o.inputs){const u=Pw(a.inputs,o.inputs,n);if(u)throw new MC({abiItem:a,type:u[0]},{abiItem:o,type:u[1]})}o=a}}return o||s[0]}function tf(e,t){const n=typeof e,i=t.type;switch(i){case"address":return Hr(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return i==="tuple"&&"components"in t?Object.values(t.components).every((r,s)=>tf(Object.values(e)[s],r)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i)?Array.isArray(e)&&e.every(r=>tf(r,{...t,type:i.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Pw(e,t,n){for(const i in e){const r=e[i],s=t[i];if(r.type==="tuple"&&s.type==="tuple"&&"components"in r&&"components"in s)return Pw(r.components,s.components,n[i]);const o=[r.type,s.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?Hr(n[i],{strict:!1}):o.includes("address")&&o.includes("bytes")?Hr(n[i],{strict:!1}):!1)return o}}const Qy="/docs/contract/encodeEventTopics";function NL(e){var l;const{abi:t,eventName:n,args:i}=e;let r=t[0];if(n){const u=vL({abi:t,name:n});if(!u)throw new Uy(n,{docsPath:Qy});r=u}if(r.type!=="event")throw new Uy(void 0,{docsPath:Qy});const s=Bo(r),o=vu(s);let a=[];if(i&&"inputs"in r){const u=(l=r.inputs)==null?void 0:l.filter(f=>"indexed"in f&&f.indexed),d=Array.isArray(i)?i:Object.values(i).length>0?(u==null?void 0:u.map(f=>i[f.name]))??[]:[];d.length>0&&(a=(u==null?void 0:u.map((f,m)=>Array.isArray(d[m])?d[m].map((y,p)=>Hy({param:f,value:d[m][p]})):typeof d[m]<"u"&&d[m]!==null?Hy({param:f,value:d[m]}):null))??[])}return[o,...a]}function Hy({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return kn(ju(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new jC(e.type);return w1([e],[t])}const wJ={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},SL={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},AL={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};let Gy=class extends we{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},kw=class extends we{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},DL=class extends we{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const OL={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new DL({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new kw({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Gy({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Gy({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function PL(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(OL);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function MJ(e,t){const n=typeof t=="string"?{to:t}:t,i=n.to;return i==="number"?bi(e,n):i==="bigint"?zw(e,n):i==="boolean"?Rw(e,n):i==="string"?Uw(e,n):bn(e,n)}function zw(e,t={}){typeof t.size<"u"&&Wn(e,{size:t.size});const n=bn(e,t);return f1(n,t)}function Rw(e,t={}){let n=e;if(typeof t.size<"u"&&(Wn(n,{size:t.size}),n=Ns(n)),n.length>1||n[0]>1)throw new NC(n);return!!n[0]}function bi(e,t={}){typeof t.size<"u"&&Wn(e,{size:t.size});const n=bn(e,t);return Za(n,t)}function Uw(e,t={}){let n=e;return typeof t.size<"u"&&(Wn(n,{size:t.size}),n=Ns(n,{dir:"right"})),new TextDecoder().decode(n)}function vc(e,t){const n=typeof t=="string"?jc(t):t,i=PL(n);if(ht(n)===0&&e.length>0)throw new yw;if(ht(t)&&ht(t)<32)throw new mw({data:typeof t=="string"?t:bn(t),params:e,size:ht(t)});let r=0;const s=[];for(let o=0;o<e.length;++o){const a=e[o];i.setPosition(r);const[l,u]=wo(i,a,{staticPosition:0});r+=u,s.push(l)}return s}function wo(e,t,{staticPosition:n}){const i=b1(t.type);if(i){const[r,s]=i;return zL(e,{...t,type:s},{length:r,staticPosition:n})}if(t.type==="tuple")return BL(e,t,{staticPosition:n});if(t.type==="address")return kL(e);if(t.type==="bool")return RL(e);if(t.type.startsWith("bytes"))return UL(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return $L(e,t);if(t.type==="string")return VL(e,{staticPosition:n});throw new CC(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const Zy=32,nf=32;function kL(e){const t=e.readBytes(32);return[p1(bn(Dw(t,-20))),32]}function zL(e,t,{length:n,staticPosition:i}){if(!n){const o=bi(e.readBytes(nf)),a=i+o,l=a+Zy;e.setPosition(a);const u=bi(e.readBytes(Zy)),d=Ja(t);let f=0;const m=[];for(let y=0;y<u;++y){e.setPosition(l+(d?y*32:f));const[p,g]=wo(e,t,{staticPosition:l});f+=g,m.push(p)}return e.setPosition(i+32),[m,32]}if(Ja(t)){const o=bi(e.readBytes(nf)),a=i+o,l=[];for(let u=0;u<n;++u){e.setPosition(a+u*32);const[d]=wo(e,t,{staticPosition:a});l.push(d)}return e.setPosition(i+32),[l,32]}let r=0;const s=[];for(let o=0;o<n;++o){const[a,l]=wo(e,t,{staticPosition:i+r});r+=l,s.push(a)}return[s,r]}function RL(e){return[Rw(e.readBytes(32),{size:32}),32]}function UL(e,t,{staticPosition:n}){const[i,r]=t.type.split("bytes");if(!r){const o=bi(e.readBytes(32));e.setPosition(n+o);const a=bi(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const l=e.readBytes(a);return e.setPosition(n+32),[bn(l),32]}return[bn(e.readBytes(Number.parseInt(r,10),32)),32]}function $L(e,t){const n=t.type.startsWith("int"),i=Number.parseInt(t.type.split("int")[1]||"256",10),r=e.readBytes(32);return[i>48?zw(r,{signed:n}):bi(r,{signed:n}),32]}function BL(e,t,{staticPosition:n}){const i=t.components.length===0||t.components.some(({name:o})=>!o),r=i?[]:{};let s=0;if(Ja(t)){const o=bi(e.readBytes(nf)),a=n+o;for(let l=0;l<t.components.length;++l){const u=t.components[l];e.setPosition(a+s);const[d,f]=wo(e,u,{staticPosition:a});s+=f,r[i?l:u==null?void 0:u.name]=d}return e.setPosition(n+32),[r,32]}for(let o=0;o<t.components.length;++o){const a=t.components[o],[l,u]=wo(e,a,{staticPosition:n});r[i?o:a==null?void 0:a.name]=l,s+=u}return[r,s]}function VL(e,{staticPosition:t}){const n=bi(e.readBytes(32)),i=t+n;e.setPosition(i);const r=bi(e.readBytes(32));if(r===0)return e.setPosition(t+32),["",32];const s=e.readBytes(r,32),o=Uw(Ns(s));return e.setPosition(t+32),[o,32]}function Ja(e){var i;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(i=e.components)==null?void 0:i.some(Ja);const n=b1(e.type);return!!(n&&Ja({...e,type:n[1]}))}function $w(e){const{abi:t,data:n}=e,i=Wl(n,0,4);if(i==="0x")throw new yw;const s=[...t||[],SL,AL].find(o=>o.type==="error"&&i===Nu(Bo(o)));if(!s)throw new _C(i,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?vc(s.inputs,Wl(n,4)):void 0,errorName:s.name}}const Su=(e,t,n)=>JSON.stringify(e,(i,r)=>{const s=typeof r=="bigint"?r.toString():r;return typeof t=="function"?t(i,s):s},n);function Au(e,t){return({exclude:n,format:i})=>({exclude:n,format:(r,s)=>{const o=t(r,s);if(n)for(const a of n)delete o[a];return{...o,...i(r,s)}},type:e})}const WL={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Bw(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=FL(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(i=>bn(i)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=tt(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=tt(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=tt(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=tt(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=tt(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=tt(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=WL[e.type]),typeof e.value<"u"&&(n.value=tt(e.value)),n}const IJ=Au("transactionRequest",Bw);function FL(e){return e.map(t=>({address:t.address,r:t.r?tt(BigInt(t.r)):t.r,s:t.s?tt(BigInt(t.s)):t.s,chainId:tt(t.chainId),nonce:tt(t.nonce),...typeof t.yParity<"u"?{yParity:tt(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:tt(t.v)}:{}}))}const Vw={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Ww(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?Za(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?Za(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Vw[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=YL(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const EJ=Au("transaction",Ww);function YL(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Fw(e,t){const n=(e.transactions??[]).map(i=>typeof i=="string"?i:Ww(i));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const CJ=Au("block",Fw);function QL(e,t){if(!Hr(e,{strict:!1}))throw new Ka({address:e});if(!Hr(t,{strict:!1}))throw new Ka({address:t});return e.toLowerCase()===t.toLowerCase()}const qy="/docs/contract/decodeEventLog";function HL(e){const{abi:t,data:n,strict:i,topics:r}=e,s=i??!0,[o,...a]=r;if(!o)throw new bC({docsPath:qy});const l=t.find(g=>g.type==="event"&&o===vu(Bo(g)));if(!(l&&"name"in l)||l.type!=="event")throw new gw(o,{docsPath:qy});const{name:u,inputs:d}=l,f=d==null?void 0:d.some(g=>!("name"in g&&g.name)),m=f?[]:{},y=d.map((g,x)=>[g,x]).filter(([g])=>"indexed"in g&&g.indexed);for(let g=0;g<y.length;g++){const[x,_]=y[g],b=a[g];if(!b)throw new pw({abiItem:l,param:x});m[f?_:x.name||_]=GL({param:x,value:b})}const p=d.filter(g=>!("indexed"in g&&g.indexed));if(p.length>0){if(n&&n!=="0x")try{const g=vc(p,n);if(g)if(f)for(let x=0;x<d.length;x++)m[x]=m[x]??g.shift();else for(let x=0;x<p.length;x++)m[p[x].name]=g[x]}catch(g){if(s)throw g instanceof mw||g instanceof kw?new ef({abiItem:l,data:n,params:p,size:ht(n)}):g}else if(s)throw new ef({abiItem:l,data:"0x",params:p,size:0})}return{eventName:u,args:Object.values(m).length>0?m:void 0}}function GL({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(vc([e],t)||[])[0]}function ZL(e){const{abi:t,args:n,logs:i,strict:r=!0}=e,s=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return i.map(o=>{var a;try{const l=t.find(d=>d.type==="event"&&o.topics[0]===vu(d));if(!l)return null;const u=HL({...o,abi:[l],strict:r});return s&&!s.includes(u.eventName)||!qL({args:u.args,inputs:l.inputs,matchArgs:n})?null:{...u,...o}}catch(l){let u,d;if(l instanceof gw)return null;if(l instanceof ef||l instanceof pw){if(r)return null;u=l.abiItem.name,d=(a=l.abiItem.inputs)==null?void 0:a.some(f=>!("name"in f&&f.name))}return{...o,args:d?[]:{},eventName:u}}}).filter(Boolean)}function qL(e){const{args:t,inputs:n,matchArgs:i}=e;if(!i)return!0;if(!t)return!1;function r(s,o,a){try{return s.type==="address"?QL(o,a):s.type==="string"||s.type==="bytes"?kn(ju(o))===a:o===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(i)?i.every((s,o)=>{if(s==null)return!0;const a=n[o];return a?(Array.isArray(s)?s:[s]).some(u=>r(a,u,t[o])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof i=="object"&&!Array.isArray(i)?Object.entries(i).every(([s,o])=>{if(o==null)return!0;const a=n.find(u=>u.name===s);return a?(Array.isArray(o)?o:[o]).some(u=>r(a,u,t[s])):!1}):!1}function KL(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const JL={"0x0":"reverted","0x1":"success"};function Yw(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(i=>KL(i)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Za(e.transactionIndex):null,status:e.status?JL[e.status]:null,type:e.type?Vw[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const LJ=Au("transactionReceipt",Yw);function XL(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return ta(t)?t:null}function e9(e){const t=new Uint8Array(32).fill(0);return e?XL(e)||kn(y1(e)):bn(t)}function t9(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}function n9(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:i}){return new Promise((r,s)=>{(async()=>{let o;try{const a=new AbortController;n>0&&(o=setTimeout(()=>{i?a.abort():s(t)},n)),r(await e({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&s(t),s(a)}finally{clearTimeout(o)}})()})}let i9=class extends we{constructor({domain:t}){super(`Invalid domain "${Su(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}},r9=class extends we{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}},s9=class extends we{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}};function o9(e){const{domain:t,message:n,primaryType:i,types:r}=e,s=(l,u)=>{const d={...u};for(const f of l){const{name:m,type:y}=f;y==="address"&&(d[m]=d[m].toLowerCase())}return d},o=r.EIP712Domain?t?s(r.EIP712Domain,t):{}:{},a=(()=>{if(i!=="EIP712Domain")return s(r[i],n)})();return Su({domain:o,message:a,primaryType:i,types:r})}function Qw(e){const{domain:t,message:n,primaryType:i,types:r}=e,s=(o,a)=>{for(const l of o){const{name:u,type:d}=l,f=a[u],m=d.match(Ow);if(m&&(typeof f=="number"||typeof f=="bigint")){const[g,x,_]=m;tt(f,{signed:x==="int",size:Number.parseInt(_,10)/8})}if(d==="address"&&typeof f=="string"&&!Hr(f))throw new Ka({address:f});const y=d.match(_L);if(y){const[g,x]=y;if(x&&ht(f)!==Number.parseInt(x,10))throw new IC({expectedSize:Number.parseInt(x,10),givenSize:ht(f)})}const p=r[d];p&&(a9(d),s(p,f))}};if(r.EIP712Domain&&t){if(typeof t!="object")throw new i9({domain:t});s(r.EIP712Domain,t)}if(i!=="EIP712Domain")if(r[i])s(r[i],n);else throw new r9({primaryType:i,types:r})}function M1({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function NJ({domain:e}){return Hw({domain:e,types:{EIP712Domain:M1({domain:e})}})}function a9(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new s9({type:e})}function SJ(e){const{domain:t={},message:n,primaryType:i}=e,r={EIP712Domain:M1({domain:t}),...e.types};Qw({domain:t,message:n,primaryType:i,types:r});const s=["0x1901"];return t&&s.push(Hw({domain:t,types:r})),i!=="EIP712Domain"&&s.push(Gw({data:n,primaryType:i,types:r})),kn(Gr(s))}function Hw({domain:e,types:t}){return Gw({data:e,primaryType:"EIP712Domain",types:t})}function Gw({data:e,primaryType:t,types:n}){const i=Zw({data:e,primaryType:t,types:n});return kn(i)}function Zw({data:e,primaryType:t,types:n}){const i=[{type:"bytes32"}],r=[c9({primaryType:t,types:n})];for(const s of n[t]){const[o,a]=Kw({types:n,name:s.name,type:s.type,value:e[s.name]});i.push(o),r.push(a)}return w1(i,r)}function c9({primaryType:e,types:t}){const n=m1(l9({primaryType:e,types:t}));return kn(n)}function l9({primaryType:e,types:t}){let n="";const i=qw({primaryType:e,types:t});i.delete(e);const r=[e,...Array.from(i).sort()];for(const s of r)n+=`${s}(${t[s].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return n}function qw({primaryType:e,types:t},n=new Set){const i=e.match(/^\w*/u),r=i==null?void 0:i[0];if(n.has(r)||t[r]===void 0)return n;n.add(r);for(const s of t[r])qw({primaryType:s.type,types:t},n);return n}function Kw({types:e,name:t,type:n,value:i}){if(e[n]!==void 0)return[{type:"bytes32"},kn(Zw({data:i,primaryType:n,types:e}))];if(n==="bytes")return i=`0x${(i.length%2?"0":"")+i.slice(2)}`,[{type:"bytes32"},kn(i)];if(n==="string")return[{type:"bytes32"},kn(m1(i))];if(n.lastIndexOf("]")===n.length-1){const r=n.slice(0,n.lastIndexOf("[")),s=i.map(o=>Kw({name:t,type:r,types:e,value:o}));return[{type:"bytes32"},kn(w1(s.map(([o])=>o),s.map(([,o])=>o)))]}return[{type:n},i]}const Rd=new WeakMap;async function Du(e){if(Rd.has(e))return Rd.get(e);const t=(async()=>{const[n,i,{concatHex:r}]=await Promise.all([Jw(e),Xw(e),h(()=>import("./concat-hex-lIlH2McC.js"),__vite__mapDeps([0,1,2,3,4,5]))]);return i?r([n,i]):n})();return Rd.set(e,t),t}async function Jw(e){if(e.data===void 0)return"0x";if(typeof e.data=="function"){const t=await e.data();return t||"0x"}return e.data}async function Xw(e){if(e.extraCallData){if(typeof e.extraCallData=="function"){const t=await e.extraCallData();if(!t)return;if(!t.startsWith("0x"))throw Error("Invalid extra calldata - must be a hex string");return t==="0x"?void 0:t}if(!e.extraCallData.startsWith("0x"))throw Error("Invalid extra calldata - must be a hex string");return e.extraCallData}}const u9=Object.freeze(Object.defineProperty({__proto__:null,encode:Du,getDataFromTx:Jw,getExtraCallDataFromTx:Xw},Symbol.toStringTag,{value:"Module"}));async function d9(e,t){const n=t.blockTag??"latest",i=t.includeTransactions??!1,r=t.blockNumber!==void 0?Ue(t.blockNumber):void 0,s=await e({method:"eth_getBlockByNumber",params:[r||n,i]});if(!s)throw new Error("Block not found");return Fw(s)}async function h9(e){const t=await e({method:"eth_maxPriorityFeePerGas"});return on(t)}async function f9(e,t,n){var r,s,o,a,l,u,d,f,m;const i=await He(t)(e,{body:Me(n.requests),headers:{...(o=(s=(r=t.config)==null?void 0:r.rpc)==null?void 0:s.fetch)==null?void 0:o.headers,"Content-Type":"application/json"},keepalive:(u=(l=(a=t.config)==null?void 0:a.rpc)==null?void 0:l.fetch)==null?void 0:u.keepalive,method:"POST",requestTimeoutMs:n.requestTimeoutMs??((m=(f=(d=t.config)==null?void 0:d.rpc)==null?void 0:f.fetch)==null?void 0:m.requestTimeoutMs)});if(!i.ok){const y=await i.text().catch(()=>null);throw new Error(`RPC request failed with status ${i.status} - ${i.statusText}: ${y||"unknown error"}`)}return await i.json()}async function m9(e,t,n){var r,s,o,a,l,u,d,f,m;const i=await He(t)(e,{body:Me(n.request),headers:{...((o=(s=(r=t.config)==null?void 0:r.rpc)==null?void 0:s.fetch)==null?void 0:o.headers)||{},"Content-Type":"application/json"},keepalive:(u=(l=(a=t.config)==null?void 0:a.rpc)==null?void 0:l.fetch)==null?void 0:u.keepalive,method:"POST",requestTimeoutMs:n.requestTimeoutMs??((m=(f=(d=t.config)==null?void 0:d.rpc)==null?void 0:f.fetch)==null?void 0:m.requestTimeoutMs)});if(!i.ok){const y=await i.text().catch(()=>null);throw new Error(`RPC request failed with status ${i.status} - ${i.statusText}: ${y||"unknown error"}`)}return await i.json()}const Ud=new WeakMap;function y9(e){if(Ud.has(e))return Ud.get(e);const t=new Map;return Ud.set(e,t),t}function g9(e){return`${e.method}:${Me(e.params)}`}const p9=100,w9=0;function ii(e){const t=y9(e.client),n=e.chain.rpc;if(t.has(n))return t.get(n);const i=(()=>{var f,m,y,p,g,x;const r=V4({chain:e.chain,client:e.client}),s=((f=e.config)==null?void 0:f.maxBatchSize)??((y=(m=e.client.config)==null?void 0:m.rpc)==null?void 0:y.maxBatchSize)??p9,o=((p=e.config)==null?void 0:p.batchTimeoutMs)??((x=(g=e.client.config)==null?void 0:g.rpc)==null?void 0:x.batchTimeoutMs)??w9,a=new Map;let l=[],u=null;function d(){var I;u&&(clearTimeout(u),u=null);const _=new Array(l.length),b=l.slice().map((E,C)=>(E.request.id=C,E.request.jsonrpc="2.0",_[C]=E.request,E));l=[],f9(r,e.client,{requests:_,requestTimeoutMs:(I=e.config)==null?void 0:I.requestTimeoutMs}).then(E=>{b.forEach((C,T)=>{const j=E[T];j?j instanceof Error?C.reject(j):"error"in j?C.reject(j.error):typeof j=="string"?C.reject(new Error(j)):j.method==="eth_subscription"?C.reject("Subscriptions not supported yet"):C.resolve(j.result):C.reject(new Error(`RPC Error from ${r}:
25
+ requests: ${Me(_)}
26
+ responses: ${Me(E)}`))})}).catch(E=>{for(const C of b)C.reject(E)}).finally(()=>{a.clear()})}return s===1?async _=>{var I;_.id=1,_.jsonrpc="2.0";const b=await m9(r,e.client,{request:_,requestTimeoutMs:(I=e.config)==null?void 0:I.requestTimeoutMs});if(!b)throw new Error("No response");if("error"in b)throw b.error;return b.result}:async _=>{const b=g9(_);if(a.has(b))return a.get(b);let I,E;const C=new Promise((T,j)=>{I=T,E=j});return a.set(b,C),l.push({reject:E,request:_,requestKey:b,resolve:I}),s>1?(u||(u=setTimeout(d,o)),l.length>=s&&d()):d(),C}})();return t.set(n,i),i}const x9=Object.freeze(Object.defineProperty({__proto__:null,getRpcClient:ii},Symbol.toStringTag,{value:"Module"}));async function nt(e){return typeof e=="function"?await e():e}function Un(e,t){const n=e.toString(),i=n[0]==="-"?"-":"",s=(i?n.slice(1):n).padStart(t+1,"0"),o=s.length-t,a=s.slice(0,o)||"0";let l=s.slice(o);for(let u=l.length-1;u>=0;u--){if(l[u]!=="0"){l=l.slice(0,u+1);break}u===0&&(l="")}return`${i}${a}${l?`.${l}`:""}`}function e5(e){return Un(e,18)}function Jn(e,t){e.includes("e")&&(e=Number(e).toFixed(t));let[n,i=""]=e.split(".");const r=n.startsWith("-")?"-":"";if(r&&(n=n.slice(1)),i=i.padEnd(t,"0"),t===0)i[0]&&Number.parseInt(i[0])>=5&&(n=(BigInt(n)+1n).toString()),i="";else if(i.length>t){const s=i[t];s&&Number.parseInt(s,10)>=5?(i=(BigInt(i.substring(0,t))+1n).toString().padStart(t,"0"),i.length>t&&(n=(BigInt(n)+1n).toString(),i=i.substring(i.length-t))):i=i.substring(0,t)}return BigInt(`${r}${n}${i}`)}function rf(e){return Jn(e,18)}const _9=Object.freeze(Object.defineProperty({__proto__:null,toEther:e5,toTokens:Un,toUnits:Jn,toWei:rf},Symbol.toStringTag,{value:"Module"}));async function b9(e){const t=await e({method:"eth_gasPrice"});return on(t)}async function sf(e){const{client:t,chain:n,percentMultiplier:i}=e,r=ii({chain:n,client:t}),s=await b9(r),o=i?s/BigInt(100)*BigInt(i):0n;return s+o}function Ua(e){if(e===0n||(e&e-1n)===0n)return e;let t=1n;for(;e>0n;)e>>=1n,t<<=1n;return t}const M9=[78600,2040,248,9372,841,842,2016,9768,2442,1942999413,1952959480,994873017,19011,40875,1511670449,5464,2020,2021,98866,1417429182];async function t5(e){var o;const[t,n,i,r]=await Promise.all([nt(e.maxFeePerGas),nt(e.maxPriorityFeePerGas),nt(e.gasPrice),nt(e.type)]);if(t!==void 0&&n!==void 0)return{maxFeePerGas:t,maxPriorityFeePerGas:n};if(typeof i=="bigint")return{gasPrice:i};const s=await I1(e.client,e.chain,r==="legacy"?"legacy":"eip1559");return(o=e.chain.experimental)!=null&&o.increaseZeroByteCount?s.gasPrice?{gasPrice:Ua(s.gasPrice)}:{maxFeePerGas:t??Ua(s.maxFeePerGas??0n),maxPriorityFeePerGas:n??Ua(s.maxPriorityFeePerGas??0n)}:s.gasPrice!==void 0?s:{maxFeePerGas:t??s.maxFeePerGas,maxPriorityFeePerGas:n??s.maxPriorityFeePerGas}}async function I1(e,t,n){if((n??t.feeType)==="legacy"||M9.includes(t.id))return{gasPrice:await sf({chain:t,client:e,percentMultiplier:10})};const r=await I9(e,t);return r.maxFeePerGas!==null&&r.maxPriorityFeePerGas!==null?{maxFeePerGas:r.maxFeePerGas,maxPriorityFeePerGas:r.maxPriorityFeePerGas}:{gasPrice:await sf({chain:t,client:e,percentMultiplier:10})}}async function I9(e,t,n=10){let i=null,r=null;const s=ii({chain:t,client:e}),[o,a]=await Promise.all([d9(s,{blockTag:"latest"}),h9(s).catch(()=>null)]),l=o==null?void 0:o.baseFeePerGas,u=t.id;return u===220||u===1220?{maxFeePerGas:null,maxPriorityFeePerGas:null}:(u===80002||u===137?r=await T9(u):a!==null&&(r=a),r==null||l==null?{maxFeePerGas:null,maxPriorityFeePerGas:null}:(r=E9(r,n),i=l*2n+r,(u===42220||u===44787||u===62320)&&(r=i),{maxFeePerGas:i,maxPriorityFeePerGas:r}))}function E9(e,t=10){const n=e/BigInt(100)*BigInt(t);return e+n}function C9(e){switch(e){case 137:return"https://gasstation.polygon.technology/v2";case 80002:return"https://gasstation.polygon.technology/amoy"}}const L9=31n;async function T9(e){const t=C9(e);try{const i=(await(await fetch(t)).json()).fast.maxPriorityFee;if(i>0){const r=Number.parseFloat(i).toFixed(9);return Jn(r,9)}}catch(n){console.error("failed to fetch gas",n)}return L9}const AJ=Object.freeze(Object.defineProperty({__proto__:null,getDefaultGasOverrides:I1,getGasOverridesForTransaction:t5},Symbol.toStringTag,{value:"Module"}));async function n5(e){if(e.id===1337||e.id===31337)return!1;if(e.id===324||e.id===300||e.id===302||e.id===11124||e.id===282||e.id===388||e.id===4654||e.id===333271||e.id===37111||e.id===978658||e.id===531050104||e.id===4457845||e.id===2741||e.id===240||e.id===555271||e.id===61166||e.id===555272)return!0;try{const{getChainMetadata:t}=await h(async()=>{const{getChainMetadata:i}=await Promise.resolve().then(()=>t1);return{getChainMetadata:i}},void 0);return(await t(e)).stackType==="zksync_stack"}catch{return!1}}function i5(e){var i;if(!e)return!1;const n=(typeof e=="string"?e:(e==null?void 0:e.message)||((i=e==null?void 0:e.data)==null?void 0:i.message)||"").toLowerCase();return n.includes("insufficient funds")||n.includes("insufficient balance")||n.includes("insufficient")&&(n.includes("native")||n.includes("gas"))||(e==null?void 0:e.code)==="INSUFFICIENT_FUNDS"||(e==null?void 0:e.reason)==="insufficient funds"}function j9(e){var i;if(!e)return{message:"Unknown error"};const t=typeof e=="string"?e:(e==null?void 0:e.message)||((i=e==null?void 0:e.data)==null?void 0:i.message)||String(e);return{code:(e==null?void 0:e.code)||(e==null?void 0:e.reason),message:t}}async function Ou({client:e,ecosystem:t,data:n}){const i=He(e,t),r={source:"sdk",...n};return i(`${it("analytics")}/event`,{body:Me(r),method:"POST"}).catch(()=>{})}async function E1(e){return v9({...e,action:"transaction:sent"})}function v9(e){return Ou({client:e.client,data:{action:e.action,chainId:e.chainId,clientId:e.client.clientId,contractAddress:e.contractAddress,errorCode:Me(e.error),functionName:e.functionName,gasPrice:e.gasPrice,transactionHash:e.transactionHash,walletAddress:e.walletAddress,walletType:e.walletType},ecosystem:e.ecosystem})}async function r5(e){var n,i,r;const t=j9(e.error);return Ou({client:e.client,data:{action:"transaction:insufficient_funds",chainId:e.chainId,clientId:e.client.clientId,contractAddress:e.contractAddress,errorCode:t.code?Me(t.code):void 0,errorMessage:t.message,functionName:e.functionName,requiredAmount:(n=e.requiredAmount)==null?void 0:n.toString(),transactionValue:(i=e.transactionValue)==null?void 0:i.toString(),userBalance:(r=e.userBalance)==null?void 0:r.toString(),walletAddress:e.walletAddress},ecosystem:e.ecosystem})}const N9="1.0.8";let Mn=class of extends Error{constructor(t,n={}){var o;const i=n.cause instanceof of?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,r=n.cause instanceof of&&n.cause.docsPath||n.docsPath,s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...r?[`Docs: https://abitype.dev${r}`]:[],...i?[`Details: ${i}`]:[],`Version: abitype@${N9}`].join(`
27
+ `);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=i,this.docsPath=r,this.metaMessages=n.metaMessages,this.shortMessage=t}};function Ki(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const s5=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,o5=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,a5=/^\(.+?\).*?$/,Ky=/^tuple(?<array>(\[(\d*)\])*)$/;function af(e){let t=e.type;if(Ky.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let r=0;r<n;r++){const s=e.components[r];t+=af(s),r<n-1&&(t+=", ")}const i=Ki(Ky,e.type);return t+=`)${(i==null?void 0:i.array)??""}`,af({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function wa(e){let t="";const n=e.length;for(let i=0;i<n;i++){const r=e[i];t+=af(r),i!==n-1&&(t+=", ")}return t}function S9(e){var t;return e.type==="function"?`function ${e.name}(${wa(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${wa(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${wa(e.inputs)})`:e.type==="error"?`error ${e.name}(${wa(e.inputs)})`:e.type==="constructor"?`constructor(${wa(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function A9(e){const t=[],n=e.length;for(let i=0;i<n;i++){const r=e[i],s=S9(r);t.push(s)}return t}const c5=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function D9(e){return c5.test(e)}function O9(e){return Ki(c5,e)}const l5=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function P9(e){return l5.test(e)}function k9(e){return Ki(l5,e)}const u5=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function z9(e){return u5.test(e)}function R9(e){return Ki(u5,e)}const d5=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function C1(e){return d5.test(e)}function U9(e){return Ki(d5,e)}const h5=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function $9(e){return h5.test(e)}function B9(e){return Ki(h5,e)}const f5=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function V9(e){return f5.test(e)}function W9(e){return Ki(f5,e)}const F9=/^receive\(\) external payable$/;function Y9(e){return F9.test(e)}const Q9=new Set(["indexed"]),cf=new Set(["calldata","memory","storage"]);class H9 extends Mn{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class G9 extends Mn{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class Z9 extends Mn{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class q9 extends Mn{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class K9 extends Mn{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class J9 extends Mn{constructor({param:t,type:n,modifier:i}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${i}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class X9 extends Mn{constructor({param:t,type:n,modifier:i}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${i}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${i}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class e7 extends Mn{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class ia extends Mn{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class t7 extends Mn{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class n7 extends Mn{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class i7 extends Mn{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class r7 extends Mn{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function s7(e,t,n){let i="";if(n)for(const r of Object.entries(n)){if(!r)continue;let s="";for(const o of r[1])s+=`[${o.type}${o.name?`:${o.name}`:""}]`;i+=`(${r[0]}{${s}})`}return t?`${t}:${e}${i}`:e}const $d=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function lf(e,t={}){if(z9(e))return o7(e,t);if(P9(e))return a7(e,t);if(D9(e))return c7(e,t);if($9(e))return l7(e,t);if(V9(e))return u7(e);if(Y9(e))return{type:"receive",stateMutability:"payable"};throw new t7({signature:e})}function o7(e,t={}){const n=R9(e);if(!n)throw new ia({signature:e,type:"function"});const i=Kn(n.parameters),r=[],s=i.length;for(let a=0;a<s;a++)r.push(Ps(i[a],{modifiers:cf,structs:t,type:"function"}));const o=[];if(n.returns){const a=Kn(n.returns),l=a.length;for(let u=0;u<l;u++)o.push(Ps(a[u],{modifiers:cf,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:r,outputs:o}}function a7(e,t={}){const n=k9(e);if(!n)throw new ia({signature:e,type:"event"});const i=Kn(n.parameters),r=[],s=i.length;for(let o=0;o<s;o++)r.push(Ps(i[o],{modifiers:Q9,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:r}}function c7(e,t={}){const n=O9(e);if(!n)throw new ia({signature:e,type:"error"});const i=Kn(n.parameters),r=[],s=i.length;for(let o=0;o<s;o++)r.push(Ps(i[o],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:r}}function l7(e,t={}){const n=B9(e);if(!n)throw new ia({signature:e,type:"constructor"});const i=Kn(n.parameters),r=[],s=i.length;for(let o=0;o<s;o++)r.push(Ps(i[o],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:r}}function u7(e){const t=W9(e);if(!t)throw new ia({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const d7=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h7=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,f7=/^u?int$/;function Ps(e,t){var f,m;const n=s7(e,t==null?void 0:t.type,t==null?void 0:t.structs);if($d.has(n))return $d.get(n);const i=a5.test(e),r=Ki(i?h7:d7,e);if(!r)throw new q9({param:e});if(r.name&&y7(r.name))throw new K9({param:e,name:r.name});const s=r.name?{name:r.name}:{},o=r.modifier==="indexed"?{indexed:!0}:{},a=(t==null?void 0:t.structs)??{};let l,u={};if(i){l="tuple";const y=Kn(r.type),p=[],g=y.length;for(let x=0;x<g;x++)p.push(Ps(y[x],{structs:a}));u={components:p}}else if(r.type in a)l="tuple",u={components:a[r.type]};else if(f7.test(r.type))l=`${r.type}256`;else if(l=r.type,(t==null?void 0:t.type)!=="struct"&&!m5(l))throw new Z9({type:l});if(r.modifier){if(!((m=(f=t==null?void 0:t.modifiers)==null?void 0:f.has)!=null&&m.call(f,r.modifier)))throw new J9({param:e,type:t==null?void 0:t.type,modifier:r.modifier});if(cf.has(r.modifier)&&!g7(l,!!r.array))throw new X9({param:e,type:t==null?void 0:t.type,modifier:r.modifier})}const d={type:`${l}${r.array??""}`,...s,...o,...u};return $d.set(n,d),d}function Kn(e,t=[],n="",i=0){const r=e.trim().length;for(let s=0;s<r;s++){const o=e[s],a=e.slice(s+1);switch(o){case",":return i===0?Kn(a,[...t,n.trim()]):Kn(a,t,`${n}${o}`,i);case"(":return Kn(a,t,`${n}${o}`,i+1);case")":return Kn(a,t,`${n}${o}`,i-1);default:return Kn(a,t,`${n}${o}`,i)}}if(n==="")return t;if(i!==0)throw new r7({current:n,depth:i});return t.push(n.trim()),t}function m5(e){return e==="address"||e==="bool"||e==="function"||e==="string"||s5.test(e)||o5.test(e)}const m7=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function y7(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||s5.test(e)||o5.test(e)||m7.test(e)}function g7(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function y5(e){const t={},n=e.length;for(let o=0;o<n;o++){const a=e[o];if(!C1(a))continue;const l=U9(a);if(!l)throw new ia({signature:a,type:"struct"});const u=l.properties.split(";"),d=[],f=u.length;for(let m=0;m<f;m++){const p=u[m].trim();if(!p)continue;const g=Ps(p,{type:"struct"});d.push(g)}if(!d.length)throw new n7({signature:a});t[l.name]=d}const i={},r=Object.entries(t),s=r.length;for(let o=0;o<s;o++){const[a,l]=r[o];i[a]=g5(l,t)}return i}const p7=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function g5(e,t,n=new Set){const i=[],r=e.length;for(let s=0;s<r;s++){const o=e[s];if(a5.test(o.type))i.push(o);else{const l=Ki(p7,o.type);if(!(l!=null&&l.type))throw new e7({abiParameter:o});const{array:u,type:d}=l;if(d in t){if(n.has(d))throw new i7({type:d});i.push({...o,type:`tuple${u??""}`,components:g5(t[d]??[],t,new Set([...n,d]))})}else if(m5(d))i.push(o);else throw new G9({type:d})}}return i}function w7(e){const t=y5(e),n=[],i=e.length;for(let r=0;r<i;r++){const s=e[r];C1(s)||n.push(lf(s,t))}return n}function Pu(e){let t;if(typeof e=="string")t=lf(e);else{const n=y5(e),i=e.length;for(let r=0;r<i;r++){const s=e[r];if(!C1(s)){t=lf(s,n);break}}}if(!t)throw new H9({signature:e});return t}const x7=t9({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0}),_7="https://{clientId}.ipfscdn.io/ipfs/{cid}";function Fi(e){var t,n;if(e.uri.startsWith("ipfs://")){const i=((n=(t=e.client.config)==null?void 0:t.storage)==null?void 0:n.gatewayUrl)??_7,r=e.client.clientId,s=b7(e.uri);let o;return typeof globalThis<"u"&&"Application"in globalThis&&(o=globalThis.Application.applicationId),`${i.replace("{clientId}",r).split("/ipfs")[0]}/ipfs/${s}${o?`?bundleId=${o}`:""}`}if(e.uri.startsWith("http"))return e.uri;throw new Error('Invalid URI scheme, expected "ipfs://" or "http(s)://"')}function b7(e){if(!e.startsWith("ipfs://"))return e;const t=e.search(/\/(Qm|baf)/i);return e.slice(t+1)}function p5(e=32){return Ys(M7(e))}function M7(e=32){return globalThis.crypto.getRandomValues(new Uint8Array(e))}async function w5(e){var i,r,s,o,a,l,u,d,f;let t;if(e.uri.startsWith("ar://")){const{resolveArweaveScheme:m}=await h(async()=>{const{resolveArweaveScheme:y}=await Promise.resolve().then(()=>c$);return{resolveArweaveScheme:y}},void 0);t=m(e)}else t=Fi(e);const n=await He(e.client)(t,{headers:(s=(r=(i=e.client.config)==null?void 0:i.storage)==null?void 0:r.fetch)==null?void 0:s.headers,keepalive:(l=(a=(o=e.client.config)==null?void 0:o.storage)==null?void 0:a.fetch)==null?void 0:l.keepalive,requestTimeoutMs:e.requestTimeoutMs??((f=(d=(u=e.client.config)==null?void 0:u.storage)==null?void 0:d.fetch)==null?void 0:f.requestTimeoutMs)??6e4});if(!n.ok){const m=await n.text();throw new Error(`Failed to download file: ${n.status} ${n.statusText} ${m||""}`)}return n}const DJ=Object.freeze(Object.defineProperty({__proto__:null,download:w5},Symbol.toStringTag,{value:"Module"}));function I7(e,t="https://contract.thirdweb.com/abi"){return Vn(async()=>{if(e.abi)return e.abi;if(e.chain.id===31337||e.chain.id===1337||e.chain.id===x7.id)return await Jy(e);try{return await E7(e,t)}catch{return await Jy(e)}},{cacheKey:`${e.chain.id}-${e.address}`,cacheTime:1e3*60*60*1})}async function E7(e,t="https://contract.thirdweb.com/abi"){const i=await(await He(e.client)(`${t}/${e.chain.id}/${e.address}`)).json();if(!i||i.error)throw new Error(`Failed to resolve ABI from contract API. ${i.error||""}`);return i}async function x5(e){const[{resolveImplementation:t},{extractIPFSUri:n}]=await Promise.all([h(()=>import("./resolveImplementation-GIw27GK7.js"),__vite__mapDeps([6,1,2,3,4,5])),h(()=>import("./extractIPFS-JN46N2o7.js"),__vite__mapDeps([7,1,2,3,4,5]))]),{bytecode:i}=await t(e);if(i==="0x"){const{id:s,name:o}=e.chain;throw new Error(`Failed to load contract bytecode. Make sure the contract [${e.address}] exists on the chain [${o||"Unknown Chain"} (chain id: ${s})]`)}const r=n(i);if(!r)return[];try{return(await(await w5({client:e.client,uri:r})).json()).output.abi}catch{return[]}}const C7={inputs:[],name:"getAllPlugins",outputs:[{components:[{internalType:"bytes4",name:"functionSelector",type:"bytes4"},{internalType:"string",name:"functionSignature",type:"string"},{internalType:"address",name:"pluginAddress",type:"address"}],internalType:"struct IPluginMap.Plugin[]",name:"registered",type:"tuple[]"}],stateMutability:"view",type:"function"},L7={inputs:[],name:"getAllExtensions",outputs:[{components:[{components:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"metadataURI",type:"string"},{internalType:"address",name:"implementation",type:"address"}],internalType:"struct IExtension.ExtensionMetadata",name:"metadata",type:"tuple"},{components:[{internalType:"bytes4",name:"functionSelector",type:"bytes4"},{internalType:"string",name:"functionSignature",type:"string"}],internalType:"struct IExtension.ExtensionFunction[]",name:"functions",type:"tuple[]"}],internalType:"struct IExtension.Extension[]",name:"allExtensions",type:"tuple[]"}],stateMutability:"view",type:"function"},T7={inputs:[],name:"facets",outputs:[{components:[{internalType:"address",name:"facetAddress",type:"address"},{internalType:"bytes4[]",name:"functionSelectors",type:"bytes4[]"}],type:"tuple[]"}],stateMutability:"view",type:"function"};async function Jy(e,t,n){const[i,r,s,o,a]=await Promise.all([x5(e),j7(e),v7(e),N7(e),S7(e)]),l=[...new Set([...r,...s,...o,...a])];if(!l.length)return i;const u=await A7({contract:e,plugins:l,resolveSubAbi:n});return D7({pluginAbis:u,rootAbi:i})}async function j7(e){try{const{readContract:t}=await h(async()=>{const{readContract:i}=await Promise.resolve().then(()=>D1);return{readContract:i}},void 0),n=await t({contract:e,method:C7});return n.length?[...new Set(n.map(i=>i.pluginAddress))]:[]}catch{}return[]}async function v7(e){try{const{readContract:t}=await h(async()=>{const{readContract:i}=await Promise.resolve().then(()=>D1);return{readContract:i}},void 0),n=await t({contract:e,method:L7});return n.length?[...new Set(n.map(i=>i.metadata.implementation))]:[]}catch{}return[]}async function N7(e){try{const{getInstalledModules:t}=await h(async()=>{const{getInstalledModules:i}=await import("./getInstalledModules-DQg0aCv5.js");return{getInstalledModules:i}},__vite__mapDeps([8,1,2,3,4,5])),n=await t({contract:e});return n.length?[...new Set(n.map(i=>i.implementation))]:[]}catch{}return[]}async function S7(e){try{const{readContract:t}=await h(async()=>{const{readContract:i}=await Promise.resolve().then(()=>D1);return{readContract:i}},void 0),n=await t({contract:e,method:T7});return n.length?n.map(i=>i.facetAddress):[]}catch{}return[]}async function A7(e){return Promise.all(e.plugins.map(t=>{const n=qt({...e.contract,address:t});return e.resolveSubAbi?e.resolveSubAbi(n):x5(n)}))}function D7(e){let t=e.pluginAbis.flat().filter(i=>i.type!=="constructor");e.rootAbi&&(t=[...e.rootAbi,...t].filter(i=>i.type!=="fallback"&&i.type!=="receive").filter(Boolean));const n=[...new Set(A9(t))];return w7(n)}async function Xy(e){var s;const{error:t,contract:n,fromAddress:i}=e;i5(t)&&n&&r5({chainId:(s=n.chain)==null?void 0:s.id,client:n.client,contractAddress:n.address,error:t,walletAddress:i});const r=await O7({contract:n,error:t});return r?new P7(r,n):t}async function O7(e){const{error:t,contract:n}=e;if(typeof t=="object"){const i=t;if(i.data&&i.data!=="0x"&&ts(i.data)){let r=n==null?void 0:n.abi;n&&!r&&(r=await I7(n).catch(()=>{}));const s=$w({abi:r,data:i.data});return`${s.errorName}${s.args?` - ${s.args}`:""}`}}return`Execution Reverted: ${Su(t)}`}class P7 extends Error{constructor(t,n){var r;let i=t;super(i),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chainId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TransactionError",this.contractAddress=n==null?void 0:n.address,this.chainId=(r=n==null?void 0:n.chain)==null?void 0:r.id,this.message=i}}const Bd=new WeakMap;async function ku(e){var s,o;const t=typeof e.from=="string"?e.from??void 0:((s=e.from)==null?void 0:s.address)??((o=e.account)==null?void 0:o.address),n={...e.transaction,from:t};if(Bd.has(n))return Bd.get(n);const{account:i}=e,r=(async()=>{var x,_;const a=await nt(e.transaction.gas);if(a!==void 0)return a;if(i!=null&&i.estimateGas)try{let b=await i.estimateGas(e.transaction);return(x=e.transaction.chain.experimental)!=null&&x.increaseZeroByteCount&&(b=Ua(b)),b}catch(b){throw await Xy({contract:e.transaction.__contract,error:b,fromAddress:t})}const{encode:l}=await h(async()=>{const{encode:b}=await Promise.resolve().then(()=>u9);return{encode:b}},void 0),[u,d,f,m]=await Promise.all([l(e.transaction),nt(e.transaction.to),nt(e.transaction.value),nt(e.transaction.authorizationList)]),[{getRpcClient:y},{eth_estimateGas:p}]=await Promise.all([h(()=>Promise.resolve().then(()=>x9),void 0),h(()=>import("./eth_estimateGas-m2_--02H.js"),__vite__mapDeps([9,1,2,3,4,5]))]),g=y(e.transaction);try{const b=Bw({authorizationList:m==null?void 0:m.map(E=>({...E,address:me(E.address),nonce:Number(E.nonce),r:ft(E.r),s:ft(E.s)})),data:u,from:t?me(t):void 0,to:d?me(d):void 0,value:f});let I=await p(g,b);return(_=e.transaction.chain.experimental)!=null&&_.increaseZeroByteCount&&(I=Ua(I)),I}catch(b){throw await Xy({contract:e.transaction.__contract,error:b,fromAddress:t})}})();return Bd.set(n,r),r}const OJ=Object.freeze(Object.defineProperty({__proto__:null,estimateGas:ku},Symbol.toStringTag,{value:"Module"}));async function _5(e){if(await n5(e.transaction.chain)){const{getZkGasFees:g}=await h(async()=>{const{getZkGasFees:I}=await import("./send-eip712-transaction-D88fU9U2.js").then(E=>E.a);return{getZkGasFees:I}},__vite__mapDeps([10,1,2,11,0,3,4,5,12])),{gas:x,maxFeePerGas:_,maxPriorityFeePerGas:b}=await g({from:typeof e.from=="string"?me(e.from):e.from!==void 0?me(e.from.address):void 0,transaction:e.transaction});e.transaction={...e.transaction,gas:x,maxFeePerGas:_,maxPriorityFeePerGas:b}}const n=ii(e.transaction),i=e.transaction.chain.id,r=e.from;let[s,o,a,l,u,d,f,m,y]=await Promise.all([Du(e.transaction),(async()=>{const g=await nt(e.transaction.nonce);return g!==void 0?g:r?await h(async()=>{const{eth_getTransactionCount:x}=await import("./eth_getTransactionCount-CEP3s4C1.js");return{eth_getTransactionCount:x}},__vite__mapDeps([13,1,2,3,4,5])).then(({eth_getTransactionCount:x})=>x(n,{address:me(typeof r=="string"?r:r.address),blockTag:"pending"})):void 0})(),ku({...e,from:e.from}),t5(e.transaction),nt(e.transaction.to),nt(e.transaction.accessList),nt(e.transaction.value),nt(e.transaction.authorizationList),nt(e.transaction.type)]);const p=await nt(e.transaction.extraGas);return p&&(a+=p),{accessList:d,authorizationList:m,chainId:i,data:s,gas:a,nonce:o,to:u,type:y,value:f,...l}}async function k7(e){var p;const[{getV1Nfts:t},{getThirdwebDomains:n},{getClientFetch:i},{assertInsightEnabled:r},{stringify:s}]=await Promise.all([h(()=>import("./thirdweb-DZ2vK6IO.js"),[]),h(()=>Promise.resolve().then(()=>xu),void 0),h(()=>Promise.resolve().then(()=>bu),void 0),h(()=>import("./common-Q4hcJSiz.js"),__vite__mapDeps([14,1,2,3,4,5])),h(()=>import("./index-BBjyHWpu.js"),__vite__mapDeps([15,16,17,12,1,2,18,3,4,5]))]),{client:o,chains:a,ownerAddress:l,contractAddresses:u,queryOptions:d}=e;await r(a);const f={chain:a.map(g=>g.id),limit:50,owner_address:[l],contract_address:u||void 0},m=await t({baseUrl:`https://${n().insight}`,fetch:i(o),query:{...f,...d}});if(m.error)throw new Error(`${m.response.status} ${m.response.statusText} - ${m.error?s(m.error):"Unknown error"}`);return(await b5(((p=m.data)==null?void 0:p.data)??[],o,l)).map(g=>({...g,quantityOwned:g.quantityOwned??1n}))}async function PJ(e){var g;const[{getV1NftsByContractAddressByTokenId:t},{getThirdwebDomains:n},{getClientFetch:i},{assertInsightEnabled:r},{stringify:s}]=await Promise.all([h(()=>import("./thirdweb-DZ2vK6IO.js"),[]),h(()=>Promise.resolve().then(()=>xu),void 0),h(()=>Promise.resolve().then(()=>bu),void 0),h(()=>import("./common-Q4hcJSiz.js"),__vite__mapDeps([14,1,2,3,4,5])),h(()=>Promise.resolve().then(()=>n1),void 0)]),{client:o,chain:a,contractAddress:l,tokenId:u,includeOwners:d=!0,queryOptions:f}=e;await r([a]);const m={chain_id:[a.id],include_owners:d===!0?"true":"false"},y=await t({baseUrl:`https://${n().insight}`,fetch:i(o),path:{contract_address:l,token_id:u.toString()},query:{...m,...f}});if(y.error)throw new Error(`${y.response.status} ${y.response.statusText} - ${y.error?s(y.error):"Unknown error"}`);const p=await b5(((g=y.data)==null?void 0:g.data)??[],o);return p==null?void 0:p[0]}async function b5(e,t,n){const[{parseNFT:i},{totalSupply:r}]=await Promise.all([h(()=>Promise.resolve().then(()=>Mv),void 0),h(()=>import("./totalSupply-DTUooqpt.js"),__vite__mapDeps([19,20,1,2,3,4,5]))]);return await Promise.all(e.map(async s=>{var E;let o;const{contract:a,extra_metadata:l,collection:u,metadata_url:d,chain_id:f,token_id:m,status:y,balance:p,token_type:g,...x}=s;let _=x,b=n?[me(n)]:void 0;if("owner_addresses"in x){const{owner_addresses:C,...T}=x;_=T,b=b??(C==null?void 0:C.map(j=>me(j)))}const I=M5({attributes:((E=s.extra_metadata)==null?void 0:E.attributes)??void 0,image:s.image_url,uri:s.metadata_url??"",..._});if((a==null?void 0:a.type)==="erc1155"){const C=await r({contract:qt({address:a.address,chain:Pe(a.chain_id),client:t}),id:BigInt(m)}).catch(()=>0n);o=i(I,{chainId:(a==null?void 0:a.chain_id)??0,owner:b==null?void 0:b[0],supply:C,tokenAddress:(a==null?void 0:a.address)??"",tokenId:BigInt(m),tokenUri:uf(d)??"",type:"ERC1155"})}else o=i(I,{chainId:(a==null?void 0:a.chain_id)??0,owner:b==null?void 0:b[0],tokenAddress:(a==null?void 0:a.address)??"",tokenId:BigInt(m),tokenUri:uf(d)??"",type:"ERC721"});return{...o,...(a==null?void 0:a.type)==="erc1155"?{quantityOwned:p?BigInt(p):void 0}:{}}}))}function M5(e){if(typeof e!="object"||e===null)return e;for(const t in e)typeof e[t]=="string"?e[t]=uf(e[t]):M5(e[t]);return e}function uf(e){if(!e||typeof e!="string")return e;try{const t=new URL(e);if(t.host.endsWith(".ipfscdn.io")){const n=t.pathname.split("/"),i=n.findIndex(s=>s==="ipfs");if(i===-1)return e;const r=n.slice(i+1).join("/");return r?`ipfs://${r}`:e}}catch{return e}return e}async function z7(e){var y;const[{getV1Tokens:t},{getThirdwebDomains:n},{getClientFetch:i},{assertInsightEnabled:r},{stringify:s}]=await Promise.all([h(()=>import("./thirdweb-DZ2vK6IO.js"),[]),h(()=>Promise.resolve().then(()=>xu),void 0),h(()=>Promise.resolve().then(()=>bu),void 0),h(()=>import("./common-Q4hcJSiz.js"),__vite__mapDeps([14,1,2,3,4,5])),h(()=>Promise.resolve().then(()=>n1),void 0)]),{client:o,chains:a,ownerAddress:l,tokenAddresses:u,queryOptions:d}=e;await r(a);const f={chain_id:a.length>0?a.map(p=>p.id):[1],include_native:"true",include_spam:"false",limit:50,metadata:"true",owner_address:[l],token_address:u||void 0,sort_by:"balance",sort_order:"desc"},m=await t({baseUrl:`https://${n().insight}`,fetch:i(o),query:{...f,...d}});if(m.error)throw new Error(`${m.response.status} ${m.response.statusText} - ${m.error?s(m.error):"Unknown error"}`);return R7(((y=m.data)==null?void 0:y.data)??[])}async function R7(e){const{toTokens:t}=await h(async()=>{const{toTokens:n}=await Promise.resolve().then(()=>_9);return{toTokens:n}},void 0);return e.map(n=>{const i=n.decimals??18,r=BigInt(n.balance);return{chainId:n.chain_id,decimals:i,displayValue:t(r,i),name:n.name??"",symbol:n.symbol??"",tokenAddress:n.token_address,value:r}})}async function U7(e){const[{getV1WalletsByWalletAddressTransactions:t},{getThirdwebDomains:n},{getClientFetch:i},{assertInsightEnabled:r},{stringify:s}]=await Promise.all([h(()=>import("./thirdweb-DZ2vK6IO.js"),[]),h(()=>Promise.resolve().then(()=>xu),void 0),h(()=>Promise.resolve().then(()=>bu),void 0),h(()=>import("./common-Q4hcJSiz.js"),__vite__mapDeps([14,1,2,3,4,5])),h(()=>Promise.resolve().then(()=>n1),void 0)]);await r(e.chains);const o=Math.floor((Date.now()-3*30*24*60*60*1e3)/1e3),{client:a,walletAddress:l,chains:u,queryOptions:d}=e,f={chain:u.map(y=>y.id),filter_block_timestamp_gte:o,limit:100},m=await t({baseUrl:`https://${n().insight}`,fetch:i(a),path:{wallet_address:l},query:{...f,...d}});if(m.error)throw new Error(`${m.response.status} ${m.response.statusText} - ${m.error?s(m.error):"Unknown error"}`);return m.data.data||[]}async function $7(e){const t=await e({method:"eth_blockNumber"});return on(t)}function B7(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,{balance:n.balance?Ue(n.balance):void 0,code:n.code,nonce:n.nonce?Ue(n.nonce):void 0,state:n.state,stateDiff:n.stateDiff}]))}async function V7(e,t){const{blockNumber:n,blockTag:i,...r}=t,o=(n?Ue(n):void 0)||i||"latest";return await e({method:"eth_call",params:t.stateOverrides?[r,o,B7(t.stateOverrides)]:[r,o]})}async function I5(e,t){const n=await e({method:"eth_getBalance",params:[t.address,t.blockTag||"latest"]});return on(n)}async function W7(e,t){return e({method:"eth_getCode",params:[t.address,t.blockTag||"latest"]})}async function F7(e,t){const n=await e({method:"eth_getTransactionReceipt",params:[t.hash]});if(!n)throw new Error("Transaction receipt not found.");return Yw(n)}function Y7(e){return new Promise(t=>setTimeout(t,e))}const Q7=5e3,H7=1e3,eg=500,G7=2,E5=10;function Z7(e){for(;e.length<E5;)e.unshift(H7);return e.reduce((n,i)=>n+i,0)/e.length}function q7(e,t,n,i){let r=[],s=[],o=!1,a,l;const u=ii({chain:t,client:e});async function d(){if(!o)return;try{const y=await $7(u);if(!a||y>a){let p=[];if(a)for(let x=a+1n;x<=y;x++)p.push(BigInt(x));else p=[y];a=y;const g=Date.now();if(l){const x=(g-l)/p.length;s.push(x),s=s.slice(-E5)}l=g;for(const x of p)for(const _ of r)_(x)}}catch(y){i?i(y):console.error(`[watchBlockNumber]: Failed to poll for latest block number: ${y}`)}const f=Z7(s),m=Math.max(eg,Math.min(Q7,Math.max(eg,f)));await Y7(m/(n??G7)),d()}return function(m,y){return r.push(m),o||(a=y,o=!0,d()),function(){r=r.filter(g=>g!==m),r.length===0&&(a=void 0,l=void 0,o=!1)}}}const tg=new Map;function C5(e){const{client:t,chain:n,onNewBlockNumber:i,overPollRatio:r,latestBlockNumber:s,onError:o}=e,a=n.id;let l=tg.get(a);return l||(l=q7(t,n,r,o),tg.set(a,l)),l(i,s)}function K7(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="event")}function L5(e){const{signature:t}=e;let n;return K7(t)?n=t:n=Pu(t),{abiEvent:n,hash:g1(n),topics:NL({abi:[n],args:e.filters})}}function J7(e){const{logs:t,events:n,strict:i}=e;return ZL({abi:n.map(r=>r.abiEvent),logs:t,strict:i})}function Pr(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,i=h1(fE(e));return n==="Bytes"?i:Os(i)}let X7=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const i=this.keys().next().value;i&&this.delete(i)}return this}};const eT={checksum:new X7(8192)},Vd=eT.checksum,tT=/^0x[a-fA-F0-9]{40}$/;function zu(e,t={}){const{strict:n=!0}=t;if(!tT.test(e))throw new df({address:e,cause:new T5});if(n){if(e.toLowerCase()===e)return;if(nT(e)!==e)throw new df({address:e,cause:new rT})}}function nT(e){if(Vd.has(e))return Vd.get(e);zu(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=Pr(u1(t),{as:"Bytes"}),i=t.split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&i[s]&&(i[s]=i[s].toUpperCase()),(n[s>>1]&15)>=8&&i[s+1]&&(i[s+1]=i[s+1].toUpperCase());const r=`0x${i.join("")}`;return Vd.set(e,r),r}function iT(e,t={}){const{strict:n=!0}=t??{};try{return zu(e,{strict:n}),!0}catch{return!1}}class df extends ve{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class T5 extends ve{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class rT extends ve{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const sT=/^(.*)\[([0-9]*)\]$/,j5=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,L1=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,zJ=2n**96n-1n,ng=2n**256n-1n;function oT({checksumAddress:e,parameters:t,values:n}){const i=[];for(let r=0;r<t.length;r++)i.push(T1({checksumAddress:e,parameter:t[r],value:n[r]}));return i}function T1({checksumAddress:e=!1,parameter:t,value:n}){const i=t,r=mT(i.type);if(r){const[s,o]=r;return cT(n,{checksumAddress:e,length:s,parameter:{...i,type:o}})}if(i.type==="tuple")return fT(n,{checksumAddress:e,parameter:i});if(i.type==="address")return aT(n,{checksum:e});if(i.type==="bool")return uT(n);if(i.type.startsWith("uint")||i.type.startsWith("int")){const s=i.type.startsWith("int"),[,,o="256"]=L1.exec(i.type)??[];return dT(n,{signed:s,size:Number(o)})}if(i.type.startsWith("bytes"))return lT(n,{type:i.type});if(i.type==="string")return hT(n);throw new A5(i.type)}function j1(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?t+=32:t+=Zt(a)}const n=[],i=[];let r=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?(n.push(ft(t+r,{size:32})),i.push(a),r+=Zt(a)):n.push(a)}return Gt(...n,...i)}function aT(e,t){const{checksum:n=!1}=t;return zu(e,{strict:n}),{dynamic:!1,encoded:Yr(e.toLowerCase())}}function cT(e,t){const{checksumAddress:n,length:i,parameter:r}=t,s=i===null;if(!Array.isArray(e))throw new _T(e);if(!s&&e.length!==i)throw new xT({expectedLength:i,givenLength:e.length,type:`${r.type}[${i}]`});let o=!1;const a=[];for(let l=0;l<e.length;l++){const u=T1({checksumAddress:n,parameter:r,value:e[l]});u.dynamic&&(o=!0),a.push(u)}if(s||o){const l=j1(a);if(s){const u=ft(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?Gt(u,l):u}}if(o)return{dynamic:!0,encoded:l}}return{dynamic:!1,encoded:Gt(...a.map(({encoded:l})=>l))}}function lT(e,{type:t}){const[,n]=t.split("bytes"),i=Zt(e);if(!n){let r=e;return i%32!==0&&(r=Qr(r,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:Gt(Yr(ft(i,{size:32})),r)}}if(i!==Number.parseInt(n))throw new N5({expectedSize:Number.parseInt(n),value:e});return{dynamic:!1,encoded:Qr(e)}}function uT(e){if(typeof e!="boolean")throw new ve(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Yr(l1(e))}}function dT(e,{signed:t,size:n}){if(typeof n=="number"){const i=2n**(BigInt(n)-(t?1n:0n))-1n,r=t?-i-1n:0n;if(e>i||e<r)throw new J4({max:i.toString(),min:r.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:ft(e,{size:32,signed:t})}}function hT(e){const t=Eu(e),n=Math.ceil(Zt(t)/32),i=[];for(let r=0;r<n;r++)i.push(Qr(Ul(t,r*32,(r+1)*32)));return{dynamic:!0,encoded:Gt(Qr(ft(Zt(t),{size:32})),...i)}}function fT(e,t){const{checksumAddress:n,parameter:i}=t;let r=!1;const s=[];for(let o=0;o<i.components.length;o++){const a=i.components[o],l=Array.isArray(e)?o:a.name,u=T1({checksumAddress:n,parameter:a,value:e[l]});s.push(u),u.dynamic&&(r=!0)}return{dynamic:r,encoded:r?j1(s):Gt(...s.map(({encoded:o})=>o))}}function mT(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const yT={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new wT({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new pT({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new ig({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new ig({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function gT(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(yT);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}class ig extends ve{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class pT extends ve{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class wT extends ve{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function v5(e,t,n){const{checksumAddress:i=!1}={};if(e.length!==t.length)throw new S5({expectedLength:e.length,givenLength:t.length});const r=oT({checksumAddress:i,parameters:e,values:t}),s=j1(r);return s.length===0?"0x":s}function hf(e,t){if(e.length!==t.length)throw new S5({expectedLength:e.length,givenLength:t.length});const n=[];for(let i=0;i<e.length;i++){const r=e[i],s=t[i];n.push(hf.encode(r,s))}return Gt(...n)}(function(e){function t(n,i,r=!1){if(n==="address"){const l=i;return zu(l),Yr(l.toLowerCase(),r?32:0)}if(n==="string")return Eu(i);if(n==="bytes")return i;if(n==="bool")return Yr(l1(i),r?32:1);const s=n.match(L1);if(s){const[l,u,d="256"]=s,f=Number.parseInt(d)/8;return ft(i,{size:r?32:f,signed:u==="int"})}const o=n.match(j5);if(o){const[l,u]=o;if(Number.parseInt(u)!==(i.length-2)/2)throw new N5({expectedSize:Number.parseInt(u),value:i});return Qr(i,r?32:0)}const a=n.match(sT);if(a&&Array.isArray(i)){const[l,u]=a,d=[];for(let f=0;f<i.length;f++)d.push(t(u,i[f],!0));return d.length===0?"0x":Gt(...d)}throw new A5(n)}e.encode=t})(hf||(hf={}));class xT extends ve{constructor({expectedLength:t,givenLength:n,type:i}){super(`Array length mismatch for type \`${i}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}let N5=class extends ve{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Zt(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}};class S5 extends ve{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
28
+ `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class _T extends ve{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class A5 extends ve{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function bT(e,t){const{as:n}=t,i=D5(e),r=gT(new Uint8Array(i.length));return i.encode(r),n==="Hex"?Os(r.bytes):r.bytes}function MT(e,t={}){const{as:n="Hex"}=t;return bT(e,{as:n})}function D5(e){return Array.isArray(e)?IT(e.map(t=>D5(t))):ET(e)}function IT(e){const t=e.reduce((r,s)=>r+s.length,0),n=O5(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),n===1?r.pushUint8(t):n===2?r.pushUint16(t):n===3?r.pushUint24(t):r.pushUint32(t));for(const{encode:s}of e)s(r)}}}function ET(e){const t=typeof e=="string"?ea(e):e,n=O5(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(r){t.length===1&&t[0]<128?r.pushBytes(t):t.length<=55?(r.pushByte(128+t.length),r.pushBytes(t)):(r.pushByte(183+n),n===1?r.pushUint8(t.length):n===2?r.pushUint16(t.length):n===3?r.pushUint24(t.length):r.pushUint32(t.length),r.pushBytes(t))}}}function O5(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new ve("Length is too large.")}function CT(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new Wd({signature:e});if(typeof e.s>"u")throw new Wd({signature:e});if(n&&typeof e.yParity>"u")throw new Wd({signature:e});if(e.r<0n||e.r>ng)throw new OT({value:e.r});if(e.s<0n||e.s>ng)throw new PT({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Ru({value:e.yParity})}function LT(e){return v1(Os(e))}function v1(e){if(e.length!==130&&e.length!==132)throw new DT({signature:e});const t=BigInt(Ul(e,0,32)),n=BigInt(Ul(e,32,64)),i=(()=>{const r=+`0x${e.slice(130)}`;if(!Number.isNaN(r))try{return N1(r)}catch{throw new Ru({value:r})}})();return typeof i>"u"?{r:t,s:n}:{r:t,s:n,yParity:i}}function TT(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return jT(e)}function jT(e){const t=typeof e=="string"?v1(e):e instanceof Uint8Array?LT(e):typeof e.r=="string"?NT(e):e.v?vT(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return CT(t),t}function vT(e){return{r:e.r,s:e.s,yParity:N1(e.v)}}function NT(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let i=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof i!="number"&&(i=N1(n)),typeof i!="number")throw new Ru({value:e.yParity});return i})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function ST(e){const{r:t,s:n,yParity:i}=e;return{r:ft(t,{size:32}),s:ft(n,{size:32}),yParity:i===0?"0x0":"0x1"}}function AT(e){const{r:t,s:n,yParity:i}=e;return[i?"0x01":"0x",t===0n?"0x":vy(ft(t)),n===0n?"0x":vy(ft(n))]}function N1(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new kT({value:e})}function UJ(e){if(e===0)return 27;if(e===1)return 28;throw new Ru({value:e})}class DT extends ve{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${Zt(aE(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class Wd extends ve{constructor({signature:t}){super(`Signature \`${Mu(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class OT extends ve{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class PT extends ve{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class Ru extends ve{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class kT extends ve{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function zT(e){return RT(e)}function RT(e){return Pr(Gt("0x05",MT(P5(e))))}function UT(e){const{address:t,chainId:n,nonce:i,...r}=e;return{address:t,chainId:ft(n),nonce:ft(i),...ST(r)}}function $T(e){return e.map(UT)}function P5(e){const{address:t,chainId:n,nonce:i}=e,r=TT(e);return[n?ft(n):"0x",t,i?ft(i):"0x",...r?AT(r):[]]}function $J(e){if(!e||e.length===0)return[];const t=[];for(const n of e)t.push(P5(n));return t}function BT(e){const{domain:t,message:n,primaryType:i,types:r}=e,s=(o,a)=>{for(const l of o){const{name:u,type:d}=l,f=a[u],m=d.match(L1);if(m&&(typeof f=="number"||typeof f=="bigint")){const[,g,x]=m;ft(f,{signed:g==="int",size:Number.parseInt(x??"")/8})}if(d==="address"&&typeof f=="string"&&!iT(f))throw new df({address:f,cause:new T5});const y=d.match(j5);if(y){const[,g]=y;if(g&&Zt(f)!==Number.parseInt(g))throw new FT({expectedSize:Number.parseInt(g),givenSize:Zt(f)})}const p=r[d];p&&(ZT(d),s(p,f))}};if(r.EIP712Domain&&t){if(typeof t!="object")throw new YT({domain:t});s(r.EIP712Domain,t)}if(i!=="EIP712Domain")if(r[i])s(r[i],n);else throw new QT({primaryType:i,types:r})}function VT(e){const{primaryType:t,types:n}=e;let i="";const r=$5({primaryType:t,types:n});r.delete(t);const s=[t,...Array.from(r).sort()];for(const o of s)i+=`${o}(${(n[o]??[]).map(({name:a,type:l})=>`${l} ${a}`).join(",")})`;return i}function Uu(e){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},typeof(e==null?void 0:e.chainId)=="number"&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function BJ(e){const{domain:t,types:n}=e;return WT({data:t,primaryType:"EIP712Domain",types:{...n,EIP712Domain:(n==null?void 0:n.EIP712Domain)||Uu(t)}})}function WT(e){const{data:t,primaryType:n,types:i}=e,r=R5({data:t,primaryType:n,types:i});return Pr(r)}function k5(e){const{domain:t,message:n,primaryType:i,types:r}=e,s=(l,u)=>{const d={...u};for(const f of l){const{name:m,type:y}=f;y==="address"&&(d[m]=d[m].toLowerCase())}return d},o=(()=>{if(!t)return{};const l=r.EIP712Domain??Uu(t);return s(l,t)})(),a=(()=>{if(i!=="EIP712Domain")return r[i]?s(r[i],n):{}})();return Mu({domain:o,message:a,primaryType:i,types:r},(l,u)=>typeof u=="bigint"?u.toString():u)}function z5(e){try{return BT(e),!0}catch{return!1}}class FT extends ve{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TypedData.BytesSizeMismatchError"})}}class YT extends ve{constructor({domain:t}){super(`Invalid domain "${Mu(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TypedData.InvalidDomainError"})}}class QT extends ve{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{metaMessages:["Check that the primary type is a key in `types`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TypedData.InvalidPrimaryTypeError"})}}class HT extends ve{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TypedData.InvalidStructTypeError"})}}function R5(e){const{data:t,primaryType:n,types:i}=e,r=[{type:"bytes32"}],s=[GT({primaryType:n,types:i})];for(const o of i[n]??[]){const[a,l]=U5({types:i,name:o.name,type:o.type,value:t[o.name]});r.push(a),s.push(l)}return v5(r,s)}function GT(e){const{primaryType:t,types:n}=e,i=Eu(VT({primaryType:t,types:n}));return Pr(i)}function U5(e){let{types:t,name:n,type:i,value:r}=e;if(t[i]!==void 0)return[{type:"bytes32"},Pr(R5({data:r,primaryType:i,types:t}))];if(i==="bytes")return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},Pr(r,{as:"Hex"})];if(i==="string")return[{type:"bytes32"},Pr(u1(r),{as:"Hex"})];if(i.lastIndexOf("]")===i.length-1){const s=i.slice(0,i.lastIndexOf("[")),o=r.map(a=>U5({name:n,type:s,types:t,value:a}));return[{type:"bytes32"},Pr(v5(o.map(([a])=>a),o.map(([,a])=>a)))]}return[{type:i},r]}function $5(e,t=new Set){const{primaryType:n,types:i}=e,r=n.match(/^\w*/u),s=r==null?void 0:r[0];if(t.has(s)||i[s]===void 0)return t;t.add(s);for(const o of i[s])$5({primaryType:o.type,types:i},t);return t}function ZT(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new HT({type:e})}function Xa(e){return ts(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function $u(e,t){if(e.length!==t.length)throw new Error("The number of parameters and values must match.");const n=qT({params:e,values:t}),i=A1(n);return i.length===0?"0x":i}function qT({params:e,values:t}){const n=[];for(let i=0;i<e.length;i++)n.push(S1({param:e[i],value:t[i]}));return n}function S1({param:e,value:t}){const n=rj(e.type);if(n){const[i,r]=n;return JT(t,{length:i,param:{...e,type:r}})}if(e.type==="tuple")return ij(t,{param:e});if(e.type==="address")return KT(t);if(e.type==="bool")return ej(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const i=e.type.startsWith("int");return tj(t,{signed:i})}if(e.type.startsWith("bytes"))return XT(t,{param:e});if(e.type==="string")return nj(t);throw new Error(`Unsupported parameter type: ${e.type}`)}function A1(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?t+=32:t+=Xa(a)}const n=[],i=[];let r=0;for(let s=0;s<e.length;s++){const{dynamic:o,encoded:a}=e[s];o?(n.push(Ue(t+r,{size:32})),i.push(a),r+=Xa(a)):n.push(a)}return Gt(...n,...i)}function KT(e){if(e!==""&&e!==void 0&&!ni(e))throw new Error(`Invalid address: ${e}`);return{dynamic:!1,encoded:vs(e.toLowerCase())}}function JT(e,{length:t,param:n}){const i=t===null;if(!Array.isArray(e))throw new Error("Invalid array value.");if(!i&&e.length!==t)throw new Error("Invalid array length.");let r=!1;const s=[];for(let o=0;o<e.length;o++){const a=S1({param:n,value:e[o]});a.dynamic&&(r=!0),s.push(a)}if(i||r){const o=A1(s);if(i){const a=Ue(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?Gt(a,o):a}}if(r)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:Gt(...s.map(({encoded:o})=>o))}}function XT(e,{param:t}){const[,n]=t.type.split("bytes"),i=Xa(e);if(!n){let r=e;return i%32!==0&&(r=vs(r,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Gt(vs(Ue(i,{size:32})),r)}}if(i!==Number.parseInt(n))throw new Error(`Invalid bytes${n} size: ${i}`);return{dynamic:!1,encoded:vs(e,{dir:"right"})}}function ej(e){return{dynamic:!1,encoded:vs(dw(e))}}function tj(e,{signed:t}){return{dynamic:!1,encoded:Ue(e,{signed:t,size:32})}}function nj(e){const t=Tc(e),n=Math.ceil(Xa(t)/32),i=[];for(let r=0;r<n;r++)i.push(vs(Ul(t,r*32,(r+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Gt(vs(Ue(Xa(t),{size:32})),...i)}}function ij(e,{param:t}){let n=!1;const i=[];for(let r=0;r<t.components.length;r++){const s=t.components[r],o=Array.isArray(e)?r:s.name,a=S1({param:s,value:e[o]});i.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?A1(i):Gt(...i.map(({encoded:r})=>r))}}function rj(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Fd=new _u(4096);function kr(e){const t=typeof e=="string"?e:Me(e);if(Fd.has(t))return Fd.get(t);const n=typeof e=="string"?Pu(e):e,r=[Nu(n),n.inputs,n.outputs];return Fd.set(t,r),r}const sj=Qe({blockExplorers:[{apiUrl:"https://api.basescan.org/api",name:"Basescan",url:"https://basescan.org"}],id:8453,name:"Base",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"}}),oj=Qe({blockExplorers:[{apiUrl:"https://api-sepolia.basescan.org/api",name:"Basescan",url:"https://sepolia.basescan.org"}],id:84532,name:"Base Sepolia",nativeCurrency:{decimals:18,name:"Sepolia Ether",symbol:"ETH"},testnet:!0}),aj=Qe({blockExplorers:[{apiUrl:"https://api-optimistic.etherscan.io",name:"Optimism Explorer",url:"https://optimistic.etherscan.io"}],id:10,name:"OP Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"}}),cj=Qe({blockExplorers:[{apiUrl:"https://optimism-sepolia.blockscout.com/api",name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}],id:11155420,name:"OP Sepolia",nativeCurrency:{decimals:18,name:"Sepolia Ether",symbol:"ETH"},testnet:!0}),lj=Qe({blockExplorers:[{apiUrl:"https://explorer.zora.energy/api",name:"Explorer",url:"https://explorer.zora.energy"}],id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"}}),uj=Qe({blockExplorers:[{apiUrl:"https://sepolia.explorer.zora.energy/api",name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}],id:999999999,name:"Zora Sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},testnet:!0}),dj=[sj.id,oj.id,aj.id,cj.id,lj.id,uj.id,34443,919,42220,44787,204,5611];async function hj(e){if(e.id===1337||e.id===31337)return!1;if(dj.includes(e.id))return!0;try{const{getChainMetadata:t}=await h(async()=>{const{getChainMetadata:i}=await Promise.resolve().then(()=>t1);return{getChainMetadata:i}},void 0);return(await t(e)).stackType==="optimism_bedrock"}catch{return!1}}async function fj(e){var l;const{transaction:t}=e,n=((l=e.account)==null?void 0:l.address)??void 0,i=await nt(t.gas)||await ku({from:n,transaction:t}),r=await I1(t.client,t.chain),s=r.maxFeePerGas||r.gasPrice;if(s===void 0)throw new Error(`Unable to determine gas price for chain ${t.chain.id}`);let o;if(await hj(t.chain)){const{estimateL1Fee:u}=await h(async()=>{const{estimateL1Fee:d}=await import("./estimate-l1-fee-CU3YnFil.js");return{estimateL1Fee:d}},__vite__mapDeps([21,1,2,3,4,5]));o=await u({transaction:t})}else o=0n;const a=i*s+o;return{ether:e5(a),wei:a}}function B5(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="function")}async function mj(e,t){try{const n=await fj({from:t,transaction:e}),i=n.wei/10n;return n.wei+i}catch{return 1000000n*await sf({chain:e.chain,client:e.client})}}async function Bu(e){const{contract:t,method:n,params:i}=e,r=async()=>{var f,m;if(Array.isArray(n))return n;if(B5(n))return kr(n);if(typeof n=="function")return kr(await n(t));if(typeof n=="string"&&n.startsWith("function ")){const y=Pu(n);if(y.type==="function")return kr(y);throw new Error('"method" passed is not of type "function"')}if(t.abi&&((f=t.abi)==null?void 0:f.length)>0){const y=(m=t.abi)==null?void 0:m.find(p=>p.type==="function"&&p.name===n);if(y)return kr(y)}throw new Error(`Could not resolve method "${n}".`)},[s,o]=await Promise.all([r(),typeof i=="function"?i():i]);let a;s[1].length===0?a=s[0]:a=s[0]+$u(s[1],o).slice(2);const l=ii({chain:t.chain,client:t.client}),u=await V7(l,{data:a,from:e.from?me(e.from):void 0,to:t.address}),d=vc(s[2],u);return Array.isArray(d)&&d.length===1?d[0]:d}const D1=Object.freeze(Object.defineProperty({__proto__:null,readContract:Bu},Symbol.toStringTag,{value:"Module"})),yj="0x313ce567",gj=[],pj=[{type:"uint8"}];async function wj(e){return Bu({contract:e.contract,method:[yj,gj,pj],params:[]})}async function V5(e){return Vn(()=>wj(e),{cacheKey:`${e.contract.chain.id}:${e.contract.address}:decimals`,cacheTime:Number.POSITIVE_INFINITY})}const xj=Object.freeze(Object.defineProperty({__proto__:null,decimals:V5},Symbol.toStringTag,{value:"Module"}));function fr(e){const t=new Set;let n=e;const i=()=>{for(const r of t)r()};return{getValue(){return n},setValue(r){r!==n&&(n=r,i())},subscribe(r){return t.add(r),()=>{t.delete(r)}}}}const ff=new Map;function W5(e){const t=ff.get(e);if(t)return t;const n=fr([]);return ff.set(e,n),n}function _j(e){const{address:t,transactionHash:n,chainId:i}=e,r=W5(t);r.setValue([...r.getValue(),{chainId:i,transactionHash:n}]),ff.set(t,r)}async function bj(e){const{walletAddress:t,chain:n,client:i}=e,r=Math.floor((Date.now()-1*30*24*60*60*1e3)/1e3);return(await U7({chains:[n],client:i,queryOptions:{filter_block_timestamp_gte:r,limit:20,decode:!0},walletAddress:t})).map(o=>({chainId:typeof o.chain_id=="string"?Number(o.chain_id):o.chain_id,receipt:{status:o.status===0?"failed":"success",to:o.to_address},transactionHash:o.hash,decoded:o.decoded}))}async function mf(e){let{account:t,transaction:n,gasless:i}=e;if(t.onTransactionRequested&&await t.onTransactionRequested(n),n.eip712){const{sendEip712Transaction:o}=await h(async()=>{const{sendEip712Transaction:a}=await import("./send-eip712-transaction-D88fU9U2.js").then(l=>l.a);return{sendEip712Transaction:a}},__vite__mapDeps([10,1,2,11,0,3,4,5,12]));return o({account:t,transaction:n})}const r=await _5({from:t,transaction:n});if(i){const{sendGaslessTransaction:o}=await h(async()=>{const{sendGaslessTransaction:a}=await import("./send-gasless-transaction-BCU2Zrfm.js");return{sendGaslessTransaction:a}},__vite__mapDeps([22,1,2,3,4,5]));return o({account:t,gasless:i,serializableTransaction:r,transaction:n})}const s=await t.sendTransaction(r);return _j({address:t.address,chainId:n.chain.id,transactionHash:s.transactionHash}),{...s,chain:n.chain,client:n.client}}const Mj=Object.freeze(Object.defineProperty({__proto__:null,sendTransaction:mf},Symbol.toStringTag,{value:"Module"})),Ij=100,Jc=new Map;function Vu(e){const{transactionHash:t,chain:n,client:i}=e,s=`${n.id}:tx_${t}`,o=e.maxBlocksWaitTime??Ij;if(Jc.has(s))return Jc.get(s);const a=new Promise((l,u)=>{t||u(new Error("Transaction has no transactionHash to wait for, did you execute it?"));const d=ii({chain:n,client:i});let f=-1;const m=C5({chain:n,client:i,onNewBlockNumber:async()=>{if(f++,f>=o){m(),u(new Error(`Transaction receipt for ${t} not found after ${o} blocks`));return}try{const y=await F7(d,{hash:t});m(),l(y)}catch{}}})}).finally(()=>{Jc.delete(s)});return Jc.set(s,a),a}function O1(e,t){return t&&(e.__preparedMethod=t.preparedMethod,e.__contract=t.contract),e}const Yd=Object.freeze(Object.defineProperty({__proto__:null,prepareTransaction:O1},Symbol.toStringTag,{value:"Module"}));function F5(e){const{contract:t,method:n,params:i,...r}=e,s=()=>(async()=>{var o,a;if(Array.isArray(n))return n;if(B5(n))return kr(n);if(typeof n=="function")return kr(await n(t));if(typeof n=="string"&&n.startsWith("function ")){const l=Pu(n);if(l.type==="function")return kr(l);throw new Error('"method" passed is not of type "function"')}if(t.abi&&((o=t.abi)==null?void 0:o.length)>0){const l=(a=t.abi)==null?void 0:a.find(u=>u.type==="function"&&u.name===n);if(l)return kr(l)}throw new Error(`Could not resolve method "${n}".`)})();return O1({...r,chain:t.chain,client:t.client,data:async()=>{let o;return Array.isArray(n)?o=n:o=await s(),o[1].length===0?o[0]:o[0]+$u(o[1],await nt(i??[])).slice(2)},to:t.address},{contract:t,preparedMethod:s})}function Ej(e){return typeof e=="object"&&e!==null}function Fl(e,t=[]){return Ej(e)&&t.every(n=>n in e)}function Cj(e){return Fl(e,["__contract"])&&Fl(e.__contract,["address","chain"])&&typeof e.__contract.address=="string"}const Xc=new WeakMap;function Y5(e){if(Xc.has(e))return Xc.get(e);const t=(async()=>{const n=ii(e),i=await W7(n,{address:e.address,blockTag:"latest"});return i==="0x"&&Xc.delete(e),i})();return Xc.set(e,t),t}const rg=new WeakSet;async function Q5(e){if(rg.has(e))return!0;const n=await Y5(e)!=="0x";return n&&rg.add(e),n}const VJ="0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c",Lj="0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00",Tj="0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb",Wu="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",jj="0x0000000071727De22E5E9d8BAf0edAc6f37da032",vj=50000n,Nj=e=>Sj(e||Wu)==="v0.7"?Tj:Lj,H5=e=>{const t=Fs().bundler;return t.startsWith("localhost:")?`http://${t}/v2?chain=${e.id}`:`https://${e.id}.${t}/v2`},Sj=e=>{const t=me(e);if(t===Wu)return"v0.6";if(t===jj)return"v0.7";throw new Error("Unknown paymaster version")},G5=w.createContext(void 0);function P1(e){if(!e.address)throw new Error("AccountProvider: No address passed. Ensure an address is always provided to the AccountProvider");return c.jsx(G5.Provider,{value:e,children:e.children})}function Nc(){const e=w.useContext(G5);if(!e)throw new Error("AccountProviderContext not found. Make sure you are using AccountName, AccountAvatar, etc. inside an <AccountProvider /> component");return e}const yf={type:"dark",colors:{accentButtonBg:"hsl(221 83% 54%)",accentButtonText:"hsl(0 0% 100%)",accentText:"hsl(209.61deg 100% 65.31%)",borderColor:"hsl(0 0% 15%)",connectedButtonBg:"hsl(0 0% 3.92%)",connectedButtonBgHover:"hsl(0 0% 11%)",danger:"hsl(360 72% 55%)",inputAutofillBg:"hsl(0 0% 11%)",modalBg:"hsl(0 0% 3.92%)",primaryButtonBg:"hsl(0 0% 100%)",primaryButtonText:"hsl(0 0% 0%)",primaryText:"hsl(0 0% 98%)",scrollbarBg:"hsl(0 0% 11%)",secondaryButtonBg:"hsl(0 0% 9%)",modalOverlayBg:"rgba(0, 0, 0, 0.7)",secondaryButtonHoverBg:"hsl(0 0% 9%/80%)",secondaryButtonText:"hsl(0 0% 98%)",secondaryIconColor:"hsl(0 0% 63%)",secondaryIconHoverBg:"hsl(0 0% 11%)",secondaryIconHoverColor:"hsl(0 0% 98%)",secondaryText:"hsl(0 0% 63%)",selectedTextBg:"hsl(0 0% 100%)",selectedTextColor:"hsl(0 0% 0%)",separatorLine:"hsl(0 0% 15%)",skeletonBg:"hsl(0 0% 12%)",success:"hsl(142 75% 50%)",tertiaryBg:"hsl(0 0% 11%/50%)",tooltipBg:"hsl(0 0% 11%)",tooltipText:"hsl(0 0% 98%)"},fontFamily:"inherit"},Aj={type:"light",colors:{accentButtonBg:"hsl(221 83% 54%)",accentButtonText:"hsl(0 0% 100%)",accentText:"hsl(211.23deg 100% 44.47%)",borderColor:"hsl(0 0% 85%)",connectedButtonBg:"hsl(0 0% 100%)",connectedButtonBgHover:"hsl(0 0% 93%)",danger:"hsl(360 72% 60%)",inputAutofillBg:"hsl(0 0% 93%)",modalBg:"hsl(0 0% 100%)",primaryButtonBg:"hsl(0 0% 4%)",primaryButtonText:"hsl(0 0% 100%)",primaryText:"hsl(0 0% 4%)",scrollbarBg:"hsl(0 0% 93%)",secondaryButtonBg:"hsl(0 0% 93%)",modalOverlayBg:"rgba(0, 0, 0, 0.7)",secondaryButtonHoverBg:"hsl(0 0% 93%/80%)",secondaryButtonText:"hsl(0 0% 4%)",secondaryIconColor:"hsl(0 0% 40%)",secondaryIconHoverBg:"hsl(0 0% 93%)",secondaryIconHoverColor:"hsl(0 0% 4%)",secondaryText:"hsl(0 0% 40%)",selectedTextBg:"hsl(0 0% 4%)",selectedTextColor:"hsl(0 0% 100%)",separatorLine:"hsl(0 0% 85%)",skeletonBg:"hsl(0 0% 85%)",success:"hsl(142.09 70.56% 35.29%)",tertiaryBg:"hsl(0 0% 93%/70%)",tooltipBg:"hsl(0 0% 100%)",tooltipText:"hsl(0 0% 4%)"},fontFamily:"inherit"},ie={"3xl":"48px",lg:"20px",md:"16px",sm:"14px",xl:"24px",xs:"12px",xxl:"32px"},z={"3xl":"64px","3xs":"4px","4xs":"2px",lg:"24px",md:"16px","md+":"20px",sm:"12px",xl:"32px",xs:"8px",xxl:"48px",xxs:"6px"},Z={lg:"12px",md:"8px",sm:"6px",xl:"20px",full:"9999px"},A={"3xl":"96","4xl":"128",lg:"32",md:"24","sm+":"20",sm:"16",xl:"48",xs:"12",xxl:"64"},k1={mobile:"@media (max-width: 640px)"},Z5={lg:"0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.1)",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)"};var Qs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ks=typeof window>"u"||"Deno"in globalThis;function zt(){}function Dj(e,t){return typeof e=="function"?e(t):e}function gf(e){return typeof e=="number"&&e>=0&&e!==1/0}function q5(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ur(e,t){return typeof e=="function"?e(t):e}function qn(e,t){return typeof e=="function"?e(t):e}function sg(e,t){const{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:a}=e;if(o){if(i){if(t.queryHash!==z1(o,t.options))return!1}else if(!ec(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||r&&r!==t.state.fetchStatus||s&&!s(t))}function og(e,t){const{exact:n,status:i,predicate:r,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(zs(t.options.mutationKey)!==zs(s))return!1}else if(!ec(t.options.mutationKey,s))return!1}return!(i&&t.state.status!==i||r&&!r(t))}function z1(e,t){return((t==null?void 0:t.queryKeyHashFn)||zs)(e)}function zs(e){return JSON.stringify(e,(t,n)=>pf(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function ec(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ec(e[n],t[n])):!1}function Fu(e,t){if(e===t)return e;const n=ag(e)&&ag(t);if(n||pf(e)&&pf(t)){const i=n?e:Object.keys(e),r=i.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{},l=new Set(i);let u=0;for(let d=0;d<o;d++){const f=n?d:s[d];(!n&&l.has(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,u++):(a[f]=Fu(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&u++)}return r===o&&u===r?e:a}return t}function Yl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ag(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pf(e){if(!cg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!cg(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function cg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Oj(e){return new Promise(t=>{setTimeout(t,e)})}function wf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Fu(e,t):t}function Pj(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function kj(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var R1=Symbol();function K5(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===R1?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function J5(e,t){return typeof e=="function"?e(...t):!!e}var xs,Er,bo,X2,zj=(X2=class extends Qs{constructor(){super();oe(this,xs);oe(this,Er);oe(this,bo);K(this,bo,t=>{if(!ks&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Er)||this.setEventListener(S(this,bo))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Er))==null||t.call(this),K(this,Er,void 0))}setEventListener(t){var n;K(this,bo,t),(n=S(this,Er))==null||n.call(this),K(this,Er,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){S(this,xs)!==t&&(K(this,xs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,xs)=="boolean"?S(this,xs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},xs=new WeakMap,Er=new WeakMap,bo=new WeakMap,X2),U1=new zj,Mo,Cr,Io,e4,Rj=(e4=class extends Qs{constructor(){super();oe(this,Mo,!0);oe(this,Cr);oe(this,Io);K(this,Io,t=>{if(!ks&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){S(this,Cr)||this.setEventListener(S(this,Io))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Cr))==null||t.call(this),K(this,Cr,void 0))}setEventListener(t){var n;K(this,Io,t),(n=S(this,Cr))==null||n.call(this),K(this,Cr,t(this.setOnline.bind(this)))}setOnline(t){S(this,Mo)!==t&&(K(this,Mo,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return S(this,Mo)}},Mo=new WeakMap,Cr=new WeakMap,Io=new WeakMap,e4),Ql=new Rj;function xf(){let e,t;const n=new Promise((r,s)=>{e=r,t=s});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),e(r)},n.reject=r=>{i({status:"rejected",reason:r}),t(r)},n}function Uj(e){return Math.min(1e3*2**e,3e4)}function X5(e){return(e??"online")==="online"?Ql.isOnline():!0}var e3=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Qd(e){return e instanceof e3}function t3(e){let t=!1,n=0,i=!1,r;const s=xf(),o=g=>{var x;i||(m(new e3(g)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>U1.isFocused()&&(e.networkMode==="always"||Ql.isOnline())&&e.canRun(),d=()=>X5(e.networkMode)&&e.canRun(),f=g=>{var x;i||(i=!0,(x=e.onSuccess)==null||x.call(e,g),r==null||r(),s.resolve(g))},m=g=>{var x;i||(i=!0,(x=e.onError)==null||x.call(e,g),r==null||r(),s.reject(g))},y=()=>new Promise(g=>{var x;r=_=>{(i||u())&&g(_)},(x=e.onPause)==null||x.call(e)}).then(()=>{var g;r=void 0,i||(g=e.onContinue)==null||g.call(e)}),p=()=>{if(i)return;let g;const x=n===0?e.initialPromise:void 0;try{g=x??e.fn()}catch(_){g=Promise.reject(_)}Promise.resolve(g).then(f).catch(_=>{var T;if(i)return;const b=e.retry??(ks?0:3),I=e.retryDelay??Uj,E=typeof I=="function"?I(n,_):I,C=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,_);if(t||!C){m(_);return}n++,(T=e.onFail)==null||T.call(e,n,_),Oj(E).then(()=>u()?void 0:y()).then(()=>{t?m(_):p()})})};return{promise:s,cancel:o,continue:()=>(r==null||r(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?p():y().then(p),s)}}var $j=e=>setTimeout(e,0);function Bj(){let e=[],t=0,n=a=>{a()},i=a=>{a()},r=$j;const s=a=>{t?e.push(a):r(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&r(()=>{i(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{i=a},setScheduler:a=>{r=a}}}var Je=Bj(),_s,t4,n3=(t4=class{constructor(){oe(this,_s)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gf(this.gcTime)&&K(this,_s,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ks?1/0:5*60*1e3))}clearGcTimeout(){S(this,_s)&&(clearTimeout(S(this,_s)),K(this,_s,void 0))}},_s=new WeakMap,t4),Eo,bs,Nn,Ms,kt,gc,Is,Gn,Di,n4,Vj=(n4=class extends n3{constructor(t){super();oe(this,Gn);oe(this,Eo);oe(this,bs);oe(this,Nn);oe(this,Ms);oe(this,kt);oe(this,gc);oe(this,Is);K(this,Is,!1),K(this,gc,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,Ms,t.client),K(this,Nn,S(this,Ms).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Eo,Wj(this.options)),this.state=t.state??S(this,Eo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,kt))==null?void 0:t.promise}setOptions(t){this.options={...S(this,gc),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Nn).remove(this)}setData(t,n){const i=wf(this.state.data,t,this.options);return ye(this,Gn,Di).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){ye(this,Gn,Di).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,r;const n=(i=S(this,kt))==null?void 0:i.promise;return(r=S(this,kt))==null||r.cancel(t),n?n.then(zt).catch(zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Eo))}isActive(){return this.observers.some(t=>qn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===R1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ur(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!q5(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,kt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,kt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Nn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,kt)&&(S(this,Is)?S(this,kt).cancel({revert:!0}):S(this,kt).cancelRetry()),this.scheduleGc()),S(this,Nn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,Gn,Di).call(this,{type:"invalidate"})}fetch(t,n){var u,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,kt))return S(this,kt).continueRetry(),S(this,kt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(y=>y.options.queryFn);m&&this.setOptions(m.options)}const i=new AbortController,r=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(K(this,Is,!0),i.signal)})},s=()=>{const m=K5(this.options,n),p=(()=>{const g={client:S(this,Ms),queryKey:this.queryKey,meta:this.meta};return r(g),g})();return K(this,Is,!1),this.options.persister?this.options.persister(m,p,this):m(p)},a=(()=>{const m={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:S(this,Ms),state:this.state,fetchFn:s};return r(m),m})();(u=this.options.behavior)==null||u.onFetch(a,this),K(this,bs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&ye(this,Gn,Di).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const l=m=>{var y,p,g,x;Qd(m)&&m.silent||ye(this,Gn,Di).call(this,{type:"error",error:m}),Qd(m)||((p=(y=S(this,Nn).config).onError)==null||p.call(y,m,this),(x=(g=S(this,Nn).config).onSettled)==null||x.call(g,this.state.data,m,this)),this.scheduleGc()};return K(this,kt,t3({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:i.abort.bind(i),onSuccess:m=>{var y,p,g,x;if(m===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(_){l(_);return}(p=(y=S(this,Nn).config).onSuccess)==null||p.call(y,m,this),(x=(g=S(this,Nn).config).onSettled)==null||x.call(g,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,y)=>{ye(this,Gn,Di).call(this,{type:"failed",failureCount:m,error:y})},onPause:()=>{ye(this,Gn,Di).call(this,{type:"pause"})},onContinue:()=>{ye(this,Gn,Di).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),S(this,kt).start()}},Eo=new WeakMap,bs=new WeakMap,Nn=new WeakMap,Ms=new WeakMap,kt=new WeakMap,gc=new WeakMap,Is=new WeakMap,Gn=new WeakSet,Di=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...i3(i.data,this.options),fetchMeta:t.meta??null};case"success":return K(this,bs,void 0),{...i,data:t.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return Qd(r)&&r.revert&&S(this,bs)?{...S(this,bs),fetchStatus:"idle"}:{...i,error:r,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),Je.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),S(this,Nn).notify({query:this,type:"updated",action:t})})},n4);function i3(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:X5(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Wj(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var mi,i4,Fj=(i4=class extends Qs{constructor(t={}){super();oe(this,mi);this.config=t,K(this,mi,new Map)}build(t,n,i){const r=n.queryKey,s=n.queryHash??z1(r,n);let o=this.get(s);return o||(o=new Vj({client:t,queryKey:r,queryHash:s,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){S(this,mi).has(t.queryHash)||(S(this,mi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,mi).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,mi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Je.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,mi).get(t)}getAll(){return[...S(this,mi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>sg(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>sg(t,i)):n}notify(t){Je.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Je.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Je.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mi=new WeakMap,i4),yi,Bt,Es,gi,mr,r4,Yj=(r4=class extends n3{constructor(t){super();oe(this,gi);oe(this,yi);oe(this,Bt);oe(this,Es);this.mutationId=t.mutationId,K(this,Bt,t.mutationCache),K(this,yi,[]),this.state=t.state||r3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,yi).includes(t)||(S(this,yi).push(t),this.clearGcTimeout(),S(this,Bt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,yi,S(this,yi).filter(n=>n!==t)),this.scheduleGc(),S(this,Bt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,yi).length||(this.state.status==="pending"?this.scheduleGc():S(this,Bt).remove(this))}continue(){var t;return((t=S(this,Es))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,a,l,u,d,f,m,y,p,g,x,_,b,I,E,C,T,j,O;const n=()=>{ye(this,gi,mr).call(this,{type:"continue"})};K(this,Es,t3({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(L,N)=>{ye(this,gi,mr).call(this,{type:"failed",failureCount:L,error:N})},onPause:()=>{ye(this,gi,mr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,Bt).canRun(this)}));const i=this.state.status==="pending",r=!S(this,Es).canStart();try{if(i)n();else{ye(this,gi,mr).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(s=S(this,Bt).config).onMutate)==null?void 0:o.call(s,t,this));const N=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));N!==this.state.context&&ye(this,gi,mr).call(this,{type:"pending",context:N,variables:t,isPaused:r})}const L=await S(this,Es).start();return await((d=(u=S(this,Bt).config).onSuccess)==null?void 0:d.call(u,L,t,this.state.context,this)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,L,t,this.state.context)),await((p=(y=S(this,Bt).config).onSettled)==null?void 0:p.call(y,L,null,this.state.variables,this.state.context,this)),await((x=(g=this.options).onSettled)==null?void 0:x.call(g,L,null,t,this.state.context)),ye(this,gi,mr).call(this,{type:"success",data:L}),L}catch(L){try{throw await((b=(_=S(this,Bt).config).onError)==null?void 0:b.call(_,L,t,this.state.context,this)),await((E=(I=this.options).onError)==null?void 0:E.call(I,L,t,this.state.context)),await((T=(C=S(this,Bt).config).onSettled)==null?void 0:T.call(C,void 0,L,this.state.variables,this.state.context,this)),await((O=(j=this.options).onSettled)==null?void 0:O.call(j,void 0,L,t,this.state.context)),L}finally{ye(this,gi,mr).call(this,{type:"error",error:L})}}finally{S(this,Bt).runNext(this)}}},yi=new WeakMap,Bt=new WeakMap,Es=new WeakMap,gi=new WeakSet,mr=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Je.batch(()=>{S(this,yi).forEach(i=>{i.onMutationUpdate(t)}),S(this,Bt).notify({mutation:this,type:"updated",action:t})})},r4);function r3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zi,Zn,pc,s4,Qj=(s4=class extends Qs{constructor(t={}){super();oe(this,zi);oe(this,Zn);oe(this,pc);this.config=t,K(this,zi,new Set),K(this,Zn,new Map),K(this,pc,0)}build(t,n,i){const r=new Yj({mutationCache:this,mutationId:++Hc(this,pc)._,options:t.defaultMutationOptions(n),state:i});return this.add(r),r}add(t){S(this,zi).add(t);const n=el(t);if(typeof n=="string"){const i=S(this,Zn).get(n);i?i.push(t):S(this,Zn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(S(this,zi).delete(t)){const n=el(t);if(typeof n=="string"){const i=S(this,Zn).get(n);if(i)if(i.length>1){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}else i[0]===t&&S(this,Zn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=el(t);if(typeof n=="string"){const i=S(this,Zn).get(n),r=i==null?void 0:i.find(s=>s.state.status==="pending");return!r||r===t}else return!0}runNext(t){var i;const n=el(t);if(typeof n=="string"){const r=(i=S(this,Zn).get(n))==null?void 0:i.find(s=>s!==t&&s.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Je.batch(()=>{S(this,zi).forEach(t=>{this.notify({type:"removed",mutation:t})}),S(this,zi).clear(),S(this,Zn).clear()})}getAll(){return Array.from(S(this,zi))}find(t){const n={exact:!0,...t};return this.getAll().find(i=>og(n,i))}findAll(t={}){return this.getAll().filter(n=>og(t,n))}notify(t){Je.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Je.batch(()=>Promise.all(t.map(n=>n.continue().catch(zt))))}},zi=new WeakMap,Zn=new WeakMap,pc=new WeakMap,s4);function el(e){var t;return(t=e.options.scope)==null?void 0:t.id}function lg(e){return{onFetch:(t,n)=>{var d,f,m,y,p;const i=t.options,r=(m=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:m.direction,s=((y=t.state.data)==null?void 0:y.pages)||[],o=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const x=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},_=K5(t.options,t.fetchOptions),b=async(I,E,C)=>{if(g)return Promise.reject();if(E==null&&I.pages.length)return Promise.resolve(I);const j=(()=>{const v={client:t.client,queryKey:t.queryKey,pageParam:E,direction:C?"backward":"forward",meta:t.options.meta};return x(v),v})(),O=await _(j),{maxPages:L}=t.options,N=C?kj:Pj;return{pages:N(I.pages,O,L),pageParams:N(I.pageParams,E,L)}};if(r&&s.length){const I=r==="backward",E=I?Hj:ug,C={pages:s,pageParams:o},T=E(i,C);a=await b(C,T,I)}else{const I=e??s.length;do{const E=l===0?o[0]??i.initialPageParam:ug(i,a);if(l>0&&E==null)break;a=await b(a,E),l++}while(l<I)}return a};t.options.persister?t.fetchFn=()=>{var g,x;return(x=(g=t.options).persister)==null?void 0:x.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function ug(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function Hj(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}var qe,Lr,Tr,Co,Lo,jr,To,jo,o4,Gj=(o4=class{constructor(e={}){oe(this,qe);oe(this,Lr);oe(this,Tr);oe(this,Co);oe(this,Lo);oe(this,jr);oe(this,To);oe(this,jo);K(this,qe,e.queryCache||new Fj),K(this,Lr,e.mutationCache||new Qj),K(this,Tr,e.defaultOptions||{}),K(this,Co,new Map),K(this,Lo,new Map),K(this,jr,0)}mount(){Hc(this,jr)._++,S(this,jr)===1&&(K(this,To,U1.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,qe).onFocus())})),K(this,jo,Ql.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,qe).onOnline())})))}unmount(){var e,t;Hc(this,jr)._--,S(this,jr)===0&&((e=S(this,To))==null||e.call(this),K(this,To,void 0),(t=S(this,jo))==null||t.call(this),K(this,jo,void 0))}isFetching(e){return S(this,qe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Lr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,qe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=S(this,qe).build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ur(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return S(this,qe).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),r=S(this,qe).get(i.queryHash),s=r==null?void 0:r.state.data,o=Dj(t,s);if(o!==void 0)return S(this,qe).build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Je.batch(()=>S(this,qe).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,qe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,qe);Je.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,qe);return Je.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Je.batch(()=>S(this,qe).findAll(e).map(r=>r.cancel(n)));return Promise.all(i).then(zt).catch(zt)}invalidateQueries(e,t={}){return Je.batch(()=>(S(this,qe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Je.batch(()=>S(this,qe).findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let s=r.fetch(void 0,n);return n.throwOnError||(s=s.catch(zt)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,qe).build(this,t);return n.isStaleByTime(Ur(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(zt).catch(zt)}fetchInfiniteQuery(e){return e.behavior=lg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(zt).catch(zt)}ensureInfiniteQueryData(e){return e.behavior=lg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ql.isOnline()?S(this,Lr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,qe)}getMutationCache(){return S(this,Lr)}getDefaultOptions(){return S(this,Tr)}setDefaultOptions(e){K(this,Tr,e)}setQueryDefaults(e,t){S(this,Co).set(zs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Co).values()],n={};return t.forEach(i=>{ec(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Lo).set(zs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Lo).values()],n={};return t.forEach(i=>{ec(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Tr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=z1(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===R1&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Tr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,qe).clear(),S(this,Lr).clear()}},qe=new WeakMap,Lr=new WeakMap,Tr=new WeakMap,Co=new WeakMap,Lo=new WeakMap,jr=new WeakMap,To=new WeakMap,jo=new WeakMap,o4),en,Ce,wc,Vt,Cs,vo,vr,Nr,xc,No,So,Ls,Ts,Sr,Ao,Se,Da,_f,bf,Mf,If,Ef,Cf,Lf,s3,a4,$1=(a4=class extends Qs{constructor(t,n){super();oe(this,Se);oe(this,en);oe(this,Ce);oe(this,wc);oe(this,Vt);oe(this,Cs);oe(this,vo);oe(this,vr);oe(this,Nr);oe(this,xc);oe(this,No);oe(this,So);oe(this,Ls);oe(this,Ts);oe(this,Sr);oe(this,Ao,new Set);this.options=n,K(this,en,t),K(this,Nr,null),K(this,vr,xf()),this.options.experimental_prefetchInRender||S(this,vr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,Ce).addObserver(this),dg(S(this,Ce),this.options)?ye(this,Se,Da).call(this):this.updateResult(),ye(this,Se,If).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Tf(S(this,Ce),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tf(S(this,Ce),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,Se,Ef).call(this),ye(this,Se,Cf).call(this),S(this,Ce).removeObserver(this)}setOptions(t){const n=this.options,i=S(this,Ce);if(this.options=S(this,en).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qn(this.options.enabled,S(this,Ce))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,Se,Lf).call(this),S(this,Ce).setOptions(this.options),n._defaulted&&!Yl(this.options,n)&&S(this,en).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,Ce),observer:this});const r=this.hasListeners();r&&hg(S(this,Ce),i,this.options,n)&&ye(this,Se,Da).call(this),this.updateResult(),r&&(S(this,Ce)!==i||qn(this.options.enabled,S(this,Ce))!==qn(n.enabled,S(this,Ce))||Ur(this.options.staleTime,S(this,Ce))!==Ur(n.staleTime,S(this,Ce)))&&ye(this,Se,_f).call(this);const s=ye(this,Se,bf).call(this);r&&(S(this,Ce)!==i||qn(this.options.enabled,S(this,Ce))!==qn(n.enabled,S(this,Ce))||s!==S(this,Sr))&&ye(this,Se,Mf).call(this,s)}getOptimisticResult(t){const n=S(this,en).getQueryCache().build(S(this,en),t),i=this.createResult(n,t);return qj(this,i)&&(K(this,Vt,i),K(this,vo,this.options),K(this,Cs,S(this,Ce).state)),i}getCurrentResult(){return S(this,Vt)}trackResult(t,n){return new Proxy(t,{get:(i,r)=>(this.trackProp(r),n==null||n(r),Reflect.get(i,r))})}trackProp(t){S(this,Ao).add(t)}getCurrentQuery(){return S(this,Ce)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,en).defaultQueryOptions(t),i=S(this,en).getQueryCache().build(S(this,en),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(t){return ye(this,Se,Da).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,Vt)))}createResult(t,n){var L;const i=S(this,Ce),r=this.options,s=S(this,Vt),o=S(this,Cs),a=S(this,vo),u=t!==i?t.state:S(this,wc),{state:d}=t;let f={...d},m=!1,y;if(n._optimisticResults){const N=this.hasListeners(),v=!N&&dg(t,n),D=N&&hg(t,i,n,r);(v||D)&&(f={...f,...i3(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:x}=f;y=f.data;let _=!1;if(n.placeholderData!==void 0&&y===void 0&&x==="pending"){let N;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(N=s.data,_=!0):N=typeof n.placeholderData=="function"?n.placeholderData((L=S(this,So))==null?void 0:L.state.data,S(this,So)):n.placeholderData,N!==void 0&&(x="success",y=wf(s==null?void 0:s.data,N,n),m=!0)}if(n.select&&y!==void 0&&!_)if(s&&y===(o==null?void 0:o.data)&&n.select===S(this,xc))y=S(this,No);else try{K(this,xc,n.select),y=n.select(y),y=wf(s==null?void 0:s.data,y,n),K(this,No,y),K(this,Nr,null)}catch(N){K(this,Nr,N)}S(this,Nr)&&(p=S(this,Nr),y=S(this,No),g=Date.now(),x="error");const b=f.fetchStatus==="fetching",I=x==="pending",E=x==="error",C=I&&b,T=y!==void 0,O={status:x,fetchStatus:f.fetchStatus,isPending:I,isSuccess:x==="success",isError:E,isInitialLoading:C,isLoading:C,data:y,dataUpdatedAt:f.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!I,isLoadingError:E&&!T,isPaused:f.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&T,isStale:B1(t,n),refetch:this.refetch,promise:S(this,vr)};if(this.options.experimental_prefetchInRender){const N=k=>{O.status==="error"?k.reject(O.error):O.data!==void 0&&k.resolve(O.data)},v=()=>{const k=K(this,vr,O.promise=xf());N(k)},D=S(this,vr);switch(D.status){case"pending":t.queryHash===i.queryHash&&N(D);break;case"fulfilled":(O.status==="error"||O.data!==D.value)&&v();break;case"rejected":(O.status!=="error"||O.error!==D.reason)&&v();break}}return O}updateResult(){const t=S(this,Vt),n=this.createResult(S(this,Ce),this.options);if(K(this,Cs,S(this,Ce).state),K(this,vo,this.options),S(this,Cs).data!==void 0&&K(this,So,S(this,Ce)),Yl(n,t))return;K(this,Vt,n);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!S(this,Ao).size)return!0;const o=new Set(s??S(this,Ao));return this.options.throwOnError&&o.add("error"),Object.keys(S(this,Vt)).some(a=>{const l=a;return S(this,Vt)[l]!==t[l]&&o.has(l)})};ye(this,Se,s3).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,Se,If).call(this)}},en=new WeakMap,Ce=new WeakMap,wc=new WeakMap,Vt=new WeakMap,Cs=new WeakMap,vo=new WeakMap,vr=new WeakMap,Nr=new WeakMap,xc=new WeakMap,No=new WeakMap,So=new WeakMap,Ls=new WeakMap,Ts=new WeakMap,Sr=new WeakMap,Ao=new WeakMap,Se=new WeakSet,Da=function(t){ye(this,Se,Lf).call(this);let n=S(this,Ce).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(zt)),n},_f=function(){ye(this,Se,Ef).call(this);const t=Ur(this.options.staleTime,S(this,Ce));if(ks||S(this,Vt).isStale||!gf(t))return;const i=q5(S(this,Vt).dataUpdatedAt,t)+1;K(this,Ls,setTimeout(()=>{S(this,Vt).isStale||this.updateResult()},i))},bf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,Ce)):this.options.refetchInterval)??!1},Mf=function(t){ye(this,Se,Cf).call(this),K(this,Sr,t),!(ks||qn(this.options.enabled,S(this,Ce))===!1||!gf(S(this,Sr))||S(this,Sr)===0)&&K(this,Ts,setInterval(()=>{(this.options.refetchIntervalInBackground||U1.isFocused())&&ye(this,Se,Da).call(this)},S(this,Sr)))},If=function(){ye(this,Se,_f).call(this),ye(this,Se,Mf).call(this,ye(this,Se,bf).call(this))},Ef=function(){S(this,Ls)&&(clearTimeout(S(this,Ls)),K(this,Ls,void 0))},Cf=function(){S(this,Ts)&&(clearInterval(S(this,Ts)),K(this,Ts,void 0))},Lf=function(){const t=S(this,en).getQueryCache().build(S(this,en),this.options);if(t===S(this,Ce))return;const n=S(this,Ce);K(this,Ce,t),K(this,wc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},s3=function(t){Je.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,Vt))}),S(this,en).getQueryCache().notify({query:S(this,Ce),type:"observerResultsUpdated"})})},a4);function Zj(e,t){return qn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function dg(e,t){return Zj(e,t)||e.state.data!==void 0&&Tf(e,t,t.refetchOnMount)}function Tf(e,t,n){if(qn(t.enabled,e)!==!1&&Ur(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&B1(e,t)}return!1}function hg(e,t,n,i){return(e!==t||qn(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&B1(e,n)}function B1(e,t){return qn(t.enabled,e)!==!1&&e.isStaleByTime(Ur(t.staleTime,e))}function qj(e,t){return!Yl(e.getCurrentResult(),t)}function fg(e,t){const n=new Set(t);return e.filter(i=>!n.has(i))}function Kj(e,t,n){const i=e.slice(0);return i[t]=n,i}var Do,Sn,Oo,Po,An,Ar,_c,bc,Mc,Lt,jf,vf,Nf,Sf,Af,c4,Jj=(c4=class extends Qs{constructor(t,n,i){super();oe(this,Lt);oe(this,Do);oe(this,Sn);oe(this,Oo);oe(this,Po);oe(this,An);oe(this,Ar);oe(this,_c);oe(this,bc);oe(this,Mc,[]);K(this,Do,t),K(this,Po,i),K(this,Oo,[]),K(this,An,[]),K(this,Sn,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&S(this,An).forEach(t=>{t.subscribe(n=>{ye(this,Lt,Sf).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,S(this,An).forEach(t=>{t.destroy()})}setQueries(t,n){K(this,Oo,t),K(this,Po,n),Je.batch(()=>{const i=S(this,An),r=ye(this,Lt,Nf).call(this,S(this,Oo));K(this,Mc,r),r.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions));const s=r.map(l=>l.observer),o=s.map(l=>l.getCurrentResult()),a=s.some((l,u)=>l!==i[u]);i.length===s.length&&!a||(K(this,An,s),K(this,Sn,o),this.hasListeners()&&(fg(i,s).forEach(l=>{l.destroy()}),fg(s,i).forEach(l=>{l.subscribe(u=>{ye(this,Lt,Sf).call(this,l,u)})}),ye(this,Lt,Af).call(this)))})}getCurrentResult(){return S(this,Sn)}getQueries(){return S(this,An).map(t=>t.getCurrentQuery())}getObservers(){return S(this,An)}getOptimisticResult(t,n){const i=ye(this,Lt,Nf).call(this,t),r=i.map(s=>s.observer.getOptimisticResult(s.defaultedQueryOptions));return[r,s=>ye(this,Lt,vf).call(this,s??r,n),()=>ye(this,Lt,jf).call(this,r,i)]}},Do=new WeakMap,Sn=new WeakMap,Oo=new WeakMap,Po=new WeakMap,An=new WeakMap,Ar=new WeakMap,_c=new WeakMap,bc=new WeakMap,Mc=new WeakMap,Lt=new WeakSet,jf=function(t,n){return n.map((i,r)=>{const s=t[r];return i.defaultedQueryOptions.notifyOnChangeProps?s:i.observer.trackResult(s,o=>{n.forEach(a=>{a.observer.trackProp(o)})})})},vf=function(t,n){return n?((!S(this,Ar)||S(this,Sn)!==S(this,bc)||n!==S(this,_c))&&(K(this,_c,n),K(this,bc,S(this,Sn)),K(this,Ar,Fu(S(this,Ar),n(t)))),S(this,Ar)):t},Nf=function(t){const n=new Map(S(this,An).map(r=>[r.options.queryHash,r])),i=[];return t.forEach(r=>{const s=S(this,Do).defaultQueryOptions(r),o=n.get(s.queryHash);o?i.push({defaultedQueryOptions:s,observer:o}):i.push({defaultedQueryOptions:s,observer:new $1(S(this,Do),s)})}),i},Sf=function(t,n){const i=S(this,An).indexOf(t);i!==-1&&(K(this,Sn,Kj(S(this,Sn),i,n)),ye(this,Lt,Af).call(this))},Af=function(){var t;if(this.hasListeners()){const n=S(this,Ar),i=ye(this,Lt,jf).call(this,S(this,Sn),S(this,Mc)),r=ye(this,Lt,vf).call(this,i,(t=S(this,Po))==null?void 0:t.combine);n!==r&&Je.batch(()=>{this.listeners.forEach(s=>{s(S(this,Sn))})})}},c4),Dr,Or,tn,Ri,Bi,El,Df,l4,Xj=(l4=class extends Qs{constructor(n,i){super();oe(this,Bi);oe(this,Dr);oe(this,Or);oe(this,tn);oe(this,Ri);K(this,Dr,n),this.setOptions(i),this.bindMethods(),ye(this,Bi,El).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var r;const i=this.options;this.options=S(this,Dr).defaultMutationOptions(n),Yl(this.options,i)||S(this,Dr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,tn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&zs(i.mutationKey)!==zs(this.options.mutationKey)?this.reset():((r=S(this,tn))==null?void 0:r.state.status)==="pending"&&S(this,tn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=S(this,tn))==null||n.removeObserver(this)}onMutationUpdate(n){ye(this,Bi,El).call(this),ye(this,Bi,Df).call(this,n)}getCurrentResult(){return S(this,Or)}reset(){var n;(n=S(this,tn))==null||n.removeObserver(this),K(this,tn,void 0),ye(this,Bi,El).call(this),ye(this,Bi,Df).call(this)}mutate(n,i){var r;return K(this,Ri,i),(r=S(this,tn))==null||r.removeObserver(this),K(this,tn,S(this,Dr).getMutationCache().build(S(this,Dr),this.options)),S(this,tn).addObserver(this),S(this,tn).execute(n)}},Dr=new WeakMap,Or=new WeakMap,tn=new WeakMap,Ri=new WeakMap,Bi=new WeakSet,El=function(){var i;const n=((i=S(this,tn))==null?void 0:i.state)??r3();K(this,Or,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Df=function(n){Je.batch(()=>{var i,r,s,o,a,l,u,d;if(S(this,Ri)&&this.hasListeners()){const f=S(this,Or).variables,m=S(this,Or).context;(n==null?void 0:n.type)==="success"?((r=(i=S(this,Ri)).onSuccess)==null||r.call(i,n.data,f,m),(o=(s=S(this,Ri)).onSettled)==null||o.call(s,n.data,null,f,m)):(n==null?void 0:n.type)==="error"&&((l=(a=S(this,Ri)).onError)==null||l.call(a,n.error,f,m),(d=(u=S(this,Ri)).onSettled)==null||d.call(u,void 0,n.error,f,m))}this.listeners.forEach(f=>{f(S(this,Or))})})},l4),o3=w.createContext(void 0),Ji=e=>{const t=w.useContext(o3);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ev=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(o3.Provider,{value:e,children:t})),a3=w.createContext(!1),c3=()=>w.useContext(a3);a3.Provider;function tv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var nv=w.createContext(tv()),l3=()=>w.useContext(nv),u3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},d3=e=>{w.useEffect(()=>{e.clearReset()},[e])},h3=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(r&&e.data===void 0||J5(n,[e.error,i])),f3=e=>{if(e.suspense){const t=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>t(n(...i)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},m3=(e,t)=>e.isLoading&&e.isFetching&&!t,Of=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Hl=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function V1({queries:e,...t},n){const i=Ji(),r=c3(),s=l3(),o=w.useMemo(()=>e.map(g=>{const x=i.defaultQueryOptions(g);return x._optimisticResults=r?"isRestoring":"optimistic",x}),[e,i,r]);o.forEach(g=>{f3(g),u3(g,s)}),d3(s);const[a]=w.useState(()=>new Jj(i,o,t)),[l,u,d]=a.getOptimisticResult(o,t.combine),f=!r&&t.subscribed!==!1;w.useSyncExternalStore(w.useCallback(g=>f?a.subscribe(Je.batchCalls(g)):zt,[a,f]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),w.useEffect(()=>{a.setQueries(o,t)},[o,t,a]);const y=l.some((g,x)=>Of(o[x],g))?l.flatMap((g,x)=>{const _=o[x];if(_){const b=new $1(i,_);if(Of(_,g))return Hl(_,b,s);m3(g,r)&&Hl(_,b,s)}return[]}):[];if(y.length>0)throw Promise.all(y);const p=l.find((g,x)=>{const _=o[x];return _&&h3({result:g,errorResetBoundary:s,throwOnError:_.throwOnError,query:i.getQueryCache().get(_.queryHash),suspense:_.suspense})});if(p!=null&&p.error)throw p.error;return u(d())}function iv(e,t,n){var f,m,y,p,g;const i=c3(),r=l3(),s=Ji(),o=s.defaultQueryOptions(e);(m=(f=s.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||m.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",f3(o),u3(o,r),d3(r);const a=!s.getQueryCache().get(o.queryHash),[l]=w.useState(()=>new t(s,o)),u=l.getOptimisticResult(o),d=!i&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(x=>{const _=d?l.subscribe(Je.batchCalls(x)):zt;return l.updateResult(),_},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),w.useEffect(()=>{l.setOptions(o)},[o,l]),Of(o,u))throw Hl(o,l,r);if(h3({result:u,errorResetBoundary:r,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((p=(y=s.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||p.call(y,o,u),o.experimental_prefetchInRender&&!ks&&m3(u,i)){const x=a?Hl(o,l,r):(g=s.getQueryCache().get(o.queryHash))==null?void 0:g.promise;x==null||x.catch(zt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function xe(e,t){return iv(e,$1)}function tc(e,t){const n=Ji(),[i]=w.useState(()=>new Xj(n,e));w.useEffect(()=>{i.setOptions(e)},[i,e]);const r=w.useSyncExternalStore(w.useCallback(o=>i.subscribe(Je.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=w.useCallback((o,a)=>{i.mutate(o,a).catch(zt)},[i]);if(r.error&&J5(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:s,mutateAsync:r.mutate}}function W1(e,t,n){const i=!!n,r=Ji(),s=xe({enabled:i&&!!(t!=null&&t.address),gcTime:0,placeholderData:!1,queryFn:()=>!n||!(t!=null&&t.address)?!1:n.isLoggedIn(t.address),queryKey:["siwe_auth","isLoggedIn",t==null?void 0:t.address],refetchOnWindowFocus:!1}),o=tc({mutationFn:async()=>{if(!n)throw new Error("No auth options provided");if(!e)throw new Error("No active wallet");const l=e.getChain();if(!l)throw new Error("No active chain");if(!t)throw new Error("No active account");const[u,{signLoginPayload:d}]=await Promise.all([n.getLoginPayload({address:t.address,chainId:l.id}),h(()=>import("./sign-login-payload-BKykauFw.js"),[])]);u.chain_id&&Number(u.chain_id)!==l.id&&await e.switchChain(Pe(Number(u.chain_id)));const f=await d({account:t,payload:u});return await n.doLogin(f)},mutationKey:["siwe_auth","login",t==null?void 0:t.address],onSuccess:()=>r.invalidateQueries({queryKey:["siwe_auth","isLoggedIn"]})}),a=tc({mutationFn:async()=>{if(!n)throw new Error("No auth options provided");return await n.doLogout()},mutationKey:["siwe_auth","logout",t==null?void 0:t.address],onSuccess:()=>r.invalidateQueries({queryKey:["siwe_auth","isLoggedIn"]})});return{doLogin:o.mutateAsync,doLogout:a.mutateAsync,isLoading:s.isFetching,isLoggedIn:s.data,isLoggingIn:o.isPending,isLoggingOut:a.isPending,isPending:s.isPending,requiresAuth:i}}const Hd=new Map;function y3(e){if(Hd.has(e))return Hd.get(e);const t=p5();return Hd.set(e,t),t}function rv(e){var t;return xe({enabled:!!(e!=null&&e.transactionHash)&&(((t=e==null?void 0:e.queryOptions)==null?void 0:t.enabled)??!0),queryFn:async()=>{if(!(e!=null&&e.transactionHash))throw new Error("No transaction hash or user op hash provided");return Vu(e)},queryKey:["waitForReceipt",(e==null?void 0:e.chain.id)||-1,e==null?void 0:e.transactionHash],retry:!1})}let sv=class{constructor(t){Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.value=t}};class ov{constructor(){Object.defineProperty(this,"head",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tail",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.clear(),this.size=0}enqueue(t){const n=new sv(t);this.head?(this.tail&&(this.tail.next=n),this.tail=n):(this.head=n,this.tail=n),this.size++}dequeue(){var n;const t=this.head;if(t)return this.head=(n=this.head)==null?void 0:n.next,this.size--,t.value}clear(){this.head=void 0,this.tail=void 0,this.size=0}*[Symbol.iterator](){let t=this.head;for(;t;)yield t.value,t=t.next}}const av={bind(e,t,n){return e.bind(n)}};function cv(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new ov;let n=0;const i=()=>{if(n--,t.size>0){const a=t.dequeue();a&&a()}},r=async(a,l,u)=>{n++;const d=(async()=>a(...u))();l(d);try{await d}catch{}i()},s=(a,l,u)=>{t.enqueue(av.bind(r.bind(void 0,a,l,u))),(async()=>{if(await Promise.resolve(),n<e&&t.size>0){const d=t.dequeue();d&&d()}})()},o=(a,...l)=>new Promise(u=>{s(a,u,l)});return Object.defineProperties(o,{activeCount:{get:()=>n},clearQueue:{value(){t.clear()}},pendingCount:{get:()=>t.size}}),o}function g3(e){var i;const t=!!e&&!e.name,n=xe({queryFn:async()=>{if(!e)throw new Error("chain is required");return Cc(await xt(e))},...ra(e),enabled:t,retry:!1});return{isLoading:t&&n.isLoading,name:(e==null?void 0:e.name)??((i=n.data)==null?void 0:i.name)}}function F1(e){var i,r,s,o;const t=!!e&&!((i=e.icon)!=null&&i.url),n=xe({queryFn:async()=>{if(!e)throw new Error("chain is required");return Cc(await xt(e))},...ra(e),enabled:t,retry:!1});return{isLoading:t&&n.isLoading,url:((r=e==null?void 0:e.icon)==null?void 0:r.url)??((o=(s=n.data)==null?void 0:s.icon)==null?void 0:o.url)}}function lv(e){var i,r;const t=!!e&&"testnet"in e&&!((i=e.faucets)!=null&&i.length)&&e.id!==1337,n=xe({queryFn:async()=>{if(!e)throw new Error("chain is required");return xt(e)},...ra(e),enabled:t});return{faucets:(e==null?void 0:e.faucets)??((r=n.data)==null?void 0:r.faucets)??[],isLoading:t&&n.isLoading}}function p3(e){var r,s;const t=!!e&&!((r=e.blockExplorers)!=null&&r.length),n=xe({queryFn:async()=>{if(!e)throw new Error("chain is required");return xt(e)},...ra(e),enabled:t}),i=n.data?Cc(n.data):void 0;return{explorers:e!=null&&e.blockExplorers&&((s=e==null?void 0:e.blockExplorers)==null?void 0:s.length)>0?e==null?void 0:e.blockExplorers:(i==null?void 0:i.blockExplorers)??[],isLoading:t&&n.isLoading}}function ra(e){return{enabled:!!e,queryKey:["chain",e==null?void 0:e.id],staleTime:1e3*60*60}}function Yu(e){return xe({...ra(e),queryFn:async()=>{if(!e)throw new Error("chainId is required");return xt(e)}})}function w3(e,t){const n=w.useMemo(()=>{const i=cv(t);return e.map(r=>({...ra(r),queryFn:()=>i(()=>xt(r))}))},[e,t]);return V1({queries:n})}function x3(e,t){e.invalidateQueries({queryKey:t?["walletBalance",t]:["walletBalance"]}),e.invalidateQueries({queryKey:t?["internal_account_balance",t]:["internal_account_balance"]}),e.invalidateQueries({queryKey:t?["nfts",t]:["nfts"]}),e.invalidateQueries({queryKey:t?["tokens",t]:["tokens"]})}async function Y1(e){const{address:t,client:n,chain:i}=e,r=e.tokenAddress||(i.id===42429?"0x20c0000000000000000000000000000000000000":void 0);if(r&&me(r)!==me(Yt)){const{getBalance:d}=await h(async()=>{const{getBalance:f}=await import("./getBalance-cs-XLy8M.js");return{getBalance:f}},__vite__mapDeps([23,24,1,2,3,4,5]));return d({address:t,contract:qt({address:r,chain:i,client:n})})}const s=ii({chain:i,client:n}),[o,a,l,u]=await Promise.all([J0(i),X0(i),e1(i),I5(s,{address:t})]);return{chainId:i.id,decimals:a,displayValue:Un(u,a),name:l,symbol:o,tokenAddress:r??Yt,value:u}}function Qu(e,t){const{chain:n,address:i,tokenAddress:r,client:s}=e;return xe({...t,enabled:((t==null?void 0:t.enabled)===void 0||t.enabled)&&!!n&&!!s&&!!i,queryFn:async()=>{if(!n)throw new Error("chain is required");if(!s)throw new Error("client is required");if(!i)throw new Error("address is required");return Y1({address:i,chain:n,client:s,tokenAddress:r})},queryKey:["walletBalance",(n==null?void 0:n.id)||-1,i||"0x0",{tokenAddress:r}]})}const _3=w.createContext(void 0);function Q1(){const e=In("useConnectionManager");if(!e)throw new Error("useConnectionManager must be used within a <ThirdwebProvider> Provider");return e}function In(e){const t=w.useContext(_3);if(!t)throw new Error(`${e} must be used within <ThirdwebProvider>`);return t}function Tt(){const t=In("useActiveAccount").activeAccountStore;return w.useSyncExternalStore(t.subscribe,t.getValue,t.getValue)}function bt(){const t=In("useActiveWallet").activeWalletStore;return w.useSyncExternalStore(t.subscribe,t.getValue,t.getValue)}function _t(){const t=In("useActiveWalletChain").activeWalletChainStore;return w.useSyncExternalStore(t.subscribe,t.getValue,t.getValue)}function uv(){const t=In("useActiveWalletConnectionStatus").activeWalletConnectionStatusStore;return w.useSyncExternalStore(t.subscribe,t.getValue,t.getValue)}function dv(){return In("useAddConnectedWallet").addConnectedWallet}function Hs(){const t=In("useConnectedWallets").connectedWallets;return w.useSyncExternalStore(t.subscribe,t.getValue,t.getValue)}function Hu(){var i;const e=bt(),t=Hs(),n=(i=e==null?void 0:e.getAdminAccount)==null?void 0:i.call(e);return n?t.find(r=>{var s,o,a;return((o=(s=r.getAccount())==null?void 0:s.address)==null?void 0:o.toLowerCase())===((a=n==null?void 0:n.address)==null?void 0:a.toLowerCase())}):e}function H1(e,t){const n={};for(const[i,r]of Object.entries(e)){n[Number(i)]={};const s={};for(const[o,a]of Object.entries(r))s[o]=a;n[Number(i)]=s}return typeof t=="number"?{[t]:n[t]}:n}function hv(){return In("useSetActiveWalletConnectionStatus").activeWalletConnectionStatusStore.setValue}function b3(e){const t=In("useConnect"),{connect:n}=t,i=hv(),[r,s]=w.useState(!1),[o,a]=w.useState(null),l=w.useCallback(async d=>{if(a(null),i("connecting"),typeof d!="function"){const f=await n(d,e);return i("connected"),f}s(!0);try{const f=await d(),m=await n(f,e);return i("connected"),m}catch(f){console.error(f),a(f),i("disconnected")}finally{s(!1)}return null},[n,e,i]),u=w.useCallback(()=>{s(!1),i("disconnected")},[i]);return{connect:l,error:o,isConnecting:r,cancelConnection:u}}function Gu(){return{disconnect:In("useDisconnect").disconnectWallet}}async function fv(e){var o;const{wallet:t,chain:n}=e,i=t.getAccount();if(!i)throw new Error(`Cannot send calls, no account connected for wallet: ${t.id}`);const r=e.calls[0];if(!r)throw new Error("No calls to send");const s=r.chain||n;if(((o=t.getChain())==null?void 0:o.id)!==s.id&&await t.switchChain(s),i.sendCalls){const{wallet:a,...l}=e;return{...await i.sendCalls(l),wallet:t}}throw new Error(`Cannot send calls, wallet ${t.id} does not support EIP-5792`)}async function Zu(e,t){const n=e.calls[0];if(!n)throw new Error("No calls to send");const{calls:i,capabilities:r,version:s="2.0.0",chain:o=n.chain}=e,a=await Promise.all(i.map(async u=>{const{to:d,value:f}=u;if(d===void 0&&u.data===void 0)throw new Error("Cannot send call, `to` or `data` must be provided.");const[m,y,p]=await Promise.all([nt(d),Du(u),nt(f)]);return m?{data:y,to:me(m),value:typeof p=="bigint"||typeof p=="number"?Ue(p):void 0}:{data:y,to:void 0,value:void 0}}));return{callParams:[{atomicRequired:e.atomicRequired??!1,calls:a,capabilities:r,chainId:Ue(o.id),from:me(t.address),version:s}],chain:o}}const mv=Object.freeze(Object.defineProperty({__proto__:null,sendCalls:fv,toProviderCallParams:Zu},Symbol.toStringTag,{value:"Module"}));async function yv({wallet:e,client:t,id:n}){const i=e.getAccount();if(!i)throw new Error(`Failed to get call status, no account found for wallet ${e.id}`);const r=e.getChain();if(!r)throw new Error(`Failed to get call status, no chain found for wallet ${e.id}`);if(i.getCallsStatus)return i.getCallsStatus({id:n,chain:r,client:t});throw new Error(`Failed to get call status, wallet ${e.id} does not support EIP-5792`)}const gv={"0x0":"reverted","0x1":"success"};function G1(e){var i;const[t,n]=(()=>{const r=e.status;return r>=100&&r<200?["pending",r]:r>=200&&r<300?["success",r]:r>=300&&r<700?["failure",r]:r==="CONFIRMED"?["success",200]:r==="PENDING"?["pending",100]:[void 0,r]})();return{...e,atomic:e.atomic,chainId:e.chainId?lw(e.chainId):void 0,receipts:((i=e.receipts)==null?void 0:i.map(r=>({...r,blockNumber:on(r.blockNumber),gasUsed:on(r.gasUsed),status:gv[r.status]})))??[],status:t,statusCode:n,version:e.version}}const pv=100,tl=new Map;function wv(e){const{id:t,chain:n,wallet:i,client:r}=e,o=`${n.id}:calls_${t}`,a=e.maxBlocksWaitTime??pv;if(tl.has(o))return tl.get(o);const l=new Promise((u,d)=>{let f=-1;const m=C5({chain:n,client:r,onNewBlockNumber:async()=>{if(f++,f>=a){m(),d(new Error(`Bundle not confirmed after ${a} blocks`));return}try{const y=await yv({client:r,id:t,wallet:i});if(y.status==="success"||y.status==="failure"){m(),u(y);return}}catch(y){console.error("waitForCallsReceipt error",y)}}})}).finally(()=>{tl.delete(o)});return tl.set(o,l),l}function M3(){return In("useSetActiveWallet").setActiveWallet}function I3(){return In("useSwitchActiveWalletChain").switchActiveWalletChain}async function Z1(e){const{address:t,client:n}=e,r=await He(n)(`${it("social")}/v1/profiles/${t}`);if(!r.ok){const s=await r.text().catch(()=>"Unknown error");throw new Error(`Failed to fetch profile: ${r.status} ${r.statusText} - ${s}`)}return(await r.json()).data}function xv(e){const{client:t,address:n}=e;return xe({enabled:!!n,queryFn:async()=>{if(!n)throw new Error("Address is required, should not have reached this point.");return await Z1({address:n,client:t})},queryKey:["social-profiles",n],retry:!1})}const sr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAwIiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNiIgZmlsbD0iIzYyN0VFQSIvPjxnIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZmlsbC1vcGFjaXR5PSIuNjAyIiBkPSJNMTYuNDk4IDR2OC44N2w3LjQ5NyAzLjM1eiIvPjxwYXRoIGQ9Ik0xNi40OTggNEw5IDE2LjIybDcuNDk4LTMuMzV6Ii8+PHBhdGggZmlsbC1vcGFjaXR5PSIuNjAyIiBkPSJNMTYuNDk4IDIxLjk2OHY2LjAyN0wyNCAxNy42MTZ6Ii8+PHBhdGggZD0iTTE2LjQ5OCAyNy45OTV2LTYuMDI4TDkgMTcuNjE2eiIvPjxwYXRoIGZpbGwtb3BhY2l0eT0iLjIiIGQ9Ik0xNi40OTggMjAuNTczbDcuNDk3LTQuMzUzLTcuNDk3LTMuMzQ4eiIvPjxwYXRoIGZpbGwtb3BhY2l0eT0iLjYwMiIgZD0iTTkgMTYuMjJsNy40OTggNC4zNTN2LTcuNzAxeiIvPjwvZz48L2c+PC9zdmc+",nl="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMzkuNDMgMjk1LjI3Ij48dGl0bGU+dGV0aGVyLXVzZHQtbG9nbzwvdGl0bGU+PHBhdGggZD0iTTYyLjE1LDEuNDVsLTYxLjg5LDEzMGEyLjUyLDIuNTIsMCwwLDAsLjU0LDIuOTRMMTY3Ljk1LDI5NC41NmEyLjU1LDIuNTUsMCwwLDAsMy41MywwTDMzOC42MywxMzQuNGEyLjUyLDIuNTIsMCwwLDAsLjU0LTIuOTRsLTYxLjg5LTEzMEEyLjUsMi41LDAsMCwwLDI3NSwwSDY0LjQ1YTIuNSwyLjUsMCwwLDAtMi4zLDEuNDVoMFoiIHN0eWxlPSJmaWxsOiM1MGFmOTU7ZmlsbC1ydWxlOmV2ZW5vZGQiLz48cGF0aCBkPSJNMTkxLjE5LDE0NC44djBjLTEuMi4wOS03LjQsMC40Ni0yMS4yMywwLjQ2LTExLDAtMTguODEtLjMzLTIxLjU1LTAuNDZ2MGMtNDIuNTEtMS44Ny03NC4yNC05LjI3LTc0LjI0LTE4LjEzczMxLjczLTE2LjI1LDc0LjI0LTE4LjE1djI4LjkxYzIuNzgsMC4yLDEwLjc0LjY3LDIxLjc0LDAuNjcsMTMuMiwwLDE5LjgxLS41NSwyMS0wLjY2di0yOC45YzQyLjQyLDEuODksNzQuMDgsOS4yOSw3NC4wOCwxOC4xM3MtMzEuNjUsMTYuMjQtNzQuMDgsMTguMTJoMFptMC0zOS4yNVY3OS42OGg1OS4yVjQwLjIzSDg5LjIxVjc5LjY4SDE0OC40djI1Ljg2Yy00OC4xMSwyLjIxLTg0LjI5LDExLjc0LTg0LjI5LDIzLjE2czM2LjE4LDIwLjk0LDg0LjI5LDIzLjE2djgyLjloNDIuNzhWMTUxLjgzYzQ4LTIuMjEsODQuMTItMTEuNzMsODQuMTItMjMuMTRzLTM2LjA5LTIwLjkzLTg0LjEyLTIzLjE1aDBabTAsMGgwWiIgc3R5bGU9ImZpbGw6I2ZmZjtmaWxsLXJ1bGU6ZXZlbm9kZCIvPjwvc3ZnPg==",Ln="data:image/svg+xml;base64,PHN2ZyBkYXRhLW5hbWU9Ijg2OTc3Njg0LTEyZGItNDg1MC04ZjMwLTIzM2E3YzI2N2QxMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMjAwMCAyMDAwIj4KICA8cGF0aCBkPSJNMTAwMCAyMDAwYzU1NC4xNyAwIDEwMDAtNDQ1LjgzIDEwMDAtMTAwMFMxNTU0LjE3IDAgMTAwMCAwIDAgNDQ1LjgzIDAgMTAwMHM0NDUuODMgMTAwMCAxMDAwIDEwMDB6IiBmaWxsPSIjMjc3NWNhIi8+CiAgPHBhdGggZD0iTTEyNzUgMTE1OC4zM2MwLTE0NS44My04Ny41LTE5NS44My0yNjIuNS0yMTYuNjYtMTI1LTE2LjY3LTE1MC01MC0xNTAtMTA4LjM0czQxLjY3LTk1LjgzIDEyNS05NS44M2M3NSAwIDExNi42NyAyNSAxMzcuNSA4Ny41IDQuMTcgMTIuNSAxNi42NyAyMC44MyAyOS4xNyAyMC44M2g2Ni42NmMxNi42NyAwIDI5LjE3LTEyLjUgMjkuMTctMjkuMTZ2LTQuMTdjLTE2LjY3LTkxLjY3LTkxLjY3LTE2Mi41LTE4Ny41LTE3MC44M3YtMTAwYzAtMTYuNjctMTIuNS0yOS4xNy0zMy4zMy0zMy4zNGgtNjIuNWMtMTYuNjcgMC0yOS4xNyAxMi41LTMzLjM0IDMzLjM0djk1LjgzYy0xMjUgMTYuNjctMjA0LjE2IDEwMC0yMDQuMTYgMjA0LjE3IDAgMTM3LjUgODMuMzMgMTkxLjY2IDI1OC4zMyAyMTIuNSAxMTYuNjcgMjAuODMgMTU0LjE3IDQ1LjgzIDE1NC4xNyAxMTIuNXMtNTguMzQgMTEyLjUtMTM3LjUgMTEyLjVjLTEwOC4zNCAwLTE0NS44NC00NS44NC0xNTguMzQtMTA4LjM0LTQuMTYtMTYuNjYtMTYuNjYtMjUtMjkuMTYtMjVoLTcwLjg0Yy0xNi42NiAwLTI5LjE2IDEyLjUtMjkuMTYgMjkuMTd2NC4xN2MxNi42NiAxMDQuMTYgODMuMzMgMTc5LjE2IDIyMC44MyAyMDB2MTAwYzAgMTYuNjYgMTIuNSAyOS4xNiAzMy4zMyAzMy4zM2g2Mi41YzE2LjY3IDAgMjkuMTctMTIuNSAzMy4zNC0zMy4zM3YtMTAwYzEyNS0yMC44NCAyMDguMzMtMTA4LjM0IDIwOC4zMy0yMjAuODR6IiBmaWxsPSIjZmZmIi8+CiAgPHBhdGggZD0iTTc4Ny41IDE1OTUuODNjLTMyNS0xMTYuNjYtNDkxLjY3LTQ3OS4xNi0zNzAuODMtODAwIDYyLjUtMTc1IDIwMC0zMDguMzMgMzcwLjgzLTM3MC44MyAxNi42Ny04LjMzIDI1LTIwLjgzIDI1LTQxLjY3VjMyNWMwLTE2LjY3LTguMzMtMjkuMTctMjUtMzMuMzMtNC4xNyAwLTEyLjUgMC0xNi42NyA0LjE2LTM5NS44MyAxMjUtNjEyLjUgNTQ1Ljg0LTQ4Ny41IDk0MS42NyA3NSAyMzMuMzMgMjU0LjE3IDQxMi41IDQ4Ny41IDQ4Ny41IDE2LjY3IDguMzMgMzMuMzQgMCAzNy41LTE2LjY3IDQuMTctNC4xNiA0LjE3LTguMzMgNC4xNy0xNi42NnYtNTguMzRjMC0xMi41LTEyLjUtMjkuMTYtMjUtMzcuNXpNMTIyOS4xNyAyOTUuODNjLTE2LjY3LTguMzMtMzMuMzQgMC0zNy41IDE2LjY3LTQuMTcgNC4xNy00LjE3IDguMzMtNC4xNyAxNi42N3Y1OC4zM2MwIDE2LjY3IDEyLjUgMzMuMzMgMjUgNDEuNjcgMzI1IDExNi42NiA0OTEuNjcgNDc5LjE2IDM3MC44MyA4MDAtNjIuNSAxNzUtMjAwIDMwOC4zMy0zNzAuODMgMzcwLjgzLTE2LjY3IDguMzMtMjUgMjAuODMtMjUgNDEuNjdWMTcwMGMwIDE2LjY3IDguMzMgMjkuMTcgMjUgMzMuMzMgNC4xNyAwIDEyLjUgMCAxNi42Ny00LjE2IDM5NS44My0xMjUgNjEyLjUtNTQ1Ljg0IDQ4Ny41LTk0MS42Ny03NS0yMzcuNS0yNTguMzQtNDE2LjY3LTQ4Ny41LTQ5MS42N3oiIGZpbGw9IiNmZmYiLz4KPC9zdmc+Cg==",il="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDkuMjYgMTA5LjI2Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzVhNTU2NDt9LmNscy0ye2ZpbGw6I2YwOTI0Mjt9LmNscy0ze2ZpbGw6IzI4MjEzODt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPndyYXBwZWQtYml0Y29pbi13YnRjPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iTGF5ZXJfMS0yIiBkYXRhLW5hbWU9IkxheWVyIDEiPjxnIGlkPSJQYWdlLTEiPjxnIGlkPSJ3YnRjX2NvbG91ciIgZGF0YS1uYW1lPSJ3YnRjIGNvbG91ciI+PHBhdGggaWQ9IlNoYXBlIiBjbGFzcz0iY2xzLTEiIGQ9Ik04OS4wOSwyMi45M2wtMywzYTQyLjQ3LDQyLjQ3LDAsMCwxLDAsNTcuMzJsMywzYTQ2Ljc2LDQ2Ljc2LDAsMCwwLDAtNjMuMzlaIi8+PHBhdGggaWQ9IlNoYXBlLTIiIGRhdGEtbmFtZT0iU2hhcGUiIGNsYXNzPSJjbHMtMSIgZD0iTTI2LDIzLjE5YTQyLjQ3LDQyLjQ3LDAsMCwxLDU3LjMyLDBsMy0zYTQ2Ljc2LDQ2Ljc2LDAsMCwwLTYzLjM5LDBaIi8+PHBhdGggaWQ9IlNoYXBlLTMiIGRhdGEtbmFtZT0iU2hhcGUiIGNsYXNzPSJjbHMtMSIgZD0iTTIzLjE5LDgzLjI4YTQyLjQ3LDQyLjQ3LDAsMCwxLDAtNTcuMjlsLTMtM2E0Ni43Niw0Ni43NiwwLDAsMCwwLDYzLjM5WiIvPjxwYXRoIGlkPSJTaGFwZS00IiBkYXRhLW5hbWU9IlNoYXBlIiBjbGFzcz0iY2xzLTEiIGQ9Ik04My4yOCw4Ni4wNWE0Mi40Nyw0Mi40NywwLDAsMS01Ny4zMiwwbC0zLDNhNDYuNzYsNDYuNzYsMCwwLDAsNjMuMzksMFoiLz48cGF0aCBpZD0iU2hhcGUtNSIgZGF0YS1uYW1lPSJTaGFwZSIgY2xhc3M9ImNscy0yIiBkPSJNNzMuNTcsNDQuNjJjLS42LTYuMjYtNi04LjM2LTEyLjgzLTlWMjdINTUuNDZ2OC40NmMtMS4zOSwwLTIuODEsMC00LjIyLDBWMjdINDZ2OC42OEgzNS4yOXY1LjY1czMuOS0uMDcsMy44NCwwYTIuNzMsMi43MywwLDAsMSwzLDIuMzJWNjcuNDFhMS44NSwxLjg1LDAsMCwxLS42NCwxLjI5LDEuODMsMS44MywwLDAsMS0xLjM2LjQ2Yy4wNy4wNi0zLjg0LDAtMy44NCwwbC0xLDYuMzFINDUuOXY4LjgyaDUuMjhWNzUuNkg1NS40djguNjVoNS4yOVY3NS41M2M4LjkyLS41NCwxNS4xNC0yLjc0LDE1LjkyLTExLjA5LjYzLTYuNzItMi41My05LjcyLTcuNTgtMTAuOTNDNzIuMSw1Miw3NCw0OS4yLDczLjU3LDQ0LjYyWk02Ni4xNyw2My40YzAsNi41Ni0xMS4yNCw1LjgxLTE0LjgyLDUuODFWNTcuNTdDNTQuOTMsNTcuNTgsNjYuMTcsNTYuNTUsNjYuMTcsNjMuNFpNNjMuNzIsNDdjMCw2LTkuMzgsNS4yNy0xMi4zNiw1LjI3VjQxLjY5QzU0LjM0LDQxLjY5LDYzLjcyLDQwLjc1LDYzLjcyLDQ3WiIvPjxwYXRoIGlkPSJTaGFwZS02IiBkYXRhLW5hbWU9IlNoYXBlIiBjbGFzcz0iY2xzLTMiIGQ9Ik01NC42MiwxMDkuMjZhNTQuNjMsNTQuNjMsMCwxLDEsNTQuNjQtNTQuNjRBNTQuNjMsNTQuNjMsMCwwLDEsNTQuNjIsMTA5LjI2Wm0wLTEwNUE1MC4zNCw1MC4zNCwwLDEsMCwxMDUsNTQuNjIsNTAuMzQsNTAuMzQsMCwwLDAsNTQuNjIsNC4yNloiLz48L2c+PC9nPjwvZz48L2c+PC9zdmc+",Gd="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSI1MTIiIGN5PSI1MTIiIHI9IjUxMiIgZmlsbD0iIzgyNDdFNSIvPgo8cGF0aCBkPSJNNjgxLjQ2OSA0MDIuNDU2QzY2OS4xODkgMzk1LjMxMiA2NTMuMjI0IDM5NS4zMTIgNjM5LjcxNiA0MDIuNDU2TDU0My45MjggNDU3LjIyOEw0NzguODQyIDQ5Mi45NDlMMzgzLjA1NSA1NDcuNzIxQzM3MC43NzQgNTU0Ljg2NSAzNTQuODEgNTU0Ljg2NSAzNDEuMzAxIDU0Ny43MjFMMjY1LjE2MiA1MDQuODU2QzI1Mi44ODIgNDk3LjcxMiAyNDQuMjg2IDQ4NC42MTQgMjQ0LjI4NiA0NzAuMzI1VjM4NS43ODZDMjQ0LjI4NiAzNzEuNDk4IDI1MS42NTQgMzU4LjQgMjY1LjE2MiAzNTEuMjU2TDM0MC4wNzMgMzA5LjU4MUMzNTIuMzUzIDMwMi40MzcgMzY4LjMxOCAzMDIuNDM3IDM4MS44MjcgMzA5LjU4MUw0NTYuNzM3IDM1MS4yNTZDNDY5LjAxOCAzNTguNCA0NzcuNjE0IDM3MS40OTggNDc3LjYxNCAzODUuNzg2VjQ0MC41NThMNTQyLjcgNDAzLjY0NlYzNDguODc0QzU0Mi43IDMzNC41ODYgNTM1LjMzMiAzMjEuNDg4IDUyMS44MjQgMzE0LjM0NEwzODMuMDU1IDIzNS43NThDMzcwLjc3NCAyMjguNjE0IDM1NC44MSAyMjguNjE0IDM0MS4zMDEgMjM1Ljc1OEwyMDAuMDc2IDMxNC4zNDRDMTg2LjU2NyAzMjEuNDg4IDE3OS4xOTkgMzM0LjU4NiAxNzkuMTk5IDM0OC44NzRWNTA3LjIzN0MxNzkuMTk5IDUyMS41MjUgMTg2LjU2NyA1MzQuNjIzIDIwMC4wNzYgNTQxLjc2N0wzNDEuMzAxIDYyMC4zNTNDMzUzLjU4MiA2MjcuNDk4IDM2OS41NDYgNjI3LjQ5OCAzODMuMDU1IDYyMC4zNTNMNDc4Ljg0MiA1NjYuNzcyTDU0My45MjggNTI5Ljg2TDYzOS43MTYgNDc2LjI3OUM2NTEuOTk2IDQ2OS4xMzUgNjY3Ljk2MSA0NjkuMTM1IDY4MS40NjkgNDc2LjI3OUw3NTYuMzggNTE3Ljk1M0M3NjguNjYgNTI1LjA5OCA3NzcuMjU3IDUzOC4xOTUgNzc3LjI1NyA1NTIuNDg0VjYzNy4wMjNDNzc3LjI1NyA2NTEuMzEyIDc2OS44ODggNjY0LjQwOSA3NTYuMzggNjcxLjU1M0w2ODEuNDY5IDcxNC40MTlDNjY5LjE4OSA3MjEuNTYzIDY1My4yMjQgNzIxLjU2MyA2MzkuNzE2IDcxNC40MTlMNTY0LjgwNSA2NzIuNzQ0QzU1Mi41MjUgNjY1LjYgNTQzLjkyOCA2NTIuNTAyIDU0My45MjggNjM4LjIxNFY1ODMuNDQyTDQ3OC44NDIgNjIwLjM1M1Y2NzUuMTI1QzQ3OC44NDIgNjg5LjQxNCA0ODYuMjEgNzAyLjUxMiA0OTkuNzE5IDcwOS42NTZMNjQwLjk0NCA3ODguMjQyQzY1My4yMjQgNzk1LjM4NiA2NjkuMTg5IDc5NS4zODYgNjgyLjY5NyA3ODguMjQyTDgyMy45MjIgNzA5LjY1NkM4MzYuMjAzIDcwMi41MTIgODQ0Ljc5OSA2ODkuNDE0IDg0NC43OTkgNjc1LjEyNVY1MTYuNzYzQzg0NC43OTkgNTAyLjQ3NCA4MzcuNDMxIDQ4OS4zNzcgODIzLjkyMiA0ODIuMjMyTDY4MS40NjkgNDAyLjQ1NloiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",mg="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiI+PGcgZmlsbD0ibm9uZSI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTYiIGZpbGw9IiNGM0JBMkYiLz48cGF0aCBmaWxsPSIjRkZGIiBkPSJNMTIuMTE2IDE0LjQwNEwxNiAxMC41MmwzLjg4NiAzLjg4NiAyLjI2LTIuMjZMMTYgNmwtNi4xNDQgNi4xNDQgMi4yNiAyLjI2ek02IDE2bDIuMjYtMi4yNkwxMC41MiAxNmwtMi4yNiAyLjI2TDYgMTZ6bTYuMTE2IDEuNTk2TDE2IDIxLjQ4bDMuODg2LTMuODg2IDIuMjYgMi4yNTlMMTYgMjZsLTYuMTQ0LTYuMTQ0LS4wMDMtLjAwMyAyLjI2My0yLjI1N3pNMjEuNDggMTZsMi4yNi0yLjI2TDI2IDE2bC0yLjI2IDIuMjZMMjEuNDggMTZ6bS0zLjE4OC0uMDAyaC4wMDJ2LjAwMkwxNiAxOC4yOTRsLTIuMjkxLTIuMjktLjAwNC0uMDA0LjAwNC0uMDAzLjQwMS0uNDAyLjE5NS0uMTk1TDE2IDEzLjcwNmwyLjI5MyAyLjI5M3oiLz48L2c+PC9zdmc+",yg="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMzYuNDEgMzM3LjQyIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2YwYjkwYjtzdHJva2U6I2YwYjkwYjt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPkFzc2V0IDE8L3RpdGxlPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGlkPSJMYXllcl8xLTIiIGRhdGEtbmFtZT0iTGF5ZXIgMSI+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMTY4LjIuNzFsNDEuNSw0Mi41TDEwNS4yLDE0Ny43MWwtNDEuNS00MS41WiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIzMS4yLDYzLjcxbDQxLjUsNDIuNUwxMDUuMiwyNzMuNzFsLTQxLjUtNDEuNVoiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik00Mi4yLDEyNi43MWw0MS41LDQyLjUtNDEuNSw0MS41TC43LDE2OS4yMVoiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0yOTQuMiwxMjYuNzFsNDEuNSw0Mi41TDE2OC4yLDMzNi43MWwtNDEuNS00MS41WiIvPjwvZz48L2c+PC9zdmc+",gg="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMzIgMzIiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojZmZmO2ZpbGwtcnVsZTpldmVub2RkO30uY2xzLTJ7ZmlsbDojMTNiNWVjO30uY2xzLTN7bWFzazp1cmwoI21hc2spO308L3N0eWxlPjxtYXNrIGlkPSJtYXNrIiB4PSIxMCIgeT0iNiIgd2lkdGg9IjkzLjEiIGhlaWdodD0iMjAiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiPjxnIGlkPSJhIj48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0xMCw2aDkzLjFWMjZIMTBaIi8+PC9nPjwvbWFzaz48L2RlZnM+PHRpdGxlPmZhPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iTGF5ZXJfMS0yIiBkYXRhLW5hbWU9IkxheWVyIDEiPjxjaXJjbGUgY2xhc3M9ImNscy0yIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTYiLz48ZyBjbGFzcz0iY2xzLTMiPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTE3LjIsMTIuOWwzLjYtMi4xVjE1Wm0zLjYsOUwxNiwyNC43bC00LjgtMi44VjE3TDE2LDE5LjgsMjAuOCwxN1pNMTEuMiwxMC44bDMuNiwyLjFMMTEuMiwxNVptNS40LDMuMUwyMC4yLDE2bC0zLjYsMi4xWm0tMS4yLDQuMkwxMS44LDE2bDMuNi0yLjFabTQuOC04LjNMMTYsMTIuMiwxMS44LDkuOCwxNiw3LjNaTTEwLDkuNFYyMi41bDYsMy40LDYtMy40VjkuNEwxNiw2WiIvPjwvZz48L2c+PC9nPjwvc3ZnPg==",_v={1:[{address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",icon:sr,name:"Wrapped Ether",symbol:"WETH"},{address:"0xdAC17F958D2ee523a2206206994597C13D831ec7",icon:nl,name:"Tether USD",symbol:"USDT"},{address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",icon:Ln,name:"USD Coin",symbol:"USDC"},{address:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",icon:il,name:"Wrapped Bitcoin",symbol:"WBTC"},{address:"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",icon:Gd,name:"Polygon",symbol:"WMATIC"}],10:[{address:"0x4200000000000000000000000000000000000006",icon:sr,name:"Wrapped Ether",symbol:"WETH"},{address:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",icon:Ln,name:"USD Coin",symbol:"USDC"}],56:[{address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",icon:mg,name:"Wrapped Binance Chain Token",symbol:"WBNB"},{address:"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",icon:yg,name:"Binance USD",symbol:"BUSD"}],97:[{address:"0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",icon:mg,name:"Wrapped Binance Chain Testnet Token",symbol:"WBNB"},{address:"0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee",icon:yg,name:"Binance USD",symbol:"BUSD"}],137:[{address:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",icon:Ln,name:"USD Coin",symbol:"USDC"},{address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",icon:Gd,name:"Wrapped Matic",symbol:"WMATIC"},{address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",icon:sr,name:"Wrapped Ether",symbol:"WETH"},{address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",icon:nl,name:"Tether USD",symbol:"USDT"},{address:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",icon:il,name:"Wrapped BTC",symbol:"WBTC"}],250:[{address:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",icon:gg,name:"Wrapped Fantom",symbol:"WFTM"},{address:"0x74b23882a30290451A17c44f4F05243b6b58C76d",icon:sr,name:"Wrapped Ether",symbol:"WETH"},{address:"0x04068DA6C83AFCFA0e13ba15A6696662335D5B75",icon:Ln,name:"USD Coin",symbol:"USDC"},{address:"0x321162Cd933E2Be498Cd2267a90534A804051b11",icon:il,name:"Wrapped Bitcoin",symbol:"WBTC"}],420:[{address:"0x4200000000000000000000000000000000000006",icon:sr,name:"Wrapped Ether",symbol:"WETH"}],4002:[{address:"0xf1277d1Ed8AD466beddF92ef448A132661956621",icon:gg,name:"Wrapped Fantom",symbol:"WFTM"}],8453:[{address:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",icon:Ln,name:"USD Coin",symbol:"USDC"}],42161:[{address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",icon:sr,name:"Wrapped Ether",symbol:"WETH"},{address:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",icon:Ln,name:"USD Coin",symbol:"USDC"}],43113:[{address:"0xd00ae08403B9bbb9124bB305C09058E32C39A48c",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwMyIgaGVpZ2h0PSIxNTA0IiB2aWV3Qm94PSIwIDAgMTUwMyAxNTA0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB4PSIyODciIHk9IjI1OCIgd2lkdGg9IjkyOCIgaGVpZ2h0PSI4NDQiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUwMi41IDc1MkMxNTAyLjUgMTE2Ni43NyAxMTY2LjI3IDE1MDMgNzUxLjUgMTUwM0MzMzYuNzM0IDE1MDMgMC41IDExNjYuNzcgMC41IDc1MkMwLjUgMzM3LjIzNCAzMzYuNzM0IDEgNzUxLjUgMUMxMTY2LjI3IDEgMTUwMi41IDMzNy4yMzQgMTUwMi41IDc1MlpNNTM4LjY4OCAxMDUwLjg2SDM5Mi45NEMzNjIuMzE0IDEwNTAuODYgMzQ3LjE4NiAxMDUwLjg2IDMzNy45NjIgMTA0NC45NkMzMjcuOTk5IDEwMzguNSAzMjEuOTExIDEwMjcuOCAzMjEuMTczIDEwMTUuOTlDMzIwLjYxOSAxMDA1LjExIDMyOC4xODQgOTkxLjgyMiAzNDMuMzEyIDk2NS4yNTVMNzAzLjE4MiAzMzAuOTM1QzcxOC40OTUgMzAzLjk5OSA3MjYuMjQzIDI5MC41MzEgNzM2LjAyMSAyODUuNTVDNzQ2LjUzNyAyODAuMiA3NTkuMDgzIDI4MC4yIDc2OS41OTkgMjg1LjU1Qzc3OS4zNzcgMjkwLjUzMSA3ODcuMTI2IDMwMy45OTkgODAyLjQzOCAzMzAuOTM1TDg3Ni40MiA0NjAuMDc5TDg3Ni43OTcgNDYwLjczOEM4OTMuMzM2IDQ4OS42MzUgOTAxLjcyMyA1MDQuMjg5IDkwNS4zODUgNTE5LjY2OUM5MDkuNDQzIDUzNi40NTggOTA5LjQ0MyA1NTQuMTY5IDkwNS4zODUgNTcwLjk1OEM5MDEuNjk1IDU4Ni40NTUgODkzLjM5MyA2MDEuMjE1IDg3Ni42MDQgNjMwLjU0OUw2ODcuNTczIDk2NC43MDJMNjg3LjA4NCA5NjUuNTU4QzY3MC40MzYgOTk0LjY5MyA2NjEuOTk5IDEwMDkuNDYgNjUwLjMwNiAxMDIwLjZDNjM3LjU3NiAxMDMyLjc4IDYyMi4yNjMgMTA0MS42MyA2MDUuNDc0IDEwNDYuNjJDNTkwLjE2MSAxMDUwLjg2IDU3My4wMDQgMTA1MC44NiA1MzguNjg4IDEwNTAuODZaTTkwNi43NSAxMDUwLjg2SDExMTUuNTlDMTE0Ni40IDEwNTAuODYgMTE2MS45IDEwNTAuODYgMTE3MS4xMyAxMDQ0Ljc4QzExODEuMDkgMTAzOC4zMiAxMTg3LjM2IDEwMjcuNDMgMTE4Ny45MiAxMDE1LjYzQzExODguNDUgMTAwNS4xIDExODEuMDUgOTkyLjMzIDExNjYuNTUgOTY3LjMwN0MxMTY2LjA1IDk2Ni40NTUgMTE2NS41NSA5NjUuNTg4IDExNjUuMDQgOTY0LjcwNkwxMDYwLjQzIDc4NS43NUwxMDU5LjI0IDc4My43MzVDMTA0NC41NCA3NTguODc3IDEwMzcuMTIgNzQ2LjMyNCAxMDI3LjU5IDc0MS40NzJDMTAxNy4wOCA3MzYuMTIxIDEwMDQuNzEgNzM2LjEyMSA5OTQuMTk5IDc0MS40NzJDOTg0LjYwNSA3NDYuNDUzIDk3Ni44NTcgNzU5LjU1MiA5NjEuNTQ0IDc4NS45MzRMODU3LjMwNiA5NjQuODkxTDg1Ni45NDkgOTY1LjUwN0M4NDEuNjkgOTkxLjg0NyA4MzQuMDY0IDEwMDUuMDEgODM0LjYxNCAxMDE1LjgxQzgzNS4zNTIgMTAyNy42MiA4NDEuNDQgMTAzOC41IDg1MS40MDIgMTA0NC45NkM4NjAuNDQzIDEwNTAuODYgODc1Ljk0IDEwNTAuODYgOTA2Ljc1IDEwNTAuODZaIiBmaWxsPSIjRTg0MTQyIi8+Cjwvc3ZnPgo=",name:"Wrapped AVAX",symbol:"WAVAX"},{address:"0x5425890298aed601595a70AB815c96711a31Bc65",icon:Ln,name:"USD Coin",symbol:"USDC"}],43114:[{address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwMyIgaGVpZ2h0PSIxNTA0IiB2aWV3Qm94PSIwIDAgMTUwMyAxNTA0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB4PSIyODciIHk9IjI1OCIgd2lkdGg9IjkyOCIgaGVpZ2h0PSI4NDQiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUwMi41IDc1MkMxNTAyLjUgMTE2Ni43NyAxMTY2LjI3IDE1MDMgNzUxLjUgMTUwM0MzMzYuNzM0IDE1MDMgMC41IDExNjYuNzcgMC41IDc1MkMwLjUgMzM3LjIzNCAzMzYuNzM0IDEgNzUxLjUgMUMxMTY2LjI3IDEgMTUwMi41IDMzNy4yMzQgMTUwMi41IDc1MlpNNTM4LjY4OCAxMDUwLjg2SDM5Mi45NEMzNjIuMzE0IDEwNTAuODYgMzQ3LjE4NiAxMDUwLjg2IDMzNy45NjIgMTA0NC45NkMzMjcuOTk5IDEwMzguNSAzMjEuOTExIDEwMjcuOCAzMjEuMTczIDEwMTUuOTlDMzIwLjYxOSAxMDA1LjExIDMyOC4xODQgOTkxLjgyMiAzNDMuMzEyIDk2NS4yNTVMNzAzLjE4MiAzMzAuOTM1QzcxOC40OTUgMzAzLjk5OSA3MjYuMjQzIDI5MC41MzEgNzM2LjAyMSAyODUuNTVDNzQ2LjUzNyAyODAuMiA3NTkuMDgzIDI4MC4yIDc2OS41OTkgMjg1LjU1Qzc3OS4zNzcgMjkwLjUzMSA3ODcuMTI2IDMwMy45OTkgODAyLjQzOCAzMzAuOTM1TDg3Ni40MiA0NjAuMDc5TDg3Ni43OTcgNDYwLjczOEM4OTMuMzM2IDQ4OS42MzUgOTAxLjcyMyA1MDQuMjg5IDkwNS4zODUgNTE5LjY2OUM5MDkuNDQzIDUzNi40NTggOTA5LjQ0MyA1NTQuMTY5IDkwNS4zODUgNTcwLjk1OEM5MDEuNjk1IDU4Ni40NTUgODkzLjM5MyA2MDEuMjE1IDg3Ni42MDQgNjMwLjU0OUw2ODcuNTczIDk2NC43MDJMNjg3LjA4NCA5NjUuNTU4QzY3MC40MzYgOTk0LjY5MyA2NjEuOTk5IDEwMDkuNDYgNjUwLjMwNiAxMDIwLjZDNjM3LjU3NiAxMDMyLjc4IDYyMi4yNjMgMTA0MS42MyA2MDUuNDc0IDEwNDYuNjJDNTkwLjE2MSAxMDUwLjg2IDU3My4wMDQgMTA1MC44NiA1MzguNjg4IDEwNTAuODZaTTkwNi43NSAxMDUwLjg2SDExMTUuNTlDMTE0Ni40IDEwNTAuODYgMTE2MS45IDEwNTAuODYgMTE3MS4xMyAxMDQ0Ljc4QzExODEuMDkgMTAzOC4zMiAxMTg3LjM2IDEwMjcuNDMgMTE4Ny45MiAxMDE1LjYzQzExODguNDUgMTAwNS4xIDExODEuMDUgOTkyLjMzIDExNjYuNTUgOTY3LjMwN0MxMTY2LjA1IDk2Ni40NTUgMTE2NS41NSA5NjUuNTg4IDExNjUuMDQgOTY0LjcwNkwxMDYwLjQzIDc4NS43NUwxMDU5LjI0IDc4My43MzVDMTA0NC41NCA3NTguODc3IDEwMzcuMTIgNzQ2LjMyNCAxMDI3LjU5IDc0MS40NzJDMTAxNy4wOCA3MzYuMTIxIDEwMDQuNzEgNzM2LjEyMSA5OTQuMTk5IDc0MS40NzJDOTg0LjYwNSA3NDYuNDUzIDk3Ni44NTcgNzU5LjU1MiA5NjEuNTQ0IDc4NS45MzRMODU3LjMwNiA5NjQuODkxTDg1Ni45NDkgOTY1LjUwN0M4NDEuNjkgOTkxLjg0NyA4MzQuMDY0IDEwMDUuMDEgODM0LjYxNCAxMDE1LjgxQzgzNS4zNTIgMTAyNy42MiA4NDEuNDQgMTAzOC41IDg1MS40MDIgMTA0NC45NkM4NjAuNDQzIDEwNTAuODYgODc1Ljk0IDEwNTAuODYgOTA2Ljc1IDEwNTAuODZaIiBmaWxsPSIjRTg0MTQyIi8+Cjwvc3ZnPgo=",name:"Wrapped AVAX",symbol:"WAVAX"},{address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",icon:sr,name:"Wrapped Ether",symbol:"WETH"},{address:"0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7",icon:nl,name:"Tether USD",symbol:"USDT"},{address:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",icon:Ln,name:"USD Coin",symbol:"USDC"},{address:"0x50b7545627a5162F82A992c33b87aDc75187B218",icon:il,name:"Wrapped BTC",symbol:"WBTC"}],80001:[{address:"0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889",icon:Gd,name:"Wrapped Matic",symbol:"WMATIC"},{address:"0xa6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa",icon:sr,name:"Wrapped Ether",symbol:"WETH"},{address:"0x0FA8781a83E46826621b3BC094Ea2A0212e71B23",icon:Ln,name:"USD Coin",symbol:"USDC"},{address:"0x3813e82e6f7098b9583FC0F33a962D02018B6803",icon:nl,name:"Tether USD",symbol:"USDT"}],84532:[{address:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",icon:Ln,name:"USD Coin",symbol:"USDC"}],421614:[{address:"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",icon:Ln,name:"USD Coin",symbol:"USDC"}],11155111:[{address:"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",icon:Ln,name:"USD Coin",symbol:"USDC"}]},nc=_v,sa=Qe({blockExplorers:[{name:"Etherscan",url:"https://etherscan.io"}],id:1,name:"Ethereum",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"}});function bv(e,t){switch(t.type){case"ERC721":return{chainId:t.chainId,id:t.tokenId,metadata:e,owner:(t==null?void 0:t.owner)??null,tokenAddress:t.tokenAddress,tokenURI:t.tokenUri,type:t.type};case"ERC1155":return{chainId:t.chainId,id:t.tokenId,metadata:e,owner:(t==null?void 0:t.owner)??null,supply:t.supply,tokenAddress:t.tokenAddress,tokenURI:t.tokenUri,type:t.type};default:throw new Error("Invalid NFT type")}}async function E3(e){let t=e.uri;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n="",i="",r=""]=t.split("/"),[s,o]=n.split(":"),[a,l]=i.split(":");if(!s||s.toLowerCase()!=="eip155")throw new Error(`Invalid EIP namespace, expected EIP155, got: "${s}"`);if(!o)throw new Error("Chain ID not found");if(!l||!ni(l))throw new Error("Contract address not found");if(!r)throw new Error("Token ID not found");const u=Pe(Number(o)),d=qt({address:l,chain:u,client:e.client});switch(a){case"erc721":{const{getNFT:f}=await h(async()=>{const{getNFT:y}=await import("./getNFT-BHbjbl1M.js");return{getNFT:y}},__vite__mapDeps([25,1,2,26,3,4,5]));return(await f({contract:d,tokenId:BigInt(r)})).metadata.image??null}case"erc1155":{const{getNFT:f}=await h(async()=>{const{getNFT:y}=await import("./getNFT-buPGFTfQ.js");return{getNFT:y}},__vite__mapDeps([27,26,1,2,19,20,3,4,5]));return(await f({contract:d,tokenId:BigInt(r)})).metadata.image??null}default:throw new Error(`Invalid ERC namespace, expected ERC721 or ERC1155, got: "${a}"`)}}const Mv=Object.freeze(Object.defineProperty({__proto__:null,parseNFT:bv,parseNftUri:E3},Symbol.toStringTag,{value:"Module"}));async function C3(e){let t=e.uri;if(/eip155:/i.test(e.uri)&&(t=await E3(e)),!t)return null;const n=Fi({client:e.client,uri:t});return await Iv({client:e.client,uri:n})?n:null}async function Iv(e){try{const t=await He(e.client)(e.uri,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return!!(n!=null&&n.startsWith("image/"))}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const i=new Image;i.onload=()=>{n(!0)},i.onerror=()=>{n(!1)},i.src=e.uri})}}function Ev(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return ts(t)?t:null}function L3(e){let t=new Uint8Array(32).fill(0);if(!e)return bn(t);const n=e.split(".");for(let i=n.length-1;i>=0;i-=1){const r=n[i],s=Ev(r),o=s?ME(s):Kh(js(r),"bytes");t=Kh(Gr([t,o]),"bytes")}return bn(t)}function Cv(e){return`[${e.slice(2)}]`}function q1(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(js(t).byteLength+2);let i=0;const r=t.split(".");for(let s=0;s<r.length;s++){const o=r[s];let a=js(o);a.byteLength>255&&(a=js(Cv(e9(o)))),n[i]=a.length,n.set(a,i+1),i+=a.length+1}return n.byteLength!==i+1?n.slice(0,i+1):n}const Lv="0x59d1d43c",Tv=[{name:"name",type:"bytes32"},{name:"key",type:"string"}],jv=[{type:"string"}];function vv(e){return $u(Tv,[e.name,e.key])}function Nv(e){return Lv+vv(e).slice(2)}function Sv(e){return vc(jv,e)[0]}const Av="0x9061b923",Dv=[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],Ov=[{type:"bytes"},{type:"address"}];async function T3(e){return Bu({contract:e.contract,method:[Av,Dv,Ov],params:[e.name,e.data]})}const K1="0xce01f8eee7E479C928F8919abD53E553a36CeF67";async function Pv(e){const{client:t,name:n,key:i,resolverAddress:r,resolverChain:s}=e;return Vn(async()=>{const o=qt({address:r||K1,chain:s||sa,client:t}),a=Nv({key:i,name:L3(n)}),l=await T3({contract:o,data:a,name:Lu(q1(n))});if(l[0]==="0x")return null;const u=Sv(l[0]);return u===""?null:u},{cacheKey:`ens:text:${n}:${i}`,cacheTime:60*1e3})}async function kv(e){const{client:t,name:n,resolverAddress:i,resolverChain:r}=e;return Vn(async()=>{const s=await Pv({client:t,key:"avatar",name:n,resolverAddress:i,resolverChain:r});if(!s)return null;try{return C3({client:t,uri:s})}catch(o){return console.error("Error parsing avatar record",o),null}},{cacheKey:`ens:avatar:${n}`,cacheTime:60*1e3})}const zv="0xec11c823",Rv=[{name:"reverseName",type:"bytes"}],Uv=[{type:"string"},{type:"address"},{type:"address"},{type:"address"}];async function $v(e){return Bu({contract:e.contract,method:[zv,Rv,Uv],params:[e.reverseName]})}async function J1(e){const{client:t,address:n,resolverAddress:i,resolverChain:r}=e;return Vn(async()=>{const s=qt({address:i||K1,chain:r||sa,client:t}),o=Lu(q1(`${n.toLowerCase().substring(2)}.addr.reverse`)),[a,l]=await $v({contract:s,reverseName:o}).catch(u=>{if("data"in u&&u.data==="0x7199966d")return[null,n];throw u});return n.toLowerCase()!==l.toLowerCase()?null:a},{cacheKey:`ens:name:${(r==null?void 0:r.id)||1}:${n}`,cacheTime:60*1e3})}function Oe(e){return typeof e=="string"?e.startsWith("ecosystem."):e.id.startsWith("ecosystem.")}async function Sc(e,t){if(Oe(e)){const{getEcosystemWalletInfo:n}=await h(async()=>{const{getEcosystemWalletInfo:i}=await import("./get-ecosystem-wallet-info-B4GMaUQL.js");return{getEcosystemWalletInfo:i}},__vite__mapDeps([28,1,2,3,4,5]));return t?n(e).then(i=>i.image_id):n(e)}switch(e){case"smart":return t?h(()=>import("./image-CLYJx-Lt.js"),[]).then(n=>n.default):h(()=>import("./index-DQErdPlT.js"),[]).then(n=>n.wallet);case"inApp":return t?h(()=>import("./image-CJcZQ4qy.js"),[]).then(n=>n.default):h(()=>import("./index-DGJr_A1x.js"),[]).then(n=>n.wallet);case"walletConnect":return t?h(()=>import("./image-B-Dq4f8l.js"),[]).then(n=>n.default):h(()=>import("./index-CCmQEc5F.js"),[]).then(n=>n.wallet);case"embedded":return t?h(()=>import("./image-CSqTAqqQ.js"),[]).then(n=>n.default):h(()=>import("./index-DcfiRGq8.js"),[]).then(n=>n.wallet);case"adapter":return t?h(()=>import("./image-cLgiWKUl.js"),[]).then(n=>n.default):h(()=>import("./index-CDBO4Wxt.js"),[]).then(n=>n.wallet);case"io.1inch.wallet":return t?h(()=>import("./image-v60dFJ72.js"),[]).then(n=>n.default):h(()=>import("./index-YIjtC3K-.js"),[]).then(n=>n.wallet);case"com.binance.wallet":return t?h(()=>import("./image-BtDMB-2P.js"),[]).then(n=>n.default):h(()=>import("./index-DQX7gmmD.js"),[]).then(n=>n.wallet);case"com.ledger":return t?h(()=>import("./image-DXXDq1SV.js"),[]).then(n=>n.default):h(()=>import("./index-DSj56DPA.js"),[]).then(n=>n.wallet);case"com.bitpay":return t?h(()=>import("./image-BS7uclVJ.js"),[]).then(n=>n.default):h(()=>import("./index-B5mnNH8U.js"),[]).then(n=>n.wallet);case"com.bestwallet":return t?h(()=>import("./image-DTjGzWem.js"),[]).then(n=>n.default):h(()=>import("./index-CWLh9ort.js"),[]).then(n=>n.wallet);case"io.metamask":return t?h(()=>import("./image-D9kD-3RI.js"),[]).then(n=>n.default):h(()=>import("./index-7YYggeeW.js"),[]).then(n=>n.wallet);case"com.trustwallet.app":return t?h(()=>import("./image-DcDvrdXW.js"),[]).then(n=>n.default):h(()=>import("./index-DRKmorNl.js"),[]).then(n=>n.wallet);case"com.fireblocks":return t?h(()=>import("./image-B264ar_O.js"),[]).then(n=>n.default):h(()=>import("./index-DKILMXwW.js"),[]).then(n=>n.wallet);case"com.bitget.web3":return t?h(()=>import("./image-Pyla20aw.js"),[]).then(n=>n.default):h(()=>import("./index-mW9xQNOt.js"),[]).then(n=>n.wallet);case"pro.tokenpocket":return t?h(()=>import("./image-Dc4UaoeV.js"),[]).then(n=>n.default):h(()=>import("./index-LzRKH3D3.js"),[]).then(n=>n.wallet);case"com.safepal":return t?h(()=>import("./image-CR2oRmyx.js"),[]).then(n=>n.default):h(()=>import("./index-Byv2UG3B.js"),[]).then(n=>n.wallet);case"org.uniswap":return t?h(()=>import("./image-C4YFvx9h.js"),[]).then(n=>n.default):h(()=>import("./index-Br2X_aBY.js"),[]).then(n=>n.wallet);case"io.zerion.wallet":return t?h(()=>import("./image-BC_7FxFG.js"),[]).then(n=>n.default):h(()=>import("./index-B4NjVdaz.js"),[]).then(n=>n.wallet);case"com.elrond.maiar.wallet":return t?h(()=>import("./image-CcKLaZOY.js"),[]).then(n=>n.default):h(()=>import("./index-BOGFyBZY.js"),[]).then(n=>n.wallet);case"com.crypto.wallet":return t?h(()=>import("./image-D1DsrpO_.js"),[]).then(n=>n.default):h(()=>import("./index-BPIHBKg2.js"),[]).then(n=>n.wallet);case"com.bitcoin":return t?h(()=>import("./image-Bn-Yp1MK.js"),[]).then(n=>n.default):h(()=>import("./index-CrhmmIqA.js"),[]).then(n=>n.wallet);case"com.bifrostwallet":return t?h(()=>import("./image-CwCfHO2C.js"),[]).then(n=>n.default):h(()=>import("./index-D4kRIh3X.js"),[]).then(n=>n.wallet);case"jp.co.rakuten-wallet":return t?h(()=>import("./image-CXmskFGu.js"),[]).then(n=>n.default):h(()=>import("./index-DbOEUjNQ.js"),[]).then(n=>n.wallet);case"com.bybit":return t?h(()=>import("./image-CfdpAcNJ.js"),[]).then(n=>n.default):h(()=>import("./index-Ck1HFtJO.js"),[]).then(n=>n.wallet);case"com.blockchain.login":return t?h(()=>import("./image-gZn57b3d.js"),[]).then(n=>n.default):h(()=>import("./index-Bl90M3Oh.js"),[]).then(n=>n.wallet);case"io.trezor":return t?h(()=>import("./image-BW_e3-dJ.js"),[]).then(n=>n.default):h(()=>import("./index-4l3b14FK.js"),[]).then(n=>n.wallet);case"im.token":return t?h(()=>import("./image-B-Cy6KkY.js"),[]).then(n=>n.default):h(()=>import("./index-C-C8iqy7.js"),[]).then(n=>n.wallet);case"global.safe":return t?h(()=>import("./image-DhRoVn_A.js"),[]).then(n=>n.default):h(()=>import("./index-CYWQaahL.js"),[]).then(n=>n.wallet);case"xyz.ctrl":return t?h(()=>import("./image-CtPX3k8b.js"),[]).then(n=>n.default):h(()=>import("./index-sMQpixIY.js"),[]).then(n=>n.wallet);case"co.arculus":return t?h(()=>import("./image-Ck4D7BzK.js"),[]).then(n=>n.default):h(()=>import("./index-C5pmmrHC.js"),[]).then(n=>n.wallet);case"com.roninchain.wallet":return t?h(()=>import("./image-D5eIt9w3.js"),[]).then(n=>n.default):h(()=>import("./index-DoLyLIiv.js"),[]).then(n=>n.wallet);case"com.okex.wallet":return t?h(()=>import("./image-DdS639hK.js"),[]).then(n=>n.default):h(()=>import("./index-DM2yaKtc.js"),[]).then(n=>n.wallet);case"com.wemixplay":return t?h(()=>import("./image-B7qmT8Ca.js"),[]).then(n=>n.default):h(()=>import("./index-qJF1Ni0x.js"),[]).then(n=>n.wallet);case"com.tangem":return t?h(()=>import("./image-DKASljuV.js"),[]).then(n=>n.default):h(()=>import("./index-DPDDihVu.js"),[]).then(n=>n.wallet);case"com.exodus":return t?h(()=>import("./image-Bgjg8hNQ.js"),[]).then(n=>n.default):h(()=>import("./index-CxpTZ-IG.js"),[]).then(n=>n.wallet);case"com.hashpack.wallet":return t?h(()=>import("./image-5Sau-rLk.js"),[]).then(n=>n.default):h(()=>import("./index-CeRPZA_a.js"),[]).then(n=>n.wallet);case"id.co.pintu":return t?h(()=>import("./image-nuAuj_Jk.js"),[]).then(n=>n.default):h(()=>import("./index-KcbqAAb7.js"),[]).then(n=>n.wallet);case"network.blackfort":return t?h(()=>import("./image-C-_OpeOv.js"),[]).then(n=>n.default):h(()=>import("./index-CzCBPhT0.js"),[]).then(n=>n.wallet);case"com.wigwam.wallet":return t?h(()=>import("./image-Cl79QoOA.js"),[]).then(n=>n.default):h(()=>import("./index-y1BukHtY.js"),[]).then(n=>n.wallet);case"app.backpack":return t?h(()=>import("./image-C3CekdMS.js"),[]).then(n=>n.default):h(()=>import("./index-BqfTsh6E.js"),[]).then(n=>n.wallet);case"app.subwallet":return t?h(()=>import("./image-CsXZJdXn.js"),[]).then(n=>n.default):h(()=>import("./index-CHj5uoB4.js"),[]).then(n=>n.wallet);case"cc.avacus":return t?h(()=>import("./image-Bmkur-sE.js"),[]).then(n=>n.default):h(()=>import("./index-D3CZdDyo.js"),[]).then(n=>n.wallet);case"me.rainbow":return t?h(()=>import("./image-CTIN0s1B.js"),[]).then(n=>n.default):h(()=>import("./index-DuYSq0vM.js"),[]).then(n=>n.wallet);case"so.onekey.app.wallet":return t?h(()=>import("./image-CJ_LMWeW.js"),[]).then(n=>n.default):h(()=>import("./index-LtZ_xWcO.js"),[]).then(n=>n.wallet);case"me.haha":return t?h(()=>import("./image-DBVezoYp.js"),[]).then(n=>n.default):h(()=>import("./index-DYjaueYq.js"),[]).then(n=>n.wallet);case"com.bee":return t?h(()=>import("./image-DRTCa3VU.js"),[]).then(n=>n.default):h(()=>import("./index-COyOD9UG.js"),[]).then(n=>n.wallet);case"ag.jup":return t?h(()=>import("./image-wxMjTeKK.js"),[]).then(n=>n.default):h(()=>import("./index-CLuOEfyi.js"),[]).then(n=>n.wallet);case"app.keplr":return t?h(()=>import("./image-CrDo15dd.js"),[]).then(n=>n.default):h(()=>import("./index-qjmsKc9v.js"),[]).then(n=>n.wallet);case"org.hot-labs":return t?h(()=>import("./image-CnHP8wCa.js"),[]).then(n=>n.default):h(()=>import("./index-BBZBr17n.js"),[]).then(n=>n.wallet);case"com.dcentwallet":return t?h(()=>import("./image-DpuchfOi.js"),[]).then(n=>n.default):h(()=>import("./index-BLXzYE6a.js"),[]).then(n=>n.wallet);case"com.kraken":return t?h(()=>import("./image-B3qkm1hD.js"),[]).then(n=>n.default):h(()=>import("./index-Blhav013.js"),[]).then(n=>n.wallet);case"com.kucoin":return t?h(()=>import("./image-CurSdKvd.js"),[]).then(n=>n.default):h(()=>import("./index-B-g1VAOO.js"),[]).then(n=>n.wallet);case"io.magiceden.wallet":return t?h(()=>import("./image-KuSQ9Dwa.js"),[]).then(n=>n.default):h(()=>import("./index-RoCEXaRu.js"),[]).then(n=>n.wallet);case"com.tomi":return t?h(()=>import("./image-DapXhx3l.js"),[]).then(n=>n.default):h(()=>import("./index-BAmym71D.js"),[]).then(n=>n.wallet);case"io.ibvm":return t?h(()=>import("./image-wCxGp5DI.js"),[]).then(n=>n.default):h(()=>import("./index-9urBw4jN.js"),[]).then(n=>n.wallet);case"com.mewwallet":return t?h(()=>import("./image-VMDTb4vT.js"),[]).then(n=>n.default):h(()=>import("./index-DEKXKw0a.js"),[]).then(n=>n.wallet);case"com.socios.app":return t?h(()=>import("./image-TCU-3JIq.js"),[]).then(n=>n.default):h(()=>import("./index-BXMj9soJ.js"),[]).then(n=>n.wallet);case"xyz.argent":return t?h(()=>import("./image--B48iF6N.js"),[]).then(n=>n.default):h(()=>import("./index-K9_ezyO0.js"),[]).then(n=>n.wallet);case"org.thorwallet":return t?h(()=>import("./image-7gNoXkuv.js"),[]).then(n=>n.default):h(()=>import("./index-C3TfYb1F.js"),[]).then(n=>n.wallet);case"io.internetmoney":return t?h(()=>import("./image-g8OkL-iB.js"),[]).then(n=>n.default):h(()=>import("./index-DMVhtS8w.js"),[]).then(n=>n.wallet);case"org.mathwallet":return t?h(()=>import("./image-D0EvVh0U.js"),[]).then(n=>n.default):h(()=>import("./index-DKe_tqaK.js"),[]).then(n=>n.wallet);case"io.cypherhq":return t?h(()=>import("./image-DpEXid6P.js"),[]).then(n=>n.default):h(()=>import("./index-BhkOXeUI.js"),[]).then(n=>n.wallet);case"io.novawallet":return t?h(()=>import("./image-B3Rrn7dP.js"),[]).then(n=>n.default):h(()=>import("./index-B1UaaLNv.js"),[]).then(n=>n.wallet);case"io.yowallet":return t?h(()=>import("./image-DKGPCmzR.js"),[]).then(n=>n.default):h(()=>import("./index-bb2W2i3i.js"),[]).then(n=>n.wallet);case"com.flowfoundation.wallet":return t?h(()=>import("./image-Co_-a15C.js"),[]).then(n=>n.default):h(()=>import("./index-hEFZFzVq.js"),[]).then(n=>n.wallet);case"app.kabila":return t?h(()=>import("./image-B32QPavX.js"),[]).then(n=>n.default):h(()=>import("./index-Dvtv553D.js"),[]).then(n=>n.wallet);case"com.opera":return t?h(()=>import("./image-qbZML0jD.js"),[]).then(n=>n.default):h(()=>import("./index-CgAK97ik.js"),[]).then(n=>n.wallet);case"com.valoraapp":return t?h(()=>import("./image-CtzrXm6T.js"),[]).then(n=>n.default):h(()=>import("./index-HkGLvX7o.js"),[]).then(n=>n.wallet);case"com.robinhood.wallet":return t?h(()=>import("./image-CAiqBiB7.js"),[]).then(n=>n.default):h(()=>import("./index-CUrSGAWv.js"),[]).then(n=>n.wallet);case"com.chain":return t?h(()=>import("./image-DUF566Oh.js"),[]).then(n=>n.default):h(()=>import("./index-hkKPuWG8.js"),[]).then(n=>n.wallet);case"io.huddln":return t?h(()=>import("./image-Rvq3ddXP.js"),[]).then(n=>n.default):h(()=>import("./index-BbFO227e.js"),[]).then(n=>n.wallet);case"app.core.extension":return t?h(()=>import("./image-egfxQb8o.js"),[]).then(n=>n.default):h(()=>import("./index-LNb19jou.js"),[]).then(n=>n.wallet);case"world.freedom":return t?h(()=>import("./image-tsyLyK5O.js"),[]).then(n=>n.default):h(()=>import("./index-kvEY65i6.js"),[]).then(n=>n.wallet);case"money.unstoppable":return t?h(()=>import("./image-BhyLUXmC.js"),[]).then(n=>n.default):h(()=>import("./index-D5HkZlJ0.js"),[]).then(n=>n.wallet);case"pk.modular":return t?h(()=>import("./image-CdPK8hWD.js"),[]).then(n=>n.default):h(()=>import("./index-B_uKoT3A.js"),[]).then(n=>n.wallet);case"app.wombat":return t?h(()=>import("./image-CKVXVlPY.js"),[]).then(n=>n.default):h(()=>import("./index-Cb3GRnFH.js"),[]).then(n=>n.wallet);case"com.klipwallet":return t?h(()=>import("./image-lj2MXbSM.js"),[]).then(n=>n.default):h(()=>import("./index-ivmWWMeT.js"),[]).then(n=>n.wallet);case"com.gemwallet":return t?h(()=>import("./image-BlhMSU_w.js"),[]).then(n=>n.default):h(()=>import("./index-BbblI1cW.js"),[]).then(n=>n.wallet);case"com.sabay.wallet":return t?h(()=>import("./image-BYiwuy-U.js"),[]).then(n=>n.default):h(()=>import("./index-weHMZi5B.js"),[]).then(n=>n.wallet);case"com.zengo":return t?h(()=>import("./image-C8W_4ZM6.js"),[]).then(n=>n.default):h(()=>import("./index-Dy08-O43.js"),[]).then(n=>n.wallet);case"xyz.joeywallet":return t?h(()=>import("./image-CfkILL-h.js"),[]).then(n=>n.default):h(()=>import("./index-CJWMUHO2.js"),[]).then(n=>n.wallet);case"io.tokoin":return t?h(()=>import("./image-BsZmggWw.js"),[]).then(n=>n.default):h(()=>import("./index--a3iuiww.js"),[]).then(n=>n.wallet);case"io.alpha-u.wallet.web":return t?h(()=>import("./image-DRkgy69L.js"),[]).then(n=>n.default):h(()=>import("./index-DhgLjA_l.js"),[]).then(n=>n.wallet);case"network.cvl":return t?h(()=>import("./image-CBk1BMR-.js"),[]).then(n=>n.default):h(()=>import("./index-E_TvYm_u.js"),[]).then(n=>n.wallet);case"io.leapwallet":return t?h(()=>import("./image-C-h7t_1F.js"),[]).then(n=>n.default):h(()=>import("./index-DgG_G6mi.js"),[]).then(n=>n.wallet);case"io.xenea":return t?h(()=>import("./image-DY9y4Zuj.js"),[]).then(n=>n.default):h(()=>import("./index-CSM6DsXg.js"),[]).then(n=>n.wallet);case"com.oasys-wallet":return t?h(()=>import("./image-0WA94JvO.js"),[]).then(n=>n.default):h(()=>import("./index-ZvCZJ82x.js"),[]).then(n=>n.wallet);case"com.bitso":return t?h(()=>import("./image-CyT4cot7.js"),[]).then(n=>n.default):h(()=>import("./index-D4qmgJzl.js"),[]).then(n=>n.wallet);case"io.enjin":return t?h(()=>import("./image-Dbjepryy.js"),[]).then(n=>n.default):h(()=>import("./index-BYkyq-Fh.js"),[]).then(n=>n.wallet);case"com.coldwallet":return t?h(()=>import("./image-Bg5cmMOq.js"),[]).then(n=>n.default):h(()=>import("./index-CCH4Lm0k.js"),[]).then(n=>n.wallet);case"org.creditcoin.app":return t?h(()=>import("./image-D72C3rOt.js"),[]).then(n=>n.default):h(()=>import("./index-Yhb_AR5X.js"),[]).then(n=>n.wallet);case"app.everspace":return t?h(()=>import("./image-ZX9AyZf9.js"),[]).then(n=>n.default):h(()=>import("./index-BSsQ8WTt.js"),[]).then(n=>n.wallet);case"app.zeal":return t?h(()=>import("./image-CXCMuT4A.js"),[]).then(n=>n.default):h(()=>import("./index-Y-7zWyQJ.js"),[]).then(n=>n.wallet);case"app.whitewallet":return t?h(()=>import("./image-Dblzndv0.js"),[]).then(n=>n.default):h(()=>import("./index-R6JShJLJ.js"),[]).then(n=>n.wallet);case"ai.purewallet":return t?h(()=>import("./image-Dq2YJAiu.js"),[]).then(n=>n.default):h(()=>import("./index-CD-c0Pwx.js"),[]).then(n=>n.wallet);case"com.fastex.wallet":return t?h(()=>import("./image-CsDGOmEX.js"),[]).then(n=>n.default):h(()=>import("./index-B3ylAWHD.js"),[]).then(n=>n.wallet);case"io.kriptomat":return t?h(()=>import("./image-OB6MEQB3.js"),[]).then(n=>n.default):h(()=>import("./index-CN5jCnO7.js"),[]).then(n=>n.wallet);case"com.ullapay":return t?h(()=>import("./image-Bg-Ezchh.js"),[]).then(n=>n.default):h(()=>import("./index-D5XbboPy.js"),[]).then(n=>n.wallet);case"io.atomicwallet":return t?h(()=>import("./image-DmF82yDT.js"),[]).then(n=>n.default):h(()=>import("./index-BVz0emY4.js"),[]).then(n=>n.wallet);case"com.pionewallet":return t?h(()=>import("./image-PmH-IhRa.js"),[]).then(n=>n.default):h(()=>import("./index-DcqBR87a.js"),[]).then(n=>n.wallet);case"io.oxalus":return t?h(()=>import("./image-72qBnfEq.js"),[]).then(n=>n.default):h(()=>import("./index-DA-8j4Lu.js"),[]).then(n=>n.wallet);case"xyz.uniultra.wallet":return t?h(()=>import("./image-PE3NuFOk.js"),[]).then(n=>n.default):h(()=>import("./index-BZprotv2.js"),[]).then(n=>n.wallet);case"xyz.frontier.wallet":return t?h(()=>import("./image-Bj3Vau0H.js"),[]).then(n=>n.default):h(()=>import("./index-CKbNEeVv.js"),[]).then(n=>n.wallet);case"com.coolbitx.cwsapp":return t?h(()=>import("./image-DBfe_vfK.js"),[]).then(n=>n.default):h(()=>import("./index-CS_r9DbU.js"),[]).then(n=>n.wallet);case"org.gooddollar":return t?h(()=>import("./image-BOYYXbZD.js"),[]).then(n=>n.default):h(()=>import("./index-D-0oKenN.js"),[]).then(n=>n.wallet);case"com.cakewallet":return t?h(()=>import("./image-H2IFlJwk.js"),[]).then(n=>n.default):h(()=>import("./index-DrxHpbC_.js"),[]).then(n=>n.wallet);case"com.ellipal":return t?h(()=>import("./image-DnrDonCs.js"),[]).then(n=>n.default):h(()=>import("./index-_4gOTVBT.js"),[]).then(n=>n.wallet);case"app.krystal":return t?h(()=>import("./image-DCd2Ym7s.js"),[]).then(n=>n.default):h(()=>import("./index-CWJEGR1b.js"),[]).then(n=>n.wallet);case"com.monarchwallet":return t?h(()=>import("./image-BzMshtv_.js"),[]).then(n=>n.default):h(()=>import("./index-CNtQA9K3.js"),[]).then(n=>n.wallet);case"com.burritowallet":return t?h(()=>import("./image-CLkcT8o9.js"),[]).then(n=>n.default):h(()=>import("./index-DbF84wMV.js"),[]).then(n=>n.wallet);case"co.family.wallet":return t?h(()=>import("./image-CUg3Cnww.js"),[]).then(n=>n.default):h(()=>import("./index-Tn6RRkjq.js"),[]).then(n=>n.wallet);case"com.mtpelerin":return t?h(()=>import("./image-BX0R5Ldt.js"),[]).then(n=>n.default):h(()=>import("./index-raYbXl7C.js"),[]).then(n=>n.wallet);case"app.keyring":return t?h(()=>import("./image-BJTIIH0l.js"),[]).then(n=>n.default):h(()=>import("./index-DK3fb1zE.js"),[]).then(n=>n.wallet);case"cc.localtrade.lab":return t?h(()=>import("./image-BPSy6QXe.js"),[]).then(n=>n.default):h(()=>import("./index-B5YMdPlv.js"),[]).then(n=>n.wallet);case"tech.okto":return t?h(()=>import("./image-DKIjfVu7.js"),[]).then(n=>n.default):h(()=>import("./index-Lowl7Qx7.js"),[]).then(n=>n.wallet);case"com.xcapit":return t?h(()=>import("./image-DhkFzAlB.js"),[]).then(n=>n.default):h(()=>import("./index-D3V2-WKd.js"),[]).then(n=>n.wallet);case"com.gayawallet":return t?h(()=>import("./image-Bz7vfc72.js"),[]).then(n=>n.default):h(()=>import("./index-D98A1qt-.js"),[]).then(n=>n.wallet);case"app.nightly":return t?h(()=>import("./image-BfqQ3_FM.js"),[]).then(n=>n.default):h(()=>import("./index-CMwU9_9b.js"),[]).then(n=>n.wallet);case"com.coin98":return t?h(()=>import("./image-BbnwlM1P.js"),[]).then(n=>n.default):h(()=>import("./index-KBxYL2Hq.js"),[]).then(n=>n.wallet);case"xyz.coca":return t?h(()=>import("./image-BuK74v8C.js"),[]).then(n=>n.default):h(()=>import("./index-_NpfTDRk.js"),[]).then(n=>n.wallet);case"app.linen":return t?h(()=>import("./image-DrSeWkD2.js"),[]).then(n=>n.default):h(()=>import("./index-CxAdVXlx.js"),[]).then(n=>n.wallet);case"dev.auroracloud":return t?h(()=>import("./image-Q84BS-gC.js"),[]).then(n=>n.default):h(()=>import("./index-DCCkUyPX.js"),[]).then(n=>n.wallet);case"com.coinomi":return t?h(()=>import("./image-B2nNrUDP.js"),[]).then(n=>n.default):h(()=>import("./index-CIEKStke.js"),[]).then(n=>n.wallet);case"my.mone":return t?h(()=>import("./image-B_6frjN-.js"),[]).then(n=>n.default):h(()=>import("./index-CWRHM42y.js"),[]).then(n=>n.wallet);case"org.alephium":return t?h(()=>import("./image-Bw4AoMkM.js"),[]).then(n=>n.default):h(()=>import("./index-CWP7CAYR.js"),[]).then(n=>n.wallet);case"com.alicebob":return t?h(()=>import("./image-7ve6a-pZ.js"),[]).then(n=>n.default):h(()=>import("./index-CWcfCu8_.js"),[]).then(n=>n.wallet);case"io.koalawallet":return t?h(()=>import("./image-D_F9G8qf.js"),[]).then(n=>n.default):h(()=>import("./index-DreOZR2Q.js"),[]).then(n=>n.wallet);case"com.veworld":return t?h(()=>import("./image-CHHWDf3g.js"),[]).then(n=>n.default):h(()=>import("./index-DH7rY4T1.js"),[]).then(n=>n.wallet);case"com.withpaper":return t?h(()=>import("./image-CX5Rh8VB.js"),[]).then(n=>n.default):h(()=>import("./index-B_5Z_DKz.js"),[]).then(n=>n.wallet);case"io.noone":return t?h(()=>import("./image-Bd0hgt6c.js"),[]).then(n=>n.default):h(()=>import("./index-C0S3Jw0J.js"),[]).then(n=>n.wallet);case"network.haqq":return t?h(()=>import("./image-CAFLdE57.js"),[]).then(n=>n.default):h(()=>import("./index-BKOOtGSa.js"),[]).then(n=>n.wallet);case"io.ricewallet":return t?h(()=>import("./image-CViScAsQ.js"),[]).then(n=>n.default):h(()=>import("./index-DX2vH8ZR.js"),[]).then(n=>n.wallet);case"me.iopay":return t?h(()=>import("./image-gPjUdZvh.js"),[]).then(n=>n.default):h(()=>import("./index-_j8eviyU.js"),[]).then(n=>n.wallet);case"app.walletnow":return t?h(()=>import("./image-CQQCUqCR.js"),[]).then(n=>n.default):h(()=>import("./index-DIQXVD2E.js"),[]).then(n=>n.wallet);case"io.okse":return t?h(()=>import("./image-Bve_kItK.js"),[]).then(n=>n.default):h(()=>import("./index-DHjyikOS.js"),[]).then(n=>n.wallet);case"network.over":return t?h(()=>import("./image-1Q7meMlv.js"),[]).then(n=>n.default):h(()=>import("./index-CCoUqMcq.js"),[]).then(n=>n.wallet);case"com.aktionariat":return t?h(()=>import("./image-C19BC9_z.js"),[]).then(n=>n.default):h(()=>import("./index-f3TfD4S5.js"),[]).then(n=>n.wallet);case"com.paybolt":return t?h(()=>import("./image-BVxPoHQF.js"),[]).then(n=>n.default):h(()=>import("./index-DA5yAy1K.js"),[]).then(n=>n.wallet);case"com.plasma-wallet":return t?h(()=>import("./image-BoYSclA6.js"),[]).then(n=>n.default):h(()=>import("./index-JKQyAdFy.js"),[]).then(n=>n.wallet);case"org.bytebank":return t?h(()=>import("./image-vBCicR5m.js"),[]).then(n=>n.default):h(()=>import("./index-Bjaz41sN.js"),[]).then(n=>n.wallet);case"io.ethermail":return t?h(()=>import("./image-Dv-zloMU.js"),[]).then(n=>n.default):h(()=>import("./index-D7fJW09r.js"),[]).then(n=>n.wallet);case"com.optowallet":return t?h(()=>import("./image-sEmhdTY-.js"),[]).then(n=>n.default):h(()=>import("./index-3mfJd8aA.js"),[]).then(n=>n.wallet);case"finance.openwallet":return t?h(()=>import("./image-F3HgBsB-.js"),[]).then(n=>n.default):h(()=>import("./index-skREueKQ.js"),[]).then(n=>n.wallet);case"xyz.sequence":return t?h(()=>import("./image-a7JzCm8c.js"),[]).then(n=>n.default):h(()=>import("./index-BNb0BNpv.js"),[]).then(n=>n.wallet);case"com.foxwallet":return t?h(()=>import("./image-ocD-m7Q3.js"),[]).then(n=>n.default):h(()=>import("./index-CO5X7F-R.js"),[]).then(n=>n.wallet);case"app.hbwallet":return t?h(()=>import("./image-DTvFXF0X.js"),[]).then(n=>n.default):h(()=>import("./index-C9KeS2NO.js"),[]).then(n=>n.wallet);case"it.airgap":return t?h(()=>import("./image-DbxthKzd.js"),[]).then(n=>n.default):h(()=>import("./index-BwPT1xVX.js"),[]).then(n=>n.wallet);case"com.holdstation":return t?h(()=>import("./image-BqmoDhq4.js"),[]).then(n=>n.default):h(()=>import("./index-DJowGey-.js"),[]).then(n=>n.wallet);case"io.universaleverything":return t?h(()=>import("./image-Ln3_5Zss.js"),[]).then(n=>n.default):h(()=>import("./index-BCgIOWHy.js"),[]).then(n=>n.wallet);case"com.abra":return t?h(()=>import("./image-D0XkC_cA.js"),[]).then(n=>n.default):h(()=>import("./index-DXWCd209.js"),[]).then(n=>n.wallet);case"org.thepulsewallet":return t?h(()=>import("./image-_ytDCtdN.js"),[]).then(n=>n.default):h(()=>import("./index-BKhtDnEy.js"),[]).then(n=>n.wallet);case"com.premanft":return t?h(()=>import("./image-Cq9CxI0T.js"),[]).then(n=>n.default):h(()=>import("./index-CqG7x8Pr.js"),[]).then(n=>n.wallet);case"xyz.timelesswallet":return t?h(()=>import("./image-D4n4fDBI.js"),[]).then(n=>n.default):h(()=>import("./index-B79hT9zU.js"),[]).then(n=>n.wallet);case"org.bitizen":return t?h(()=>import("./image-Eet5vkQN.js"),[]).then(n=>n.default):h(()=>import("./index-CAbUuCad.js"),[]).then(n=>n.wallet);case"app.ultimate":return t?h(()=>import("./image-1PFF0msR.js"),[]).then(n=>n.default):h(()=>import("./index-DMa3aE-k.js"),[]).then(n=>n.wallet);case"io.compasswallet":return t?h(()=>import("./image-B7f6OOFe.js"),[]).then(n=>n.default):h(()=>import("./index-DWEPmLGL.js"),[]).then(n=>n.wallet);case"app.fizzwallet":return t?h(()=>import("./image-TqYEE834.js"),[]).then(n=>n.default):h(()=>import("./index-USdA4g97.js"),[]).then(n=>n.wallet);case"com.xovawallet":return t?h(()=>import("./image-ac_iWcfz.js"),[]).then(n=>n.default):h(()=>import("./index-DjdLeYmK.js"),[]).then(n=>n.wallet);case"app.nicegram":return t?h(()=>import("./image-CTjG3MUk.js"),[]).then(n=>n.default):h(()=>import("./index-BCjMsn_g.js"),[]).then(n=>n.wallet);case"io.zelcore":return t?h(()=>import("./image-D6CcyX2K.js"),[]).then(n=>n.default):h(()=>import("./index-zbt41C9e.js"),[]).then(n=>n.wallet);case"app.freighter":return t?h(()=>import("./image-ByILNqlH.js"),[]).then(n=>n.default):h(()=>import("./index-ByCnomey.js"),[]).then(n=>n.wallet);case"app.stickey":return t?h(()=>import("./image-BV0ZeCAx.js"),[]).then(n=>n.default):h(()=>import("./index-BHpZ5apY.js"),[]).then(n=>n.wallet);case"app.coinstats":return t?h(()=>import("./image-1uQAVoCP.js"),[]).then(n=>n.default):h(()=>import("./index-CCHSY1Ig.js"),[]).then(n=>n.wallet);case"io.harti":return t?h(()=>import("./image-BmT8QXyE.js"),[]).then(n=>n.default):h(()=>import("./index-CVzxUbsV.js"),[]).then(n=>n.wallet);case"io.dttd":return t?h(()=>import("./image-BLwps_AU.js"),[]).then(n=>n.default):h(()=>import("./index-BKc1f5vZ.js"),[]).then(n=>n.wallet);case"com.tellaw":return t?h(()=>import("./image-F1X0Jqxn.js"),[]).then(n=>n.default):h(()=>import("./index-whsFZACg.js"),[]).then(n=>n.wallet);case"io.klever":return t?h(()=>import("./image-C-jy5_uw.js"),[]).then(n=>n.default):h(()=>import("./index-DyIhQvc9.js"),[]).then(n=>n.wallet);case"com.unstoppabledomains":return t?h(()=>import("./image-CDQQ8H3a.js"),[]).then(n=>n.default):h(()=>import("./index-CEQTfzyW.js"),[]).then(n=>n.wallet);case"is.callback":return t?h(()=>import("./image-GJh-xUBh.js"),[]).then(n=>n.default):h(()=>import("./index-D06yDGlI.js"),[]).then(n=>n.wallet);case"ai.pundi":return t?h(()=>import("./image-ATPgDDWr.js"),[]).then(n=>n.default):h(()=>import("./index-CIqB4GcC.js"),[]).then(n=>n.wallet);case"io.summonersarena":return t?h(()=>import("./image-B9xCKEQ5.js"),[]).then(n=>n.default):h(()=>import("./index-Dj4HncvX.js"),[]).then(n=>n.wallet);case"io.fizen":return t?h(()=>import("./image-B0gwpZUx.js"),[]).then(n=>n.default):h(()=>import("./index-QNOqUF4K.js"),[]).then(n=>n.wallet);case"fi.pillar":return t?h(()=>import("./image-gTlOw189.js"),[]).then(n=>n.default):h(()=>import("./index-B8F2-SGp.js"),[]).then(n=>n.wallet);case"world.ixo":return t?h(()=>import("./image-BPwT6MdF.js"),[]).then(n=>n.default):h(()=>import("./index-VoB5PA0C.js"),[]).then(n=>n.wallet);case"org.thetatoken":return t?h(()=>import("./image-Dts-dWM_.js"),[]).then(n=>n.default):h(()=>import("./index-C28bWeia.js"),[]).then(n=>n.wallet);case"net.gateweb3":return t?h(()=>import("./image-CGjM8vV0.js"),[]).then(n=>n.default):h(()=>import("./index-CfvJYRh3.js"),[]).then(n=>n.wallet);case"app.ammer":return t?h(()=>import("./image-DCe7pzXg.js"),[]).then(n=>n.default):h(()=>import("./index-C_0gheI4.js"),[]).then(n=>n.wallet);case"us.binance":return t?h(()=>import("./image-DO0rKwK5.js"),[]).then(n=>n.default):h(()=>import("./index-CsOh37JV.js"),[]).then(n=>n.wallet);case"io.yusetoken":return t?h(()=>import("./image-BkXrnCqT.js"),[]).then(n=>n.default):h(()=>import("./index-DSfHTVO4.js"),[]).then(n=>n.wallet);case"co.muza":return t?h(()=>import("./image-Ck3Eh6O7.js"),[]).then(n=>n.default):h(()=>import("./index-BemdfzPz.js"),[]).then(n=>n.wallet);case"io.hyperpay":return t?h(()=>import("./image-BGGL-U5y.js"),[]).then(n=>n.default):h(()=>import("./index-CZ1QIkWn.js"),[]).then(n=>n.wallet);case"io.cosmostation":return t?h(()=>import("./image-CQvGfQex.js"),[]).then(n=>n.default):h(()=>import("./index-DjjVwGb1.js"),[]).then(n=>n.wallet);case"app.ryipay":return t?h(()=>import("./image-BHsLcCY-.js"),[]).then(n=>n.default):h(()=>import("./index-CqsWR9GD.js"),[]).then(n=>n.wallet);case"io.wallet3":return t?h(()=>import("./image-C5BUR1H0.js"),[]).then(n=>n.default):h(()=>import("./index-B1EcH1c7.js"),[]).then(n=>n.wallet);case"org.dota168":return t?h(()=>import("./image-DTI3p9-Y.js"),[]).then(n=>n.default):h(()=>import("./index-DQzq_sef.js"),[]).then(n=>n.wallet);case"com.bitpie":return t?h(()=>import("./image-C_d1pRRI.js"),[]).then(n=>n.default):h(()=>import("./index-B18M8pMG.js"),[]).then(n=>n.wallet);case"com.coininn":return t?h(()=>import("./image-o13bTCjN.js"),[]).then(n=>n.default):h(()=>import("./index-Bh_-A7Ja.js"),[]).then(n=>n.wallet);case"me.easy":return t?h(()=>import("./image-DTBDlZkw.js"),[]).then(n=>n.default):h(()=>import("./index-CCcCf_zM.js"),[]).then(n=>n.wallet);case"io.shido":return t?h(()=>import("./image-BcFBvVbI.js"),[]).then(n=>n.default):h(()=>import("./index-DsAnwcI8.js"),[]).then(n=>n.wallet);case"com.neonwallet":return t?h(()=>import("./image-ioijj4TO.js"),[]).then(n=>n.default):h(()=>import("./index-BzHMIBCY.js"),[]).then(n=>n.wallet);case"com.secuxtech":return t?h(()=>import("./image-u8DQucgw.js"),[]).then(n=>n.default):h(()=>import("./index-X6Icwh-t.js"),[]).then(n=>n.wallet);case"com.unitywallet":return t?h(()=>import("./image-DarW8a9S.js"),[]).then(n=>n.default):h(()=>import("./index-CHtlbymW.js"),[]).then(n=>n.wallet);case"io.miraiapp":return t?h(()=>import("./image-C7KIwDbC.js"),[]).then(n=>n.default):h(()=>import("./index-CJUw-x2B.js"),[]).then(n=>n.wallet);case"com.beexo":return t?h(()=>import("./image-BxnxblQ1.js"),[]).then(n=>n.default):h(()=>import("./index-D3-ragvp.js"),[]).then(n=>n.wallet);case"social.halo":return t?h(()=>import("./image-CyB_F_3i.js"),[]).then(n=>n.default):h(()=>import("./index-BrmfNCsT.js"),[]).then(n=>n.wallet);case"com.gemspocket":return t?h(()=>import("./image-D-u8N4-J.js"),[]).then(n=>n.default):h(()=>import("./index-Cu7IM6b-.js"),[]).then(n=>n.wallet);case"app.status":return t?h(()=>import("./image-BHWhxIRJ.js"),[]).then(n=>n.default):h(()=>import("./index-uBBwnPjF.js"),[]).then(n=>n.wallet);case"com.midoin":return t?h(()=>import("./image-CIV6mRvx.js"),[]).then(n=>n.default):h(()=>import("./index-CocmFQPB.js"),[]).then(n=>n.wallet);case"id.competence":return t?h(()=>import("./image-Bvz63dRa.js"),[]).then(n=>n.default):h(()=>import("./index-BLJlEky2.js"),[]).then(n=>n.wallet);case"com.safemoon":return t?h(()=>import("./image-CAb3G_S1.js"),[]).then(n=>n.default):h(()=>import("./index-DiywNzXF.js"),[]).then(n=>n.wallet);case"llc.besc":return t?h(()=>import("./image-Ceksqz1-.js"),[]).then(n=>n.default):h(()=>import("./index-BxdOFUPP.js"),[]).then(n=>n.wallet);case"baby.smart":return t?h(()=>import("./image-DRIx4y_P.js"),[]).then(n=>n.default):h(()=>import("./index-CNMUmwOO.js"),[]).then(n=>n.wallet);case"app.onto":return t?h(()=>import("./image-Bt794qKF.js"),[]).then(n=>n.default):h(()=>import("./index-BDZlq0qh.js"),[]).then(n=>n.wallet);case"com.ivirse":return t?h(()=>import("./image-UedJVRUu.js"),[]).then(n=>n.default):h(()=>import("./index-BDxaD6BF.js"),[]).then(n=>n.wallet);case"one.mixin.messenger":return t?h(()=>import("./image-D3W98SRi.js"),[]).then(n=>n.default):h(()=>import("./index-D3xs2XN5.js"),[]).then(n=>n.wallet);case"cash.abpay":return t?h(()=>import("./image-BIXNfpi0.js"),[]).then(n=>n.default):h(()=>import("./index-Q0EiqGJA.js"),[]).then(n=>n.wallet);case"ch.dssecurity":return t?h(()=>import("./image-yTAVsfm3.js"),[]).then(n=>n.default):h(()=>import("./index-C_xRuElA.js"),[]).then(n=>n.wallet);case"com.concordium.wallet":return t?h(()=>import("./image-ZwVZp8I-.js"),[]).then(n=>n.default):h(()=>import("./index-DRMQsmmg.js"),[]).then(n=>n.wallet);case"io.zkape":return t?h(()=>import("./image-Y1vaco4M.js"),[]).then(n=>n.default):h(()=>import("./index-DVU2i8-9.js"),[]).then(n=>n.wallet);case"com.paliwallet":return t?h(()=>import("./image-CqwlZgVk.js"),[]).then(n=>n.default):h(()=>import("./index-CMLf1O57.js"),[]).then(n=>n.wallet);case"io.pitaka":return t?h(()=>import("./image-DrYWWKEd.js"),[]).then(n=>n.default):h(()=>import("./index-Cnl_JyCd.js"),[]).then(n=>n.wallet);case"com.saitamatoken":return t?h(()=>import("./image-CAyyni45.js"),[]).then(n=>n.default):h(()=>import("./index-DHDeZN7S.js"),[]).then(n=>n.wallet);case"org.mugambo":return t?h(()=>import("./image-CAO8bP71.js"),[]).then(n=>n.default):h(()=>import("./index-Dhf5ESfd.js"),[]).then(n=>n.wallet);case"fi.stablez":return t?h(()=>import("./image-2gXaVQKJ.js"),[]).then(n=>n.default):h(()=>import("./index-Y-iqvqQm.js"),[]).then(n=>n.wallet);case"io.legacynetwork":return t?h(()=>import("./image-BOsaNxhb.js"),[]).then(n=>n.default):h(()=>import("./index-DQgBEjQv.js"),[]).then(n=>n.wallet);case"com.meld.app":return t?h(()=>import("./image-Bu5z-R3j.js"),[]).then(n=>n.default):h(()=>import("./index-vIU3bmo3.js"),[]).then(n=>n.wallet);case"io.bladewallet":return t?h(()=>import("./image-BriecT_A.js"),[]).then(n=>n.default):h(()=>import("./index-B1lRIgux.js"),[]).then(n=>n.wallet);case"com.authentrend":return t?h(()=>import("./image-Bt0VMJN5.js"),[]).then(n=>n.default):h(()=>import("./index-COjO7y4b.js"),[]).then(n=>n.wallet);case"com.webauth":return t?h(()=>import("./image-DSJKsPTa.js"),[]).then(n=>n.default):h(()=>import("./index-DDY5PRF0.js"),[]).then(n=>n.wallet);case"xyz.tucop":return t?h(()=>import("./image-BB74R1v0.js"),[]).then(n=>n.default):h(()=>import("./index-BEvs-KDU.js"),[]).then(n=>n.wallet);case"pro.fintoken":return t?h(()=>import("./image-DFJ9V7d6.js"),[]).then(n=>n.default):h(()=>import("./index-BUPzw_YU.js"),[]).then(n=>n.wallet);case"io.nash":return t?h(()=>import("./image-VX9kj-L4.js"),[]).then(n=>n.default):h(()=>import("./index-DLIbM3lV.js"),[]).then(n=>n.wallet);case"vc.uincubator.api":return t?h(()=>import("./image-C-l2o06T.js"),[]).then(n=>n.default):h(()=>import("./index-3b4FPnNt.js"),[]).then(n=>n.wallet);case"io.unagi.unawallet":return t?h(()=>import("./image-BbMnRQvP.js"),[]).then(n=>n.default):h(()=>import("./index-CCMe_tjP.js"),[]).then(n=>n.wallet);case"io.nonbank":return t?h(()=>import("./image-Balnt-Cz.js"),[]).then(n=>n.default):h(()=>import("./index-BgNRU-e0.js"),[]).then(n=>n.wallet);case"io.armana.portal":return t?h(()=>import("./image-2TZb5wm0.js"),[]).then(n=>n.default):h(()=>import("./index-bXsRal1P.js"),[]).then(n=>n.wallet);case"com.x9wallet":return t?h(()=>import("./image-B3vFiCTL.js"),[]).then(n=>n.default):h(()=>import("./index-rngE6ltw.js"),[]).then(n=>n.wallet);case"io.kigo":return t?h(()=>import("./image-0Rb-Alqp.js"),[]).then(n=>n.default):h(()=>import("./index-Bp51oEV0.js"),[]).then(n=>n.wallet);case"com.alphawallet":return t?h(()=>import("./image-keSuKx3L.js"),[]).then(n=>n.default):h(()=>import("./index-CNUn3cep.js"),[]).then(n=>n.wallet);case"com.getcogni":return t?h(()=>import("./image-Obx6ILaM.js"),[]).then(n=>n.default):h(()=>import("./index-CVbWxVgo.js"),[]).then(n=>n.wallet);case"app.sinum":return t?h(()=>import("./image-BZqe_XdR.js"),[]).then(n=>n.default):h(()=>import("./index-Cw_t_6u-.js"),[]).then(n=>n.wallet);case"finance.soulswap.app":return t?h(()=>import("./image-BcwKGbKI.js"),[]).then(n=>n.default):h(()=>import("./index-DzZiRHPP.js"),[]).then(n=>n.wallet);case"io.loopring.wallet":return t?h(()=>import("./image-BW8rKOXQ.js"),[]).then(n=>n.default):h(()=>import("./index-BBSqe2Yu.js"),[]).then(n=>n.wallet);case"com.shapeshift":return t?h(()=>import("./image-CkzfH2rK.js"),[]).then(n=>n.default):h(()=>import("./index-iIYRP3A2.js"),[]).then(n=>n.wallet);case"io.trinity-tech":return t?h(()=>import("./image-B9EV7DkB.js"),[]).then(n=>n.default):h(()=>import("./index-DA2atyII.js"),[]).then(n=>n.wallet);case"money.keychain":return t?h(()=>import("./image-D-N6lJzn.js"),[]).then(n=>n.default):h(()=>import("./index-DyKMC2z8.js"),[]).then(n=>n.wallet);case"com.superhero.cordova":return t?h(()=>import("./image-CF0jVIb9.js"),[]).then(n=>n.default):h(()=>import("./index-BGXhyrjQ.js"),[]).then(n=>n.wallet);case"com.bettatrade":return t?h(()=>import("./image-6D1EQPfl.js"),[]).then(n=>n.default):h(()=>import("./index-QgklQrvI.js"),[]).then(n=>n.wallet);case"online.puzzle":return t?h(()=>import("./image-DR_z7tXV.js"),[]).then(n=>n.default):h(()=>import("./index-CUruswiz.js"),[]).then(n=>n.wallet);case"gg.indi":return t?h(()=>import("./image-CzDMlkmp.js"),[]).then(n=>n.default):h(()=>import("./index-B82mCN3i.js"),[]).then(n=>n.wallet);case"io.tradestrike":return t?h(()=>import("./image-S1B0Gp4I.js"),[]).then(n=>n.default):h(()=>import("./index-C9QluAH0.js"),[]).then(n=>n.wallet);case"xyz.echooo":return t?h(()=>import("./image-D-l0_TY5.js"),[]).then(n=>n.default):h(()=>import("./index-DiYqUBGF.js"),[]).then(n=>n.wallet);case"com.kryptogo":return t?h(()=>import("./image-BzcRZ3z_.js"),[]).then(n=>n.default):h(()=>import("./index-Bi3gSOdz.js"),[]).then(n=>n.wallet);case"io.trustasset":return t?h(()=>import("./image-D7kLqgEy.js"),[]).then(n=>n.default):h(()=>import("./index-DDOKzdz4.js"),[]).then(n=>n.wallet);case"app.utorg":return t?h(()=>import("./image-CYPCjBfV.js"),[]).then(n=>n.default):h(()=>import("./index-DFMDLTUW.js"),[]).then(n=>n.wallet);case"app.dfinnwallet":return t?h(()=>import("./image-Brf-M6Eo.js"),[]).then(n=>n.default):h(()=>import("./index-DMB3d6tz.js"),[]).then(n=>n.wallet);case"org.rezor":return t?h(()=>import("./image-DP3-AKgU.js"),[]).then(n=>n.default):h(()=>import("./index-Bd679tWT.js"),[]).then(n=>n.wallet);case"io.legionnetwork":return t?h(()=>import("./image-DhEatMPL.js"),[]).then(n=>n.default):h(()=>import("./index-CmL6gP_y.js"),[]).then(n=>n.wallet);case"cc.maxwallet":return t?h(()=>import("./image-pWd800uA.js"),[]).then(n=>n.default):h(()=>import("./index-BtXf6MK9.js"),[]).then(n=>n.wallet);case"com.ripio":return t?h(()=>import("./image-Ch_ktfcX.js"),[]).then(n=>n.default):h(()=>import("./index-Bj2cV2cj.js"),[]).then(n=>n.wallet);case"com.fxwallet":return t?h(()=>import("./image-BXDrqmSz.js"),[]).then(n=>n.default):h(()=>import("./index-rm_ORFAd.js"),[]).then(n=>n.wallet);case"inc.tomo":return t?h(()=>import("./image-DyAVMMp6.js"),[]).then(n=>n.default):h(()=>import("./index-Cca-XDRc.js"),[]).then(n=>n.wallet);case"me.komet.app":return t?h(()=>import("./image-DzEk34N9.js"),[]).then(n=>n.default):h(()=>import("./index-d1Bi4Y3G.js"),[]).then(n=>n.wallet);case"io.guardiianwallet":return t?h(()=>import("./image-AC1H6ZPE.js"),[]).then(n=>n.default):h(()=>import("./index-BWc71RqF.js"),[]).then(n=>n.wallet);case"io.hacken.hai":return t?h(()=>import("./image-Dnxw18r0.js"),[]).then(n=>n.default):h(()=>import("./index-DrVtwvSv.js"),[]).then(n=>n.wallet);case"com.zypto":return t?h(()=>import("./image-DKzTIzax.js"),[]).then(n=>n.default):h(()=>import("./index-C7MfWFoK.js"),[]).then(n=>n.wallet);case"io.nabox":return t?h(()=>import("./image-DBRyH_Rh.js"),[]).then(n=>n.default):h(()=>import("./index-DNfPkY9K.js"),[]).then(n=>n.wallet);case"com.tastycrypto":return t?h(()=>import("./image-eNFpMOAS.js"),[]).then(n=>n.default):h(()=>import("./index-Dzz3Ux1P.js"),[]).then(n=>n.wallet);case"com.ballet":return t?h(()=>import("./image-BO752L4A.js"),[]).then(n=>n.default):h(()=>import("./index-DmZNtM-R.js"),[]).then(n=>n.wallet);case"io.talken":return t?h(()=>import("./image-DNK-Wi5D.js"),[]).then(n=>n.default):h(()=>import("./index-CjviSBad.js"),[]).then(n=>n.wallet);case"io.wallacy":return t?h(()=>import("./image-BenqI60j.js"),[]).then(n=>n.default):h(()=>import("./index-CZ_a5e1G.js"),[]).then(n=>n.wallet);case"network.mrhb":return t?h(()=>import("./image-CqMUpFKn.js"),[]).then(n=>n.default):h(()=>import("./index-D5OfgCAv.js"),[]).then(n=>n.wallet);case"io.pockie":return t?h(()=>import("./image-DZnDK-Xj.js"),[]).then(n=>n.default):h(()=>import("./index-Bk7uX5j_.js"),[]).then(n=>n.wallet);case"me.astrox":return t?h(()=>import("./image-CBEV_Ymj.js"),[]).then(n=>n.default):h(()=>import("./index-C3gWBSK8.js"),[]).then(n=>n.wallet);case"com.thirdweb":return t?h(()=>import("./image-T5Lr0jNA.js"),[]).then(n=>n.default):h(()=>import("./index-DsKtpcc2.js"),[]).then(n=>n.wallet);case"com.poolsmobility.wallet":return t?h(()=>import("./image-VRkR1FSv.js"),[]).then(n=>n.default):h(()=>import("./index-CPsQ8NHN.js"),[]).then(n=>n.wallet);case"xyz.roam.wallet":return t?h(()=>import("./image-CJoENcT7.js"),[]).then(n=>n.default):h(()=>import("./index-CMXgyf5r.js"),[]).then(n=>n.wallet);case"app.gamic":return t?h(()=>import("./image-JETMQh4S.js"),[]).then(n=>n.default):h(()=>import("./index-DdQ2QlTJ.js"),[]).then(n=>n.wallet);case"app.m1nty":return t?h(()=>import("./image-DueZWGGJ.js"),[]).then(n=>n.default):h(()=>import("./index-DJ38lxUa.js"),[]).then(n=>n.wallet);case"network.trustkeys":return t?h(()=>import("./image-CoVfVQ2N.js"),[]).then(n=>n.default):h(()=>import("./index-D9OjbU6W.js"),[]).then(n=>n.wallet);case"com.caesiumlab":return t?h(()=>import("./image-CqVlNOfi.js"),[]).then(n=>n.default):h(()=>import("./index-N_5htzMA.js"),[]).then(n=>n.wallet);case"app.catecoin":return t?h(()=>import("./image-D8LYDHPh.js"),[]).then(n=>n.default):h(()=>import("./index-fLuuaL2F.js"),[]).then(n=>n.wallet);case"com.hootark":return t?h(()=>import("./image-FsYj6Ipw.js"),[]).then(n=>n.default):h(()=>import("./index-4Gkxn9a_.js"),[]).then(n=>n.wallet);case"com.crossmint":return t?h(()=>import("./image-Csi8zv8i.js"),[]).then(n=>n.default):h(()=>import("./index-DGbXzX8-.js"),[]).then(n=>n.wallet);case"com.coincircle":return t?h(()=>import("./image-CZoAF_IO.js"),[]).then(n=>n.default):h(()=>import("./index-DaqgY28G.js"),[]).then(n=>n.wallet);case"io.bharatbox":return t?h(()=>import("./image-CE5zhWMG.js"),[]).then(n=>n.default):h(()=>import("./index-C1HmbNh1.js"),[]).then(n=>n.wallet);case"nl.greenhood.wallet":return t?h(()=>import("./image-DcHAlJFf.js"),[]).then(n=>n.default):h(()=>import("./index-CI0o0_5P.js"),[]).then(n=>n.wallet);case"co.swopme":return t?h(()=>import("./image-B5zGMb7x.js"),[]).then(n=>n.default):h(()=>import("./index-Kpt7iZg5.js"),[]).then(n=>n.wallet);case"com.kresus":return t?h(()=>import("./image-B9i2YHdN.js"),[]).then(n=>n.default):h(()=>import("./index-DhvSUS0J.js"),[]).then(n=>n.wallet);case"com.dolletwallet":return t?h(()=>import("./image-9mjTTt3Y.js"),[]).then(n=>n.default):h(()=>import("./index-DQv3qKxR.js"),[]).then(n=>n.wallet);case"net.shinobi-wallet":return t?h(()=>import("./image-DU8NyouV.js"),[]).then(n=>n.default):h(()=>import("./index-CpizqJi3.js"),[]).then(n=>n.wallet);case"com.azcoiner":return t?h(()=>import("./image-BPo0OIev.js"),[]).then(n=>n.default):h(()=>import("./index-C01qJiwG.js"),[]).then(n=>n.wallet);case"com.passwallet.app":return t?h(()=>import("./image-A5Pisxzq.js"),[]).then(n=>n.default):h(()=>import("./index-CHGmRGs1.js"),[]).then(n=>n.wallet);case"app.qubic.wallet":return t?h(()=>import("./image-CVijw__b.js"),[]).then(n=>n.default):h(()=>import("./index-cXlHoOhe.js"),[]).then(n=>n.wallet);case"com.coinex.wallet":return t?h(()=>import("./image-B9-WC9qz.js"),[]).then(n=>n.default):h(()=>import("./index-CLmRyFMq.js"),[]).then(n=>n.wallet);case"app.xverse":return t?h(()=>import("./image-D1LhuZVG.js"),[]).then(n=>n.default):h(()=>import("./index-DFgt2jBx.js"),[]).then(n=>n.wallet);case"com.flash-wallet":return t?h(()=>import("./image-BaHqSwQx.js"),[]).then(n=>n.default):h(()=>import("./index-BUFTsMrI.js"),[]).then(n=>n.wallet);case"com.vgxfoundation":return t?h(()=>import("./image-B33xp9CQ.js"),[]).then(n=>n.default):h(()=>import("./index-DwgGCnoU.js"),[]).then(n=>n.wallet);case"org.arianee":return t?h(()=>import("./image-AczLW1TP.js"),[]).then(n=>n.default):h(()=>import("./index-Jtyxv-aY.js"),[]).then(n=>n.wallet);case"io.myabcwallet":return t?h(()=>import("./image-DraNAXbA.js"),[]).then(n=>n.default):h(()=>import("./index-3Cvg-OXh.js"),[]).then(n=>n.wallet);case"io.owallet":return t?h(()=>import("./image-AK02cNa4.js"),[]).then(n=>n.default):h(()=>import("./index-BhCLT0ad.js"),[]).then(n=>n.wallet);case"io.zelus":return t?h(()=>import("./image-BZaRgIwq.js"),[]).then(n=>n.default):h(()=>import("./index-CeX49D2O.js"),[]).then(n=>n.wallet);case"net.myrenegade":return t?h(()=>import("./image-DqZNaegF.js"),[]).then(n=>n.default):h(()=>import("./index-B0wYo_zG.js"),[]).then(n=>n.wallet);case"io.clingon":return t?h(()=>import("./image-DYpL4EaL.js"),[]).then(n=>n.default):h(()=>import("./index-CnESNHyu.js"),[]).then(n=>n.wallet);case"com.icewal":return t?h(()=>import("./image-0QbZculn.js"),[]).then(n=>n.default):h(()=>import("./index-Dyr2ZfAb.js"),[]).then(n=>n.wallet);case"io.streakk":return t?h(()=>import("./image-BylgX2RN.js"),[]).then(n=>n.default):h(()=>import("./index-D5zmTuuZ.js"),[]).then(n=>n.wallet);case"com.dokwallet":return t?h(()=>import("./image-BxZLlxGO.js"),[]).then(n=>n.default):h(()=>import("./index-DWUn3xTJ.js"),[]).then(n=>n.wallet);case"finance.porta":return t?h(()=>import("./image-DS02lLXY.js"),[]).then(n=>n.default):h(()=>import("./index-BZcoU6Z0.js"),[]).then(n=>n.wallet);case"io.prettygood.x":return t?h(()=>import("./image-W4tnKhU5.js"),[]).then(n=>n.default):h(()=>import("./index-IVGt0iH4.js"),[]).then(n=>n.wallet);case"io.earthwallet":return t?h(()=>import("./image-B6eNElEj.js"),[]).then(n=>n.default):h(()=>import("./index-DYoxAMAI.js"),[]).then(n=>n.wallet);case"net.spatium.wallet":return t?h(()=>import("./image-BZAeII_Q.js"),[]).then(n=>n.default):h(()=>import("./index-CRpuavSs.js"),[]).then(n=>n.wallet);case"live.superex":return t?h(()=>import("./image-xqIoPugN.js"),[]).then(n=>n.default):h(()=>import("./index-CDSsehUH.js"),[]).then(n=>n.wallet);case"com.adftechnology":return t?h(()=>import("./image-COolNucr.js"),[]).then(n=>n.default):h(()=>import("./index-Cw_4ZjJn.js"),[]).then(n=>n.wallet);case"com.bscecowallet":return t?h(()=>import("./image-DmVdrg9x.js"),[]).then(n=>n.default):h(()=>import("./index-DphUbohB.js"),[]).then(n=>n.wallet);case"io.wallypto":return t?h(()=>import("./image-Bgyn7Edx.js"),[]).then(n=>n.default):h(()=>import("./index-3Hrik3MN.js"),[]).then(n=>n.wallet);case"com.reown":return t?h(()=>import("./image-BC-ISwXb.js"),[]).then(n=>n.default):h(()=>import("./index-CQYWT8jy.js"),[]).then(n=>n.wallet);case"finance.voltage":return t?h(()=>import("./image-BvknIf7o.js"),[]).then(n=>n.default):h(()=>import("./index-DwI6Aho1.js"),[]).then(n=>n.wallet);case"com.walletconnect":return t?h(()=>import("./image-nGg2NUr5.js"),[]).then(n=>n.default):h(()=>import("./index-wECDJ3NE.js"),[]).then(n=>n.wallet);case"io.passpay":return t?h(()=>import("./image-CG2L-E9e.js"),[]).then(n=>n.default):h(()=>import("./index-BpHRNVJq.js"),[]).then(n=>n.wallet);case"technology.obvious":return t?h(()=>import("./image-BN9yS9ct.js"),[]).then(n=>n.default):h(()=>import("./index-DdpNYj5B.js"),[]).then(n=>n.wallet);case"io.plutope":return t?h(()=>import("./image-bx7t2tFM.js"),[]).then(n=>n.default):h(()=>import("./index-i5HAwWW2.js"),[]).then(n=>n.wallet);case"io.buzz-up":return t?h(()=>import("./image-YrUQjQfX.js"),[]).then(n=>n.default):h(()=>import("./index-DoEa8sok.js"),[]).then(n=>n.wallet);case"co.xellar":return t?h(()=>import("./image-D89rnuSD.js"),[]).then(n=>n.default):h(()=>import("./index-TVPnfEz9.js"),[]).then(n=>n.wallet);case"com.kaxaa":return t?h(()=>import("./image-DJWswcCh.js"),[]).then(n=>n.default):h(()=>import("./index-DxaY4K6c.js"),[]).then(n=>n.wallet);case"org.shefi":return t?h(()=>import("./image-DDvpwoJM.js"),[]).then(n=>n.default):h(()=>import("./index-BF0upGcQ.js"),[]).then(n=>n.wallet);case"xyz.orion":return t?h(()=>import("./image-Cj-WnBuG.js"),[]).then(n=>n.default):h(()=>import("./index-Byy_fx6M.js"),[]).then(n=>n.wallet);case"world.dosi.vault":return t?h(()=>import("./image-CTIpcfmx.js"),[]).then(n=>n.default):h(()=>import("./index-C7Y-Vt-H.js"),[]).then(n=>n.wallet);case"network.gridlock":return t?h(()=>import("./image-DCu5LmP3.js"),[]).then(n=>n.default):h(()=>import("./index-DfOp93tH.js"),[]).then(n=>n.wallet);case"finance.plena":return t?h(()=>import("./image-QiSwBpPD.js"),[]).then(n=>n.default):h(()=>import("./index-DsKyOM-e.js"),[]).then(n=>n.wallet);case"cc.dropp":return t?h(()=>import("./image-Bh9RaAFE.js"),[]).then(n=>n.default):h(()=>import("./index-DwvFwGye.js"),[]).then(n=>n.wallet);case"io.scramberry":return t?h(()=>import("./image-DG2A0pp3.js"),[]).then(n=>n.default):h(()=>import("./index-OxTQHzjd.js"),[]).then(n=>n.wallet);case"xyz.bonuz":return t?h(()=>import("./image-BlxEEUgA.js"),[]).then(n=>n.default):h(()=>import("./index-DW3P0esM.js"),[]).then(n=>n.wallet);case"com.bmawallet":return t?h(()=>import("./image-B29oqZFQ.js"),[]).then(n=>n.default):h(()=>import("./index-DG_CsZ_L.js"),[]).then(n=>n.wallet);case"co.lifedefi":return t?h(()=>import("./image-Cacm9krt.js"),[]).then(n=>n.default):h(()=>import("./index-BV6FLPiR.js"),[]).then(n=>n.wallet);case"com.get-verso":return t?h(()=>import("./image-C1H-7cB7.js"),[]).then(n=>n.default):h(()=>import("./index-DGzea1yQ.js"),[]).then(n=>n.wallet);case"io.blocto":return t?h(()=>import("./image-mtAAp4l3.js"),[]).then(n=>n.default):h(()=>import("./index-Cyniq_vs.js"),[]).then(n=>n.wallet);case"com.pandoshi":return t?h(()=>import("./image-DBTtOr0A.js"),[]).then(n=>n.default):h(()=>import("./index-DhglES_R.js"),[]).then(n=>n.wallet);case"io.getclave":return t?h(()=>import("./image-Cj5FK2LF.js"),[]).then(n=>n.default):h(()=>import("./index-VhOPKpLQ.js"),[]).then(n=>n.wallet);case"technology.jambo":return t?h(()=>import("./image-bGkpV8Yz.js"),[]).then(n=>n.default):h(()=>import("./index-zY1FByDs.js"),[]).then(n=>n.wallet);case"app.edge":return t?h(()=>import("./image-DMShxJ4p.js"),[]).then(n=>n.default):h(()=>import("./index-bnomx8Dl.js"),[]).then(n=>n.wallet);case"io.banksocial":return t?h(()=>import("./image-C4kRcwMC.js"),[]).then(n=>n.default):h(()=>import("./index-Ccilo5se.js"),[]).then(n=>n.wallet);case"io.konio":return t?h(()=>import("./image-BnnBPaYj.js"),[]).then(n=>n.default):h(()=>import("./index-CWMJI89u.js"),[]).then(n=>n.wallet);case"com.qubetics":return t?h(()=>import("./image-BoPDznhr.js"),[]).then(n=>n.default):h(()=>import("./index-FAz89-B7.js"),[]).then(n=>n.wallet);case"app.imem":return t?h(()=>import("./image-DU11lzrk.js"),[]).then(n=>n.default):h(()=>import("./index-qqhEcO_P.js"),[]).then(n=>n.wallet);case"com.purechain":return t?h(()=>import("./image-D9EUqNLw.js"),[]).then(n=>n.default):h(()=>import("./index-y-fv5WSz.js"),[]).then(n=>n.wallet);case"io.ethos":return t?h(()=>import("./image-DEWYzY44.js"),[]).then(n=>n.default):h(()=>import("./index-C_QhTFPr.js"),[]).then(n=>n.wallet);case"io.didwallet":return t?h(()=>import("./image-DD3TEXBm.js"),[]).then(n=>n.default):h(()=>import("./index-Bg6yFg1o.js"),[]).then(n=>n.wallet);case"com.dextrade":return t?h(()=>import("./image-D2pp6L6Y.js"),[]).then(n=>n.default):h(()=>import("./index-CMZLDlaA.js"),[]).then(n=>n.wallet);case"org.kelp":return t?h(()=>import("./image-DW-QsWzn.js"),[]).then(n=>n.default):h(()=>import("./index-DGIafVOM.js"),[]).then(n=>n.wallet);case"xyz.nestwallet":return t?h(()=>import("./image-ClMsEpOA.js"),[]).then(n=>n.default):h(()=>import("./index-DovxLsNV.js"),[]).then(n=>n.wallet);case"com.cryptnox":return t?h(()=>import("./image-D3yhzjwN.js"),[]).then(n=>n.default):h(()=>import("./index-DAvwKHX9.js"),[]).then(n=>n.wallet);case"land.liker":return t?h(()=>import("./image-jU3weE_L.js"),[]).then(n=>n.default):h(()=>import("./index-B5oClu2g.js"),[]).then(n=>n.wallet);case"io.hippowallet":return t?h(()=>import("./image-Ua30yTgk.js"),[]).then(n=>n.default):h(()=>import("./index-N8lMWapZ.js"),[]).then(n=>n.wallet);case"io.certhis":return t?h(()=>import("./image-DdhciWs2.js"),[]).then(n=>n.default):h(()=>import("./index-DhlU5IqG.js"),[]).then(n=>n.wallet);case"io.safecryptowallet":return t?h(()=>import("./image-CggT8fcC.js"),[]).then(n=>n.default):h(()=>import("./index-CeoeXAWS.js"),[]).then(n=>n.wallet);case"com.saify":return t?h(()=>import("./image-D9BJV0RO.js"),[]).then(n=>n.default):h(()=>import("./index-qfQgSHHm.js"),[]).then(n=>n.wallet);case"com.tiduswallet":return t?h(()=>import("./image-B94WiSPl.js"),[]).then(n=>n.default):h(()=>import("./index-5MfyGNXX.js"),[]).then(n=>n.wallet);case"io.uptn.dapp-web":return t?h(()=>import("./image-Bx8CuGbg.js"),[]).then(n=>n.default):h(()=>import("./index-Bf6aVU23.js"),[]).then(n=>n.wallet);case"com.it.onewallet":return t?h(()=>import("./image-DwT8NU8o.js"),[]).then(n=>n.default):h(()=>import("./index-C15ioynp.js"),[]).then(n=>n.wallet);case"com.rktechworks":return t?h(()=>import("./image-B_3kPYuE.js"),[]).then(n=>n.default):h(()=>import("./index-B7yCMw6f.js"),[]).then(n=>n.wallet);case"com.revelator.wallet":return t?h(()=>import("./image-BEDiadVJ.js"),[]).then(n=>n.default):h(()=>import("./index-zdYI4P64.js"),[]).then(n=>n.wallet);case"com.sinohope":return t?h(()=>import("./image-CR0aTzS0.js"),[]).then(n=>n.default):h(()=>import("./index-C9s7a0Ez.js"),[]).then(n=>n.wallet);case"network.dgg":return t?h(()=>import("./image-BI56qXQ0.js"),[]).then(n=>n.default):h(()=>import("./index-D7-VEloj.js"),[]).then(n=>n.wallet);case"io.up":return t?h(()=>import("./image-Dx3svzxu.js"),[]).then(n=>n.default):h(()=>import("./index-BG7XICd4.js"),[]).then(n=>n.wallet);case"com.lif3":return t?h(()=>import("./image-CFT4k-B4.js"),[]).then(n=>n.default):h(()=>import("./index-BmyNUPMf.js"),[]).then(n=>n.wallet);case"io.bimwallet":return t?h(()=>import("./image-BR5h2SHU.js"),[]).then(n=>n.default):h(()=>import("./index-Bk78_cgg.js"),[]).then(n=>n.wallet);case"pub.dg":return t?h(()=>import("./image-C5K8o_QO.js"),[]).then(n=>n.default):h(()=>import("./index-3AGQkopq.js"),[]).then(n=>n.wallet);case"com.wemix":return t?h(()=>import("./image-D7e0j8-5.js"),[]).then(n=>n.default):h(()=>import("./index-BCmub21b.js"),[]).then(n=>n.wallet);case"com.pierwallet":return t?h(()=>import("./image-BgTI1Mr2.js"),[]).then(n=>n.default):h(()=>import("./index-BxoamgAt.js"),[]).then(n=>n.wallet);case"net.stasis":return t?h(()=>import("./image-B0xghz9F.js"),[]).then(n=>n.default):h(()=>import("./index-D-cUTPXD.js"),[]).then(n=>n.wallet);case"com.peakdefi":return t?h(()=>import("./image-B-j6X2ua.js"),[]).then(n=>n.default):h(()=>import("./index-Ds8RjPXm.js"),[]).then(n=>n.wallet);case"com.3swallet":return t?h(()=>import("./image-Dm6aqzLa.js"),[]).then(n=>n.default):h(()=>import("./index-B01hsCSm.js"),[]).then(n=>n.wallet);case"com.example.subdomain":return t?h(()=>import("./image-BrBkAmMh.js"),[]).then(n=>n.default):h(()=>import("./index-Bx-6M_VN.js"),[]).then(n=>n.wallet);case"com.reown.appkit-lab":return t?h(()=>import("./image-Bt_TYk3Z.js"),[]).then(n=>n.default):h(()=>import("./index-BomxN3NM.js"),[]).then(n=>n.wallet);case"com.opz":return t?h(()=>import("./image-Dubw5heQ.js"),[]).then(n=>n.default):h(()=>import("./index-BsYaYokr.js"),[]).then(n=>n.wallet);case"ai.spotonchain.platform":return t?h(()=>import("./image-CmemWtNq.js"),[]).then(n=>n.default):h(()=>import("./index-CCYs1NTS.js"),[]).then(n=>n.wallet);case"org.dailychain.wallet":return t?h(()=>import("./image-HX_Cc3WE.js"),[]).then(n=>n.default):h(()=>import("./index-DOvMMOii.js"),[]).then(n=>n.wallet);case"app.omni":return t?h(()=>import("./image-B3gcDEsF.js"),[]).then(n=>n.default):h(()=>import("./index-CFS3GV0-.js"),[]).then(n=>n.wallet);case"id.plumaa":return t?h(()=>import("./image-D2OcPCwL.js"),[]).then(n=>n.default):h(()=>import("./index-XPcis1Hk.js"),[]).then(n=>n.wallet);case"io.ttmwallet":return t?h(()=>import("./image-LKLppsLU.js"),[]).then(n=>n.default):h(()=>import("./index-CY9mq6Ws.js"),[]).then(n=>n.wallet);case"io.kgen":return t?h(()=>import("./image-C_araf9B.js"),[]).then(n=>n.default):h(()=>import("./index-BlKJ-JBj.js"),[]).then(n=>n.wallet);case"com.nufinetes":return t?h(()=>import("./image-Uvntzjzd.js"),[]).then(n=>n.default):h(()=>import("./index-CM1LA8OI.js"),[]).then(n=>n.wallet);case"com.squirrelwallet":return t?h(()=>import("./image-D4996xLS.js"),[]).then(n=>n.default):h(()=>import("./index-GazkMlKm.js"),[]).then(n=>n.wallet);case"eu.trusteeglobal":return t?h(()=>import("./image-ClaYyDQX.js"),[]).then(n=>n.default):h(()=>import("./index-BbT33_dP.js"),[]).then(n=>n.wallet);case"com.daffione":return t?h(()=>import("./image-C6JZ7WuV.js"),[]).then(n=>n.default):h(()=>import("./index-KxQNzhUS.js"),[]).then(n=>n.wallet);case"com.saakuru.app":return t?h(()=>import("./image-CwFxLfDc.js"),[]).then(n=>n.default):h(()=>import("./index-u12pzcuy.js"),[]).then(n=>n.wallet);case"io.r0ar":return t?h(()=>import("./image-BEeNARTM.js"),[]).then(n=>n.default):h(()=>import("./index-BAFdi-Xy.js"),[]).then(n=>n.wallet);case"com.nodle":return t?h(()=>import("./image-BDK4RXKk.js"),[]).then(n=>n.default):h(()=>import("./index-iN0t9HsN.js"),[]).then(n=>n.wallet);case"app.tofee":return t?h(()=>import("./image-BOnGX8Q5.js"),[]).then(n=>n.default):h(()=>import("./index--Gdut-6F.js"),[]).then(n=>n.wallet);case"io.pltwallet":return t?h(()=>import("./image-C3CgzYTf.js"),[]).then(n=>n.default):h(()=>import("./index-1j0V944m.js"),[]).then(n=>n.wallet);case"org.talkapp":return t?h(()=>import("./image-2_1YP_wN.js"),[]).then(n=>n.default):h(()=>import("./index-BBhuy_-9.js"),[]).then(n=>n.wallet);case"io.ready":return t?h(()=>import("./image-DigckmBu.js"),[]).then(n=>n.default):h(()=>import("./index-BwWQILXK.js"),[]).then(n=>n.wallet);case"app.w3wallet":return t?h(()=>import("./image-BCZn_efw.js"),[]).then(n=>n.default):h(()=>import("./index-D09tH-_p.js"),[]).then(n=>n.wallet);case"pro.ds.app":return t?h(()=>import("./image-IE8YXerr.js"),[]).then(n=>n.default):h(()=>import("./index-mDTTSKTd.js"),[]).then(n=>n.wallet);case"com.reown.docs":return t?h(()=>import("./image-CkIE5GW_.js"),[]).then(n=>n.default):h(()=>import("./index-DkSjxVHF.js"),[]).then(n=>n.wallet);case"com.apollox":return t?h(()=>import("./image-BnILE5Nd.js"),[]).then(n=>n.default):h(()=>import("./index-B9VmLLfu.js"),[]).then(n=>n.wallet);case"com.ipmb":return t?h(()=>import("./image-CI9-uvbv.js"),[]).then(n=>n.default):h(()=>import("./index-BK3hD_Aq.js"),[]).then(n=>n.wallet);case"com.payperless":return t?h(()=>import("./image-Db2mz7AE.js"),[]).then(n=>n.default):h(()=>import("./index-D9LT89OI.js"),[]).then(n=>n.wallet);case"com.obliowallet":return t?h(()=>import("./image-C6e4H5Qk.js"),[]).then(n=>n.default):h(()=>import("./index-CNa4H4iF.js"),[]).then(n=>n.wallet);case"app.keeper-wallet":return t?h(()=>import("./image-ds_DS45D.js"),[]).then(n=>n.default):h(()=>import("./index-OrvSEOrD.js"),[]).then(n=>n.wallet);case"io.paraswap":return t?h(()=>import("./image-DLNyVKh7.js"),[]).then(n=>n.default):h(()=>import("./index-OUxzqq8e.js"),[]).then(n=>n.wallet);case"org.ecoinwallet":return t?h(()=>import("./image-C6_rXHSy.js"),[]).then(n=>n.default):h(()=>import("./index-Bzae-fTw.js"),[]).then(n=>n.wallet);case"fi.dropmate":return t?h(()=>import("./image-CDZQNGIA.js"),[]).then(n=>n.default):h(()=>import("./index-DePwUFvF.js"),[]).then(n=>n.wallet);case"com.cryptokara":return t?h(()=>import("./image-CqvokakT.js"),[]).then(n=>n.default):h(()=>import("./index-CkUX-IzZ.js"),[]).then(n=>n.wallet);case"co.cyber.wallet":return t?h(()=>import("./image-Eq0Swt8O.js"),[]).then(n=>n.default):h(()=>import("./index-DNwbsPLB.js"),[]).then(n=>n.wallet);case"com.kriptonio":return t?h(()=>import("./image-nnLbNJXY.js"),[]).then(n=>n.default):h(()=>import("./index-CT7qvsrD.js"),[]).then(n=>n.wallet);case"digital.minerva":return t?h(()=>import("./image-Bs-ggdFz.js"),[]).then(n=>n.default):h(()=>import("./index-CnPAMI6s.js"),[]).then(n=>n.wallet);case"com.mpcvault.broswerplugin":return t?h(()=>import("./image-C4G5noc2.js"),[]).then(n=>n.default):h(()=>import("./index-CQcA9NQy.js"),[]).then(n=>n.wallet);case"com.liberawallet":return t?h(()=>import("./image-CeeH5SSM.js"),[]).then(n=>n.default):h(()=>import("./index-CJOIpO0D.js"),[]).then(n=>n.wallet);case"io.helixid":return t?h(()=>import("./image-CGnQwBYH.js"),[]).then(n=>n.default):h(()=>import("./index-BiQYxH3k.js"),[]).then(n=>n.wallet);case"com.broearn":return t?h(()=>import("./image-CGMwpiJi.js"),[]).then(n=>n.default):h(()=>import("./index-usaXkbHq.js"),[]).then(n=>n.wallet);case"io.altme":return t?h(()=>import("./image-ponfuhgz.js"),[]).then(n=>n.default):h(()=>import("./index-DkHeUbcp.js"),[]).then(n=>n.wallet);case"app.herewallet":return t?h(()=>import("./image-Cki_h5H8.js"),[]).then(n=>n.default):h(()=>import("./index-BXLtaWeF.js"),[]).then(n=>n.wallet);case"com.coinsdo":return t?h(()=>import("./image-BkQn-eFE.js"),[]).then(n=>n.default):h(()=>import("./index-DiP3XxxX.js"),[]).then(n=>n.wallet);case"trade.flooz.wallet":return t?h(()=>import("./image-B79qVkMd.js"),[]).then(n=>n.default):h(()=>import("./index-CMs5X7O_.js"),[]).then(n=>n.wallet);case"com.tapwallet":return t?h(()=>import("./image-EV0HMtku.js"),[]).then(n=>n.default):h(()=>import("./index-CIXsaBn0.js"),[]).then(n=>n.wallet);case"fun.tobi":return t?h(()=>import("./image-BC0xyU5O.js"),[]).then(n=>n.default):h(()=>import("./index-DatayTYV.js"),[]).then(n=>n.wallet);case"com.bitnovo":return t?h(()=>import("./image-Diy5ggOd.js"),[]).then(n=>n.default):h(()=>import("./index-DZ9mCxwq.js"),[]).then(n=>n.wallet);case"io.xucre":return t?h(()=>import("./image-DdG87PRE.js"),[]).then(n=>n.default):h(()=>import("./index-RftHbEJr.js"),[]).then(n=>n.wallet);case"app.girin":return t?h(()=>import("./image-CPTr6dkg.js"),[]).then(n=>n.default):h(()=>import("./index-DTTPaYVe.js"),[]).then(n=>n.wallet);case"finance.panaroma":return t?h(()=>import("./image-C4MrlFC9.js"),[]).then(n=>n.default):h(()=>import("./index-BuRC3xsC.js"),[]).then(n=>n.wallet);case"app.clot":return t?h(()=>import("./image-9P9l0zV_.js"),[]).then(n=>n.default):h(()=>import("./index-BFO7EK1h.js"),[]).then(n=>n.wallet);case"io.transi":return t?h(()=>import("./image-DW2MUS3y.js"),[]).then(n=>n.default):h(()=>import("./index-5DvAcfYw.js"),[]).then(n=>n.wallet);case"world.qoin":return t?h(()=>import("./image-5AG089cB.js"),[]).then(n=>n.default):h(()=>import("./index-L98tcAPA.js"),[]).then(n=>n.wallet);case"com.greengloryglobal":return t?h(()=>import("./image-Ljm9Bz3n.js"),[]).then(n=>n.default):h(()=>import("./index-cT-bgULX.js"),[]).then(n=>n.wallet);case"com.amazewallet":return t?h(()=>import("./image-C-F3MXbl.js"),[]).then(n=>n.default):h(()=>import("./index-5MqcAe3C.js"),[]).then(n=>n.wallet);case"zone.bitverse":return t?h(()=>import("./image-DGb_hLx6.js"),[]).then(n=>n.default):h(()=>import("./index-B6he1NFn.js"),[]).then(n=>n.wallet);case"social.gm2":return t?h(()=>import("./image-AWdU8VV0.js"),[]).then(n=>n.default):h(()=>import("./index-CvmJGI4m.js"),[]).then(n=>n.wallet);case"io.ozonewallet":return t?h(()=>import("./image-9QI9sTH5.js"),[]).then(n=>n.default):h(()=>import("./index-CtrwXvyj.js"),[]).then(n=>n.wallet);case"io.ukiss":return t?h(()=>import("./image-CbgyrC3w.js"),[]).then(n=>n.default):h(()=>import("./index-DjBbIJjj.js"),[]).then(n=>n.wallet);case"finance.islamicoin":return t?h(()=>import("./image-DOl7zD0B.js"),[]).then(n=>n.default):h(()=>import("./index-Do5UpbR4.js"),[]).then(n=>n.wallet);case"io.copiosa":return t?h(()=>import("./image-D7UG6IdA.js"),[]).then(n=>n.default):h(()=>import("./index-CEiupjfk.js"),[]).then(n=>n.wallet);case"world.fncy":return t?h(()=>import("./image-D8u0coXq.js"),[]).then(n=>n.default):h(()=>import("./index-B8M5fchQ.js"),[]).then(n=>n.wallet);case"io.moonstake":return t?h(()=>import("./image-Di_xLdyX.js"),[]).then(n=>n.default):h(()=>import("./index-7HfmIPvC.js"),[]).then(n=>n.wallet);case"com.trusteeglobal":return t?h(()=>import("./image-DnR4Lmm2.js"),[]).then(n=>n.default):h(()=>import("./index-DBjSfZvB.js"),[]).then(n=>n.wallet);case"net.spatium":return t?h(()=>import("./image-GC2hQOZY.js"),[]).then(n=>n.default):h(()=>import("./index-DoDmQ6s0.js"),[]).then(n=>n.wallet);case"co.filwallet":return t?h(()=>import("./image-BO9Hp1NS.js"),[]).then(n=>n.default):h(()=>import("./index-BjuDWcc8.js"),[]).then(n=>n.wallet);case"money.snowball":return t?h(()=>import("./image-Bq5dNCvj.js"),[]).then(n=>n.default):h(()=>import("./index-DJaj65I0.js"),[]).then(n=>n.wallet);case"com.ennowallet":return t?h(()=>import("./image-CCpZhmeV.js"),[]).then(n=>n.default):h(()=>import("./index-CXMLwLSL.js"),[]).then(n=>n.wallet);case"io.safematrix":return t?h(()=>import("./image-aLir34M2.js"),[]).then(n=>n.default):h(()=>import("./index-DF3I6ohZ.js"),[]).then(n=>n.wallet);case"pro.assure":return t?h(()=>import("./image-BbZlFk1s.js"),[]).then(n=>n.default):h(()=>import("./index-DyMe2909.js"),[]).then(n=>n.wallet);case"com.neftipedia":return t?h(()=>import("./image-DK9H4-Ad.js"),[]).then(n=>n.default):h(()=>import("./index-BeSxOizm.js"),[]).then(n=>n.wallet);case"io.goldbit":return t?h(()=>import("./image-C-1BYDS8.js"),[]).then(n=>n.default):h(()=>import("./index-DatBJWXi.js"),[]).then(n=>n.wallet);case"com.coingrig":return t?h(()=>import("./image-DjUJV6x7.js"),[]).then(n=>n.default):h(()=>import("./index-UbUXcYI1.js"),[]).then(n=>n.wallet);case"io.xfun":return t?h(()=>import("./image-BKzTjD_x.js"),[]).then(n=>n.default):h(()=>import("./index-CupY10KR.js"),[]).then(n=>n.wallet);case"com.antiersolutions":return t?h(()=>import("./image-ubiaz4Ce.js"),[]).then(n=>n.default):h(()=>import("./index-DC6eto0o.js"),[]).then(n=>n.wallet);case"com.itoken":return t?h(()=>import("./image-CFVYHfGR.js"),[]).then(n=>n.default):h(()=>import("./index-ecg_2Bkp.js"),[]).then(n=>n.wallet);case"com.cardstack":return t?h(()=>import("./image-BNMU4MrK.js"),[]).then(n=>n.default):h(()=>import("./index-BNxqavL8.js"),[]).then(n=>n.wallet);case"io.slavi":return t?h(()=>import("./image-BKRBGzRA.js"),[]).then(n=>n.default):h(()=>import("./index-BGdrC_Sh.js"),[]).then(n=>n.wallet);case"tech.defiantapp":return t?h(()=>import("./image-SecrmBNd.js"),[]).then(n=>n.default):h(()=>import("./index-Dkkrt5IR.js"),[]).then(n=>n.wallet);case"com.dexari":return t?h(()=>import("./image-DqECxs5-.js"),[]).then(n=>n.default):h(()=>import("./index-01H7hL5P.js"),[]).then(n=>n.wallet);case"io.cfcx":return t?h(()=>import("./image-BtCfBTZq.js"),[]).then(n=>n.default):h(()=>import("./index-CcMwGV5f.js"),[]).then(n=>n.wallet);case"com.socjsc":return t?h(()=>import("./image-R9RXoc8s.js"),[]).then(n=>n.default):h(()=>import("./index-DbhRZmkB.js"),[]).then(n=>n.wallet);case"com.tokenb":return t?h(()=>import("./image-CVhRaM7j.js"),[]).then(n=>n.default):h(()=>import("./index-CJjptfiA.js"),[]).then(n=>n.wallet);case"org.onyx":return t?h(()=>import("./image-LrnAZqig.js"),[]).then(n=>n.default):h(()=>import("./index-B5qFvytG.js"),[]).then(n=>n.wallet);case"io.gk8":return t?h(()=>import("./image-BFZzUxQN.js"),[]).then(n=>n.default):h(()=>import("./index-BLslmGSA.js"),[]).then(n=>n.wallet);case"com.anchorage":return t?h(()=>import("./image-eXgCeXYC.js"),[]).then(n=>n.default):h(()=>import("./index-bwODdJd_.js"),[]).then(n=>n.wallet);case"com.hashport.wallet":return t?h(()=>import("./image-CrwfI0sg.js"),[]).then(n=>n.default):h(()=>import("./index-60aSyGqb.js"),[]).then(n=>n.wallet);case"io.billionwallet":return t?h(()=>import("./image-BJZxT49R.js"),[]).then(n=>n.default):h(()=>import("./index-DBBjFUrh.js"),[]).then(n=>n.wallet);case"com.dlicom":return t?h(()=>import("./image-DGt7Rmz0.js"),[]).then(n=>n.default):h(()=>import("./index-n485xKg2.js"),[]).then(n=>n.wallet);case"com.tychiwallet":return t?h(()=>import("./image-CWHyXFR4.js"),[]).then(n=>n.default):h(()=>import("./index-ClREn2mR.js"),[]).then(n=>n.wallet);case"at.swe":return t?h(()=>import("./image-AnfmMqaq.js"),[]).then(n=>n.default):h(()=>import("./index-BW67UrrV.js"),[]).then(n=>n.wallet);case"network.wali":return t?h(()=>import("./image-CXq-Cxbd.js"),[]).then(n=>n.default):h(()=>import("./index-BsPtMfti.js"),[]).then(n=>n.wallet);case"io.diamante":return t?h(()=>import("./image-BtTEqc7_.js"),[]).then(n=>n.default):h(()=>import("./index-DntehBUo.js"),[]).then(n=>n.wallet);case"ai.interlinklabs":return t?h(()=>import("./image-mo-MZ3QJ.js"),[]).then(n=>n.default):h(()=>import("./index-BnZ9yt85.js"),[]).then(n=>n.wallet);case"com.walllet":return t?h(()=>import("./image-OZ1AOwbT.js"),[]).then(n=>n.default):h(()=>import("./index-CeIV1F82.js"),[]).then(n=>n.wallet);case"org.lunascape":return t?h(()=>import("./image-ClfNqwc4.js"),[]).then(n=>n.default):h(()=>import("./index-m2MsoiHM.js"),[]).then(n=>n.wallet);case"com.nvxowallet":return t?h(()=>import("./image-CMq0qq2T.js"),[]).then(n=>n.default):h(()=>import("./index-C21V-qUV.js"),[]).then(n=>n.wallet);case"today.paywithcrypto.wallet":return t?h(()=>import("./image-N5WHiU5_.js"),[]).then(n=>n.default):h(()=>import("./index-BYdDyzxC.js"),[]).then(n=>n.wallet);case"ai.iluminary":return t?h(()=>import("./image-CW_1GHb7.js"),[]).then(n=>n.default):h(()=>import("./index-DXyPnzZX.js"),[]).then(n=>n.wallet);case"io.reactwallet":return t?h(()=>import("./image-Bnt5C7zC.js"),[]).then(n=>n.default):h(()=>import("./index-C5LJPbHN.js"),[]).then(n=>n.wallet);case"com.rewardywallet":return t?h(()=>import("./image-S9984bPS.js"),[]).then(n=>n.default):h(()=>import("./index-RjHECb4a.js"),[]).then(n=>n.wallet);case"io.walletv":return t?h(()=>import("./image-B9zDzj_n.js"),[]).then(n=>n.default):h(()=>import("./index-Cr_bAMhu.js"),[]).then(n=>n.wallet);case"app.outlawgames":return t?h(()=>import("./image-qL02cf1Y.js"),[]).then(n=>n.default):h(()=>import("./index-Dq3AkWuf.js"),[]).then(n=>n.wallet);case"io.ironwallet":return t?h(()=>import("./image-Ce4eMMpY.js"),[]).then(n=>n.default):h(()=>import("./index-I2Tu6nVy.js"),[]).then(n=>n.wallet);case"com.mecowallet":return t?h(()=>import("./image-BJ7E9wJj.js"),[]).then(n=>n.default):h(()=>import("./index-BNcgD_Jo.js"),[]).then(n=>n.wallet);case"com.onlybulls":return t?h(()=>import("./image-IV7Ly6tc.js"),[]).then(n=>n.default):h(()=>import("./index-Wki7z4v7.js"),[]).then(n=>n.wallet);case"me.qiewallet":return t?h(()=>import("./image-mUn2Nmwd.js"),[]).then(n=>n.default):h(()=>import("./index-B8FJWq2b.js"),[]).then(n=>n.wallet);case"fund.lflabs":return t?h(()=>import("./image-DmNtyNJi.js"),[]).then(n=>n.default):h(()=>import("./index-Mc-mIuS3.js"),[]).then(n=>n.wallet);case"io.walletverse":return t?h(()=>import("./image-CuH_nXcV.js"),[]).then(n=>n.default):h(()=>import("./index-I0tHaeSb.js"),[]).then(n=>n.wallet);case"com.berasig":return t?h(()=>import("./image-Dg0N1g6c.js"),[]).then(n=>n.default):h(()=>import("./index-B7f-7qNF.js"),[]).then(n=>n.wallet);case"app.phantom":return t?h(()=>import("./image-AMwbpknG.js"),[]).then(n=>n.default):h(()=>import("./index-H3IjI5-5.js"),[]).then(n=>n.wallet);case"com.coinbase.wallet":return t?h(()=>import("./image-WgGILhOH.js"),[]).then(n=>n.default):h(()=>import("./index-BQfRnOEk.js"),[]).then(n=>n.wallet);case"io.rabby":return t?h(()=>import("./image-DO9smEJD.js"),[]).then(n=>n.default):h(()=>import("./index-C3Ud76aq.js"),[]).then(n=>n.wallet);case"com.brave.wallet":return t?h(()=>import("./image-TDSuOHNU.js"),[]).then(n=>n.default):h(()=>import("./index-DP05FHXN.js"),[]).then(n=>n.wallet);case"fi.nu":return t?h(()=>import("./image-ubhPU-df.js"),[]).then(n=>n.default):h(()=>import("./index-DpmgAexj.js"),[]).then(n=>n.wallet);case"pro.hinkal.walletconnect":return t?h(()=>import("./image-WE5WO1oI.js"),[]).then(n=>n.default):h(()=>import("./index-BNz6smeL.js"),[]).then(n=>n.wallet);case"com.moongate.one":return t?h(()=>import("./image-DU5rwGF4.js"),[]).then(n=>n.default):h(()=>import("./index-CYFQ1qjY.js"),[]).then(n=>n.wallet);case"tech.levain":return t?h(()=>import("./image-DNqAGFzc.js"),[]).then(n=>n.default):h(()=>import("./index-ZMR3O7_V.js"),[]).then(n=>n.wallet);case"com.enkrypt":return t?h(()=>import("./image-Bwc5B3nF.js"),[]).then(n=>n.default):h(()=>import("./index-CLDRRTfd.js"),[]).then(n=>n.wallet);case"com.scramble":return t?h(()=>import("./image-BdlxKsqN.js"),[]).then(n=>n.default):h(()=>import("./index-CsrGDi9G.js"),[]).then(n=>n.wallet);case"io.finoa":return t?h(()=>import("./image-BjNYHzYo.js"),[]).then(n=>n.default):h(()=>import("./index-CIJwg7x2.js"),[]).then(n=>n.wallet);case"com.blazpay.wallet":return t?h(()=>import("./image-Ded2cDkb.js"),[]).then(n=>n.default):h(()=>import("./index-B7x0EPkI.js"),[]).then(n=>n.wallet);case"io.getjoin.prd":return t?h(()=>import("./image-Bh9Vac4W.js"),[]).then(n=>n.default):h(()=>import("./index-BGmtW5WT.js"),[]).then(n=>n.wallet);case"xyz.talisman":return t?h(()=>import("./image-DnOc4PLu.js"),[]).then(n=>n.default):h(()=>import("./index-BoWyXM61.js"),[]).then(n=>n.wallet);case"eu.flashsoft.clear-wallet":return t?h(()=>import("./image-RaAvmTda.js"),[]).then(n=>n.default):h(()=>import("./index-CBEChUnX.js"),[]).then(n=>n.wallet);case"app.berasig":return t?h(()=>import("./image-CKgTbGoy.js"),[]).then(n=>n.default):h(()=>import("./index-CJLOVPEY.js"),[]).then(n=>n.wallet);case"com.wallet.reown":return t?h(()=>import("./image-CBv_A54z.js"),[]).then(n=>n.default):h(()=>import("./index-Fk0P5t9a.js"),[]).then(n=>n.wallet);case"io.runonflux.sspwallet":return t?h(()=>import("./image-CMMSxKCI.js"),[]).then(n=>n.default):h(()=>import("./index-BSQg7iBu.js"),[]).then(n=>n.wallet);case"com.blanqlabs.wallet":return t?h(()=>import("./image-BQnyjyHr.js"),[]).then(n=>n.default):h(()=>import("./index-RFNw1zDI.js"),[]).then(n=>n.wallet);case"io.hero.wallet":return t?h(()=>import("./image-BSsXAyde.js"),[]).then(n=>n.default):h(()=>import("./index-zfxUsesj.js"),[]).then(n=>n.wallet);case"network.verified.custody":return t?h(()=>import("./image-WVTBQdo8.js"),[]).then(n=>n.default):h(()=>import("./index-Uztr5Jgj.js"),[]).then(n=>n.wallet);case"console.utila.io":return t?h(()=>import("./image-y8DPTS4d.js"),[]).then(n=>n.default):h(()=>import("./index-jAmOB9mf.js"),[]).then(n=>n.wallet);case"com.micet.wallet":return t?h(()=>import("./image-DIOD3I9G.js"),[]).then(n=>n.default):h(()=>import("./index-BFmXTuTI.js"),[]).then(n=>n.wallet);case"world.dolphinode.chain":return t?h(()=>import("./image-DYjHGArM.js"),[]).then(n=>n.default):h(()=>import("./index-CtkUWqve.js"),[]).then(n=>n.wallet);case"com.lootrush":return t?h(()=>import("./image-CD-9cKzY.js"),[]).then(n=>n.default):h(()=>import("./index-BkT_Phju.js"),[]).then(n=>n.wallet);case"xyz.dawnwallet":return t?h(()=>import("./image-D84iATu3.js"),[]).then(n=>n.default):h(()=>import("./index-CufUEtrW.js"),[]).then(n=>n.wallet);case"xyz.abs":return t?h(()=>import("./image-982I_LqG.js"),[]).then(n=>n.default):h(()=>import("./index-CBtcz4_T.js"),[]).then(n=>n.wallet);case"sh.frame":return t?h(()=>import("./image-QsHphgJe.js"),[]).then(n=>n.default):h(()=>import("./index-D-YZvb-d.js"),[]).then(n=>n.wallet);case"io.useglyph":return t?h(()=>import("./image-BebTTEqp.js"),[]).then(n=>n.default):h(()=>import("./index-6xhBK11g.js"),[]).then(n=>n.wallet);case"org.base.account":return t?h(()=>import("./image-BsBvd3sv.js"),[]).then(n=>n.default):h(()=>import("./index-Bw9O70Te.js"),[]).then(n=>n.wallet);default:throw new Error(`Wallet with id ${e} not found`)}}function j3(e){const{client:t,address:n}=e;return xe({enabled:!!n,queryFn:()=>J1({address:n||"",client:t,resolverChain:sa}),queryKey:["ens-name",n]})}function oa(e){return xe({enabled:!!e,queryFn:()=>{if(!e)throw new Error("Wallet id is required");return Sc(e,!1)},queryKey:["wallet-info",e],refetchOnMount:!1,refetchOnWindowFocus:!1,retry:!1})}function Bv(e){return xe({enabled:!!e,queryFn:async()=>{var i;if(!e)throw new Error("Wallet id is required");const{getInstalledWalletProviders:t}=await h(async()=>{const{getInstalledWalletProviders:r}=await Promise.resolve().then(()=>Zl);return{getInstalledWalletProviders:r}},void 0),n=(i=t().find(r=>r.info.rdns===e))==null?void 0:i.info.icon;return n||Sc(e,!0)},queryKey:["wallet-image",e],refetchOnMount:!1,refetchOnWindowFocus:!1,retry:!1})}const v3=w.createContext(void 0);function Vv(e){return c.jsx(v3.Provider,{value:e,children:e.children})}function Wv(){const e=w.useContext(v3);if(!e)throw new Error("WalletProviderContext not found. Make sure you are using WalletIcon, WalletName, etc. inside a <WalletProvider /> component");return e}async function xn(e){const t={action:e.event,amountWei:e.amountWei,chainId:e.chainId,clientId:e.client.clientId,dstChainId:e.toChainId,dstTokenAddress:e.toToken,errorCode:e.error,source:"pay",tokenAddress:e.fromToken,walletAddress:e.walletAddress,walletType:e.walletType};return Ou({client:e.client,data:t,ecosystem:e.ecosystem})}function Vo(e){if(!e)return!1;if(e.id==="smart")return!0;if(e.id==="inApp"||Oe(e)){const t=e.getConfig();if(t&&"smartAccount"in t&&t.smartAccount)return!0;if(t!=null&&t.executionMode){const n=t.executionMode;return n.mode==="EIP4337"||n.mode==="EIP7702"}}return!1}function Fv(e){if(!e)return!1;let t=!1;if(e&&e.id==="smart"){const n=e.getConfig();"sponsorGas"in n&&(t=n.sponsorGas),"gasless"in n&&(t=n.gasless)}if(e&&(e.id==="inApp"||Oe(e))){const n=e.getConfig();if(n&&"smartAccount"in n&&n.smartAccount){const i=n.smartAccount;"sponsorGas"in i&&(t=i.sponsorGas),"gasless"in i&&(t=i.gasless)}if(n!=null&&n.executionMode){const i=n.executionMode;if(i.mode==="EIP4337"){const r=i.smartAccount;r&&"sponsorGas"in r&&(t=r.sponsorGas),r&&"gasless"in r&&(t=r.gasless)}i.mode==="EIP7702"&&(t=i.sponsorGas||!1)}}return t}async function Yv(e){const{account:t,client:n,chain:i,tokenAddress:r}=e;if(r){const{getBalance:d}=await h(async()=>{const{getBalance:f}=await import("./getBalance-cs-XLy8M.js");return{getBalance:f}},__vite__mapDeps([23,24,1,2,3,4,5]));return d({address:t.address,contract:qt({address:r,chain:i,client:n})})}const s=ii({chain:i,client:n}),[o,a,l,u]=await Promise.all([J0(i),X0(i),e1(i),I5(s,{address:t.address})]);return{decimals:a,displayValue:Un(u,a),name:l,symbol:o,value:u}}const N3=w.createContext(()=>{}),S3=w.createContext(yf);function X1(e){const{theme:t,children:n}=e,i=A3(t);return c.jsx(S3.Provider,{value:i,children:n})}function A3(e){if(!e||!Qv(e))return yf;let t;return typeof e=="string"?t=e==="light"?Aj:yf:t=e,t}function Qv(e){return e==="dark"||e==="light"||typeof e=="object"&&e!==null&&"colors"in e}function X(){return w.useContext(S3)}class Hv{async open(t){window.open(t,"_blank","noopener,noreferrer")}}const pg=new Hv;function D3(...e){return e.filter(t=>typeof t=="string").join(" ")}const Gv=$t`
29
+ from {
30
+ opacity: 0;
31
+ transform: translateY(20%) scale(0.8) ;
32
+ }
33
+ to {
34
+ opacity: 1;
35
+ transform: translateY(0);
36
+ }
37
+ `,Zv=$t`
38
+ from {
39
+ opacity: 0;
40
+ transform: translateY(-20%) scale(0.8) ;
41
+ }
42
+ to {
43
+ opacity: 1;
44
+ transform: translateY(0);
45
+ }
46
+ `,Gs=$t`
47
+ from {
48
+ opacity: 0;
49
+ }
50
+ to {
51
+ opacity: 1;
52
+ }
53
+ `;var qv=zI,Kv=function(t){return t!=="theme"},wg=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?qv:Kv},xg=function(t,n,i){var r;if(n){var s=n.shouldForwardProp;r=t.__emotion_forwardProp&&s?function(o){return t.__emotion_forwardProp(o)&&s(o)}:s}return typeof r!="function"&&i&&(r=t.__emotion_forwardProp),r},Jv=function(t){var n=t.cache,i=t.serialized,r=t.isStringTag;return BI(n,i,r),VI(function(){return WI(n,i,r)}),null},Xv=function e(t,n){var i=t.__emotion_real===t,r=i&&t.__emotion_base||t,s,o;n!==void 0&&(s=n.label,o=n.target);var a=xg(t,n,i),l=a||wg(r),u=!l("as");return function(){var d=arguments,f=i&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&f.push("label:"+s+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var m=d[0];f.push(m[0]);for(var y=d.length,p=1;p<y;p++)f.push(d[p],m[p])}var g=PI(function(x,_,b){var I=u&&x.as||r,E="",C=[],T=x;if(x.theme==null){T={};for(var j in x)T[j]=x[j];T.theme=w.useContext(RI)}typeof x.className=="string"?E=UI(_.registered,C,x.className):x.className!=null&&(E=x.className+" ");var O=$I(f.concat(C),_.registered,T);E+=_.key+"-"+O.name,o!==void 0&&(E+=" "+o);var L=u&&a===void 0?wg(I):l,N={};for(var v in x)u&&v==="as"||L(v)&&(N[v]=x[v]);return N.className=E,b&&(N.ref=b),w.createElement(w.Fragment,null,w.createElement(Jv,{cache:_,serialized:O,isStringTag:typeof I=="string"}),w.createElement(I,N))});return g.displayName=s!==void 0?s:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=r,g.__emotion_styles=f,g.__emotion_forwardProp=a,Object.defineProperty(g,"toString",{value:function(){return"."+o}}),g.withComponent=function(x,_){var b=e(x,kI({},n,_,{shouldForwardProp:xg(g,_,!0)}));return b.apply(void 0,f)},g}},eN=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Be=Xv.bind(null);eN.forEach(function(e){Be[e]=Be(e)});const ke=Be.div,tN=Be.svg,nN=Be.span,iN=Be.a,Xi=Be.button,rN=Be.label,sN=Be.input,oN=Be.h2,aN=Be.p,O3=Be.ul,cN=Be.select,lN=Be.option;function Ge(e,t){if(e==null)return{};var n={},i=Object.keys(e),r,s;for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var uN=["color"],dN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,uN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M7.5 2C7.77614 2 8 2.22386 8 2.5L8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.75979 12.9473 7.63261 13 7.5 13C7.36739 13 7.24021 12.9473 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 2.5C7 2.22386 7.22386 2 7.5 2Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),hN=["color"],fN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,hN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),mN=["color"],aa=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,mN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),yN=["color"],gN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,yN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),pN=["color"],qu=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,pN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),wN=["color"],P3=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,wN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),xN=["color"],_N=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,xN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),bN=["color"],MN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,bN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),IN=["color"],k3=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,IN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),EN=["color"],CN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,EN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),LN=["color"],z3=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,LN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),TN=["color"],is=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,TN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),jN=["color"],vN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,jN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M3 1C2.44771 1 2 1.44772 2 2V13C2 13.5523 2.44772 14 3 14H10.5C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13H3V2L10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1H3ZM12.6036 4.89645C12.4083 4.70118 12.0917 4.70118 11.8964 4.89645C11.7012 5.09171 11.7012 5.40829 11.8964 5.60355L13.2929 7H6.5C6.22386 7 6 7.22386 6 7.5C6 7.77614 6.22386 8 6.5 8H13.2929L11.8964 9.39645C11.7012 9.59171 11.7012 9.90829 11.8964 10.1036C12.0917 10.2988 12.4083 10.2988 12.6036 10.1036L14.8536 7.85355C15.0488 7.65829 15.0488 7.34171 14.8536 7.14645L12.6036 4.89645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),NN=["color"],R3=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,NN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),SN=["color"],em=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,SN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),AN=["color"],DN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,AN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),ON=["color"],PN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,ON);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),kN=["color"],zN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,kN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M13.5 13.95C13.7485 13.95 13.95 13.7485 13.95 13.5C13.95 13.2514 13.7485 13.05 13.5 13.05L1.49995 13.05C1.25142 13.05 1.04995 13.2514 1.04995 13.5C1.04995 13.7485 1.25142 13.95 1.49995 13.95L13.5 13.95ZM11.0681 7.5683C11.2439 7.39257 11.2439 7.10764 11.0681 6.93191C10.8924 6.75617 10.6075 6.75617 10.4317 6.93191L7.94993 9.41371L7.94993 1.49998C7.94993 1.25146 7.74846 1.04998 7.49993 1.04998C7.2514 1.04998 7.04993 1.25146 7.04993 1.49998L7.04993 9.41371L4.56813 6.93191C4.39239 6.75617 4.10746 6.75617 3.93173 6.93191C3.75599 7.10764 3.75599 7.39257 3.93173 7.5683L7.18173 10.8183C7.35746 10.994 7.64239 10.994 7.81812 10.8183L11.0681 7.5683Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),RN=["color"],Ku=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,RN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),UN=["color"],$N=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,UN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M7.49985 0.877045C3.84216 0.877045 0.877014 3.84219 0.877014 7.49988C0.877014 11.1575 3.84216 14.1227 7.49985 14.1227C11.1575 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1575 0.877045 7.49985 0.877045ZM1.82701 7.49988C1.82701 4.36686 4.36683 1.82704 7.49985 1.82704C10.6328 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6328 13.1727 7.49985 13.1727C4.36683 13.1727 1.82701 10.6329 1.82701 7.49988ZM7.49999 9.49999C8.60456 9.49999 9.49999 8.60456 9.49999 7.49999C9.49999 6.39542 8.60456 5.49999 7.49999 5.49999C6.39542 5.49999 5.49999 6.39542 5.49999 7.49999C5.49999 8.60456 6.39542 9.49999 7.49999 9.49999Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),BN=["color"],Ac=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,BN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M1.84998 7.49998C1.84998 4.66458 4.05979 1.84998 7.49998 1.84998C10.2783 1.84998 11.6515 3.9064 12.2367 5H10.5C10.2239 5 10 5.22386 10 5.5C10 5.77614 10.2239 6 10.5 6H13.5C13.7761 6 14 5.77614 14 5.5V2.5C14 2.22386 13.7761 2 13.5 2C13.2239 2 13 2.22386 13 2.5V4.31318C12.2955 3.07126 10.6659 0.849976 7.49998 0.849976C3.43716 0.849976 0.849976 4.18537 0.849976 7.49998C0.849976 10.8146 3.43716 14.15 7.49998 14.15C9.44382 14.15 11.0622 13.3808 12.2145 12.2084C12.8315 11.5806 13.3133 10.839 13.6418 10.0407C13.7469 9.78536 13.6251 9.49315 13.3698 9.38806C13.1144 9.28296 12.8222 9.40478 12.7171 9.66014C12.4363 10.3425 12.0251 10.9745 11.5013 11.5074C10.5295 12.4963 9.16504 13.15 7.49998 13.15C4.05979 13.15 1.84998 10.3354 1.84998 7.49998Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),VN=["color"],WN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,VN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M12.3536 1.14645C12.1583 0.951184 11.8417 0.951184 11.6464 1.14645C11.4512 1.34171 11.4512 1.65829 11.6464 1.85355L12.7929 3H12C10.7037 3 9.71111 3.58423 8.87248 4.38931C8.20065 5.03427 7.59349 5.85684 6.99461 6.6682C6.86287 6.84668 6.73154 7.02462 6.6 7.2C5.10874 9.18835 3.49037 11 0.5 11C0.223858 11 0 11.2239 0 11.5C0 11.7761 0.223858 12 0.5 12C4.00963 12 5.89126 9.81165 7.4 7.8C7.54367 7.60845 7.6832 7.41962 7.81996 7.23454L7.82005 7.23443L7.82006 7.23441C8.41674 6.42695 8.96069 5.69085 9.56502 5.11069C10.2889 4.41577 11.0463 4 12 4H12.7929L11.6464 5.14645C11.4512 5.34171 11.4512 5.65829 11.6464 5.85355C11.8417 6.04882 12.1583 6.04882 12.3536 5.85355L14.3536 3.85355C14.5488 3.65829 14.5488 3.34171 14.3536 3.14645L12.3536 1.14645ZM0.5 3C3.35278 3 5.12992 4.44588 6.50548 6.06746L6.3762 6.24266C6.2483 6.4161 6.12293 6.58609 6 6.75C5.96397 6.79804 5.92798 6.84581 5.892 6.89331C4.57348 5.29306 3.02637 4 0.5 4C0.223858 4 0 3.77614 0 3.5C0 3.22386 0.223858 3 0.5 3ZM8.87248 10.6107C8.37284 10.131 7.90897 9.55314 7.45767 8.95468C7.64688 8.71693 7.82704 8.48061 8 8.25L8.08987 8.12987C8.58412 8.79402 9.05288 9.39766 9.56502 9.88931C10.2889 10.5842 11.0463 11 12 11H12.7929L11.6464 9.85355C11.4512 9.65829 11.4512 9.34171 11.6464 9.14645C11.8417 8.95118 12.1583 8.95118 12.3536 9.14645L14.3536 11.1464C14.5488 11.3417 14.5488 11.6583 14.3536 11.8536L12.3536 13.8536C12.1583 14.0488 11.8417 14.0488 11.6464 13.8536C11.4512 13.6583 11.4512 13.3417 11.6464 13.1464L12.7929 12H12C10.7037 12 9.71111 11.4158 8.87248 10.6107Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),FN=["color"],YN=w.forwardRef(function(e,t){var n=e.color,i=n===void 0?"currentColor":n,r=Ge(e,FN);return w.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),w.createElement("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))});const ae=Xi(e=>{const t=X();return e.unstyled?{}:{all:"unset","[&:active]:not([disabled])":{transform:"translateY(1px)"},"&[data-disabled='true']":{"&:hover":{borderColor:"transparent"},background:t.colors.tertiaryBg,borderColor:"transparent",boxShadow:"none",color:t.colors.secondaryText},"&[disabled]":{cursor:"not-allowed"},alignItems:"center",background:(()=>{if(e.bg)return t.colors[e.bg];switch(e.variant){case"primary":return t.colors.primaryButtonBg;case"accent":return t.colors.accentButtonBg;case"secondary":return t.colors.secondaryButtonBg;default:return"none"}})(),borderRadius:Z.md,boxSizing:"border-box",color:(()=>{switch(e.variant){case"primary":return t.colors.primaryButtonText;case"accent":return t.colors.accentButtonText;case"secondary":return t.colors.secondaryButtonText;case"ghost":case"ghost-solid":case"outline":return t.colors.secondaryButtonText;case"link":return t.colors.accentText;default:return t.colors.primaryButtonText}})(),cursor:"pointer",display:"inline-flex",flexShrink:0,fontSize:ie.sm,fontWeight:500,gap:e.gap&&z[e.gap]||0,justifyContent:"center",lineHeight:"normal",maxWidth:"100%",padding:`${ie.sm} ${ie.sm}`,textAlign:"center",transition:"border 200ms ease",WebkitTapHighlightColor:"transparent",width:e.fullWidth?"100%":void 0,"&:hover":{background:e.hoverBg?t.colors[e.hoverBg]:void 0},...e.variant==="outline"?{"&:hover":{borderColor:t.colors.accentText},'&[aria-selected="true"]':{borderColor:t.colors.accentText},border:`1px solid ${t.colors.borderColor}`}:e.variant==="ghost"?{"&:hover":{borderColor:t.colors.accentText},border:"1px solid transparent"}:e.variant==="ghost-solid"?{"&:hover":{background:t.colors[e.hoverBg||"tertiaryBg"]},border:"1px solid transparent"}:e.variant==="accent"?{"&:hover":{opacity:.8}}:e.variant==="secondary"?{"&:hover":{background:t.colors[e.hoverBg||"secondaryButtonHoverBg"]}}:e.variant==="link"?{"&:hover":{color:t.colors.primaryText},padding:0}:{}}}),U3=ae.withComponent("a"),Yi=Xi(e=>{const t=X();return{all:"unset","&:hover":{background:t.colors.secondaryIconHoverBg,color:t.colors.secondaryIconHoverColor},"&[disabled]":{cursor:"not-allowed"},alignItems:"center",borderRadius:Z.sm,color:t.colors.secondaryIconColor,cursor:"pointer",display:"inline-flex",justifyContent:"center",padding:"2px",transition:"background 200ms ease, color 200ms ease",WebkitTapHighlightColor:"transparent"}}),Ju=oN(e=>({color:X().colors.primaryText,fontSize:ie.lg,fontWeight:500,lineHeight:1.3,margin:0,letterSpacing:"-0.025em",textAlign:"left"})),QN=e=>c.jsx(Yi,{className:"tw-back-button",onClick:e.onClick,style:{transform:"translateX(-25%)",...e.style},type:"button",children:c.jsx(P3,{height:A.md,width:A.md})}),$3=ke(e=>({borderTop:`1px solid ${X().colors.separatorLine}`,display:"flex",flexDirection:"column",gap:z.md,padding:z.lg})),Dc={"&::-webkit-scrollbar":{display:"none",width:0},scrollbarWidth:"none"};function be(e){const{onBack:t,title:n}=e;return c.jsxs("div",{className:D3("tw-header",e.className),style:{alignItems:"center",display:"flex",justifyContent:e.leftAligned?"flex-start":"center",position:"relative"},children:[t&&c.jsx(QN,{onClick:t,style:{left:0,position:"absolute",top:0}}),c.jsx(M,{center:"both",flex:"row",gap:"xs",children:typeof n=="string"?c.jsx(Ju,{children:n}):n})]})}const We=ke(e=>{const t=X();return{borderTop:`1px ${e.dashed?"dashed":"solid"} ${t.colors.separatorLine}`}});function M(e){const t={};return e.relative&&(t.position="relative"),e.fullHeight&&(t.height="100%"),e.expand&&(t.flex="1 1 0%"),e.flex&&(t.display="flex",t.flexDirection=e.flex,e.flex==="row"&&(t.flexWrap="wrap"),e.gap&&(t.gap=z[e.gap]),e.center&&(e.center==="both"&&(t.justifyContent="center",t.alignItems="center"),(e.center==="x"&&e.flex==="row"||e.center==="y"&&e.flex==="column")&&(t.justifyContent="center"),(e.center==="x"&&e.flex==="column"||e.center==="y"&&e.flex==="row")&&(t.alignItems="center"))),e.p&&(t.padding=z[e.p]),e.px&&(t.paddingLeft=z[e.px],t.paddingRight=z[e.px]),e.py&&(t.paddingTop=z[e.py],t.paddingBottom=z[e.py]),e.pb&&(t.paddingBottom=z[e.pb]),e.pt&&(t.paddingTop=z[e.pt]),e.debug&&(t.outline="1px solid red",t.outlineOffset="-1px"),c.jsx(HN,{bg:e.bg,borderColor:e.borderColor,color:e.color,"data-animate":e.animate,"data-scrolly":e.scrollY,className:e.className,style:{...t,...e.style},children:e.children})}const HN=ke(e=>{const t=X();return{"&[data-animate='fadein']":{animation:`${Gs} 350ms ease forwards`,opacity:0},"&[data-animate='floatdown']":{animation:`${Zv} 350ms ease forwards`,opacity:0},"&[data-animate='floatup']":{animation:`${Gv} 350ms ease forwards`,opacity:0},"&[data-scrolly='true']":{overflowY:"auto",...Dc},background:e.bg?t.colors[e.bg]:void 0,borderColor:e.borderColor?t.colors[e.borderColor]:void 0,color:e.color?t.colors[e.color]:"inherit"}}),$e=e=>{const t=X();return c.jsxs(qN,{style:{height:`${A[e.size]}px`,width:`${A[e.size]}px`,...e.style},viewBox:"0 0 50 50",className:"tw-spinner",children:[c.jsx("circle",{cx:"25",cy:"25",fill:"none",r:"20",style:{strokeLinecap:"round",animation:"tw-spinner-circle-dash 1.5s ease-in-out infinite"},stroke:e.color?t.colors[e.color]:"currentColor",strokeWidth:Number(A[e.size])>64?"2":"4"}),c.jsx("style",{children:GN})]})},GN=`
54
+ @keyframes tw-spinner-circle-dash {
55
+ 0% {
56
+ stroke-dasharray: 1, 150;
57
+ stroke-dashoffset: 0;
58
+ }
59
+ 50% {
60
+ stroke-dasharray: 90, 150;
61
+ stroke-dashoffset: -35;
62
+ }
63
+ 100% {
64
+ stroke-dasharray: 90, 150;
65
+ stroke-dashoffset: -124;
66
+ }
67
+ `,ZN=$t`
68
+ 100% {
69
+ transform: rotate(360deg);
70
+ }
71
+ `,qN=tN({animation:`${ZN} 2s linear infinite`,height:"1em",width:"1em"});function wt(e){return c.jsx(M,{center:"both",flex:"row",fullHeight:!0,style:{minHeight:e.height||"350px"},children:c.jsx($e,{color:"secondaryText",size:"xl"})})}async function Oc(e,t,n){return Vn(async()=>{const r=(await W4({chainId:n,client:e,tokenAddress:t}))[0];return r||await F8({chainId:n,client:e,tokenAddress:t}).catch(()=>{throw new Error("Token not supported")})},{cacheKey:`get-token-price-${t}-${n}`,cacheTime:1e3*60})}const tm=e=>{const t=w.useId(),n=w.useId();return c.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 109 109",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsxs("g",{clipPath:`url(#${n})`,children:[c.jsx("path",{d:"M54.5 109C84.5995 109 109 84.5995 109 54.5C109 24.4005 84.5995 0 54.5 0C24.4005 0 0 24.4005 0 54.5C0 84.5995 24.4005 109 54.5 109Z",fill:"#4BABFF"}),c.jsx("path",{d:"M55 96C77.6437 96 96 77.6437 96 55C96 32.3563 77.6437 14 55 14C32.3563 14 14 32.3563 14 55C14 77.6437 32.3563 96 55 96Z",fill:"#1C85FF"}),c.jsx("path",{d:"M73.2352 69.389C73.7459 69.8997 74.0329 70.5924 74.0329 71.3147C74.0329 72.037 73.7459 72.7298 73.2352 73.2405C72.7244 73.7513 72.0317 74.0382 71.3094 74.0382C70.5871 74.0382 69.8944 73.7513 69.3836 73.2405L54.9992 58.8515L40.6102 73.236C40.0994 73.7467 39.4067 74.0337 38.6844 74.0337C37.9621 74.0337 37.2694 73.7467 36.7586 73.236C36.2479 72.7252 35.9609 72.0325 35.9609 71.3102C35.9609 70.5879 36.2479 69.8952 36.7586 69.3844L51.1476 55L36.7632 40.611C36.2524 40.1002 35.9655 39.4075 35.9655 38.6852C35.9655 37.9629 36.2524 37.2702 36.7632 36.7594C37.2739 36.2487 37.9666 35.9617 38.6889 35.9617C39.4112 35.9617 40.104 36.2487 40.6147 36.7594L54.9992 51.1484L69.3881 36.7572C69.8989 36.2464 70.5916 35.9595 71.3139 35.9595C72.0362 35.9595 72.729 36.2464 73.2397 36.7572C73.7505 37.2679 74.0374 37.9606 74.0374 38.6829C74.0374 39.4052 73.7505 40.098 73.2397 40.6087L58.8507 55L73.2352 69.389Z",fill:`url(#${t})`})]}),c.jsxs("defs",{children:[c.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:t,x1:"54.9992",x2:"54.9992",y1:"35.9595",y2:"74.0382",children:[c.jsx("stop",{stopColor:"white"}),c.jsx("stop",{offset:"1",stopColor:"#90CBFF"})]}),c.jsx("clipPath",{id:n,children:c.jsx("rect",{fill:"white",height:"109",width:"109"})})]})]})};async function KN(e){switch(e){case"es_ES":return(await h(async()=>{const{default:t}=await import("./es-VJyYb90S.js");return{default:t}},[])).default;case"ja_JP":return(await h(async()=>{const{default:t}=await import("./ja-DJMSrON6.js");return{default:t}},[])).default;case"tl_PH":return(await h(async()=>{const{default:t}=await import("./tl-CRo3FF6E.js");return{default:t}},[])).default;case"vi_VN":return(await h(async()=>{const{default:t}=await import("./vi-UZskHqr3.js");return{default:t}},[])).default;case"de_DE":return(await h(async()=>{const{default:t}=await import("./de-CGYpD2SG.js");return{default:t}},[])).default;case"ko_KR":return(await h(async()=>{const{default:t}=await import("./kr-5lmSzexK.js");return{default:t}},[])).default;case"fr_FR":return(await h(async()=>{const{default:t}=await import("./fr-Dw9xCc6Y.js");return{default:t}},[])).default;case"ru_RU":return(await h(async()=>{const{default:t}=await import("./ru-BiwauFaO.js");return{default:t}},[])).default;case"pt_BR":return(await h(async()=>{const{default:t}=await import("./br-B9BLCi07.js");return{default:t}},[])).default;case"zh_CN":return(await h(async()=>{const{default:t}=await import("./zh-uWVXxi-t.js");return{default:t}},[])).default;default:return(await h(async()=>{const{default:t}=await Promise.resolve().then(()=>tz);return{default:t}},void 0)).default}}function JN(e){return xe({queryFn:async()=>KN(e),queryKey:["connect-locale",e],refetchOnMount:!1,refetchOnWindowFocus:!1})}const gn="com.coinbase.wallet",zr="org.base.account",nm="io.metamask",B3="me.rainbow",V3="io.zerion.wallet",XN=["inApp","embedded","smart","xyz.abs"];async function zn(e){const{client:t,ecosystem:n,walletType:i,walletAddress:r,chainId:s}=e;return Ou({client:t,data:{action:"connect",chainId:s,source:"connectWallet",walletAddress:r,walletType:i},ecosystem:n})}const Ut={async getItem(e){try{if(typeof window<"u"&&window.localStorage)return localStorage.getItem(e)}catch{}return null},async removeItem(e){typeof window<"u"&&window.localStorage&&localStorage.removeItem(e)},async setItem(e,t){try{typeof window<"u"&&window.localStorage&&localStorage.setItem(e,t)}catch{}}};function im(e){return e.startsWith("http://")||e.startsWith("https://")}function W3(e,t){if(!im(e))return F3(e,t);let n=e;n.endsWith("/")||(n=`${n}/`);const i=encodeURIComponent(t);return{href:n,redirect:`${n}wc?uri=${i}`}}function F3(e,t){if(im(e))return W3(e,t);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`);const i=encodeURIComponent(t);return{href:n,redirect:`${n}wc?uri=${i}`}}function Y3(e,t){return im(e)?W3(e,t):F3(e,t)}function eS(e,t){return`${e.endsWith("/")?e:`${e}/`}tx/${t}`}function tS(e,t){return`${e.endsWith("/")?e:`${e}/`}address/${t}`}function nS(){if(typeof navigator>"u")return!1;const e=q0(navigator.userAgent);return e?e.toLowerCase().includes("android"):!1}function iS(){if(typeof navigator>"u")return!1;const e=q0(navigator.userAgent);return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function rS(){return typeof window>"u"||typeof navigator>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function sS(){return typeof window>"u"?!1:"orientation"in window||"onorientationchange"in window}function Qi(){return!!(nS()||iS()||rS()&&sS()||typeof window<"u"&&window.innerWidth<640)}function $r(e){if(window!==window.top)window.open(e);else if(e.startsWith("http")){const n=document.createElement("a");n.href=e,n.target="_blank",n.rel="noreferrer noopener",n.click()}else window.location.href=e}function oS(){const e=new Map;return{emit(t,n){const i=e.get(t);if(i)for(const r of i)r(n)},subscribe(t,n){var i;return e.has(t)?(i=e.get(t))==null||i.add(n):e.set(t,new Set([n])),()=>{const r=e.get(t);r&&r.delete(n)}}}}function Pc(){return oS()}function aS(e){const{createOptions:t}=e,n=Pc();let i,r;function s(){i=void 0,r=void 0}let o=async()=>{},a=async d=>{r=d};const l=n.subscribe("chainChanged",d=>{r=d}),u=n.subscribe("disconnect",()=>{s(),l(),u()});return n.subscribe("accountChanged",d=>{i=d}),{autoConnect:async d=>{const{autoConnectBaseAccountSDK:f}=await h(async()=>{const{autoConnectBaseAccountSDK:_}=await Promise.resolve().then(()=>bg);return{autoConnectBaseAccountSDK:_}},void 0),m=await e.providerFactory(),[y,p,g,x]=await f(d,n,m);return i=y,r=p,o=g,a=x,zn({chainId:r.id,client:d.client,walletAddress:i.address,walletType:zr}),i},connect:async d=>{const{connectBaseAccountSDK:f}=await h(async()=>{const{connectBaseAccountSDK:_}=await Promise.resolve().then(()=>bg);return{connectBaseAccountSDK:_}},void 0),m=await e.providerFactory(),[y,p,g,x]=await f(d,n,m);return i=y,r=p,o=g,a=x,zn({chainId:r.id,client:d.client,walletAddress:i.address,walletType:zr}),i},disconnect:async()=>{s(),await o()},getAccount:()=>i,getChain(){if(r)return r=Xo(r.id)||r,r},getConfig:()=>t,id:zr,subscribe:n.subscribe,switchChain:async d=>{await a(d)}}}function rm(e){const t=e.domain;return(t==null?void 0:t.chainId)!==void 0&&Uo(t.chainId)&&(e.domain={...e.domain,chainId:K4(e.domain.chainId)}),e}function sm(e){return cS(e).map(t=>{try{const n=new URL(t);return n.hostname.endsWith(".thirdweb.com")&&(n.pathname="",n.search=""),n.toString()}catch{return t}})}function cS(e,t,n="http"){const i=[];for(const r of e.rpc)n==="http"&&!r.startsWith("http")||n==="ws"&&!r.startsWith("ws")||(r.includes("${THIRDWEB_API_KEY}")?i.push(r.replace("${THIRDWEB_API_KEY}","")):r.includes("${")||i.push(r));if(i.length===0)throw new Error(`No RPC available for chainId "${e.chainId}" with mode ${n}`);return i}function lS(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}function uS(){return typeof Ui<"u"&&typeof Ui.versions<"u"&&typeof Ui.versions.node<"u"}function Q3(){return!lS()&&!uS()}function Gl(){if(!Q3())return{description:"thirdweb powered dApp",logoUrl:"https://thirdweb.com/favicon.ico",name:"thirdweb powered dApp",url:"https://thirdweb.com"};const{protocol:e,hostname:t,port:n}=window.location;let i=`${e}//${t}`;n&&n!=="80"&&n!=="443"&&(i+=`:${n}`);const r=`${i}/favicon.ico`;return{description:window.document.title||"thirdweb powered dApp",logoUrl:r,name:window.document.title||"thirdweb powered dApp",url:i}}function ri(e){return typeof e=="number"?e:ts(e)?lw(e):typeof e=="bigint"?Number(e):Number.parseInt(e,10)}let Zd,rl;async function H3(e){var s,o,a,l,u,d,f;if(Zd){if(e&&rl){const m=((s=rl.chains)==null?void 0:s.map(x=>x.id))||[],y=((o=e.chains)==null?void 0:o.map(x=>x.id))||[],p=m.length===y.length&&m.every((x,_)=>x===y[_]),g=((a=e.appMetadata)==null?void 0:a.name)===((l=rl.appMetadata)==null?void 0:l.name);(!p||!g)&&console.warn("[Base Account SDK] Provider already initialized with different options. The Base Account SDK uses a singleton provider - subsequent configurations are ignored. Create only one Base Account wallet instance per application.")}return Zd}const{createBaseAccountSDK:t}=await h(async()=>{const{createBaseAccountSDK:m}=await import("./index-1dvjnqEQ.js");return{createBaseAccountSDK:m}},__vite__mapDeps([29,30,1,2,31,12,16,17,5,3,4])),n=Gl(),r=t({appName:((u=e==null?void 0:e.appMetadata)==null?void 0:u.name)||n.name||"thirdweb powered dApp",appLogoUrl:((d=e==null?void 0:e.appMetadata)==null?void 0:d.logoUrl)||n.logoUrl||null,appChainIds:((f=e==null?void 0:e.chains)==null?void 0:f.map(m=>m.id))||[]}).getProvider();return Zd=r,rl=e,r}function _g({provider:e,address:t,client:n}){const i={address:me(t),async sendTransaction(r){const s=await e.request({method:"eth_sendTransaction",params:[{accessList:r.accessList,data:r.data,from:me(t),gas:r.gas?Ue(r.gas):void 0,to:r.to,value:r.value?Ue(r.value):void 0}]});return E1({chainId:r.chainId,client:n,contractAddress:r.to??void 0,gasPrice:r.gasPrice,transactionHash:s,walletAddress:me(t),walletType:zr}),{transactionHash:s}},async signMessage({message:r}){if(!i.address)throw new Error("Provider not setup");const s=typeof r=="string"?Tc(r):r.raw instanceof Uint8Array?Ys(r.raw):r.raw,o=await e.request({method:"personal_sign",params:[s,i.address]});if(!Uo(o))throw new Error("Invalid signature returned");return o},async signTypedData(r){if(!i.address)throw new Error("Provider not setup");const{domain:s,message:o,primaryType:a}=rm(r),l={EIP712Domain:Uu(s),...r.types};z5({domain:s,message:o,primaryType:a,types:l});const u=k5({domain:s??{},message:o,primaryType:a,types:l}),d=await e.request({method:"eth_signTypedData_v4",params:[i.address,u]});if(!Uo(d))throw new Error("Invalid signed payload returned");return d},sendCalls:async r=>{try{const{callParams:s,chain:o}=await Zu(r,i),a=await e.request({method:"wallet_sendCalls",params:s});return a&&typeof a=="object"&&"id"in a?{chain:o,client:n,id:a.id}:{chain:o,client:n,id:a}}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${zr} errored calling wallet_sendCalls, with error: ${s instanceof Error?s.message:Me(s)}`):s}},async getCallsStatus(r){try{const s=await e.request({method:"wallet_getCallsStatus",params:[r.id]});return G1(s)}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${zr} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCapabilities(r){const s=r.chainId;try{const o=await e.request({method:"wallet_getCapabilities",params:[me(i.address)]});return H1(o,s)}catch(o){if(/unsupport|not support|not available/i.test(o.message))return{message:`${zr} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw o}}};return i}function G3(e,t,n,i,r){const s=_g({address:e,client:r,provider:n});async function o(){n.off("accountsChanged",l),n.off("chainChanged",u),n.off("disconnect",a),await n.disconnect()}async function a(){o(),i.emit("disconnect",void 0)}function l(d){if(d[0]){const f=_g({address:me(d[0]),client:r,provider:n});i.emit("accountChanged",f),i.emit("accountsChanged",d)}else a()}function u(d){const f=Pe(ri(d));i.emit("chainChanged",f)}return n.on("accountsChanged",l),n.on("chainChanged",u),n.on("disconnect",a),[s,t,a,d=>Z3(n,d)]}async function dS(e,t,n){const i=await n.request({method:"eth_requestAccounts"});if(!i[0])throw new Error("No accounts found");const r=me(i[0]),s=await n.request({method:"eth_chainId"}),o=ri(s);let a=e.chain&&e.chain.id===o?e.chain:Pe(o);return o&&(e!=null&&e.chain)&&o!==(e==null?void 0:e.chain.id)&&(await Z3(n,e.chain),a=e.chain),G3(r,a,n,t,e.client)}async function hS(e,t,n){const r=(await n.request({method:"eth_accounts"}))[0];if(!r)throw new Error("No accounts found");const s=await n.request({method:"eth_chainId"}),o=ri(s),a=e.chain&&e.chain.id===o?e.chain:Pe(o);return G3(r,a,n,t,e.client)}async function Z3(e,t){var s;const n=await e.request({method:"eth_chainId"}),i=Pe(ri(n));if((i==null?void 0:i.id)===t.id)return;const r=Ue(t.id);try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]})}catch(o){const a=await xt(t);(o==null?void 0:o.code)===4902&&await e.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:((s=a.explorers)==null?void 0:s.map(l=>l.url))||[],chainId:r,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:sm(a)}]})}}const bg=Object.freeze(Object.defineProperty({__proto__:null,autoConnectBaseAccountSDK:hS,connectBaseAccountSDK:dS,getBaseAccountWebProvider:H3},Symbol.toStringTag,{value:"Module"}));function fS(e){const{createOptions:t}=e,n=Pc();let i,r;function s(){i=void 0,r=void 0}let o=async()=>{},a=async d=>{r=d};const l=n.subscribe("chainChanged",d=>{r=d}),u=n.subscribe("disconnect",()=>{s(),l(),u()});return n.subscribe("accountChanged",d=>{i=d}),{autoConnect:async d=>{const{autoConnectCoinbaseWalletSDK:f}=await h(async()=>{const{autoConnectCoinbaseWalletSDK:_}=await Promise.resolve().then(()=>Pf);return{autoConnectCoinbaseWalletSDK:_}},void 0),m=await e.providerFactory(),[y,p,g,x]=await f(d,n,m);return i=y,r=p,o=g,a=x,zn({chainId:r.id,client:d.client,walletAddress:i.address,walletType:gn}),i},connect:async d=>{const{connectCoinbaseWalletSDK:f}=await h(async()=>{const{connectCoinbaseWalletSDK:_}=await Promise.resolve().then(()=>Pf);return{connectCoinbaseWalletSDK:_}},void 0),m=await e.providerFactory(),[y,p,g,x]=await f(d,n,m);return i=y,r=p,o=g,a=x,zn({chainId:r.id,client:d.client,walletAddress:i.address,walletType:gn}),i},disconnect:async()=>{s(),await o()},getAccount:()=>i,getChain(){if(r)return r=Xo(r.id)||r,r},getConfig:()=>t,id:gn,onConnectRequested:async()=>{var d;if(e.onConnectRequested){const f=await e.providerFactory();return(d=e.onConnectRequested)==null?void 0:d.call(e,f)}},subscribe:n.subscribe,switchChain:async d=>{await a(d)}}}async function q3(e){var t,n;await((n=(t=e==null?void 0:e.communicator)==null?void 0:t.waitForPopupLoaded)==null?void 0:n.call(t))}const mS=Object.freeze(Object.defineProperty({__proto__:null,showCoinbasePopup:q3},Symbol.toStringTag,{value:"Module"}));let qd;async function K3(e){var t,n;if(!qd){let i=(await h(()=>import("./index-B5dYTApw.js"),__vite__mapDeps([32,1,2,30,31,3,4,5]))).default;typeof i!="function"&&typeof i.default=="function"&&(i=i.default);const s=new i({appChainIds:e!=null&&e.chains?e.chains.map(o=>o.id):void 0,appLogoUrl:((t=e==null?void 0:e.appMetadata)==null?void 0:t.logoUrl)||Gl().logoUrl,appName:((n=e==null?void 0:e.appMetadata)==null?void 0:n.name)||Gl().name}).makeWeb3Provider(e==null?void 0:e.walletConfig);return qd=s,s}return qd}function Mg({provider:e,address:t,client:n}){const i={address:me(t),onTransactionRequested:async()=>{window.localStorage&&window.localStorage.getItem("-CBWSDK:SignerConfigurator:SignerType")==="scw"&&await q3(e)},async sendTransaction(r){const s=await e.request({method:"eth_sendTransaction",params:[{accessList:r.accessList,data:r.data,from:me(t),gas:r.gas?Ue(r.gas):void 0,to:r.to,value:r.value?Ue(r.value):void 0}]});return E1({chainId:r.chainId,client:n,contractAddress:r.to??void 0,gasPrice:r.gasPrice,transactionHash:s,walletAddress:me(t),walletType:gn}),{transactionHash:s}},async signMessage({message:r}){if(!i.address)throw new Error("Provider not setup");const s=typeof r=="string"?Tc(r):r.raw instanceof Uint8Array?Ys(r.raw):r.raw,o=await e.request({method:"personal_sign",params:[s,i.address]});if(!Uo(o))throw new Error("Invalid signature returned");return o},async signTypedData(r){if(!i.address)throw new Error("Provider not setup");const{domain:s,message:o,primaryType:a}=rm(r),l={EIP712Domain:Uu(s),...r.types};z5({domain:s,message:o,primaryType:a,types:l});const u=k5({domain:s??{},message:o,primaryType:a,types:l}),d=await e.request({method:"eth_signTypedData_v4",params:[i.address,u]});if(!Uo(d))throw new Error("Invalid signed payload returned");return d},sendCalls:async r=>{try{const{callParams:s,chain:o}=await Zu(r,i),a=await e.request({method:"wallet_sendCalls",params:s});return a&&typeof a=="object"&&"id"in a?{chain:o,client:n,id:a.id}:{chain:o,client:n,id:a}}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${gn} errored calling wallet_sendCalls, with error: ${s instanceof Error?s.message:Me(s)}`):s}},async getCallsStatus(r){try{const s=await e.request({method:"wallet_getCallsStatus",params:[r.id]});return G1(s)}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${gn} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCallsStatusRaw(r){try{return await e.request({method:"wallet_getCallsStatus",params:[r.id]})}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${gn} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCapabilities(r){const s=r.chainId;try{const o=await e.request({method:"wallet_getCapabilities",params:[me(i.address)]});return H1(o,s)}catch(o){if(/unsupport|not support|not available/i.test(o.message))return{message:`${gn} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw o}}};return i}function J3(e,t,n,i,r){const s=Mg({address:e,client:r,provider:n});async function o(){n.removeListener("accountsChanged",l),n.removeListener("chainChanged",u),n.removeListener("disconnect",a),await n.disconnect()}async function a(){o(),i.emit("disconnect",void 0)}function l(d){if(d[0]){const f=Mg({address:me(d[0]),client:r,provider:n});i.emit("accountChanged",f),i.emit("accountsChanged",d)}else a()}function u(d){const f=Pe(ri(d));i.emit("chainChanged",f)}return n.on("accountsChanged",l),n.on("chainChanged",u),n.on("disconnect",a),[s,t,a,d=>X3(n,d)]}async function yS(e,t,n){const i=await n.request({method:"eth_requestAccounts"});if(!i[0])throw new Error("No accounts found");const r=me(i[0]),s=await n.request({method:"eth_chainId"}),o=ri(s);let a=e.chain&&e.chain.id===o?e.chain:Pe(o);return o&&(e!=null&&e.chain)&&o!==(e==null?void 0:e.chain.id)&&(await X3(n,e.chain),a=e.chain),J3(r,a,n,t,e.client)}async function gS(e,t,n){const r=(await n.request({method:"eth_accounts"}))[0];if(!r)throw new Error("No accounts found");const s=await n.request({method:"eth_chainId"}),o=ri(s),a=e.chain&&e.chain.id===o?e.chain:Pe(o);return J3(r,a,n,t,e.client)}async function X3(e,t){var s;const n=await e.request({method:"eth_chainId"}),i=Pe(ri(n));if((i==null?void 0:i.id)===t.id)return;const r=Ue(t.id);try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]})}catch(o){const a=await xt(t);(o==null?void 0:o.code)===4902&&await e.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:((s=a.explorers)==null?void 0:s.map(l=>l.url))||[],chainId:r,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:sm(a)}]})}}const Pf=Object.freeze(Object.defineProperty({__proto__:null,autoConnectCoinbaseWalletSDK:gS,connectCoinbaseWalletSDK:yS,getCoinbaseWebProvider:K3},Symbol.toStringTag,{value:"Module"}));async function ex(e){return Vn(async()=>{var i;const n=await(await fetch(`${it("inAppWallet")}/api/2024-05-05/ecosystem-wallet`,{headers:{"x-ecosystem-id":e}})).json();if(!n||n.code==="UNAUTHORIZED")throw new Error(n.message||`Could not find ecosystem wallet with id ${e}, please check your ecosystem wallet configuration.`);return(i=n.authOptions)!=null&&i.includes("siwe")&&(n.authOptions=n.authOptions.filter(r=>r!=="siwe"),n.authOptions.push("wallet")),n},{cacheKey:`ecosystem-wallet-options-${e}`,cacheTime:1e3*60*5})}const Kd=new Map;async function Oa(e,t,n){var s;const i=Me({clientId:e.clientId,ecosystem:n,partialSecretKey:(s=e.secretKey)==null?void 0:s.slice(0,5)});if(Kd.has(i))return Kd.get(i);const r=await t(e);return Kd.set(i,r),r}function tx(e){const{createOptions:t,connectorFactory:n,ecosystem:i}=e,r=i?i.id:"inApp",s=Pc();let o=t,a,l,u,d,f=null;const m=async y=>{if(i){const p=await ex(i.id),g=p==null?void 0:p.smartAccountOptions;if(g)if(p.smartAccountOptions.executionMode==="EIP7702")o={...o,executionMode:{mode:"EIP7702",sponsorGas:g.sponsorGas}};else{const{defaultChainId:_}=p.smartAccountOptions,b=(y==null?void 0:y.chain)??(_?Pe(_):void 0);if(!b)throw new Error("A chain must be provided either via 'chain' in connect options or 'defaultChainId' in ecosystem configuration. Please pass it via connect() or update the ecosystem configuration.");o={...o,smartAccount:{chain:b,factoryAddress:g.accountFactoryAddress,sponsorGas:g.sponsorGas}}}}};return{autoConnect:async y=>{const{autoConnectInAppWallet:p}=await h(async()=>{const{autoConnectInAppWallet:I}=await Promise.resolve().then(()=>th);return{autoConnectInAppWallet:I}},void 0),g=await Oa(y.client,n,i);await m();const{account:x,chain:_,adminAccount:b}=await p(y,o,g);d=y.client,a=x,l=b,u=_;try{f=await g.storage.getAuthCookie()}catch(I){console.error("Failed to retrieve auth token:",I),f=null}return zn({chainId:u.id,client:y.client,ecosystem:i,walletAddress:a.address,walletType:r}),a},connect:async y=>{const{connectInAppWallet:p}=await h(async()=>{const{connectInAppWallet:I}=await Promise.resolve().then(()=>th);return{connectInAppWallet:I}},void 0),g=await Oa(y.client,n,i);await m();const{account:x,chain:_,adminAccount:b}=await p(y,o,g);d=y.client,a=x,l=b,u=_;try{f=await g.storage.getAuthCookie()}catch(I){console.error("Failed to retrieve auth token:",I),f=null}return zn({chainId:u.id,client:y.client,ecosystem:i,walletAddress:a.address,walletType:r}),a},disconnect:async()=>{if(d&&!(await(await Oa(d,n,i)).logout()).success)throw new Error("Failed to logout");a=void 0,l=void 0,u=void 0,f=null,s.emit("disconnect",void 0)},getAccount:()=>a,getAdminAccount:()=>l,getAuthToken:()=>f,getChain(){if(u)return u=Xo(u.id)||u,u},getConfig:()=>o,id:r,subscribe:s.subscribe,switchChain:async y=>{var p;if((o!=null&&o.smartAccount||((p=o==null?void 0:o.executionMode)==null?void 0:p.mode)==="EIP4337")&&d&&a){const{autoConnectInAppWallet:g}=await h(async()=>{const{autoConnectInAppWallet:E}=await Promise.resolve().then(()=>th);return{autoConnectInAppWallet:E}},void 0),x=await Oa(d,n,i);await m({chain:y});const{account:_,chain:b,adminAccount:I}=await g({chain:y,client:d},o,x);l=I,a=_,u=b}else u=y;s.emit("chainChanged",y)}}}function pS(...e){const[t,n]=e,i={id:t,partnerId:n==null?void 0:n.partnerId};return tx({connectorFactory:async r=>{const{InAppWebConnector:s}=await h(async()=>{const{InAppWebConnector:o}=await import("./web-connector-DDEmzUHA.js");return{InAppWebConnector:o}},__vite__mapDeps([33,1,2,34,11,3,4,5]));return new s({client:r,ecosystem:i,storage:n==null?void 0:n.storage})},createOptions:{auth:{...n==null?void 0:n.auth,options:[]},partnerId:i.partnerId},ecosystem:i})}function kf(e){return tx({connectorFactory:async t=>{var i;const{InAppWebConnector:n}=await h(async()=>{const{InAppWebConnector:r}=await import("./web-connector-DDEmzUHA.js");return{InAppWebConnector:r}},__vite__mapDeps([33,1,2,34,11,3,4,5]));return new n({client:t,passkeyDomain:(i=e==null?void 0:e.auth)==null?void 0:i.passkeyDomain,storage:e==null?void 0:e.storage})},createOptions:e})}const Ig=Q3()?GI():void 0;function om(e){const t=Hi().find(n=>n.info.rdns===e);return t==null?void 0:t.provider}function wS(){if(Ig)return Ig}function Hi(){var t;const e=((t=wS())==null?void 0:t.getProviders())||[];for(const n of e)if(n.info.rdns==="io.metamask.mobile"){n.info.rdns=nm;break}return e}const Zl=Object.freeze(Object.defineProperty({__proto__:null,getInstalledWalletProviders:Hi,injectedProvider:om},Symbol.toStringTag,{value:"Module"}));function zf(e){const t=om(e);if(!t)throw new Error(`No injected provider found for wallet: "${e}"`);return t}async function xS({id:e,provider:t,emitter:n,client:i,chain:r}){var m,y;let s,a=0;for(;!(s!=null&&s[0])&&a<3;){try{s=await t.request({method:"eth_requestAccounts"})}catch(p){if(console.error(p),(y=(m=bS(p))==null?void 0:m.toLowerCase())!=null&&y.includes("rejected"))throw p;await new Promise(g=>setTimeout(g,500))}a++}const l=s==null?void 0:s[0];if(!l)throw new Error("Failed to connect to wallet, no accounts available");const u=me(l),d=await t.request({method:"eth_chainId"}).then(ri).catch(p=>{throw new Error("Error reading chainId from provider",p)});let f=r&&r.id===d?r:Pe(d);try{r&&typeof r.id<"u"&&r.id!==d&&(await ix(t,r),f=r)}catch{console.warn(`Error switching to chain ${r==null?void 0:r.id} - defaulting to wallet chain (${d})`)}return nx({address:u,chain:f,client:i,emitter:n,id:e,provider:t})}async function _S({id:e,provider:t,emitter:n,client:i,chain:r}){const o=(await t.request({method:"eth_accounts"}))[0];if(!o)throw new Error("Failed to connect to wallet, no accounts available");const a=me(o),l=await t.request({method:"eth_chainId"}).then(ri),u=r&&r.id===l?r:Pe(l);return nx({address:a,chain:u,client:i,emitter:n,id:e,provider:t})}function Eg({provider:e,address:t,client:n,id:i}){const r={address:me(t),async sendTransaction(s){const a=[{...s.gasPrice?{gasPrice:Ue(s.gasPrice)}:{maxFeePerGas:s.maxFeePerGas?Ue(s.maxFeePerGas):void 0,maxPriorityFeePerGas:s.maxPriorityFeePerGas?Ue(s.maxPriorityFeePerGas):void 0},from:this.address,gas:s.gas?Ue(s.gas):void 0,nonce:s.nonce?Ue(s.nonce):void 0,to:s.to?me(s.to):void 0,data:s.data,value:s.value?Ue(s.value):void 0,authorizationList:s.authorizationList?$T(s.authorizationList):void 0,accessList:s.accessList,...s.eip712}];try{const l=await e.request({method:"eth_sendTransaction",params:a});return E1({chainId:s.chainId,client:n,contractAddress:s.to??void 0,gasPrice:s.gasPrice,transactionHash:l,walletAddress:me(t),walletType:i}),{transactionHash:l}}catch(l){throw i5(l)&&r5({chainId:s.chainId,client:n,contractAddress:s.to||void 0,error:l,transactionValue:s.value,walletAddress:me(t)}),l}},async signMessage({message:s}){if(!r.address)throw new Error("Provider not setup");const o=typeof s=="string"?Tc(s):s.raw instanceof Uint8Array?Ys(s.raw):s.raw;return await e.request({method:"personal_sign",params:[o,me(r.address)]})},async signAuthorization(s){const o=zT(s);let a;try{a=await e.request({method:"eth_sign",params:[me(r.address),o]})}catch{a=await e.request({method:"secp256k1_sign",params:[o]})}if(!a)throw new Error("Failed to sign authorization");const l=v1(a);return{...s,...l}},async signTypedData(s){if(!e||!r.address)throw new Error("Provider not setup");const o=rm(s),{domain:a,message:l,primaryType:u}=o,d={EIP712Domain:M1({domain:a}),...o.types};Qw({domain:a,message:l,primaryType:u,types:d});const f=o9({domain:a??{},message:l,primaryType:u,types:d});return await e.request({method:"eth_signTypedData_v4",params:[me(r.address),f]})},async watchAsset(s){return await e.request({method:"wallet_watchAsset",params:s},{retryCount:0})},async sendCalls(s){try{const{callParams:o,chain:a}=await Zu(s,r),l=await e.request({method:"wallet_sendCalls",params:o});return l&&typeof l=="object"&&"id"in l?{chain:a,client:n,id:l.id}:{chain:a,client:n,id:l}}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${i} errored calling wallet_sendCalls, with error: ${o instanceof Error?o.message:Su(o)}`):o}},async getCallsStatus(s){try{const o=await e.request({method:"wallet_getCallsStatus",params:[s.id]});return G1(o)}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${i} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):o}},async getCallsStatusRaw(s){try{return await e.request({method:"wallet_getCallsStatus",params:[s.id]})}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${i} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):o}},async getCapabilities(s){const o=s.chainId;try{const a=await e.request({method:"wallet_getCapabilities",params:[me(r.address),o?[Ue(o)]:void 0]});return H1(a,o)}catch(a){if(/unsupport|not support|not available/i.test(a.message))return{message:`${i} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw a}}};return r}async function nx({provider:e,address:t,chain:n,emitter:i,client:r,id:s}){const o=Eg({address:t,client:r,id:s,provider:e});async function a(){e.removeListener("accountsChanged",u),e.removeListener("chainChanged",d),e.removeListener("disconnect",l);try{await n9(()=>e.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}}async function l(){a(),i.emit("disconnect",void 0)}function u(f){if(f[0]){const m=Eg({address:me(f[0]),client:r,id:s,provider:e});i.emit("accountChanged",m),i.emit("accountsChanged",f)}else l()}function d(f){const m=Pe(ri(f));i.emit("chainChanged",m)}return e.on&&(e.on("accountsChanged",u),e.on("chainChanged",d),e.on("disconnect",l)),[o,n,l,f=>ix(e,f)]}async function ix(e,t){var i;const n=Ue(t.id);try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})}catch{const r=await xt(t);await e.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(i=r.explorers)==null?void 0:i.map(s=>s.url),chainId:n,chainName:r.name,nativeCurrency:r.nativeCurrency,rpcUrls:sm(r)}]})}}function bS(e){return e instanceof Error?e.message:typeof e=="string"?e:typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}const Cg=Object.freeze(Object.defineProperty({__proto__:null,autoConnectEip1193Wallet:_S,connectEip1193Wallet:xS,getInjectedProvider:zf},Symbol.toStringTag,{value:"Module"}));function rx(e){const t=Pc();let n,i,r,s;return{autoConnect:async o=>{const{connectSmartAccount:a}=await h(async()=>{const{connectSmartAccount:d}=await import("./index-Beysbmyx.js").then(f=>f.i);return{connectSmartAccount:d}},__vite__mapDeps([35,1,2,10,11,0,3,4,5,12])),[l,u]=await a(o,e);return s=o,n=l,r=u,zn({chainId:r.id,client:o.client,walletAddress:n.address,walletType:"smart"}),n},connect:async o=>{const{connectSmartAccount:a}=await h(async()=>{const{connectSmartAccount:d}=await import("./index-Beysbmyx.js").then(f=>f.i);return{connectSmartAccount:d}},__vite__mapDeps([35,1,2,10,11,0,3,4,5,12])),[l,u]=await a(o,e);return i=o.personalAccount,s=o,n=l,r=u,zn({chainId:r.id,client:o.client,walletAddress:n.address,walletType:"smart"}),t.emit("accountChanged",n),n},disconnect:async()=>{if(n){const{disconnectSmartAccount:o}=await h(async()=>{const{disconnectSmartAccount:a}=await import("./index-Beysbmyx.js").then(l=>l.i);return{disconnectSmartAccount:a}},__vite__mapDeps([35,1,2,10,11,0,3,4,5,12]));await o(n)}n=void 0,i=void 0,r=void 0,t.emit("disconnect",void 0)},getAccount:()=>n,getAdminAccount:()=>i,getChain(){if(r)return r=Xo(r.id)||r,r},getConfig:()=>e,id:"smart",subscribe:t.subscribe,switchChain:async o=>{var f;if(!s)throw new Error("Cannot switch chain without a previous connection");if(!await n5(o)){const m=qt({address:e.factoryAddress||Nj((f=e.overrides)==null?void 0:f.entrypointAddress),chain:o,client:s.client});if(!await Q5(m))throw new Error(`Factory contract not deployed on chain: ${o.id}`)}const{connectSmartAccount:l}=await h(async()=>{const{connectSmartAccount:m}=await import("./index-Beysbmyx.js").then(y=>y.i);return{connectSmartAccount:m}},__vite__mapDeps([35,1,2,10,11,0,3,4,5,12])),[u,d]=await l({...s,chain:o},{...e,chain:o});n=u,r=d,t.emit("accountChanged",u),t.emit("chainChanged",d)}}}function Rt(...e){const[t,n]=e;switch(!0){case t==="smart":return rx(n);case(t==="embedded"||t==="inApp"):return kf(n);case Oe(t):return pS(...e);case t===gn:{const i=n;return fS({createOptions:i,onConnectRequested:async r=>{const{showCoinbasePopup:s}=await h(async()=>{const{showCoinbasePopup:o}=await Promise.resolve().then(()=>mS);return{showCoinbasePopup:o}},void 0);return s(r)},providerFactory:()=>K3(i)})}case t===zr:{const i=n;return aS({createOptions:i,providerFactory:()=>H3(i)})}default:{let a=function(){r=void 0,s=void 0};const i=Pc();let r,s,o,l=async()=>{};const u=i.subscribe("disconnect",()=>{a(),o==null||o(),u()});i.subscribe("accountChanged",y=>{r=y});let d=async()=>{throw new Error("Not implemented yet")};const f=Qi()?y=>$r(y):void 0,m={autoConnect:async y=>{const{injectedProvider:p}=await h(async()=>{const{injectedProvider:g}=await Promise.resolve().then(()=>Zl);return{injectedProvider:g}},void 0);if(t!=="walletConnect"&&p(t)){const{autoConnectEip1193Wallet:g}=await h(async()=>{const{autoConnectEip1193Wallet:E}=await Promise.resolve().then(()=>Cg);return{autoConnectEip1193Wallet:E}},void 0),[x,_,b,I]=await g({chain:y.chain,client:y.client,emitter:i,id:t,provider:zf(t)});return r=x,s=_,l=b,d=I,o=i.subscribe("chainChanged",E=>{s=E}),zn({chainId:s.id,client:y.client,walletAddress:r.address,walletType:t}),r}if(y&&"client"in y){const{autoConnectWC:g}=await h(async()=>{const{autoConnectWC:E}=await import("./controller-Czxst7w9.js");return{autoConnectWC:E}},__vite__mapDeps([36,1,2,17,3,4,5])),[x,_,b,I]=await g(y,i,m.id,Ut,f);return r=x,s=_,l=b,d=I,zn({chainId:s.id,client:y.client,walletAddress:r.address,walletType:t}),r}throw new Error("Failed to auto connect")},connect:async y=>{async function p(_){var E;const{connectWC:b}=await h(async()=>{const{connectWC:C}=await import("./controller-Czxst7w9.js");return{connectWC:C}},__vite__mapDeps([36,1,2,17,3,4,5]));let I;try{const[C,T,j,O]=await b({..._,walletConnect:{..._.walletConnect,onDisplayUri:((E=_.walletConnect)==null?void 0:E.onDisplayUri)||(async L=>{var N,v;if(typeof window<"u"&&typeof document<"u")if(Qi()){const D=await Sc(t),k=D.mobile.native||D.mobile.universal;$r(k?Y3(k,L).redirect:L);return}else try{const{createQROverlay:D}=await h(async()=>{const{createQROverlay:k}=await import("./qr-overlay-DXzL7fWi.js");return{createQROverlay:k}},__vite__mapDeps([37,1,2]));I&&I.destroy(),I=D(L,{theme:((v=(N=_.walletConnect)==null?void 0:N.qrModalOptions)==null?void 0:v.themeMode)??"dark",qrSize:280,showCloseButton:!0,onCancel:()=>{var k,U;(U=(k=_.walletConnect)==null?void 0:k.onCancel)==null||U.call(k)}})}catch(D){console.error("Failed to create QR overlay:",D)}})}},i,m.id,Ut,f);return I&&(I.destroy(),I=void 0),r=C,s=T,l=j,d=O,zn({chainId:s.id,client:_.client,walletAddress:r.address,walletType:t}),r}catch(C){throw I&&(I.destroy(),I=void 0),C}}if(t==="walletConnect"){const{client:_,chain:b,...I}=y;return p({chain:b,client:_,walletConnect:{...I}})}const g=y&&"walletConnect"in y,{injectedProvider:x}=await h(async()=>{const{injectedProvider:_}=await Promise.resolve().then(()=>Zl);return{injectedProvider:_}},void 0);if(x(t)&&!g){const{connectEip1193Wallet:_}=await h(async()=>{const{connectEip1193Wallet:T}=await Promise.resolve().then(()=>Cg);return{connectEip1193Wallet:T}},void 0),[b,I,E,C]=await _({chain:y.chain,client:y.client,emitter:i,id:t,provider:zf(t)});return r=b,s=I,l=E,d=C,o=i.subscribe("chainChanged",T=>{s=T}),zn({chainId:s.id,client:y.client,walletAddress:r.address,walletType:t}),r}if(y&&"client"in y)return p(y);throw new Error("Failed to connect")},disconnect:async()=>{a(),await l()},getAccount:()=>r,getChain(){if(s)return s=Xo(s.id)||s,s},getConfig:()=>e[1],id:t,subscribe:i.subscribe,switchChain:async y=>{try{await d(y),s=y}catch(p){console.error("Error switching chain",p)}}};return m}}}function Xu(e){return[Rt("inApp",{executionMode:e==null?void 0:e.executionMode}),Rt(nm),Rt(gn,{appMetadata:e==null?void 0:e.appMetadata,chains:e==null?void 0:e.chains}),Rt(B3),Rt("io.rabby"),Rt(V3),Rt("com.okex.wallet")]}function MS(e){return[Rt(nm),Rt(gn,{appMetadata:e==null?void 0:e.appMetadata,chains:e==null?void 0:e.chains}),Rt(B3),Rt("io.rabby"),Rt(V3),Rt("com.okex.wallet")]}const sx=w.createContext(!1),ox=w.createContext(()=>{}),ax=w.createContext({}),cx=w.createContext(()=>{}),lx=e=>{const[t,n]=w.useState(e.isOpen),[i,r]=w.useState({});return c.jsx(sx.Provider,{value:t,children:c.jsx(ox.Provider,{value:n,children:c.jsx(ax.Provider,{value:i,children:c.jsx(cx.Provider,{value:r,children:c.jsx(X1,{theme:e.theme,children:e.children})})})})})},IS=()=>w.useContext(sx),ux=()=>{const e=w.useContext(ox);if(e===void 0)throw new Error("useSetWalletModalOpen must be used within a ThirdwebProvider");return e};function Zs(){return w.useContext(cx)}function ES(){return w.useContext(ax)}const Wt={getStarted:"getStarted",main:"main",showAll:"showAll",signIn:"signIn"},dx="400px",hx=730,fx=`${hx}px`,CS=hx+40,mx="570px",am="660px",Rf=250;function ql(e){setTimeout(e,Rf+200)}function LS(){return typeof window<"u"?window.innerWidth>=CS:!1}function TS({wallets:e}){V1({queries:e.filter(t=>t.id===gn||t.id==="inApp"||Oe(t.id)).map(t=>({queryFn:async()=>{switch(!0){case gn===t.id:{const{getCoinbaseWebProvider:n}=await h(async()=>{const{getCoinbaseWebProvider:i}=await Promise.resolve().then(()=>Pf);return{getCoinbaseWebProvider:i}},void 0);return await n(t.getConfig()),!0}default:return!1}},queryKey:["preload-wallet",t.id]}))})}function yx(e,t){return new Promise((n,i)=>{const r=setTimeout(()=>{i(new Error(t.message))},t.ms);e.then(s=>{clearTimeout(r),n(s)},s=>{clearTimeout(r),i(s)})})}const YJ="/sdk/2022-08-12/embedded-wallet",Jd=e=>`thirdwebEwsWalletUserId-${e}`,jS="walletToken",Xd=e=>`${jS}-${e}`,Lg=e=>`passkey-credential-id-${e}`,vS="a",eh=(e,t)=>`${vS}-${e}-${t}`,Tg=e=>`walletConnectSessions-${e}`,jg=e=>`thirdweb_guest_session_id_${e}`,vg=new Map;class kc{constructor({storage:t,clientId:n,ecosystem:i}){Object.defineProperty(this,"key",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.storage=t,this.key=NS(n,i==null?void 0:i.id),this.ecosystem=i}async getItem(t){return this.storage?this.storage.getItem(t):vg.get(t)??null}async setItem(t,n){if(this.storage)return this.storage.setItem(t,n);vg.set(t,n)}async removeItem(t){const n=await this.getItem(t);return this.storage&&n?(this.storage.removeItem(t),!0):!1}async getWalletConnectSessions(){return this.getItem(Tg(this.key))}async saveWalletConnectSessions(t){await this.setItem(Tg(this.key),t)}async savePasskeyCredentialId(t){await this.setItem(Lg(this.key),t)}async getPasskeyCredentialId(){return this.getItem(Lg(this.key))}async saveAuthCookie(t){await this.setItem(Xd(this.key),t)}async getAuthCookie(){return this.getItem(Xd(this.key))}async removeAuthCookie(){return this.removeItem(Xd(this.key))}async saveDeviceShare(t,n){await this.saveWalletUserId(n),await this.setItem(eh(this.key,n),t)}async getDeviceShare(){const t=await this.getWalletUserId();return t?this.getItem(eh(this.key,t)):null}async removeDeviceShare(){const t=await this.getWalletUserId();return t?this.removeItem(eh(this.key,t)):!1}async getWalletUserId(){return this.getItem(Jd(this.key))}async saveWalletUserId(t){await this.setItem(Jd(this.key),t)}async removeWalletUserId(){return this.removeItem(Jd(this.key))}async getGuestSessionId(){return this.getItem(jg(this.key))}async saveGuestSessionId(t){await this.setItem(jg(this.key),t)}}const NS=(e,t)=>`${e}${t?`-${t}`:""}`;async function SS({client:e,ecosystem:t,tokenToLink:n,storage:i}){const r=He(e,t),s=it("inAppWallet"),o=await i.getAuthCookie();if(!o)throw new Error("Failed to link account, no user logged in");const a={Authorization:`Bearer iaw-auth-token:${o}`,"Content-Type":"application/json"},l=await r(`${s}/api/2024-05-05/account/connect`,{body:Me({accountAuthTokenToConnect:n}),headers:a,method:"POST"});if(!l.ok){const d=await l.json();throw new Error(d.message||"Failed to link account.")}const{linkedAccounts:u}=await l.json();return u??[]}async function QJ({client:e,ecosystem:t,profileToUnlink:n,allowAccountDeletion:i=!1,storage:r}){const s=He(e,t),o=it("inAppWallet"),a=await r.getAuthCookie();if(!a)throw new Error("Failed to unlink account, no user logged in");const l={Authorization:`Bearer iaw-auth-token:${a}`,"Content-Type":"application/json"},u=await s(`${o}/api/2024-05-05/account/disconnect`,{body:Me({allowAccountDeletion:i,details:n.details,type:n.type}),headers:l,method:"POST"});if(!u.ok){const f=await u.json();throw new Error(f.message||"Failed to unlink account.")}const{linkedAccounts:d}=await u.json();return d??[]}async function HJ({client:e,ecosystem:t,storage:n}){const i=He(e,t),r=it("inAppWallet"),s=await n.getAuthCookie();if(!s)throw new Error("Failed to get linked accounts, no user logged in");const o={Authorization:`Bearer iaw-auth-token:${s}`,"Content-Type":"application/json"},a=await i(`${r}/api/2024-05-05/accounts`,{headers:o,method:"GET"});if(!a.ok){const u=await a.json();throw new Error(u.message||"Failed to get linked accounts.")}const{linkedAccounts:l}=await a.json();return l??[]}function gx(e){let t;return()=>(t||(t=e()),t)}function AS(e={}){return L5({filters:e,signature:"event UserOperationRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)"})}function DS(e={}){return L5({filters:e,signature:"event PostOpRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)"})}function OS(e){const{receipt:t}=e,n={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs,status:t.status,to:t.to?t.to:null,transactionHash:t.transactionHash,transactionIndex:t.transactionIndex,type:t.type};return t.blobGasPrice&&(n.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(n.blobGasUsed=BigInt(t.blobGasUsed)),{...e,actualGasCost:BigInt(e.actualGasCost),actualGasUsed:BigInt(e.actualGasUsed),nonce:BigInt(e.nonce),receipt:n,userOpHash:e.userOpHash}}const GJ=()=>{const e=BigInt(Math.floor(Math.random()*4294967296)),t=BigInt(Math.floor(Math.random()*4294967296)),n=BigInt(Math.floor(Math.random()*4294967296)),i=BigInt(Math.floor(Math.random()*4294967296)),r=BigInt(Math.floor(Math.random()*4294967296)),s=BigInt(Math.floor(Math.random()*4294967296));return e<<BigInt(160)|t<<BigInt(128)|n<<BigInt(96)|i<<BigInt(64)|r<<BigInt(32)|s};function px(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,n==null||ts(n)?n:Lu(n)]))}async function ZJ(e){return rs({...e,operation:"eth_sendUserOperation",params:[px(e.userOp),e.options.entrypointAddress??Wu]})}async function qJ(e,t){const n=await rs({...e,operation:"eth_estimateUserOperationGas",params:[px(e.userOp),e.options.entrypointAddress??Wu,t??{}]});return{callGasLimit:on(n.callGasLimit)+vj,paymasterPostOpGasLimit:n.paymasterPostOpGasLimit!==void 0?on(n.paymasterPostOpGasLimit):void 0,paymasterVerificationGasLimit:n.paymasterVerificationGasLimit!==void 0?on(n.paymasterVerificationGasLimit):void 0,preVerificationGas:on(n.preVerificationGas),verificationGas:n.verificationGas!==void 0?on(n.verificationGas):void 0,verificationGasLimit:on(n.verificationGasLimit)}}async function KJ(e){const t=await rs({...e,operation:"thirdweb_getUserOperationGasPrice",params:[]});return{maxFeePerGas:on(t.maxFeePerGas),maxPriorityFeePerGas:on(t.maxPriorityFeePerGas)}}async function JJ(e){var n,i;const t=await PS(e);if(t){if(t.success===!1){const s=(i=(n=J7({events:[AS(),DS()],logs:t.logs})[0])==null?void 0:n.args)==null?void 0:i.revertReason;if(!s)throw new Error(`UserOp failed at txHash: ${t.receipt.transactionHash}`);const o=$w({data:s});throw new Error(`UserOp failed with reason: '${o.args.join(",")}' at txHash: ${t.receipt.transactionHash}`)}return t.receipt}}async function PS(e){const t=await rs({operation:"eth_getUserOperationReceipt",options:e,params:[e.userOpHash]});if(t)return OS(t)}async function XJ(e){const t=await rs({operation:"zk_paymasterData",options:e.options,params:[e.transaction]});return{paymaster:t.paymaster,paymasterInput:t.paymasterInput}}async function kS(e){const t=await rs({...e,operation:"tw_execute",params:[e.eoaAddress,e.wrappedCalls,e.signature,e.authorization]});if(!t.queueId)throw new Error(`Error executing 7702 transaction: ${Me(t)}`);return{transactionId:t.queueId}}async function zS(e){return{transactionHash:(await rs({...e,operation:"tw_getTransactionHash",params:[e.transactionId]})).transactionHash}}async function eX(e){return{transactionHash:(await rs({operation:"zk_broadcastTransaction",options:e.options,params:[{...e.transaction,signedTransaction:e.signedTransaction}]})).transactionHash}}async function rs(e){const{options:t,operation:n,params:i}=e,r=t.bundlerUrl??H5(t.chain),o=await He(t.client)(r,{useAuthToken:!0,body:Me({id:1,jsonrpc:"2.0",method:n,params:i}),headers:{"Content-Type":"application/json"},method:"POST"}),a=await o.json();if(!o.ok||a.error){let l=a.error||o.statusText;typeof l=="object"&&(l=Me(l));const u=a.code||"UNKNOWN";throw new Error(`${n} error: ${l}
72
+ Status: ${o.status}
73
+ Code: ${u}`)}return a.result}const ed=["google","apple","facebook","discord","line","x","tiktok","epic","coinbase","farcaster","telegram","github","twitch","steam"],RS=[...ed,"guest","backend","email","phone","passkey","wallet"],US="0x3f707e6b",$S=[{type:"tuple[]",name:"calls",components:[{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}]}],BS=[];function VS(e){const t=gx(async()=>"asyncParams"in e?await e.asyncParams():e);return F5({contract:e.contract,method:[US,$S,BS],params:async()=>[(await t()).calls],value:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.value},accessList:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.accessList},gas:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.gas},gasPrice:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.gasPrice},maxFeePerGas:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.maxFeePerGas},maxPriorityFeePerGas:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.maxPriorityFeePerGas},nonce:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.nonce},extraGas:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.extraGas},erc20Value:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.erc20Value},authorizationList:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.authorizationList}})}async function WS(e){const{client:t,chain:n,bundlerUrl:i}=e,r=i??H5(n),s=`delegation-contract:${r}`;return Vn(async()=>{var u;const a=await He(t)(r,{useAuthToken:!0,body:Me({id:1,jsonrpc:"2.0",method:"tw_getDelegationContract",params:[]}),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok)throw new Error(`Failed to fetch delegation contract: ${a.status} ${a.statusText}`);const l=await a.json();if(l.error)throw new Error(`Delegation contract RPC error: ${JSON.stringify(l.error)}`);if(!((u=l.result)!=null&&u.delegationContract))throw new Error("Invalid response: missing delegationContract in result");return l.result.delegationContract},{cacheKey:s,cacheTime:24*60*60*1e3})}const FS=e=>{const{client:t,adminAccount:n,sponsorGas:i}=e,r=async o=>{var p,g,x;const a=o[0];if(!a)throw new Error("No transactions provided");const l=Pe(a.chainId),u=qt({address:n.address,chain:l,client:t,abi:GS});let d=(p=a.authorizationList)==null?void 0:p[0];const f=await WS({client:t,chain:l});if(d&&((g=d.address)==null?void 0:g.toLowerCase())!==f.toLowerCase())throw new Error(`Authorization address does not match expected delegation contract address. Expected ${f} but got ${d.address}`);if(!d&&!await QS(u,f)){let b=a.nonce?BigInt(a.nonce):BigInt(await YS({client:t,address:n.address,chain:l}));b+=i?0n:1n;const I=await((x=n.signAuthorization)==null?void 0:x.call(n,{address:me(f),chainId:a.chainId,nonce:b}));if(!I)throw new Error("Failed to sign authorization");d=I}if(i){const _={calls:o.map(C=>({data:C.data??"0x",target:me(C.to??""),value:C.value??0n})),uid:p5()},b=await n.signTypedData({domain:{chainId:a.chainId,name:"MinimalAccount",verifyingContract:u.address,version:"1"},message:_,primaryType:"WrappedCalls",types:{Call:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],WrappedCalls:[{name:"calls",type:"Call[]"},{name:"uid",type:"bytes32"}]}}),I=await kS({authorization:d,eoaAddress:me(n.address),options:{chain:Pe(a.chainId),client:t},signature:b,wrappedCalls:_});return{transactionHash:await HS({options:{chain:Pe(a.chainId),client:t},transactionId:I.transactionId})}}const m=VS({calls:o.map(_=>({data:_.data??"0x",target:me(_.to??""),value:_.value??0n})),contract:u,overrides:{authorizationList:d?[d]:void 0,value:o.reduce((_,b)=>_+(b.value??0n),0n)}}),y=await _5({from:n.address,transaction:m});return n.sendTransaction(y)},s={address:n.address,sendBatchTransaction:async o=>r(o),sendTransaction:async o=>r([o]),signMessage:({message:o,originalMessage:a,chainId:l})=>n.signMessage({chainId:l,message:o,originalMessage:a}),signTypedData:o=>n.signTypedData(o),sendCalls:async o=>{const{inAppWalletSendCalls:a}=await h(async()=>{const{inAppWalletSendCalls:m}=await import("./in-app-wallet-calls-hmGpEqXh.js");return{inAppWalletSendCalls:m}},__vite__mapDeps([38,39,1,2,3,4,5])),l=o.calls[0];if(!l)throw new Error("No calls to send");const u=l.client,d=l.chain||o.chain,f=await a({account:s,calls:o.calls,chain:d});return{chain:d,client:u,id:f}},getCallsStatus:async o=>{const{inAppWalletGetCallsStatus:a}=await h(async()=>{const{inAppWalletGetCallsStatus:l}=await import("./in-app-wallet-calls-hmGpEqXh.js");return{inAppWalletGetCallsStatus:l}},__vite__mapDeps([38,39,1,2,3,4,5]));return a(o)},getCallsStatusRaw:async o=>{const{inAppWalletGetCallsStatusRaw:a}=await h(async()=>{const{inAppWalletGetCallsStatusRaw:l}=await import("./in-app-wallet-calls-hmGpEqXh.js");return{inAppWalletGetCallsStatusRaw:l}},__vite__mapDeps([38,39,1,2,3,4,5]));return a(o)},getCapabilities:async o=>({[o.chainId??1]:{atomic:{status:"supported"},paymasterService:{supported:i??!1}}})};return s};async function YS(e){const{client:t,address:n,chain:i}=e,r=ii({chain:i,client:t});return await h(async()=>{const{eth_getTransactionCount:o}=await import("./eth_getTransactionCount-CEP3s4C1.js");return{eth_getTransactionCount:o}},__vite__mapDeps([13,1,2,3,4,5])).then(({eth_getTransactionCount:o})=>o(r,{address:me(n),blockTag:"pending"}))}async function QS(e,t){const n=await Y5(e),i=n.length>0&&n.startsWith("0xef0100"),r=`0x${n.slice(8,48)}`;return i&&r.toLowerCase()===t.toLowerCase()}async function HS(e){const t=e.timeoutMs||3e5,n=e.intervalMs||1e3,i=Date.now()+t;for(;Date.now()<i;){const r=await zS({options:e.options,transactionId:e.transactionId});if(r.transactionHash)return r.transactionHash;await new Promise(s=>setTimeout(s,n))}throw new Error(`Timeout waiting for transaction to be mined on chain ${e.options.chain.id} with transactionId: ${e.transactionId}`)}const GS=[{type:"receive",stateMutability:"payable"},{type:"function",name:"createSessionWithSig",inputs:[{name:"sessionSpec",type:"tuple",internalType:"struct SessionLib.SessionSpec",components:[{name:"signer",type:"address",internalType:"address"},{name:"isWildcard",type:"bool",internalType:"bool"},{name:"expiresAt",type:"uint256",internalType:"uint256"},{name:"callPolicies",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]},{name:"transferPolicies",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"eip712Domain",inputs:[],outputs:[{name:"fields",type:"bytes1",internalType:"bytes1"},{name:"name",type:"string",internalType:"string"},{name:"version",type:"string",internalType:"string"},{name:"chainId",type:"uint256",internalType:"uint256"},{name:"verifyingContract",type:"address",internalType:"address"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"extensions",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"execute",inputs:[{name:"calls",type:"tuple[]",internalType:"struct Call[]",components:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}]}],outputs:[],stateMutability:"payable"},{type:"function",name:"executeWithSig",inputs:[{name:"wrappedCalls",type:"tuple",internalType:"struct WrappedCalls",components:[{name:"calls",type:"tuple[]",internalType:"struct Call[]",components:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"function",name:"getCallPoliciesForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]}],stateMutability:"view"},{type:"function",name:"getSessionExpirationForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getSessionStateForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple",internalType:"struct SessionLib.SessionState",components:[{name:"transferValue",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]},{name:"callValue",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]},{name:"callParams",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]}]}],stateMutability:"view"},{type:"function",name:"getTransferPoliciesForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}],stateMutability:"view"},{type:"function",name:"isWildcardSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"onERC1155BatchReceived",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC1155Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC721Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"event",name:"Executed",inputs:[{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"},{name:"data",type:"bytes",indexed:!1,internalType:"bytes"}],anonymous:!1},{type:"event",name:"SessionCreated",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"sessionSpec",type:"tuple",indexed:!1,internalType:"struct SessionLib.SessionSpec",components:[{name:"signer",type:"address",internalType:"address"},{name:"isWildcard",type:"bool",internalType:"bool"},{name:"expiresAt",type:"uint256",internalType:"uint256"},{name:"callPolicies",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]},{name:"transferPolicies",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]}],anonymous:!1},{type:"event",name:"ValueReceived",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"AllowanceExceeded",inputs:[{name:"allowanceUsage",type:"uint256",internalType:"uint256"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint64",internalType:"uint64"}]},{type:"error",name:"CallPolicyViolated",inputs:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"}]},{type:"error",name:"CallReverted",inputs:[]},{type:"error",name:"ConditionFailed",inputs:[{name:"param",type:"bytes32",internalType:"bytes32"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"condition",type:"uint8",internalType:"uint8"}]},{type:"error",name:"InvalidDataLength",inputs:[{name:"actualLength",type:"uint256",internalType:"uint256"},{name:"expectedLength",type:"uint256",internalType:"uint256"}]},{type:"error",name:"InvalidSignature",inputs:[{name:"msgSender",type:"address",internalType:"address"},{name:"thisAddress",type:"address",internalType:"address"}]},{type:"error",name:"LifetimeUsageExceeded",inputs:[{name:"lifetimeUsage",type:"uint256",internalType:"uint256"},{name:"limit",type:"uint256",internalType:"uint256"}]},{type:"error",name:"MaxValueExceeded",inputs:[{name:"value",type:"uint256",internalType:"uint256"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"}]},{type:"error",name:"NoCallsToExecute",inputs:[]},{type:"error",name:"SessionExpired",inputs:[]},{type:"error",name:"SessionExpiresTooSoon",inputs:[]},{type:"error",name:"SessionZeroSigner",inputs:[]},{type:"error",name:"TransferPolicyViolated",inputs:[{name:"target",type:"address",internalType:"address"}]},{type:"error",name:"UIDAlreadyProcessed",inputs:[]}];function cm(e){return e.id==="inApp"||e.id==="embedded"}async function ZS(e,t,n){var s,o,a,l;if(((s=t==null?void 0:t.auth)==null?void 0:s.mode)!=="popup"&&((o=t==null?void 0:t.auth)==null?void 0:o.mode)!==void 0&&n.authenticateWithRedirect){const u=e.strategy;ed.includes(u)&&await n.authenticateWithRedirect(u,(a=t==null?void 0:t.auth)==null?void 0:a.mode,(l=t==null?void 0:t.auth)==null?void 0:l.redirectUrl)}const r=(await n.connect(e)).user.account;return wx({authAccount:r,client:e.client,createOptions:t,desiredChain:e.chain})}async function qS(e,t,n){e.authResult&&n.loginWithAuthToken&&await n.loginWithAuthToken(e.authResult);const i=await JS(n);if(!i)throw new Error("Failed to authenticate user.");const r=i.account;return wx({authAccount:r,client:e.client,createOptions:t,desiredChain:e.chain})}async function KS(e){const{connectSmartAccount:t}=await h(async()=>{const{connectSmartAccount:n}=await import("./index-Beysbmyx.js").then(i=>i.i);return{connectSmartAccount:n}},__vite__mapDeps([35,1,2,10,11,0,3,4,5,12]));return t({chain:e.chain,client:e.client,personalAccount:e.authAccount},e.smartAccountOptions)}async function JS(e){const t=await e.getUser();switch(t.status){case"Logged In, Wallet Initialized":return t}}async function wx(e){const{createOptions:t,authAccount:n,desiredChain:i,client:r}=e;let s,o;const a=t&&"executionMode"in t?t.executionMode:void 0;if(a&&(a.mode==="EIP4337"?s=a.smartAccount:a.mode==="EIP7702"&&(o=a)),t&&"smartAccount"in t&&(t!=null&&t.smartAccount)&&(s=t.smartAccount),s){const[l,u]=await KS({authAccount:n,chain:i,client:r,smartAccountOptions:s});return{account:l,adminAccount:n,chain:u}}if(o){const l=i;if(!l)throw new Error("Chain is required for EIP-7702 execution, pass a chain when connecting the inAppWallet.");return{account:FS({adminAccount:n,client:r,sponsorGas:o.sponsorGas}),adminAccount:n,chain:l}}return{account:n,chain:i||sa}}const th=Object.freeze(Object.defineProperty({__proto__:null,autoConnectInAppWallet:qS,connectInAppWallet:ZS,isInAppWallet:cm},Symbol.toStringTag,{value:"Module"}));function XS(e){const t=i=>cm(i)||Oe(i),n=Vo(e.wallet)&&e.connectedWallets.some(i=>{var r,s,o,a,l,u;return t(i)&&((s=(r=i.getAccount())==null?void 0:r.address)==null?void 0:s.toLowerCase())===((u=(l=(a=(o=e.wallet).getAdminAccount)==null?void 0:a.call(o))==null?void 0:l.address)==null?void 0:u.toLowerCase())});return t(e.wallet)||n}function eA(){if(typeof document>"u")return;const e=window.location.search,t=new URLSearchParams(e),n=t.get("authResult"),i=t.get("walletId"),r=t.get("authProvider"),s=t.get("authCookie"),o=t.get("authFlow");if((s||n)&&i){const a=(()=>{if(n)return t.delete("authResult"),JSON.parse(decodeURIComponent(n))})();return t.delete("walletId"),t.delete("authProvider"),t.delete("authCookie"),t.delete("authFlow"),window.history.pushState({},"",`${window.location.pathname}?${t.toString()}`),{authCookie:s,authFlow:o,authProvider:r,authResult:a,walletId:i}}}function tA(e,t){const n=new Set;let i=e();const r=()=>{for(const o of n)o()},s=o=>{i=o,r()};for(const o of t)o.subscribe(()=>{s(e())});return{getValue(){return i},subscribe(o){return n.add(o),()=>{n.delete(o)}}}}function sl(e,t,n=!0){n&&e();const i=t.map(r=>r.subscribe(()=>{e()}));return()=>{for(const r of i)r()}}const ic="tw:connected-wallet-params";async function tX(e,t,n){if(!iA(n))throw new Error("given params are not stringifiable");const i=await e.getItem(ic);let r;if(i){try{r=JSON.parse(i)}catch{r={}}r[t]=n}else r={[t]:n};e.setItem(ic,Me(r))}async function nA(e,t){const n=await e.getItem(ic);let i;if(n){try{i=JSON.parse(n)}catch{i={}}delete i[t],e.setItem(ic,Me(i))}}async function nX(e,t){const n=await e.getItem(ic);if(!n)return null;try{const i=JSON.parse(n);return i!=null&&i[t]?i[t]:null}catch{return null}}function iA(e){try{return Me(e),!0}catch{return!1}}const xx="thirdweb:connected-wallet-ids",Cl="thirdweb:active-wallet-id",Uf="thirdweb:active-chain",$f="thirdweb:last-used-wallet-id";function rA(e){const t=fr(void 0),n=fr(void 0),i=fr(void 0),r=fr("unknown"),s=fr(new Map);sl(()=>{U4([...s.getValue().values()])},[s]),sl(()=>{const I=i.getValue();if(!I)return;const E=s.getValue().get(I.id);!E||E===I||i.setValue(E)},[s,i]);const o=fr(new Map),a=fr(!1),l=tA(()=>Array.from(o.getValue().values()),[o]),u=I=>{const E=o.getValue();if(E.has(I.id))return;const C=new Map(E);C.set(I.id,I),o.setValue(C)},d=I=>{const E=o.getValue(),C=new Map(E);C.delete(I.id),o.setValue(C)},f=I=>{nA(e,I.id),d(I),t.getValue()===I&&(e.removeItem(Cl),n.setValue(void 0),i.setValue(void 0),t.setValue(void 0),r.setValue("disconnected"))},m=I=>{f(I),I.disconnect()},y=async(I,E)=>{if(!I.getAccount())throw new Error("Cannot set a wallet without an account as active");const T=await(async()=>E!=null&&E.accountAbstraction&&!Vo(I)?await sA(I,E.client,E.accountAbstraction,f):I)();return await e.setItem(Cl,I.id),await e.setItem($f,I.id),u(I),(E==null?void 0:E.setWalletAsActive)!==!1&&g(T),I.subscribe("accountChanged",async()=>{var O;const j=await y(I,E);(O=E==null?void 0:E.onConnect)==null||O.call(E,j,l.getValue())}),T},p=async(I,E)=>{var T;const C=await y(I,E);return(T=E==null?void 0:E.onConnect)==null||T.call(E,C,l.getValue()),C},g=I=>{const E=I.getAccount();if(!E)throw new Error("Cannot set a wallet without an account as active");u(I),t.setValue(I),n.setValue(E),i.setValue(I.getChain()),r.setValue("connected");const C=N=>{n.setValue(N)},T=I.subscribe("accountChanged",C),j=I.subscribe("chainChanged",N=>i.setValue(N)),O=I.subscribe("disconnect",()=>{L()}),L=()=>{f(I),T(),j(),O()}},x=async I=>{g(I),I.id!=="smart"&&(await e.setItem(Cl,I.id),await e.setItem($f,I.id))};sl(()=>{const I=i.getValue();I?e.setItem(Uf,Me(I)):e.removeItem(Uf)},[i],!1),sl(async()=>{const E=l.getValue().map(C=>C==null?void 0:C.id).filter(C=>!!C);e.setItem(xx,Me(Array.from(new Set([...E]))))},[l],!1);const _=async I=>{const E=t.getValue();if(!E)throw new Error("No active wallet found");if(!E.switchChain)throw new Error("Wallet does not support switching chains");if(Vo(E)){const C=await lm(e);if(C){const T=l.getValue().find(j=>j.id===C);if(T){await T.switchChain(I),await E.switchChain(I),g(E);return}}await E.switchChain(I),g(E)}else await E.switchChain(I);i.setValue(E.getChain())};function b(I){const E=s.getValue();if(I.every(j=>{const O=E.get(j.id);return Me(O)===Me(j)}))return;const T=new Map(E);for(const j of I)T.set(j.id,j);s.setValue(T)}return{activeAccountStore:n,activeWalletChainStore:i,activeWalletConnectionStatusStore:r,activeWalletStore:t,addConnectedWallet:u,connect:p,connectedWallets:l,defineChains:b,disconnectWallet:m,handleConnection:y,isAutoConnecting:a,removeConnectedWallet:d,setActiveWallet:x,switchActiveWalletChain:_}}async function _x(e){try{const t=await e.getItem(xx);return t?JSON.parse(t):[]}catch{return[]}}async function lm(e){try{const t=await e.getItem(Cl);if(t)return t}catch{}return null}async function bx(e){try{const t=await e.getItem(Uf);if(t)return JSON.parse(t)}catch{}return null}const sA=async(e,t,n,i)=>{const r=e.getAccount();if(!r)throw new Error("Cannot set a wallet without an account as active");const s=rx(n);await s.connect({chain:n.chain,client:t,personalAccount:r});const o=e.subscribe("disconnect",()=>{a()}),a=()=>{o(),i(s)};return s};let nh;const oA=async e=>{if(nh&&!e.force&&await nh)return!0;const t=aA(e);return nh=t,t},aA=async({storage:e,props:t,createWalletFn:n,manager:i,connectOverride:r,setLastAuthProvider:s})=>{var C,T,j,O,L;const{wallets:o,onConnect:a}=t,l=t.timeout??15e3;let u=!1;i.isAutoConnecting.setValue(!0);let[d,f]=await Promise.all([_x(e),lm(e)]);const m=eA();if((m==null?void 0:m.authFlow)==="link"&&m.authResult)return await cA({client:t.client,connectOverride:r,createWalletFn:n,manager:i,onConnect:a,props:t,setLastAuthProvider:s,storage:e,timeout:l,urlToken:m,wallets:o});const y=o.find(N=>N.id===(m==null?void 0:m.walletId));if(m!=null&&m.authCookie&&y&&await new kc({clientId:t.client.clientId,ecosystem:Oe(y)?{id:y.id,partnerId:(C=y.getConfig())==null?void 0:C.partnerId}:void 0,storage:e}).saveAuthCookie(m.authCookie),m!=null&&m.walletId&&(f=m.walletId,d=d!=null&&d.includes(m.walletId)?d:[m.walletId,...d||[]]),m!=null&&m.authProvider&&await(s==null?void 0:s(m.authProvider,e)),!d)return u;const p=await bx(e)||t.chain,g=d.map(N=>{const v=o.find(D=>D.id===N);return v||n(N)}),x=f&&(g.find(N=>N.id===f)||n(f));if(x){i.activeWalletConnectionStatusStore.setValue("connecting"),await yx(Bf({authResult:m==null?void 0:m.authResult,client:t.client,lastConnectedChain:p,wallet:x}),{message:`AutoConnect timeout: ${l}ms limit exceeded.`,ms:l}).catch(N=>{console.warn(N.message),t.onTimeout&&t.onTimeout()});try{await(r?r(x):i.connect(x,{accountAbstraction:t.accountAbstraction,client:t.client}))}catch(N){N instanceof Error&&console.warn("Error auto connecting wallet:",N.message),i.activeWalletConnectionStatusStore.setValue("disconnected")}}else i.activeWalletConnectionStatusStore.setValue("disconnected");const _=g.filter(N=>N.id!==f&&d.includes(N.id));for(const N of _)try{await Bf({authResult:m==null?void 0:m.authResult,client:t.client,lastConnectedChain:p,wallet:N}),i.addConnectedWallet(N)}catch{}x&&XS({connectedWallets:x?[x,..._]:_,wallet:x})&&((T=t.siweAuth)!=null&&T.requiresAuth)&&!((j=t.siweAuth)!=null&&j.isLoggedIn)&&!((O=t.siweAuth)!=null&&O.isLoggingIn)&&await((L=t.siweAuth)==null?void 0:L.doLogin().catch(N=>{console.warn("Error signing in with SIWE:",N.message)})),i.isAutoConnecting.setValue(!1);const I=i.activeWalletStore.getValue(),E=i.connectedWallets.getValue();if(I){u=!0;try{a==null||a(I,E)}catch(N){console.error("Error calling onConnect callback:",N)}}else i.activeWalletConnectionStatusStore.setValue("disconnected");return u};async function cA(e){var E;const{client:t,connectOverride:n,createWalletFn:i,manager:r,onConnect:s,props:o,setLastAuthProvider:a,storage:l,timeout:u,urlToken:d,wallets:f}=e,[m,y]=await Promise.all([_x(l),lm(l)]),p=await bx(l)||o.chain;if(!y||!m)return console.warn("No stored wallet found for linking flow"),r.isAutoConnecting.setValue(!1),!1;d.authProvider&&await(a==null?void 0:a(d.authProvider,l));const g=f.find(C=>C.id===y)||i(y);r.activeWalletConnectionStatusStore.setValue("connecting");try{await yx(Bf({authResult:void 0,client:t,lastConnectedChain:p,wallet:g}),{message:`AutoConnect timeout: ${u}ms limit exceeded.`,ms:u}),await(n?n(g):r.connect(g,{accountAbstraction:o.accountAbstraction,client:t}))}catch(C){return console.warn("Failed to auto-connect for linking:",C),r.activeWalletConnectionStatusStore.setValue("disconnected"),r.isAutoConnecting.setValue(!1),!1}const x=Oe(g)?{id:g.id,partnerId:(E=g.getConfig())==null?void 0:E.partnerId}:void 0,_=new kc({clientId:t.clientId,ecosystem:x,storage:l});try{await SS({client:t,ecosystem:x,storage:_,tokenToLink:d.authResult.storedToken.cookieString})}catch(C){console.error("Failed to link profile after redirect:",C)}r.isAutoConnecting.setValue(!1);const b=r.activeWalletStore.getValue(),I=r.connectedWallets.getValue();if(b){try{s==null||s(b,I)}catch(C){console.error("Error calling onConnect callback:",C)}return!0}return!1}async function Bf(e){return e.wallet.autoConnect({authResult:e.authResult,chain:e.lastConnectedChain,client:e.client})}const um="lastAuthProvider";async function Gi(e,t){await t.setItem(um,e)}async function Mx(e){return await e.getItem(um)}function lA(e,t,n){const i=In("useAutoConnect"),{connect:r}=b3({accountAbstraction:t.accountAbstraction,client:t.client});return xe({queryFn:()=>oA({connectOverride:r,createWalletFn:n,manager:i,props:t,setLastAuthProvider:Gi,storage:e}),queryKey:["autoConnect",t.client.clientId],refetchOnMount:!1,refetchOnWindowFocus:!1})}function uA(e){const t=e.wallets||Xu(e);return lA(Ut,{...e,wallets:t},Rt)}function Ix(e){return uA(e),null}function Ex(e){const{height:t,elementRef:n}=dA();return c.jsx("div",{style:{boxSizing:"border-box",height:t?`${t}px`:"auto",overflow:"hidden",transition:"height 210ms ease"},children:c.jsx("div",{ref:n,style:{maxHeight:e.maxHeight},children:e.children})})}function dA(){const e=w.useRef(null),[t,n]=w.useState();return w.useEffect(()=>{const i=e.current;if(!i)return;const r=new ResizeObserver(()=>{n(i.scrollHeight)});return r.observe(i),()=>{r.disconnect()}},[]),{elementRef:e,height:t}}const Cx=e=>new Promise(t=>setTimeout(t,e)),$=({y:e})=>c.jsx("div",{style:{height:z[e],flexShrink:0}}),P=nN(e=>({color:X().colors[e.color||"secondaryText"],display:e.inline?"inline":"block",fontSize:ie[e.size||"md"],fontWeight:e.weight||400,lineHeight:e.multiline?1.5:"normal",margin:0,maxWidth:"100%",overflow:"hidden",textAlign:e.center?"center":"left",textOverflow:"ellipsis",textWrap:e.balance?"balance":"inherit",letterSpacing:e.trackingTight?"-0.025em":void 0})),Zr=iN(e=>{const t=X();return{all:"unset","&:hover":{color:t.colors[e.hoverColor||"primaryText"],textDecoration:"none"},color:t.colors[e.color||"accentText"],cursor:"pointer",display:e.inline?"inline":"block",fontSize:ie[e.size||"md"],fontWeight:e.weight||500,lineHeight:"normal",textAlign:e.center?"center":"left",textDecoration:"none",transition:"color 0.2s ease"}}),Lx="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3MDUuNiIgaGVpZ2h0PSI3MjAiIHZpZXdCb3g9IjAgMCAxODYuNjkgMTkwLjUiIHhtbG5zOnY9Imh0dHBzOi8vdmVjdGEuaW8vbmFubyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTE4NC41ODMgNzY1LjE3MSkiPjxwYXRoIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIgZD0iTS0xMDg5LjMzMy02ODcuMjM5djM2Ljg4OGg1MS4yNjJjLTIuMjUxIDExLjg2My05LjAwNiAyMS45MDgtMTkuMTM3IDI4LjY2MmwzMC45MTMgMjMuOTg2YzE4LjAxMS0xNi42MjUgMjguNDAyLTQxLjA0NCAyOC40MDItNzAuMDUyIDAtNi43NTQtLjYwNi0xMy4yNDktMS43MzItMTkuNDgzeiIgZmlsbD0iIzQyODVmNCIvPjxwYXRoIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIgZD0iTS0xMTQyLjcxNC02NTEuNzkxbC02Ljk3MiA1LjMzNy0yNC42NzkgMTkuMjIzaDBjMTUuNjczIDMxLjA4NiA0Ny43OTYgNTIuNTYxIDg1LjAzIDUyLjU2MSAyNS43MTcgMCA0Ny4yNzgtOC40ODYgNjMuMDM4LTIzLjAzM2wtMzAuOTEzLTIzLjk4NmMtOC40ODYgNS43MTUtMTkuMzEgOS4xNzktMzIuMTI1IDkuMTc5LTI0Ljc2NSAwLTQ1LjgwNi0xNi43MTItNTMuMzQtMzkuMjI2eiIgZmlsbD0iIzM0YTg1MyIvPjxwYXRoIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIgZD0iTS0xMTc0LjM2NS03MTIuNjFjLTYuNDk0IDEyLjgxNS0xMC4yMTcgMjcuMjc2LTEwLjIxNyA0Mi42ODlzMy43MjMgMjkuODc0IDEwLjIxNyA0Mi42ODljMCAuMDg2IDMxLjY5My0yNC41OTIgMzEuNjkzLTI0LjU5Mi0xLjkwNS01LjcxNS0zLjAzMS0xMS43NzYtMy4wMzEtMTguMDk4czEuMTI2LTEyLjM4MyAzLjAzMS0xOC4wOTh6IiBmaWxsPSIjZmJiYzA1Ii8+PHBhdGggZD0iTS0xMDg5LjMzMy03MjcuMjQ0YzE0LjAyOCAwIDI2LjQ5NyA0Ljg0OSAzNi40NTUgMTQuMjAxbDI3LjI3Ni0yNy4yNzZjLTE2LjUzOS0xNS40MTMtMzguMDEzLTI0Ljg1Mi02My43MzEtMjQuODUyLTM3LjIzNCAwLTY5LjM1OSAyMS4zODgtODUuMDMyIDUyLjU2MWwzMS42OTIgMjQuNTkyYzcuNTMzLTIyLjUxNCAyOC41NzUtMzkuMjI2IDUzLjM0LTM5LjIyNnoiIGZpbGw9IiNlYTQzMzUiIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIvPjwvZz48L3N2Zz4=",Tx="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbmFtZT0iRWJlbmUgMSIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgaWQ9ImZhY2Vib29rLWxvZ28tMjAxOSI+PHBhdGggZmlsbD0iIzE4NzdmMiIgZD0iTTEwMjQsNTEyQzEwMjQsMjI5LjIzMDE2LDc5NC43Njk3OCwwLDUxMiwwUzAsMjI5LjIzMDE2LDAsNTEyYzAsMjU1LjU1NCwxODcuMjMxLDQ2Ny4zNzAxMiw0MzIsNTA1Ljc3Nzc3VjY2MEgzMDJWNTEySDQzMlYzOTkuMkM0MzIsMjcwLjg3OTgyLDUwOC40Mzg1NCwyMDAsNjI1LjM4OTIyLDIwMCw2ODEuNDA3NjUsMjAwLDc0MCwyMTAsNzQwLDIxMFYzMzZINjc1LjQzNzEzQzYxMS44MzUwOCwzMzYsNTkyLDM3NS40NjY2Nyw1OTIsNDE1Ljk1NzI4VjUxMkg3MzRMNzExLjMsNjYwSDU5MnYzNTcuNzc3NzdDODM2Ljc2OSw5NzkuMzcwMTIsMTAyNCw3NjcuNTU0LDEwMjQsNTEyWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik03MTEuMyw2NjAsNzM0LDUxMkg1OTJWNDE1Ljk1NzI4QzU5MiwzNzUuNDY2NjcsNjExLjgzNTA4LDMzNiw2NzUuNDM3MTMsMzM2SDc0MFYyMTBzLTU4LjU5MjM1LTEwLTExNC42MTA3OC0xMEM1MDguNDM4NTQsMjAwLDQzMiwyNzAuODc5ODIsNDMyLDM5OS4yVjUxMkgzMDJWNjYwSDQzMnYzNTcuNzc3NzdhNTE3LjM5NjE5LDUxNy4zOTYxOSwwLDAsMCwxNjAsMFY2NjBaIj48L3BhdGg+PC9zdmc+",jx="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDM4IiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCA0OTYuMjU1IDYwOC43MjgiIGlkPSJhcHBsZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTI3My44MSA1Mi45NzNDMzEzLjgwNi4yNTcgMzY5LjQxIDAgMzY5LjQxIDBzOC4yNzEgNDkuNTYyLTMxLjQ2MyA5Ny4zMDZjLTQyLjQyNiA1MC45OC05MC42NDkgNDIuNjM4LTkwLjY0OSA0Mi42MzhzLTkuMDU1LTQwLjA5NCAyNi41MTItODYuOTcxek0yNTIuMzg1IDE3NC42NjJjMjAuNTc2IDAgNTguNzY0LTI4LjI4NCAxMDguNDcxLTI4LjI4NCA4NS41NjIgMCAxMTkuMjIyIDYwLjg4MyAxMTkuMjIyIDYwLjg4M3MtNjUuODMzIDMzLjY1OS02NS44MzMgMTE1LjMzMWMwIDkyLjEzMyA4Mi4wMSAxMjMuODg1IDgyLjAxIDEyMy44ODVzLTU3LjMyOCAxNjEuMzU3LTEzNC43NjIgMTYxLjM1N2MtMzUuNTY1IDAtNjMuMjE1LTIzLjk2Ny0xMDAuNjg4LTIzLjk2Ny0zOC4xODggMC03Ni4wODQgMjQuODYxLTEwMC43NjYgMjQuODYxQzg5LjMzIDYwOC43MyAwIDQ1NS42NjYgMCAzMzIuNjI4YzAtMTIxLjA1MiA3NS42MTItMTg0LjU1NCAxNDYuNTMzLTE4NC41NTQgNDYuMTA1IDAgODEuODgzIDI2LjU4OCAxMDUuODUyIDI2LjU4OHoiPjwvcGF0aD48L3N2Zz4=",vx="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDEwMCAxMDAiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBpZD0iZGlzY29yZCI+PHBhdGggZmlsbD0iIzY2NjVkMiIgZD0iTTg1LjIyLDI0Ljk1OGMtMTEuNDU5LTguNTc1LTIyLjQzOC04LjMzNC0yMi40MzgtOC4zMzRsLTEuMTIyLDEuMjgyCgkJCQljMTMuNjIzLDQuMDg3LDE5Ljk1NCwxMC4wOTcsMTkuOTU0LDEwLjA5N2MtMTkuNDkxLTEwLjczMS00NC4zMTctMTAuNjU0LTY0LjU5LDBjMCwwLDYuNTcxLTYuMzMxLDIwLjk5Ni0xMC40MThsLTAuODAxLTAuOTYyCgkJCQljMCwwLTEwLjg5OS0wLjI0LTIyLjQzOCw4LjMzNGMwLDAtMTEuNTQsMjAuNzU1LTExLjU0LDQ2LjMxOWMwLDAsNi43MzIsMTEuNTQsMjQuNDQyLDEyLjEwMWMwLDAsMi45NjUtMy41MjYsNS4zNjktNi41NzEKCQkJCWMtMTAuMTc3LTMuMDQ1LTE0LjAyNC05LjM3Ni0xNC4wMjQtOS4zNzZjNi4zOTQsNC4wMDEsMTIuODU5LDYuNTA1LDIwLjkxNiw4LjA5NGMxMy4xMDgsMi42OTgsMjkuNDEzLTAuMDc2LDQxLjU5MS04LjA5NAoJCQkJYzAsMC00LjAwNyw2LjQ5MS0xNC41MDUsOS40NTZjMi40MDQsMi45NjUsNS4yODksNi40MTEsNS4yODksNi40MTFjMTcuNzEtMC41NjEsMjQuNDQxLTEyLjEwMSwyNC40NDEtMTIuMDIKCQkJCUM5Ni43NTksNDUuNzEzLDg1LjIyLDI0Ljk1OCw4NS4yMiwyNC45NTh6IE0zNS4wNTUsNjMuODI0Yy00LjQ4OCwwLTguMTc0LTMuOTI3LTguMTc0LTguODE1CgkJCQljMC4zMjgtMTEuNzA3LDE2LjEwMi0xMS42NzEsMTYuMzQ4LDBDNDMuMjI5LDU5Ljg5NywzOS42MjIsNjMuODI0LDM1LjA1NSw2My44MjR6IE02NC4zMDQsNjMuODI0CgkJCQljLTQuNDg4LDAtOC4xNzQtMy45MjctOC4xNzQtOC44MTVjMC4zNi0xMS42ODQsMTUuOTM3LTExLjY4OSwxNi4zNDgsMEM3Mi40NzgsNTkuODk3LDY4Ljg3Miw2My44MjQsNjQuMzA0LDYzLjgyNHoiPjwvcGF0aD48L3N2Zz4=",Nx="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTU2IiBoZWlnaHQ9IjU1NiIgdmlld0JveD0iMCAwIDU1NiA1NTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xNDhfNSkiPgo8cGF0aCBkPSJNMjc4IDBDNDMxLjUzMyAwIDU1NiAxMjQuNDY3IDU1NiAyNzhDNTU2IDQzMS41MzMgNDMxLjUzMyA1NTYgMjc4IDU1NkMxMjQuNDY3IDU1NiAwIDQzMS41MzMgMCAyNzhDMCAxMjQuNDY3IDEyNC40NjcgMCAyNzggMFoiIGZpbGw9IiMwMDUyRkYiLz4KPHBhdGggZD0iTTI3OC40ODIgMzc1LjE5QzIyNC40OSAzNzUuMTkgMTgwLjg2MiAzMzEuNDEgMTgwLjg2MiAyNzcuNUMxODAuODYyIDIyMy41OSAyMjQuNjEgMTc5LjgxIDI3OC40ODIgMTc5LjgxQzMyNi44MSAxNzkuODEgMzY2Ljk0MyAyMTUuMDI3IDM3NC42NTYgMjYxLjIxOEg0NzNDNDY0LjY4NCAxNjAuODc1IDM4MC44MDMgODIgMjc4LjM2MiA4MkMxNzAuNDk3IDgyIDgzIDE2OS41NTkgODMgMjc3LjVDODMgMzg1LjQ0MSAxNzAuNDk3IDQ3MyAyNzguMzYyIDQ3M0MzODAuODAzIDQ3MyA0NjQuNjg0IDM5NC4xMjUgNDczIDI5My43ODJIMzc0LjUzNkMzNjYuODIzIDMzOS45NzMgMzI2LjgxIDM3NS4xOSAyNzguNDgyIDM3NS4xOVoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMTQ4XzUiPgo8cmVjdCB3aWR0aD0iNTU2IiBoZWlnaHQ9IjU1NiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",Sx="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMjAiIGhlaWdodD0iMzIwIiB2aWV3Qm94PSIwIDAgMzIwIDMyMCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMwNmM3NTU7fS5jbHMtMntmaWxsOiNmZmY7fTwvc3R5bGU+PC9kZWZzPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGlkPSJMSU5FX0xPR08iIGRhdGEtbmFtZT0iTElORSBMT0dPIj48cmVjdCBjbGFzcz0iY2xzLTEiIHdpZHRoPSIzMjAiIGhlaWdodD0iMzIwIiByeD0iNzIuMTQiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0yNjYuNjYsMTQ0LjkyYzAtNDcuNzQtNDcuODYtODYuNTgtMTA2LjY5LTg2LjU4UzUzLjI4LDk3LjE4LDUzLjI4LDE0NC45MmMwLDQyLjgsMzgsNzguNjUsODkuMjIsODUuNDIsMy40OC43NSw4LjIxLDIuMjksOS40LDUuMjYsMS4wOCwyLjcuNzEsNi45My4zNSw5LjY1LDAsMC0xLjI1LDcuNTMtMS41Miw5LjEzLS40NywyLjctMi4xNSwxMC41NSw5LjI0LDUuNzZzNjEuNDQtMzYuMTgsODMuODItNjEuOTVoMEMyNTkuMjUsMTgxLjI0LDI2Ni42NiwxNjQsMjY2LjY2LDE0NC45MloiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0yMzEuMTYsMTcyLjQ5aC0zMGEyLDIsMCwwLDEtMi0ydjBoMFYxMjMuOTRoMHYwYTIsMiwwLDAsMSwyLTJoMzBhMiwyLDAsMCwxLDIsMnY3LjU3YTIsMiwwLDAsMS0yLDJIMjEwLjc5djcuODVoMjAuMzdhMiwyLDAsMCwxLDIsMlYxNTFhMiwyLDAsMCwxLTIsMkgyMTAuNzl2Ny44NmgyMC4zN2EyLDIsMCwwLDEsMiwydjcuNTZBMiwyLDAsMCwxLDIzMS4xNiwxNzIuNDlaIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMTIwLjI5LDE3Mi40OWEyLDIsMCwwLDAsMi0ydi03LjU2YTIsMiwwLDAsMC0yLTJIOTkuOTJ2LTM3YTIsMiwwLDAsMC0yLTJIOTAuMzJhMiwyLDAsMCwwLTIsMnY0Ni41M2gwdjBhMiwyLDAsMCwwLDIsMmgzMFoiLz48cmVjdCBjbGFzcz0iY2xzLTEiIHg9IjEyOC43MyIgeT0iMTIxLjg1IiB3aWR0aD0iMTEuNjQiIGhlaWdodD0iNTAuNjQiIHJ4PSIyLjA0Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMTg5Ljg0LDEyMS44NWgtNy41NmEyLDIsMCwwLDAtMiwydjI3LjY2bC0yMS4zLTI4Ljc3YTEuMiwxLjIsMCwwLDAtLjE3LS4yMXYwbC0uMTItLjEyLDAsMC0uMTEtLjA5LS4wNiwwLS4xMS0uMDgtLjA2LDAtLjExLS4wNi0uMDcsMC0uMTEsMC0uMDcsMC0uMTIsMC0uMDgsMC0uMTIsMGgtLjA4bC0uMTEsMGgtNy43MWEyLDIsMCwwLDAtMiwydjQ2LjU2YTIsMiwwLDAsMCwyLDJoNy41N2EyLDIsMCwwLDAsMi0yVjE0Mi44MWwyMS4zMywyOC44YTIsMiwwLDAsMCwuNTIuNTJoMGwuMTIuMDguMDYsMCwuMS4wNS4xLDAsLjA3LDAsLjE0LDBoMGEyLjQyLDIuNDIsMCwwLDAsLjU0LjA3aDcuNTJhMiwyLDAsMCwwLDItMlYxMjMuODlBMiwyLDAsMCwwLDE4OS44NCwxMjEuODVaIi8+PC9nPjwvZz48L3N2Zz4=",Ax="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIiByeD0iMjAwIiBmaWxsPSIjODU1RENEIi8+CjxwYXRoIGQ9Ik0yNTcuNzc4IDE1NS41NTZINzQyLjIyMlY4NDQuNDQ0SDY3MS4xMTFWNTI4Ljg4OUg2NzAuNDE0QzY2Mi41NTQgNDQxLjY3NyA1ODkuMjU4IDM3My4zMzMgNTAwIDM3My4zMzNDNDEwLjc0MiAzNzMuMzMzIDMzNy40NDYgNDQxLjY3NyAzMjkuNTg2IDUyOC44ODlIMzI4Ljg4OVY4NDQuNDQ0SDI1Ny43NzhWMTU1LjU1NloiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMjguODg5IDI1My4zMzNMMTU3Ljc3OCAzNTEuMTExSDE4Mi4yMjJWNzQ2LjY2N0MxNjkuOTQ5IDc0Ni42NjcgMTYwIDc1Ni42MTYgMTYwIDc2OC44ODlWNzk1LjU1NkgxNTUuNTU2QzE0My4yODMgNzk1LjU1NiAxMzMuMzMzIDgwNS41MDUgMTMzLjMzMyA4MTcuNzc4Vjg0NC40NDRIMzgyLjIyMlY4MTcuNzc4QzM4Mi4yMjIgODA1LjUwNSAzNzIuMjczIDc5NS41NTYgMzYwIDc5NS41NTZIMzU1LjU1NlY3NjguODg5QzM1NS41NTYgNzU2LjYxNiAzNDUuNjA2IDc0Ni42NjcgMzMzLjMzMyA3NDYuNjY3SDMwNi42NjdWMjUzLjMzM0gxMjguODg5WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTY3NS41NTYgNzQ2LjY2N0M2NjMuMjgzIDc0Ni42NjcgNjUzLjMzMyA3NTYuNjE2IDY1My4zMzMgNzY4Ljg4OVY3OTUuNTU2SDY0OC44ODlDNjM2LjYxNiA3OTUuNTU2IDYyNi42NjcgODA1LjUwNSA2MjYuNjY3IDgxNy43NzhWODQ0LjQ0NEg4NzUuNTU2VjgxNy43NzhDODc1LjU1NiA4MDUuNTA1IDg2NS42MDYgNzk1LjU1NiA4NTMuMzMzIDc5NS41NTZIODQ4Ljg4OVY3NjguODg5Qzg0OC44ODkgNzU2LjYxNiA4MzguOTQgNzQ2LjY2NyA4MjYuNjY3IDc0Ni42NjdWMzUxLjExMUg4NTEuMTExTDg4MCAyNTMuMzMzSDcwMi4yMjJWNzQ2LjY2N0g2NzUuNTU2WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Dx="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTAwMHB4IiBoZWlnaHQ9IjEwMDBweCIgdmlld0JveD0iMCAwIDEwMDAgMTAwMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTMuMiAoNzI2NDMpIC0gaHR0cHM6Ly9za2V0Y2hhcHAuY29tIC0tPgogICAgPHRpdGxlPkFydGJvYXJkPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI1MCUiIHkxPSIwJSIgeDI9IjUwJSIgeTI9Ijk5LjI1ODM0MDQlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMyQUFCRUUiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzIyOUVEOSIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJBcnRib2FyZCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbCIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0xKSIgY3g9IjUwMCIgY3k9IjUwMCIgcj0iNTAwIj48L2NpcmNsZT4KICAgICAgICA8cGF0aCBkPSJNMjI2LjMyODQxOSw0OTQuNzIyMDY5IEMzNzIuMDg4NTczLDQzMS4yMTY2ODUgNDY5LjI4NDgzOSwzODkuMzUwMDQ5IDUxNy45MTcyMTYsMzY5LjEyMjE2MSBDNjU2Ljc3MjUzNSwzMTEuMzY3NDMgNjg1LjYyNTQ4MSwzMDEuMzM0ODE1IDcwNC40MzE0MjcsMzAxLjAwMzUzMiBDNzA4LjU2NzYyMSwzMDAuOTMwNjcgNzE3LjgxNTgzOSwzMDEuOTU1NzQzIDcyMy44MDY0NDYsMzA2LjgxNjcwNyBDNzI4Ljg2NDc5NywzMTAuOTIxMjEgNzMwLjI1NjU1MiwzMTYuNDY1ODEgNzMwLjkyMjU1MSwzMjAuMzU3MzI5IEM3MzEuNTg4NTUxLDMyNC4yNDg4NDggNzMyLjQxNzg3OSwzMzMuMTEzODI4IDczMS43NTg2MjYsMzQwLjA0MDY2NiBDNzI0LjIzNDAwNyw0MTkuMTAyNDg2IDY5MS42NzUxMDQsNjEwLjk2NDY3NCA2NzUuMTEwOTgyLDY5OS41MTUyNjcgQzY2OC4xMDIwOCw3MzYuOTg0MzQyIDY1NC4zMDEzMzYsNzQ5LjU0NzUzMiA2NDAuOTQwNjE4LDc1MC43NzcwMDYgQzYxMS45MDQ2ODQsNzUzLjQ0ODkzOCA1ODkuODU2MTE1LDczMS41ODgwMzUgNTYxLjczMzM5Myw3MTMuMTUzMjM3IEM1MTcuNzI2ODg2LDY4NC4zMDY0MTYgNDkyLjg2NjAwOSw2NjYuMzQ5MTgxIDQ1MC4xNTAwNzQsNjM4LjIwMDAxMyBDNDAwLjc4NDQyLDYwNS42Njg3OCA0MzIuNzg2MTE5LDU4Ny43ODkwNDggNDYwLjkxOTQ2Miw1NTguNTY4NTYzIEM0NjguMjgyMDkxLDU1MC45MjE0MjMgNTk2LjIxNTA4LDQzNC41NTY0NzkgNTk4LjY5MTIyNyw0MjQuMDAwMzU1IEM1OTkuMDAwOTEsNDIyLjY4MDEzNSA1OTkuMjg4MzEyLDQxNy43NTg5ODEgNTk2LjM2NDc0LDQxNS4xNjA0MzEgQzU5My40NDExNjgsNDEyLjU2MTg4MSA1ODkuMTI2MjI5LDQxMy40NTA0ODQgNTg2LjAxMjQ0OCw0MTQuMTU3MTk4IEM1ODEuNTk4NzU4LDQxNS4xNTg5NDMgNTExLjI5Nzc5Myw0NjEuNjI1Mjc0IDM3NS4xMDk1NTMsNTUzLjU1NjE4OSBDMzU1LjE1NDg1OCw1NjcuMjU4NjIzIDMzNy4wODA1MTUsNTczLjkzNDkwOCAzMjAuODg2NTI0LDU3My41ODUwNDYgQzMwMy4wMzM5NDgsNTczLjE5OTM1MSAyNjguNjkyNzU0LDU2My40OTA5MjggMjQzLjE2MzYwNiw1NTUuMTkyNDA4IEMyMTEuODUxMDY3LDU0NS4wMTM5MzYgMTg2Ljk2NDQ4NCw1MzkuNjMyNTA0IDE4OS4xMzE1NDcsNTIyLjM0NjMwOSBDMTkwLjI2MDI4Nyw1MTMuMzQyNTg5IDIwMi42NTkyNDQsNTA0LjEzNDUwOSAyMjYuMzI4NDE5LDQ5NC43MjIwNjkgWiIgaWQ9IlBhdGgtMyIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgPC9nPgo8L3N2Zz4=",Ox="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjQwMCAyODAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNDAwIDI4MDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KCS5zdDF7ZmlsbDojOTE0NkZGO30KPC9zdHlsZT4KPHRpdGxlPkFzc2V0IDI8L3RpdGxlPgo8Zz4KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMjIwMCwxMzAwIDE4MDAsMTcwMCAxNDAwLDE3MDAgMTA1MCwyMDUwIDEwNTAsMTcwMCA2MDAsMTcwMCA2MDAsMjAwIDIyMDAsMjAwIAkiLz4KCTxnPgoJCTxnIGlkPSJMYXllcl8xLTIiPgoJCQk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNNTAwLDBMMCw1MDB2MTgwMGg2MDB2NTAwbDUwMC01MDBoNDAwbDkwMC05MDBWMEg1MDB6IE0yMjAwLDEzMDBsLTQwMCw0MDBoLTQwMGwtMzUwLDM1MHYtMzUwSDYwMFYyMDBoMTYwMAoJCQkJVjEzMDB6Ii8+CgkJCTxyZWN0IHg9IjE3MDAiIHk9IjU1MCIgY2xhc3M9InN0MSIgd2lkdGg9IjIwMCIgaGVpZ2h0PSI2MDAiLz4KCQkJPHJlY3QgeD0iMTE1MCIgeT0iNTUwIiBjbGFzcz0ic3QxIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjYwMCIvPgoJCTwvZz4KCTwvZz4KPC9nPgo8L3N2Zz4K",Px="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNjUgNjUiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI0IiIHg9Ii41IiB5PSIuNSIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0iQSIgeDI9IjUwJSIgeDE9IjUwJSIgeTI9IjEwMCUiIHkxPSIwJSI+PHN0b3Agc3RvcC1jb2xvcj0iIzExMWQyZSIgb2Zmc2V0PSIwJSIvPjxzdG9wIHN0b3AtY29sb3I9IiMwNTE4MzkiIG9mZnNldD0iMjEuMiUiLz48c3RvcCBzdG9wLWNvbG9yPSIjMGExYjQ4IiBvZmZzZXQ9IjQwLjclIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzEzMmU2MiIgb2Zmc2V0PSI1OC4xJSIvPjxzdG9wIHN0b3AtY29sb3I9IiMxNDRiN2UiIG9mZnNldD0iNzMuOCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjMTM2NDk3IiBvZmZzZXQ9Ijg3LjMlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzEzODdiOCIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHN5bWJvbCBpZD0iQiI+PGc+PHBhdGggZD0iTTEuMzA1IDQxLjIwMkM1LjI1OSA1NC4zODYgMTcuNDg4IDY0IDMxLjk1OSA2NGMxNy42NzMgMCAzMi0xNC4zMjcgMzItMzJzLTE0LjMyNy0zMi0zMi0zMkMxNS4wMDEgMCAxLjEyNCAxMy4xOTMuMDI4IDI5Ljg3NGMyLjA3NCAzLjQ3NyAyLjg3OSA1LjYyOCAxLjI3NSAxMS4zMjh6IiBmaWxsPSJ1cmwoI0EpIi8+PHBhdGggZD0iTTMwLjMxIDIzLjk4NWwuMDAzLjE1OC03LjgzIDExLjM3NWMtMS4yNjgtLjA1OC0yLjU0LjE2NS0zLjc0OC42NjJhOC4xNCA4LjE0IDAgMCAwLTEuNDk4LjhMLjA0MiAyOS44OTNzLS4zOTggNi41NDYgMS4yNiAxMS40MjRsMTIuMTU2IDUuMDE2Yy42IDIuNzI4IDIuNDggNS4xMiA1LjI0MiA2LjI3YTguODggOC44OCAwIDAgMCAxMS42MDMtNC43ODIgOC44OSA4Ljg5IDAgMCAwIC42ODQtMy42NTZMNDIuMTggMzYuMTZsLjI3NS4wMDVjNi43MDUgMCAxMi4xNTUtNS40NjYgMTIuMTU1LTEyLjE4cy01LjQ0LTEyLjE2LTEyLjE1NS0xMi4xNzRjLTYuNzAyIDAtMTIuMTU1IDUuNDYtMTIuMTU1IDEyLjE3NHptLTEuODggMjMuMDVjLTEuNDU0IDMuNS01LjQ2NiA1LjE0Ny04Ljk1MyAzLjY5NGE2Ljg0IDYuODQgMCAwIDEtMy41MjQtMy4zNjJsMy45NTcgMS42NGE1LjA0IDUuMDQgMCAwIDAgNi41OTEtMi43MTkgNS4wNSA1LjA1IDAgMCAwLTIuNzE1LTYuNjAxbC00LjEtMS42OTVjMS41NzgtLjYgMy4zNzItLjYyIDUuMDUuMDc3IDEuNy43MDMgMyAyLjAyNyAzLjY5NiAzLjcycy42OTIgMy41Ni0uMDEgNS4yNDZNNDIuNDY2IDMyLjFhOC4xMiA4LjEyIDAgMCAxLTguMDk4LTguMTEzIDguMTIgOC4xMiAwIDAgMSA4LjA5OC04LjExMSA4LjEyIDguMTIgMCAwIDEgOC4xIDguMTExIDguMTIgOC4xMiAwIDAgMS04LjEgOC4xMTNtLTYuMDY4LTguMTI2YTYuMDkgNi4wOSAwIDAgMSA2LjA4LTYuMDk1YzMuMzU1IDAgNi4wODQgMi43MyA2LjA4NCA2LjA5NWE2LjA5IDYuMDkgMCAwIDEtNi4wODQgNi4wOTMgNi4wOSA2LjA5IDAgMCAxLTYuMDgxLTYuMDkzeiIvPjwvZz48L3N5bWJvbD48L3N2Zz4=",kx="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTA2IiBoZWlnaHQ9IjEwNiIgdmlld0JveD0iMCAwIDEwNiAxMDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjUzIiBjeT0iNTMiIHI9IjUzIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTUyLjg1NCA0QzI1LjgzOSA0IDQgMjYgNCA1My4yMTdDNCA3NC45NzMgMTcuOTkzIDkzLjM4OSAzNy40MDUgOTkuOTA3QzM5LjgzMiAxMDAuMzk3IDQwLjcyMSA5OC44NDggNDAuNzIxIDk3LjU0NUM0MC43MjEgOTYuNDA0IDQwLjY0MSA5Mi40OTMgNDAuNjQxIDg4LjQxOEMyNy4wNTEgOTEuMzUyIDI0LjIyMSA4Mi41NTEgMjQuMjIxIDgyLjU1MUMyMi4wMzcgNzYuODQ3IDE4LjgwMSA3NS4zODEgMTguODAxIDc1LjM4MUMxNC4zNTMgNzIuMzY2IDE5LjEyNSA3Mi4zNjYgMTkuMTI1IDcyLjM2NkMyNC4wNTkgNzIuNjkyIDI2LjY0OCA3Ny40MTggMjYuNjQ4IDc3LjQxOEMzMS4wMTUgODQuOTE0IDM4LjA1MiA4Mi43OTYgNDAuODgzIDgxLjQ5MkM0MS4yODcgNzguMzE0IDQyLjU4MiA3Ni4xMTQgNDMuOTU3IDc0Ljg5MkMzMy4xMTggNzMuNzUxIDIxLjcxNCA2OS41MTQgMjEuNzE0IDUwLjYwOUMyMS43MTQgNDUuMjMxIDIzLjY1NCA0MC44MzEgMjYuNzI4IDM3LjQwOUMyNi4yNDMgMzYuMTg3IDI0LjU0NCAzMS4xMzQgMjcuMjE0IDI0LjM3MUMyNy4yMTQgMjQuMzcxIDMxLjMzOSAyMy4wNjcgNDAuNjQgMjkuNDIzQzQ0LjYyMjEgMjguMzQ1NyA0OC43Mjg4IDI3Ljc5NzYgNTIuODU0IDI3Ljc5M0M1Ni45NzkgMjcuNzkzIDYxLjE4NCAyOC4zNjQgNjUuMDY3IDI5LjQyM0M3NC4zNjkgMjMuMDY3IDc4LjQ5NCAyNC4zNzEgNzguNDk0IDI0LjM3MUM4MS4xNjQgMzEuMTM0IDc5LjQ2NCAzNi4xODcgNzguOTc5IDM3LjQwOUM4Mi4xMzQgNDAuODMxIDgzLjk5NCA0NS4yMzEgODMuOTk0IDUwLjYwOUM4My45OTQgNjkuNTE0IDcyLjU5IDczLjY2OSA2MS42NyA3NC44OTJDNjMuNDUgNzYuNDQgNjQuOTg2IDc5LjM3MyA2NC45ODYgODQuMDE4QzY0Ljk4NiA5MC42MTggNjQuOTA2IDk1LjkxNSA2NC45MDYgOTcuNTQ0QzY0LjkwNiA5OC44NDggNjUuNzk2IDEwMC4zOTcgNjguMjIyIDk5LjkwOEM4Ny42MzQgOTMuMzg4IDEwMS42MjcgNzQuOTczIDEwMS42MjcgNTMuMjE3QzEwMS43MDcgMjYgNzkuNzg4IDQgNTIuODU0IDRaIiBmaWxsPSIjMjQyOTJGIi8+Cjwvc3ZnPgo=",zx="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIwIiBoZWlnaHQ9IjMyMCIgdmlld0JveD0iMCAwIDMyMCAzMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIzMjAiIGhlaWdodD0iMzIwIiByeD0iMjQiIGZpbGw9ImJsYWNrIi8+CjxwYXRoIGQ9Ik0xNzcuMzE1IDE0NS4zMzVMMjQ1LjA2OCA2N0gyMjkuMDEzTDE3MC4xODIgMTM1LjAxN0wxMjMuMTk1IDY3SDY5TDE0MC4wNTUgMTY5Ljg1NEw2OSAyNTJIODUuMDU2M0wxNDcuMTgzIDE4MC4xNzJMMTk2LjgwNSAyNTJIMjUxTDE3Ny4zMTEgMTQ1LjMzNUgxNzcuMzE1Wk0xNTUuMzIzIDE3MC43NkwxNDguMTI0IDE2MC41MThMOTAuODQxNyA3OS4wMjJIMTE1LjUwM0wxNjEuNzMxIDE0NC43OTJMMTY4LjkzIDE1NS4wMzRMMjI5LjAyIDI0MC41MjVIMjA0LjM1OUwxNTUuMzIzIDE3MC43NjRWMTcwLjc2WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Rx="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDEyMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgogIDxwYXRoIGQ9Ik02MzYgMTIwMWMtMjMuMDIgMC00Ni4wNDIgMC02OS42OTctLjQwOC05Ljc5NC0xLjEzNS0xOC45OTYtMS41MTgtMjguMTAxLTIuNjY1LTE2LjQyNC0yLjA2Ny0zMi45Ni0zLjc3NS00OS4xNC03LjEyNi0yMS42OTYtNC40OTQtNDMuMjM2LTkuOTA3LTY0LjU4OS0xNS44NDItMjQuMjYtNi43NDMtNDcuNjQ1LTE2LjAyLTcwLjU3Ny0yNi40OC0yNi4yMjYtMTEuOTYzLTUxLjkxMy0yNC45NjQtNzUuNzk4LTQxLjA5OC0xOC43NDYtMTIuNjYzLTM3LjA1Ny0yNi4wNC01NC44OTktMzkuOTQ4LTEzLjU1LTEwLjU2My0yNi43MjktMjEuNzkxLTM4Ljg2Ni0zMy45My0xNi4xOS0xNi4xOS0zMS42NTgtMzMuMTYyLTQ2LjU4Mi01MC41MzItMTAuOTY1LTEyLjc2Mi0yMS4yMS0yNi4yNjUtMzAuNTk3LTQwLjIzLTExLjM3OS0xNi45MjUtMjIuMTc4LTM0LjMyMS0zMi4wMS01Mi4xODUtMTAuMTM2LTE4LjQyLTE5LjYyOC0zNy4yOTUtMjcuOTE3LTU2LjYwOC0xMC43NDEtMjUuMDI1LTE5LjkzMS01MC43MjQtMjYuMjE0LTc3LjMwNy00LjU5Mi0xOS40MjctOS4yOTgtMzguODYzLTEyLjgxMy01OC40OTktMi42NjYtMTQuODkyLTMuNS0zMC4xMS01LjI3Mi00NS4xNjdDMi44MDQgNjUxLjkyMiAxLjY2NiA2NTAuOTg5IDEgNjUwYzAtLjQ0NCAwLS44ODkuMzk5LTEuODIuMTMzLTMuNzE4LS4xMzMtNi45NS0uMzk5LTEwLjE4IDAtMjQuMzU0IDAtNDguNzA4LjM5OS03My42ODUuMTMzLTMuODUzLS4xMzMtNy4wODQtLjM5OS0xMC4zMTUgMC0uNDQ0IDAtLjg4OS4zOTEtMS43OS43OTUtMS4xMzggMS40ODUtMS43ODkgMS41Ni0yLjUwMy43NC03LjE1NiAxLjI0Ni0xNC4zMzggMi4wOC0yMS40ODIgMS4yMjgtMTAuNSAyLjAyOS0yMS4xMDcgNC4xNjMtMzEuNDMgMy44MS0xOC40MjYgOC4zMDMtMzYuNzE3IDEyLjgyNy01NC45ODYgNy44ODUtMzEuODQgMTkuNDA0LTYyLjQ2NyAzMy4yMTMtOTIuMTExIDE1LjM3NS0zMy4wMDcgMzMuMzUzLTY0LjU4NCA1NC41MjMtOTQuMzg1IDE2LjM2NC0yMy4wMzYgMzQuMTc3LTQ0LjggNTMuMjE3LTY1LjU2NSA5LjczNS0xMC42MTcgMjAuNTg5LTIwLjIxMyAzMS4wMS0zMC4xOTUgMTcuMjMtMTYuNTA2IDM1Ljg4Mi0zMS4yNSA1NS4xNDItNDUuMzMgMjEuODk3LTE2LjAwOSA0NC42NDctMzAuNjc4IDY4LjczLTQzLjAxIDIwLjgyOC0xMC42NjggNDIuMTE4LTIwLjY2NSA2My45LTI5LjE3NyAyMS43NDUtOC40OTggNDQuMTcxLTE1LjQyNiA2Ni42MzYtMjEuODYzIDIzLjkyMS02Ljg1NCA0OC4zNTQtMTEuNzI4IDczLjE5LTE0LjE4IDEzLjgyNC0xLjM2NSAyNy42NTgtMi42NSA0MS40ODItNC4wMjQgMS0uMSAxLjk1OC0uNjM2IDIuOTM2LS45NjkgMjMuMDIgMCA0Ni4wNDIgMCA2OS42OTcuNDA4IDkuNzk3IDEuMTM1IDE5LjAwMyAxLjUxMyAyOC4xMTEgMi42NjYgMTYuMjY0IDIuMDYgMzIuNjM0IDMuNzg5IDQ4LjY1NyA3LjExMyAyMS44NiA0LjUzNiA0My41NzYgOS45MzYgNjUuMSAxNS44ODMgMjQuMjggNi43MSA0Ny42NDEgMTYuMDY5IDcwLjYwNyAyNi40NzQgMjUuOTc2IDExLjc3IDUxLjA4MiAyNS4xMTggNzUuMTUgNDAuMzYgMzIuMDkgMjAuMzI0IDYxLjk2NyA0My42MjYgODkuNTUgNjkuNjk4IDEzLjY5NSAxMi45NDUgMjYuNjIgMjYuNzk2IDM5LjAwNCA0MS4wMTIgMTIuNDkgMTQuMzM5IDI0LjAyNyAyOS41MjMgMzUuNzE1IDQ0LjU0NCAxNi4xNzQgMjAuNzg3IDI5LjczNCA0My4zMjQgNDIuMTc3IDY2LjQ0MiAxOS41ODkgMzYuMzk3IDM1LjU1NCA3NC40MTggNDcuMDc2IDExNC4xNTMgNC43NDEgMTYuMzUyIDguNTM4IDMzLjAxIDEyLjAzOSA0OS42OCAyLjkyNSAxMy45MyA1LjE2NCAyOC4wMzMgNy4wMjQgNDIuMTUgMS44MTUgMTMuNzY4IDIuNzUgMjcuNjUyIDQuMTI0IDQxLjQ4LjEgMS4wMDEuNjM2IDEuOTYuOTY5IDIuOTM3IDAgMjMuMDIgMCA0Ni4wNDItLjQwOCA2OS42OTctMS4xMzUgOS43OTctMS41MTMgMTkuMDAzLTIuNjY2IDI4LjExMS0yLjA2IDE2LjI2NC0zLjgxNyAzMi42MjYtNy4xMDcgNDguNjU5LTQuNDU4IDIxLjcyMS05LjYxMyA0My4zNDctMTUuNjE2IDY0LjY5MS03LjE2MyAyNS40NzItMTYuODc1IDUwLjExLTI4IDc0LjEyNy0xMS45NzggMjUuODU4LTI1LjQ3MyA1MC45MjYtNDAuOTE4IDc0Ljg5M2E1OTguNSA1OTguNSAwIDAgMS02Ny44OSA4Ni42OWMtMTIuOTMzIDEzLjcwNS0yNi43OTIgMjYuNjI0LTQxLjAwOCAzOS4wMDctMTQuMzQgMTIuNDkxLTI5LjUyMyAyNC4wMjgtNDQuNTQ1IDM1LjcxNi0yMC43ODYgMTYuMTc0LTQzLjMyMyAyOS43MzQtNjYuNDQyIDQyLjE3Ny0zNi4zOTcgMTkuNTg5LTc0LjQxOCAzNS41NTQtMTE0LjE1MyA0Ny4wNzYtMTYuMzUyIDQuNzQxLTMzLjAxIDguNTM4LTQ5LjY4IDEyLjAzOS0xMy45MyAyLjkyNS0yOC4wMzQgNS4xNjQtNDIuMTUgNy4wMjUtMTMuNzY4IDEuODE0LTI3LjY1MiAyLjc0OC00MS40OCA0LjEyMy0xLjAwMS4xLTEuOTYuNjM2LTIuOTM3Ljk2OW0xNzkuOTM0LTg1NS45NDhzLS4wMjQuMDg3LjA0LS42NDNjLTEuMjg4LTEuNjctMi42My0zLjMtMy44NTgtNS4wMTQtOS42ODgtMTMuNTE5LTE3Ljk2NS0yNy44Mi0yNC4xMTQtNDMuMzE3LTYuMzMzLTE1Ljk2LTEwLjY0OC0zMi4zOTctMTIuMDA0LTQ5LjU1Ni0uNTA0LTYuMzY3LTEtMTIuNzMzLTEuNTItMTkuMzczLTExLjc1IDAtMjMuNTIgMC0zNS40MzYtLjE4NSAwIDAtLjE4Ni0uMTQ2LS40NjMtLjg4NmwtMy40OTItMzIuODU2SDYwMHY2LjA4NWMwIDE3Ny4wNzktLjAxNyAzNTQuMTU3LjAyOSA1MzEuMjM2LjAwNCAxNS42MDItMy44OTMgMzAuMzE0LTEwLjQ3NiA0NC4xODQtMTEuNjY4IDI0LjU4LTI5LjkxIDQyLjgwNS01NC43NTMgNTQuMzMzLTIzLjU4NiAxMC45NDUtNDcuOTU4IDEzLjY1NC03My4xMzIgNy4xMTMtOC4wNC0yLjA4OS0xNS43ODgtNS4zMDYtMjQuMjY1LTguMjUzLS44LS42OTUtMS42LTEuMzktMi40MjItMi43OS0yNi4xNy00MC43MDctMjguNTk2LTgzLjExMS0yLjI0OC0xMjMuNDc3IDMwLjA1OS00Ni4wNTEgNzQuMjQ5LTYxLjIwOCAxMjcuODktNDcuODc4VjUxNS4zMDdjLTEzLjA1LS4zOTMtMjUuNzQyLS43NzYtMzguNTgtMS4zNDMgMCAwLS4xODctLjE0NS0uMDU4LTEuMDVWNDgxLjQ5Yy0xMS4zODYtLjUwNC0yMi41My0xLjYyMy0zMy42MzYtMS4zMzMtMTQuNDUuMzc2LTI5LjAzOC44NDUtNDMuMjY0IDMuMTQ3LTE3LjE4NiAyLjc4MS0zMy44ODcgNy44NzgtNTAuMTQyIDE0LjU0LTI3LjY5NCAxMS4zNS01Mi42MzkgMjYuODM3LTc0LjQzNCA0Ny4yNzctNy40ODUgNy4wMi0xNC40NzUgMTQuNjA0LTIxLjMwOSAyMi4yNzItMTEuMDY0IDEyLjQxNS0yMC4yMzcgMjYuMTg3LTI4LjI0MiA0MC43NjQtMTEuMzYgMjAuNjg1LTE5Ljk3IDQyLjQ4MS0yNC42NzggNjUuNTU1LTIuNzY1IDEzLjU0OC0zLjgyNyAyNy40NjktNS4xNzMgNDEuMjY5LS42MjcgNi40MzItLjQ0IDEyLjk5Ny0uMDM1IDE5LjQ2NS43NiAxMi4xMTUgMS4wMjkgMjQuMzY3IDMuMTQyIDM2LjI3IDQuODYyIDI3LjM3OCAxMy45ODMgNTMuMzc0IDI3LjggNzcuNjU4IDE0LjY0IDI1LjczIDMzLjAyNCA0OC4zNDMgNTUuNTI1IDY3LjU2MyAzLjkwMSAzLjMzMiA4LjMzMSA2LjA0NiAxMi40ODkgOS4wMzQgMCAwLS4wMTMtLjAyNy4wNC41Ni41OS40OSAxLjE3OC45ODEgMi4wNTggMi4xMTEgMi4yOSAxLjg0MiA0LjU4MSAzLjY4MyA3LjA5MiA2LjA4LjY0Mi40IDEuMjg0Ljc5OCAxLjg0MyAxLjIzIDAgMCAuMDEyLS4wODguMDcuNjAxIDEyLjc3NCAxMC41MjEgMjUuMDEgMjEuNzk0IDM4LjQ0MyAzMS4zOSAyMS4wOCAxNS4wNTYgNDQuNjMgMjUuNDM1IDY5LjUzIDMyLjYxIDE4LjQzIDUuMzEyIDM3LjMxMiA4LjM2MyA1Ni40MTUgOS4zMiAxOC40NzEuOTI3IDM2Ljg2Ny0uNTY4IDU1LjE0NS0zLjc5NSAyNy4wMS00Ljc3IDUyLjQ0OS0xMy43MDcgNzYuNDA0LTI3LjA1OSAyNi4xMDMtMTQuNTQ4IDQ4LjgyNS0zMy4xMjYgNjguMjk3LTU1LjgwNyAxMi44MjktMTQuOTQ0IDI0LjIxLTMwLjkxMyAzMi41MjUtNDguNzAyIDYuNTgtMTQuMDggMTIuMDEyLTI4Ljc2MiAxNy4wMy00My40OTEgNi45MDctMjAuMjY1IDkuODA1LTQxLjQ4IDkuOTAzLTYyLjczMS40MTctOTAuMTQzLjE3Ny0xODAuMjg4LjE3Ny0yNzAuNDMzdi02Ljc0NGM1Ni42NSAzOC45MiAxMTguMDM4IDU4Ljk2NiAxODUuNzQzIDU4Ljk4NXYtMTM0LjUyYy04LjU4Ni0uODc2LTE2LjkwNC0xLjY3Ni0yNS4yMDktMi41OTUtNC41MjQtLjUtOS4wMjUtMS4yMDMtMTQuMDgtMi4wMjUtLjIwNi0uMzE3LS40MTMtLjYzNS0uMjI2LTEuNzE5di0yNy43NDVjLTcuODE4LS44Mi0xNS43ODgtMS42Ni0yMy43NTktMi40ODktMTMuOTE4LTEuNDQ2LTI3LjQ0LTQuNzU4LTQwLjMwNi0xMC4xMDUtMTEuMDE3LTQuNTc4LTIxLjYwNS0xMC4xOS0zMi40NjYtMTUuNDc0IDAgMC0uMjM0LS4yLS42NjQtLjgyM2EyMSAyMSAwIDAgMS0yLjY4LS43MzJjLTEuMTczLTEuMjg4LTIuMzQ2LTIuNTc3LTMuNTMtNC40ODctLjY1OS0uNDM1LTEuMzE4LS44Ny0xLjg4OS0xLjMzIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1maWxsOnZhcigtLWRhcmtyZWFkZXItYmFja2dyb3VuZC0wMDAwMDAsICMwMDAwMDApOy0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOm5vbmU7dmlzaWJpbGl0eTp2aXNpYmxlO29wYWNpdHk6MSIgZGF0YS1pbmRleD0iMCIvPgogIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xIDU1NC40NTRjLjI2NiAyLjc3Ny41MzIgNi4wMDguMzk5IDkuMzkyQzEgNTYwLjk3IDEgNTU3Ljk0IDEgNTU0LjQ1NCIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLXRleHQtZmZmZmZmLCAjZThlNmUzKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lO3Zpc2liaWxpdHk6dmlzaWJsZSIgZGF0YS1pbmRleD0iNSIvPgogIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xIDYzOC40NTRjLjI2NiAyLjc3Ny41MzIgNi4wMDguMzk5IDkuMzkyQzEgNjQ0Ljk3IDEgNjQxLjk0IDEgNjM4LjQ1NCIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLXRleHQtZmZmZmZmLCAjZThlNmUzKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lO3Zpc2liaWxpdHk6dmlzaWJsZSIgZGF0YS1pbmRleD0iNiIvPgogIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04MjQuNDYzIDM1Mi4yMjJzLjIzNC4yLjA1NC42MjljNC44OTggNS4zNjIgOS44NTcgMTAuNDI1IDE1LjA3NSAxNS4yMDYgMTUuMjUgMTMuOTcxIDMyLjY5NCAyNC41NTYgNTEuOTIzIDMxLjk2NCA5LjUxNCAzLjY2NiAxOS41MyA2LjAyOSAyOS4zMTkgOC45OC4yMDcuMzE5LjQxNC42MzcuODkzIDEuNTE3LjI3MiAzNS4xMzUuMjcyIDY5LjcwOC4yNzIgMTA0LjU3OS0zMy44NjYtLjA1Ni02Ni4yMDMtNS4wODctOTcuNzc1LTE1LjEyNC0zMS41MTYtMTAuMDItNjAuNzIyLTI0Ljc0NS04OC4yMjQtNDMuOTcyIDAgMS41NDYuMDAzIDIuMzY1IDAgMy4xODQtLjMzMyA5NC4yMzUtLjU3NiAxODguNDctMS4xMzEgMjgyLjcwMy0uMDYgMTAuMTIxLTEuMjA0IDIwLjM3My0zLjEyOCAzMC4zMTctMy41NTMgMTguMzU1LTkuMDQ5IDM2LjE1LTE2LjQ2IDUzLjQ0Mi0xMS4xMzkgMjUuOTkxLTI2LjI5IDQ5LjI4OS00NS41MTMgNjkuODAxLTkuMzMgOS45NTYtMTkuNTczIDE5LjMxLTMwLjUxOCAyNy40MzQtMTIuODk5IDkuNTc1LTI2LjU4OCAxOC4yOS00MC42OTQgMjUuOTg0YTE5MC4zIDE5MC4zIDAgMCAxLTU1LjMxIDE5LjgzOGMtMTUuODY4IDMuMDQxLTMyLjA0OCA0LjY4LTQ4LjE2NCA2LjExOC03LjgzNy42OTgtMTUuODk5LS4wMDgtMjMuNzYtLjkyNi0xMy45MzQtMS42MjctMjcuOTY3LTMuMTAyLTQxLjY0NC02LjA4NS0yMi42OS00Ljk0OC00NC4wNzEtMTMuNjQyLTY0LjExMi0yNS41My00LjY1OS0yLjc2My05LjY1My00Ljk2LTE0LjQ5My03LjQxOCAwIDAtLjAxMi4wODcuMjE0LS4yNjctLjYxMy0uNzEyLTEuNDUtMS4wNzEtMi4yOS0xLjQzLTIuMjktMS44NDItNC41OC0zLjY4My02Ljk2NS02LjIxLS43MzQtMS4xMjktMS4zNzYtMS41Ny0yLjAxNy0yLjAxMyAwIDAgLjAxMy4wMjcuMjAzLS4zMDYtLjk1NS0xLjkzOS0xLjk4Mi0zLjY0NC0zLjI2Mi01LjEzMi0xNC44NTEtMTcuMjc1LTI2LjU3Ni0zNi40NjgtMzUuOTQ0LTU3LjIyLTExLjc2NS0yNi4wNjYtMTkuMDc1LTUzLjM5NS0yMC42OC04MS43ODgtMS4wNS0xOC41OTQtLjAwOS0zNy40NzggMi4wMS01Ni4wMjQgMS45MzgtMTcuODE4IDcuMTE4LTM1LjEzMSAxMy42LTUxLjk4NSAxMS4yMDUtMjkuMTI2IDI3LjI3Ni01NS4yODUgNDguNDQtNzguMDY0IDEwLjA4NC0xMC44NTQgMjEuMzI1LTIwLjgxMiAzMi45NjgtMzAuMDAzIDE5LjUwNy0xNS4zOTkgNDEuMjMzLTI3LjA3MiA2NC42OTUtMzUuNTU0IDI1LjgyOC05LjMzNyA1Mi40MDMtMTQuMzAyIDc5LjgxMS0xNS4wNDggMCAwIC4xODYuMTQ1LjE3OS42OS0uMDA3IDM1LjQ1OS0uMDA3IDcwLjM3NC0uMDA3IDEwNS4yMjctOS4xNzQtMS42NDMtMTcuNzQ2LTMuODQ2LTI2LjQ0Mi00LjU4LTEzLjY3Ni0xLjE1NC0yNy4xNy43MjMtNDAuMzIgNC44NTUtMjcuODg4IDguNzY0LTQ5LjQwMSAyNS44My02NC4xMDYgNTAuODgtMTIuNzg5IDIxLjc4Ni0xNy42MzcgNDUuNDY5LTE0LjI3NyA3MC44MTUgMi4wNyAxNS42MTggNy4wMDggMzAuMDc2IDE1LjE4OSA0My4zOTQgMTAuNjYgMTcuMzUzIDI0Ljc1IDMxLjIzNiA0Mi45MyA0MC43MzQuOC42OTYgMS42IDEuMzkxIDIuNzEyIDIuNTU0IDcuNDU1IDEwLjUyMiAxNi4zMzYgMTguODE3IDI2LjUzNSAyNS42MzcgMjUuNDA2IDE2Ljk4OSA1My4zMjIgMjMuNTA5IDgzLjM5NiAxNy43OTMgMzAuNDQtNS43ODUgNTQuNDk3LTIyLjE4NyA3Mi4xOTMtNDcuNTE2IDExLjI3NS0xNi4xMzkgMTguODUxLTM0LjMyOCAxOC45MzgtNTMuOTgyLjcyOC0xNjQuMTg0Ljg5My0zMjguMzcgMS4yMi00OTIuNTU2LjAzLTE1LjE1OC4wMDQtMzAuMzE3LjAwNC00NS40NzZWMjI3YzIuNSAwIDQuNDU5LjAwMyA2LjQxNyAwbDkyLjQ0LS4xODJzLjE4NS4xNDYuMTc4LjYzOGMtLjAxMS45OS0uMTE4IDEuNTE1LS4wMDYgMS45ODYgNC41MjMgMTkuMDI3IDEwLjY0MiAzNy4zOCAyMC4zMzQgNTQuNTY3IDExLjg2OCAyMS4wNDggMjcuMzMgMzguOTA3IDQ1LjY3NiA1NC4zODUgMy4yMjUgMi43MiA3LjIyNyA0LjUyIDEwLjg3IDYuNzQ1IDAgMCAuMDI1LS4wODctLjIyOC4yMzYuNTQ5Ljc1OCAxLjM1MSAxLjE5MyAyLjE1MyAxLjYyOGEyMTMgMjEzIDAgMCAwIDQuMDUgNC4zNTdjMS4yMTUuNjE1IDEuODk3LjczOSAyLjU3OS44NjIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci1iYWNrZ3JvdW5kLWZmZmZmZiwgIzE4MWExYik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6bm9uZTtvcGFjaXR5OjEiIGRhdGEtaW5kZXg9IjciLz4KICA8cGF0aCBmaWxsPSIjRkUyQzU1IiBkPSJNMzUxLjEwMiA5MzUuMjA3YzQuODEgMi4xMTMgOS44MDUgNC4zMSAxNC40NjQgNy4wNzQgMjAuMDQgMTEuODg4IDQxLjQyMyAyMC41ODIgNjQuMTEyIDI1LjUzIDEzLjY3NyAyLjk4MyAyNy43MSA0LjQ1OCA0MS42NDUgNi4wODUgNy44Ni45MTggMTUuOTIyIDEuNjI0IDIzLjc1OS45MjYgMTYuMTE2LTEuNDM3IDMyLjI5Ni0zLjA3NyA0OC4xNjQtNi4xMThhMTkwLjMgMTkwLjMgMCAwIDAgNTUuMzEtMTkuODM4YzE0LjEwNi03LjY5NSAyNy43OTUtMTYuNDA5IDQwLjY5NC0yNS45ODQgMTAuOTQ1LTguMTI1IDIxLjE4Ny0xNy40NzggMzAuNTE4LTI3LjQzNCAxOS4yMjMtMjAuNTEyIDM0LjM3NC00My44MSA0NS41MTMtNjkuOCA3LjQxMS0xNy4yOTQgMTIuOTA3LTM1LjA4OCAxNi40Ni01My40NDMgMS45MjQtOS45NDQgMy4wNjgtMjAuMTk2IDMuMTI4LTMwLjMxNy41NTUtOTQuMjMzLjc5OC0xODguNDY4IDEuMTMtMjgyLjcwMy4wMDQtLjgyLjAwMS0xLjYzOC4wMDEtMy4xODQgMjcuNTAyIDE5LjIyNyA1Ni43MDggMzMuOTUzIDg4LjIyNCA0My45NzIgMzEuNTcyIDEwLjAzNyA2My45MSAxNS4wNjggOTcuNzc1IDE1LjEyNGwtLjAwMS0xMDQuNDc0YzQuNTEuMTU0IDkuMDEyLjg1NyAxMy41MzYgMS4zNTcgOC4zMDUuOTE5IDE2LjYyMyAxLjcxOSAyNS4yMDkgMi41OTZ2MTM0LjUxOWMtNjcuNzA1LS4wMi0xMjkuMDkzLTIwLjA2Ni0xODUuNzQzLTU4Ljk4NXY2Ljc0NGMwIDkwLjE0NS4yNCAxODAuMjktLjE3NyAyNzAuNDMzLS4wOTggMjEuMjUxLTIuOTk2IDQyLjQ2Ni05LjkwMiA2Mi43My01LjAyIDE0LjczLTEwLjQ1IDI5LjQxMi0xNy4wMzEgNDMuNDkyLTguMzE0IDE3Ljc4OS0xOS42OTYgMzMuNzU4LTMyLjUyNSA0OC43MDItMTkuNDcyIDIyLjY4LTQyLjE5NCA0MS4yNTktNjguMjk3IDU1LjgwNy0yMy45NTUgMTMuMzUyLTQ5LjM5NSAyMi4yOS03Ni40MDQgMjcuMDU5LTE4LjI3OCAzLjIyNy0zNi42NzQgNC43MjItNTUuMTQ1IDMuNzk2LTE5LjEwMy0uOTU4LTM3Ljk4NC00LjAwOS01Ni40MTUtOS4zMi0yNC45LTcuMTc2LTQ4LjQ1LTE3LjU1NS02OS41My0zMi42MTEtMTMuNDM0LTkuNTk2LTI1LjY3LTIwLjg2OS0zOC40NzItMzEuNzM1IiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1maWxsOnZhcigtLWRhcmtyZWFkZXItYmFja2dyb3VuZC1mZTJjNTUsICNiMTAxMjMpOy0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOm5vbmU7dmlzaWJpbGl0eTp2aXNpYmxlO29wYWNpdHk6MSIgZGF0YS1pbmRleD0iOCIvPgogIDxwYXRoIGZpbGw9IiMyNUY0RUUiIGQ9Ik03MzguNzE4IDIyNi40NDhjLTMwLjY3NS40MzEtNjEuNDg4LjQ5Mi05Mi4zMDEuNTUxLTEuOTU4LjAwNC0zLjkxNi4wMDEtNi40MTcuMDAxdjUuMjg4YzAgMTUuMTU5LjAyNiAzMC4zMTgtLjAwNCA0NS40NzYtLjMyNyAxNjQuMTg2LS40OTIgMzI4LjM3Mi0xLjIyIDQ5Mi41NTYtLjA4NyAxOS42NTQtNy42NjMgMzcuODQzLTE4LjkzOCA1My45ODItMTcuNjk2IDI1LjMyOS00MS43NTMgNDEuNzMtNzIuMTkzIDQ3LjUxNi0zMC4wNzQgNS43MTYtNTcuOTktLjgwNC04My4zOTYtMTcuNzkzLTEwLjE5OS02LjgyLTE5LjA4LTE1LjExNS0yNi4yMzctMjUuNTE0IDcuODY4IDIuMzU2IDE1LjYxNiA1LjU3MyAyMy42NTYgNy42NjIgMjUuMTc0IDYuNTQxIDQ5LjU0NiAzLjgzMiA3My4xMzItNy4xMTMgMjQuODQzLTExLjUyOCA0My4wODUtMjkuNzUzIDU0Ljc1My01NC4zMzMgNi41ODMtMTMuODcgMTAuNDgtMjguNTgyIDEwLjQ3Ni00NC4xODQtLjA0Ni0xNzcuMDc5LS4wMjktMzU0LjE1Ny0uMDI5LTUzMS4yMzZ2LTYuMDg1aDEzNS4wODdjMS4xODIgMTEuMTE1IDIuMzM3IDIxLjk4NSAzLjYzIDMzLjIyNiIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLWJhY2tncm91bmQtMjVmNGVlLCAjMDliM2IwKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lO29wYWNpdHk6MSIgZGF0YS1pbmRleD0iOSIvPgogIDxwYXRoIGZpbGw9IiMyNUY0RUUiIGQ9Ik01MjEuOTIgNTEzLjM2N2MtMjcuNDcyIDEuMTk4LTU0LjA0NyA2LjE2My03OS44NzUgMTUuNS0yMy40NjIgOC40ODItNDUuMTg4IDIwLjE1NS02NC42OTUgMzUuNTU0LTExLjY0MyA5LjE5MS0yMi44ODQgMTkuMTQ5LTMyLjk2OSAzMC4wMDMtMjEuMTYzIDIyLjc3OS0zNy4yMzQgNDguOTM4LTQ4LjQzOCA3OC4wNjQtNi40ODMgMTYuODU0LTExLjY2MyAzNC4xNjctMTMuNjAyIDUxLjk4NS0yLjAxOCAxOC41NDYtMy4wNTkgMzcuNDMtMi4wMDggNTYuMDI0IDEuNjA0IDI4LjM5MyA4LjkxNCA1NS43MjIgMjAuNjggODEuNzg4IDkuMzY3IDIwLjc1MiAyMS4wOTIgMzkuOTQ1IDM1Ljk0MyA1Ny4yMiAxLjI4IDEuNDg4IDIuMzA3IDMuMTkzIDMuMjc2IDUuMTM3LTQuMzYyLTIuNjYtOC43OTItNS4zNzQtMTIuNjkzLTguNzA2LTIyLjUwMS0xOS4yMi00MC44ODUtNDEuODMyLTU1LjUyNS02Ny41NjMtMTMuODE3LTI0LjI4NC0yMi45MzgtNTAuMjgtMjcuOC03Ny42NTgtMi4xMTMtMTEuOTAzLTIuMzgyLTI0LjE1NS0zLjE0Mi0zNi4yNy0uNDA2LTYuNDY4LS41OTItMTMuMDMzLjAzNS0xOS40NjUgMS4zNDYtMTMuOCAyLjQwOC0yNy43MjEgNS4xNzMtNDEuMjY5IDQuNzA5LTIzLjA3NCAxMy4zMTktNDQuODcgMjQuNjc4LTY1LjU1NSA4LjAwNS0xNC41NzcgMTcuMTc4LTI4LjM1IDI4LjI0Mi00MC43NjQgNi44MzQtNy42NjggMTMuODI0LTE1LjI1MyAyMS4zMDktMjIuMjcyIDIxLjc5NS0yMC40NCA0Ni43NC0zNS45MjcgNzQuNDM0LTQ3LjI3NyAxNi4yNTUtNi42NjIgMzIuOTU2LTExLjc1OSA1MC4xNDItMTQuNTQgMTQuMjI2LTIuMzAyIDI4LjgxMy0yLjc3IDQzLjI2NC0zLjE0NyAxMS4xMDctLjI5IDIyLjI1LjgyOSAzMy42MzYgMS4zMzMgMCAxMS4xNDUgMCAyMS4yODUtLjA2NCAzMS44NzgiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci1iYWNrZ3JvdW5kLTI1ZjRlZSwgIzA5YjNiMCk7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6dmFyKC0tZGFya3JlYWRlci10ZXh0LTBkOTlmZiwgIzIzYTNmZik7b3BhY2l0eToxIiBkYXRhLWluZGV4PSIxMCIvPgogIDxwYXRoIGZpbGw9IiNGRTJDNTUiIGQ9Ik00MzQuOTkyIDgyNS40ODJjLTE4LjE3LTkuMTQ2LTMyLjI2LTIzLjAyOS00Mi45Mi00MC4zODItOC4xOC0xMy4zMTgtMTMuMTItMjcuNzc2LTE1LjE5LTQzLjM5NC0zLjM1OS0yNS4zNDYgMS40OS00OS4wMjkgMTQuMjc4LTcwLjgxNSAxNC43MDUtMjUuMDUgMzYuMjE4LTQyLjExNiA2NC4xMDYtNTAuODggMTMuMTUtNC4xMzIgMjYuNjQ0LTYuMDA5IDQwLjMyLTQuODU1IDguNjk2LjczNCAxNy4yNjggMi45MzcgMjYuNDQyIDQuNTggMC0zNC44NTMgMC02OS43NjguMDgtMTA1LjEzNSAxMi43NzMtLjA3IDI1LjQ2Ni4zMTMgMzguNTE0LjcwNnYxMzguNDY4Yy01My42NC0xMy4zMy05Ny44MyAxLjgyNy0xMjcuODkgNDcuODc4LTI2LjM0NyA0MC4zNjYtMjMuOTIxIDgyLjc3IDIuMjYgMTIzLjgyOSIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLWJhY2tncm91bmQtZmUyYzU1LCAjYjEwMTIzKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lO29wYWNpdHk6MSIgZGF0YS1pbmRleD0iMTEiLz4KICA8cGF0aCBmaWxsPSIjRkUyQzU1IiBkPSJNODE1Ljk0MiAzNDQuNzc0Yy0zLjY3Ni0xLjg2LTcuNjc4LTMuNjYtMTAuOTAzLTYuMzgtMTguMzQ1LTE1LjQ3OC0zMy44MDgtMzMuMzM3LTQ1LjY3Ni01NC4zODUtOS42OTItMTcuMTg3LTE1LjgxMS0zNS41NC0yMC4zMzQtNTQuNTY3LS4xMTItLjQ3MS0uMDA1LS45OTUuMDgtMS44OTQgMTEuODQ5LS4zOTkgMjMuNjE4LS4zOTkgMzUuMzY5LS4zOTkuNTIgNi42NCAxLjAxNiAxMy4wMDYgMS41MiAxOS4zNzMgMS4zNTYgMTcuMTYgNS42NyAzMy41OTUgMTIuMDA0IDQ5LjU1NiA2LjE1IDE1LjQ5OCAxNC40MjYgMjkuNzk4IDI0LjExNCA0My4zMTcgMS4yMjcgMS43MTMgMi41NyAzLjM0NCAzLjgyNiA1LjM3OSIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLWJhY2tncm91bmQtZmUyYzU1LCAjYjEwMTIzKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lIiBkYXRhLWluZGV4PSIxMiIvPgogIDxwYXRoIGZpbGw9IiMyNUY0RUUiIGQ9Ik05MjEuMDMgNDA4LjYxOWMtOS45ODUtMi41Ny0yMC00LjkzMi0yOS41MTUtOC41OTgtMTkuMjMtNy40MDgtMzYuNjczLTE3Ljk5My01MS45MjMtMzEuOTY0LTUuMjE4LTQuNzgtMTAuMTc3LTkuODQ0LTE1LjAzMy0xNS4xNDEgMTEgNC43OTIgMjEuNTg3IDEwLjQwMyAzMi42MDQgMTQuOTgxIDEyLjg2NyA1LjM0NyAyNi4zODggOC42NiA0MC4zMDYgMTAuMTA1IDcuOTcxLjgyOCAxNS45NCAxLjY3IDIzLjc1OSAyLjQ5IDAgOS4wODYgMCAxOC40MTUtLjE5NyAyOC4xMjciIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci10ZXh0LTI1ZjRlZSwgIzM2ZjVlZik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6dmFyKC0tZGFya3JlYWRlci10ZXh0LTBkOTlmZiwgIzIzYTNmZik7b3BhY2l0eToxIiBkYXRhLWluZGV4PSIxMyIvPgogIDxwYXRoIGZpbGw9IiNGRTJDNTUiIGQ9Ik04MTcuODI5IDM0Ni42OTJhMy41IDMuNSAwIDAgMS0yLjE5Mi0xLjMwNWMuODY4LjEyNCAxLjUyNy41NTkgMi4xOTIgMS4zMDUiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci10ZXh0LWZlMmM1NSwgI2ZlMzk1Zik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6bm9uZSIgZGF0YS1pbmRleD0iMTQiLz4KICA8cGF0aCBmaWxsPSIjMjVGNEVFIiBkPSJNMzQwLjA0MiA5MjUuMjM3Yy42MTQuMTQ4IDEuMjU2LjU5IDEuODQ1IDEuMzk5LS42NC0uMTI1LTEuMjMtLjYxNS0xLjg0NS0xLjQiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci10ZXh0LTI1ZjRlZSwgIzM2ZjVlZik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6bm9uZTt2aXNpYmlsaXR5OnZpc2libGUiIGRhdGEtaW5kZXg9IjE1Ii8+CiAgPHBhdGggZmlsbD0iI0ZFMkM1NSIgZD0iTTM0OS4xMDggOTMzLjQ0M2EzLjY2IDMuNjYgMCAwIDEgMi4yMiAxLjEzOGMtLjgyNi0uMDYyLTEuNDY4LS40Ni0yLjIyLTEuMTM4IiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1maWxsOnZhcigtLWRhcmtyZWFkZXItdGV4dC1mZTJjNTUsICNmZTM5NWYpOy0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOm5vbmU7dmlzaWJpbGl0eTp2aXNpYmxlIiBkYXRhLWluZGV4PSIxNiIvPgogIDxwYXRoIGZpbGw9IiMyNUY0RUUiIGQ9Ik04MjQuMjQ4IDM1MS45MTFjLS40NjcuMTg4LTEuMTUuMDY0LTIuMDQtLjQwMi40Ny0uMTk4IDEuMTQ3LS4wNTMgMi4wNC40MDIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci10ZXh0LTI1ZjRlZSwgIzM2ZjVlZik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6bm9uZSIgZGF0YS1pbmRleD0iMTciLz4KPC9zdmc+Cg==",Ux="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPgo8c3ZnIHdpZHRoPSI4MDBweCIgaGVpZ2h0PSI4MDBweCIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgPGNpcmNsZSBjeD0iNTEyIiBjeT0iNTEyIiByPSI1MTIiIHN0eWxlPSJmaWxsOiMzMTMxMzEiLz4KICAgPHBhdGggZD0iTTMzMS40IDI3NmMtMjkuMyAwLTQwLjEgMTAuOC00MC4xIDQwLjF2MzUzLjRjMCAzLjMuMSA2LjQuNCA5LjIuNyA2LjQuOCAxMi43IDYuOCAxOS43LjYuOCA2LjYgNS4yIDYuNiA1LjIgMy4yIDEuNiA1LjUgMi43IDkuMiA0LjNsMTc3LjggNzQuNWM5LjIgNC4yIDEzLjEgNS45IDE5LjggNS43aC4xYzYuOC4yIDEwLjYtMS41IDE5LjgtNS43bDE3Ny44LTc0LjVjMy43LTEuNSA1LjktMi42IDkuMi00LjMgMCAwIDYuMS00LjUgNi42LTUuMiA2LTcgNi0xMy4yIDYuOC0xOS43LjMtMi44LjQtNS45LjQtOS4yVjMxNmMwLTI5LjMtMTAuOC00MC00MC4xLTQwSDMzMS40em0yODUgNjYuM2gxNC41YzI0LjIgMCAzNiAxMS44IDM2IDM2LjJ2NDAuMWgtMjkuM3YtMzguNWMwLTcuOC0zLjYtMTEuNS0xMS4yLTExLjVoLTVjLTcuOCAwLTExLjUgMy42LTExLjUgMTEuNXYxMjRjMCA3LjggMy42IDExLjQgMTEuNSAxMS40aDUuNWM3LjUgMCAxMS4xLTMuNiAxMS4xLTExLjR2LTQ0LjRoMjkuNHY0NS43YzAgMjQuNC0xMiAzNi40LTM2LjMgMzYuNGgtMTQuOGMtMjQuMyAwLTM2LjMtMTIuMS0zNi4zLTM2LjRWMzc4LjhjLjEtMjQuNCAxMi4xLTM2LjUgMzYuNC0zNi41em0tMjYwIDEuNmg2Ni40djI3LjJoLTM2LjZ2NTUuNmgzNS4ydjI3LjJoLTM1LjJ2NTkuMmgzNy4xdjI3LjJoLTY2LjlWMzQzLjl6bTgxLjQgMGg0Ni45YzI0LjMgMCAzNi4zIDEyLjEgMzYuMyAzNi41djUyLjJjMCAyNC40LTEyIDM2LjUtMzYuMyAzNi41aC0xNi45djcxLjJoLTI5LjlsLS4xLTE5Ni40em05Ni42IDBoMjkuOHYxOTYuNGgtMjkuOFYzNDMuOXptLTY2LjggMjYuNXY3Mi4zSDQ4MGM3LjUgMCAxMS4xLTMuNiAxMS4xLTExLjV2LTQ5LjNjMC03LjktMy42LTExLjUtMTEuMS0xMS41aC0xMi40ek0zODUuNCA1ODdoNC40bDEgLjFoMS42bC44LjNoLjhsLjguMi44LjIuNy4xLjcuMi43LjEuOC4zLjYuMS42LjMuOC4yLjYuMy44LjMuNy4zLjYuNC44LjMuNi40LjguNC42LjQuNy40LjYuNS42LjQuNi41LjcuNS42LjYuNi41LS41LjYtLjYuNi0uNS42LS42LjYtLjUuNi0uNS42LS42LjYtLjUuNi0uNS42LS42LjYtLjUuNi0uNi42LS41LjYtLjUuNi0uNi42LS41LjctLjYuNi0uNS42LS42LS41LS42LS42LS42LS40LS43LS41LS42LS40LS43LS40LS42LS40LS43LS40LS42LS4zLS42LS4zLS42LS4yLS43LS4zLS44LS4yLS42LS4yLS44LS4yLS44LS4yLS44LS4xaC0uOWwtMS0uMmgtMS42bC0uOC4xaC0uOGwtLjguMi0uNy4yLS43LjItLjguMi0uNi4zLS44LjMtLjYuNC0uNi40LS42LjQtLjYuNS0uNi41LS42LjUtLjUuNi0uNi42LS40LjYtLjQuNi0uNS42LS4zLjctLjQuNi0uNC43LS4yLjctLjMuNy0uMi44LS4xLjgtLjIuNy0uMi45di44bC0uMS44djEuOWwuMS44LjEuNy4xLjguMi44LjIuNi4xLjguMi42LjMuNi4zLjguNC44LjMuNi40LjYuNS43LjUuNi40LjYuNi42LjUuNi42LjUuNi41LjYuNS43LjQuNi40LjcuMy44LjMuNi4zLjguMi44LjMuOC4xLjguMi44LjEgMSAuMWgyLjZsMS0uMWguOGwuOC0uMy44LS4xLjgtLjMuNy0uMS43LS4zLjYtLjMuOC0uMy41LS4zLjYtLjR2LTcuNGgtMTEuOHYtMTEuOWgyNi42djI2LjZsLS42LjUtLjYuNS0uNi40LS42LjUtLjYuNC0uNi41LS42LjQtLjcuNC0uOC40LS43LjQtLjYuNC0uOC4zLS42LjQtLjguMy0uOC4zLS44LjMtLjcuMy0uNy4yLS43LjMtLjguMi0uNy4yLS44LjMtLjcuMS0uOC4yLS44LjItLjguMS0uOC4xLS44LjEtLjguMS0xIC4xLS44LjEtLjkuMWgtNC4ybC0uNy42aC0uOGwtLjgtLjFoLS44bC0uOC0uMy0uOC0uMS0uOC0uMi0uOC0uMS0uNi0uMy0uOC0uMS0uOC0uMy0uNy0uMy0uNy0uMi0uOC0uMy0uNy0uMy0uOC0uMy0uNi0uMy0uOC0uNC0uNi0uNC0uOC0uNC0uNi0uNC0uNi0uNC0uNi0uNS0uNi0uNS0uNy0uNS0uNS0uNS0uNi0uNS0uNi0uNi0uNi0uNS0uNi0uNi0uNy0uNi0uNi0uNi0uNS0uNi0uNS0uNi0uNC0uNi0uNS0uNi0uNC0uNi0uNC0uNi0uNC0uNy0uNC0uNi0uMy0uNy0uMy0uNy0uMy0uNy0uMy0uNy0uMi0uNi0uMy0uNy0uMi0uNy0uMi0uNy0uMi0uOC0uMi0uNy0uMi0uOC0uMS0uNy0uMi0uOC0uMS0uNy0uMS0uOC0uMS0uOC0uMS0uOHYtNC40bC4yLS44di0uOWwuMi0uOHYtLjhsLjMtLjguMy0uOC4xLS44LjItLjcuMy0uOC4yLS43LjMtLjguMy0uNy4zLS43LjMtLjcuMy0uNy40LS43LjQtLjYuNC0uNi40LS42LjQtLjYuNS0uNy41LS42LjUtLjYuNi0uNi41LS42LjUtLjYuNi0uNi41LS42LjYtLjUuNi0uNi42LS41LjYtLjUuNi0uNC42LS41LjYtLjQuNy0uNC43LS40LjgtLjQuNi0uNC44LS4zLjctLjMuOC0uNC42LS4yLjgtLjMuNy0uMy43LS4yLjctLjIuOC0uMi43LS4yLjgtLjJoLjhsLjgtLjJoLjhsLjgtLjJoLjhsMS4zLTF6bTI1NS44LjJoNC40bDEgLjJoMS42bC44LjJoMWwuOC4zLjcuMS44LjIuOC4xLjcuMi44LjIuOC4zLjYuMS44LjMuOC4zLjYuMy44LjMuOC4zLjcuNC42LjMuOC40LjcuNC42LjQuNy41LjYuNC42LjUuNi41LjYuNS0uNS42LS40LjctLjUuNi0uNS42LS41LjctLjQuNi0uNS42LS41LjctLjQuNi0uNS42LS41LjYtLjUuNy0uNC43LS41LjYtLjYuNi0uNC42LS41LjctLjYtLjUtLjctLjQtLjYtLjQtLjYtLjUtLjctLjMtLjYtLjQtLjgtLjMtLjYtLjMtLjgtLjMtLjYtLjMtLjYtLjItLjctLjMtLjgtLjItLjgtLjMtLjgtLjItLjktLjItLjgtLjEtLjgtLjItLjgtLjEtLjgtLjEtLjctLjFoLTEuOGwtLjkuMS0uOC4yLS44LjEtLjYuMy0uNi4zLS43LjYtLjUuNy0uMy43djJsLjQuOS4zLjUuNi42LjguNC42LjQuOC4zLjguMyAxIC4zLjYuMi42LjIuOC4yLjYuMi44LjIuOS4yLjkuMi45LjMuOS4xLjguMy45LjIuOC4yLjguMi44LjIuOC4zLjguMi43LjIuOC4zLjguMy44LjQuOC4zLjguNC44LjQuNi40LjYuNC43LjUuNi40LjcuNi42LjYuNi42LjYuNi40LjYuNi44LjQuNi4zLjguNC42LjIuOC4zLjYuMS44LjIuOC4xLjguMS44LjEuOHYybC0uMS45LS4xLjgtLjEuOS0uMi44LS4yLjgtLjIuOC0uMi44LS4zLjctLjMuNi0uMy43LS40LjYtLjUuNi0uNC42LS40LjctLjYuNi0uNS42LS42LjUtLjYuNi0uNi41LS42LjUtLjYuNC0uNy41LS44LjQtLjYuMy0uOC40LS44LjMtLjguMy0uOC4zLS44LjItLjYuMi0uOC4yLS44LjItLjYuMS0uOC4yaC0uM2wtLjguMWgtLjhsLS44LjJoLTZsLS44LS4xLS44LS4xLS45LS4xLS44LS4yLS44LS4xLS44LS4xLS44LS4yLS45LS4yLS44LS4yLS44LS4yLS44LS4yLS44LS4yLS44LS4zLS44LS4zLS43LS4yLS44LS4yLS44LS4zLS42LS4zLS44LS4zLS42LS40LS44LS4zLS43LS40LS42LS40LS44LS40LS42LS40LS43LS40LS42LS41LS42LS41LS42LS41LS42LS41LS42LS41LS42LS42LjUtLjYuNi0uNi41LS42LjYtLjYuNS0uNi41LS42LjYtLjYuNS0uNi42LS42LjUtLjYuNi0uNi41LS42LjUtLjYuNi0uNi41LS42LjYtLjYuNi0uNi42LjUuOC41LjYuNS44LjUuNi40LjcuNS42LjQuNy4zLjYuNC43LjMuOC4zLjYuMy44LjIuNi4zLjguMi44LjMuOC4zLjguMS44LjIuOC4xaC45bC44LjNoNC40bC44LS4yLjgtLjIuNi0uMS42LS4yLjYtLjMuNy0uNS40LS42LjQtLjYuMi0uOHYtMS45bC0uMy0uOC0uNS0uNi0uNS0uNS0uNy0uNS0uNi0uMy0uOC0uMy0uOC0uMy0xLS40LS42LS4xLS42LS4yLS44LS4yLS42LS4yLS44LS4zLS44LS4xLS45LS4zLS44LS4xLS45LS4zLS44LS4xLS44LS4zLS44LS4xLS44LS4zLS44LS4yLS44LS4yLS43LS4zLS43LS4yLS43LS4zLS44LS4zLS45LS4zLS44LS4zLS44LS4zLS44LS40LS44LS40LS42LS40LS44LS40LS42LS41LS43LS40LS41LS41LS42LS42LS42LS42LS41LS42LS41LS42LS40LS42LS40LS42LS40LS43LS4zLS42LS4zLS42LS4yLS43LS4yLS42LS4yLS44LS4xLS43di0uOGwtLjItLjh2LTMuNWwuMS0uOC4xLS44LjEtLjYuMi0uOC4yLS42LjItLjguMy0uNi4zLS44LjMtLjYuNC0uOC40LS42LjYtLjYuNC0uNi42LS42LjYtLjYuNS0uNi43LS42LjUtLjQuNy0uNS42LS41LjYtLjQuOC0uNC42LS4zLjgtLjQuNi0uMy44LS4zLjgtLjMuOC0uMi42LS4yLjgtLjEuNi0uMi44LS4xLjgtLjIuOC0uMS44LS4xLjgtLjEuNi0uMXptLTE5Ny4xLjZoMTUuMWwuMy43LjMuNy4zLjcuMi44LjMuNy4zLjcuMy43LjMuNy4yLjcuNC44LjMuNy4zLjcuMi43LjMuNy40LjcuMy44LjMuNy4yLjcuMy43LjQuNy4yLjcuMy44LjIuOC4zLjYuNC44LjMuNi4zLjguMy44LjIuNi40LjguMy42LjMuOC4yLjYuMy44LjQuOC4zLjcuMi43LjIuNy4zLjcuNC43LjMuOC4zLjcuMi43LjMuNy4zLjcuMy43LjMuOC4zLjcuMy43LjQuNy4zLjcuMy43LjIuOC4zLjcuNC43LjMuNy4yLjcuMy43LjMuOC40LjguMi42LjMuOC4yLjYuMy44LjQuOC4zLjYuMi44LjMuNi4yLjguNC42LjMuOC4yLjguMy42LjMuOC40LjYuMy44LjIuOC4zLjYuMy44LjQuNkg0NjZsLS40LS43LS4yLS43LS4zLS43LS4zLS44LS4yLS43LS4zLS43LS4zLS43LS4zLS43LS4zLS43LS4zLS43LS4yLS43LS4zLS44LS4zLS43LS4zLS43LS4zLS43aC0yMy4ybC0uMy44LS4yLjYtLjMuOC0uNC44LS4yLjYtLjMuOC0uMy42LS4yLjgtLjMuNi0uMy44LS4zLjYtLjMuOC0uMy44LS4zLjYtLjIuOGgtMTYuNWwuMy0uOC4zLS43LjMtLjcuMy0uOC4yLS43LjQtLjcuMy0uNy4zLS43LjItLjcuMy0uOC40LS43LjMtLjcuMy0uNy4yLS43LjMtLjcuNC0uOC4zLS43LjMtLjcuMy0uNy4zLS43LjMtLjcuMy0uOC4zLS44LjMtLjYuMy0uOC40LS42LjMtLjguMi0uOC4yLS42LjMtLjguNC0uNi4zLS44LjMtLjYuMi0uOC4zLS44LjQtLjYuMi0uOC4zLS42LjMtLjguMy0uOC40LS42LjMtLjguMi0uNi4zLS44LjMtLjYuNC0uOC4zLS44LjMtLjcuMi0uNy4zLS43LjQtLjcuMy0uNy4yLS44LjMtLjcuMy0uNy40LS43LjMtLjcuMi0uNy4zLS44LjMtLjguMy0uNi4zLS44LjItLjYuMy0uOC4zLS44LjQtLjYuMy0uOC4zLS42LjItLjguMy0uNi40LS44LjMtLjguMy0uNi4zLS44LjMtLjYuNC0uOC4yLS44LjItLjYuMy0uOCAyLjgtLjZ6bTQ2LjguNGgxNi41bC41LjYuNC43LjUuNi40LjcuNC42LjQuNy40LjYuNS43LjQuNi40LjYuNC43LjQuNi42LjcuMy42LjQuNy41LjYuNS42LjMuNy41LjYuNC43LjMuNi42LjcuNC42LjQuNy40LjYuNC42LjUuNy40LjYuNC43LjQuNi40LjcuNS42LjQuNy40LjYuNS0uNi4zLS44LjUtLjYuNS0uOC40LS42LjMtLjguNi0uNi40LS44LjMtLjYuNS0uNi41LS44LjQtLjYuNC0uOC40LS42LjUtLjguNC0uNi40LS44LjQtLjYuNC0uNi41LS44LjQtLjYuNC0uOC41LS42LjQtLjguNC0uNi41LS42LjQtLjguNS0uNi40LS44LjQtLjYuNC0uOC41LS42LjQtLjguNC0uNkg1NTN2NTkuNWgtMTUuN3YtMzVsLS40LjYtLjUuOC0uNC42LS41LjYtLjQuOC0uNS42LS40LjYtLjUuOC0uNC42LS40LjYtLjYuNi0uNC44LS41LjYtLjQuNi0uNC44LS41LjYtLjQuNi0uNS44LS40LjYtLjUuNi0uNC44LS40LjYtLjUuNi0uNC44LS41LjYtLjUuNi0uNC42LS40LjgtLjUuNi0uNS42LS4zLjgtLjYuNi0uNC42LS41LjgtLjQuNmgtLjNsLS41LS43LS40LS42LS41LS43LS40LS42LS41LS43LS40LS42LS41LS43LS40LS42LS41LS43LS40LS42LS42LS43LS4zLS42LS41LS43LS41LS42LS40LS43LS41LS42LS40LS44LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS42LS42LS4zLS43LS41LS42djM1LjFINDkxdi01OC45bC0uMS0uMnptNzQgMGg0Ni45djEzLjRoLTMxLjR2OS41aDI4LjJ2MTIuN2gtMjguMlY2MzRoMzEuOHYxMy41SDU2NXYtNTguOWwtLjEtLjR6bS0xMTMuNSAxOC4yLS4zLjgtLjMuNi0uMy44LS4zLjgtLjIuNy0uMy43LS4zLjgtLjMuOC0uMi42LS4zLjgtLjMuNi0uMy44LS4zLjgtLjMuNi0uMi44LS4zLjYtLjMuOC0uNiAxLjItLjIuNi0uMy44LS4zLjgtLjIuNi0uMy44aDEzLjdsLS4zLS44LS4zLS43LS4zLS44LS4zLS43LS4yLS43LS4zLS43LS4zLS44LS4zLS43LS4zLS43LS4zLS43LS4yLS43LS4zLS44LS4zLS43LS4zLS43LS4zLS43LS4yLS43LS4zLS44LS4zLS44LS4zLS42LS4zLS44LS4zLS44LS4yLS43LS44LTEuMXptLTI0LjUgMTExLjRoMTcxbC04Ny4zIDI4LjgtODMuNy0yOC44eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPgo8L3N2Zz4=",hA="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjMzMzUgMi42NjY1SDIuNjY2ODNDMS45MzA0NSAyLjY2NjUgMS4zMzM1IDMuMjYzNDYgMS4zMzM1IDMuOTk5ODRWMTEuOTk5OEMxLjMzMzUgMTIuNzM2MiAxLjkzMDQ1IDEzLjMzMzIgMi42NjY4MyAxMy4zMzMySDEzLjMzMzVDMTQuMDY5OSAxMy4zMzMyIDE0LjY2NjggMTIuNzM2MiAxNC42NjY4IDExLjk5OThWMy45OTk4NEMxNC42NjY4IDMuMjYzNDYgMTQuMDY5OSAyLjY2NjUgMTMuMzMzNSAyLjY2NjVaIiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTQuNjY2OCA0LjY2NjVMOC42ODY4MyA4LjQ2NjVDOC40ODEwMSA4LjU5NTQ1IDguMjQzMDQgOC42NjM4NCA4LjAwMDE2IDguNjYzODRDNy43NTcyOCA4LjY2Mzg0IDcuNTE5MzEgOC41OTU0NSA3LjMxMzUgOC40NjY1TDEuMzMzNSA0LjY2NjUiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",fA="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzU2MzlfNjMyKSI+CjxwYXRoIGQ9Ik0xNC42NjY5IDExLjI4MDJWMTMuMjgwMkMxNC42Njc3IDEzLjQ2NTkgMTQuNjI5NyAxMy42NDk3IDE0LjU1NTMgMTMuODE5OEMxNC40ODA5IDEzLjk4OTkgMTQuMzcxOCAxNC4xNDI2IDE0LjIzNSAxNC4yNjgxQzE0LjA5ODIgMTQuMzkzNyAxMy45MzY3IDE0LjQ4OTIgMTMuNzYwOCAxNC41NDg3QzEzLjU4NDkgMTQuNjA4MiAxMy4zOTg1IDE0LjYzMDMgMTMuMjEzNiAxNC42MTM2QzExLjE2MjIgMTQuMzkwNyA5LjE5MTYxIDEzLjY4OTcgNy40NjAyOCAxMi41NjY5QzUuODQ5NSAxMS41NDMzIDQuNDgzODQgMTAuMTc3NyAzLjQ2MDI4IDguNTY2ODlDMi4zMzM2IDYuODI3NyAxLjYzMjQ0IDQuODQ3NTYgMS40MTM2MSAyLjc4Njg5QzEuMzk2OTUgMi42MDI1NCAxLjQxODg2IDIuNDE2NzMgMS40Nzc5NSAyLjI0MTMxQzEuNTM3MDMgMi4wNjU4OSAxLjYzMTk5IDEuOTA0NjkgMS43NTY3OSAxLjc2Nzk3QzEuODgxNTkgMS42MzEyNiAyLjAzMzQ4IDEuNTIyMDMgMi4yMDI4MSAxLjQ0NzI0QzIuMzcyMTMgMS4zNzI0NSAyLjU1NTE3IDEuMzMzNzQgMi43NDAyOCAxLjMzMzU2SDQuNzQwMjhDNS4wNjM4MiAxLjMzMDM4IDUuMzc3NDggMS40NDQ5NSA1LjYyMjc5IDEuNjU1OTJDNS44NjgxIDEuODY2ODkgNi4wMjgzMyAyLjE1OTg2IDYuMDczNjEgMi40ODAyM0M2LjE1ODAzIDMuMTIwMjcgNi4zMTQ1OCAzLjc0ODcxIDYuNTQwMjggNC4zNTM1NkM2LjYyOTk4IDQuNTkyMTggNi42NDkzOSA0Ljg1MTUgNi41OTYyMiA1LjEwMDgxQzYuNTQzMDUgNS4zNTAxMiA2LjQxOTUyIDUuNTc4OTcgNi4yNDAyOCA1Ljc2MDIzTDUuMzkzNjEgNi42MDY4OUM2LjM0MjY1IDguMjc1OTIgNy43MjQ1OCA5LjY1Nzg2IDkuMzkzNjEgMTAuNjA2OUwxMC4yNDAzIDkuNzYwMjNDMTAuNDIxNSA5LjU4MDk5IDEwLjY1MDQgOS40NTc0NiAxMC44OTk3IDkuNDA0MjlDMTEuMTQ5IDkuMzUxMTIgMTEuNDA4MyA5LjM3MDUzIDExLjY0NjkgOS40NjAyM0MxMi4yNTE4IDkuNjg1OTMgMTIuODgwMiA5Ljg0MjQ4IDEzLjUyMDMgOS45MjY4OUMxMy44NDQxIDkuOTcyNTggMTQuMTM5OSAxMC4xMzU3IDE0LjM1MTMgMTAuMzg1MkMxNC41NjI3IDEwLjYzNDggMTQuNjc1MSAxMC45NTMzIDE0LjY2NjkgMTEuMjgwMloiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLXdpZHRoPSIxLjMzMzMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF81NjM5XzYzMiI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",$x="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzQwNDhfNDIzMSkiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuNTg0IDQuODU1NjZDNy43MTA2OSA0Ljc4MjUyIDcuODU0MzkgNC43NDQwMiA4LjAwMDY3IDQuNzQ0MDJDOC4xNDY5NSA0Ljc0NDAyIDguMjkwNjUgNC43ODI1MiA4LjQxNzM0IDQuODU1NjZMMTAuNTE1MyA2LjA2NjY2QzEwLjY0MiA2LjEzOTggMTAuNzQ3MiA2LjI0NSAxMC44MjA0IDYuMzcxNjhDMTAuODkzNSA2LjQ5ODM1IDEwLjkzMiA2LjY0MjA1IDEwLjkzMiA2Ljc4ODMzVjkuMjExQzEwLjkzMiA5LjM1NzI3IDEwLjg5MzUgOS41MDA5NyAxMC44MjA0IDkuNjI3NjVDMTAuNzQ3MiA5Ljc1NDMzIDEwLjY0MiA5Ljg1OTUzIDEwLjUxNTMgOS45MzI2Nkw4LjQxNzM0IDExLjE0NEM4LjI5MDY1IDExLjIxNzEgOC4xNDY5NSAxMS4yNTU2IDguMDAwNjcgMTEuMjU1NkM3Ljg1NDM5IDExLjI1NTYgNy43MTA2OSAxMS4yMTcxIDcuNTg0IDExLjE0NEw1LjQ4NiA5LjkzMjY2QzUuMzU5MzIgOS44NTk1MyA1LjI1NDEzIDkuNzU0MzMgNS4xODA5OSA5LjYyNzY1QzUuMTA3ODUgOS41MDA5NyA1LjA2OTM0IDkuMzU3MjcgNS4wNjkzNCA5LjIxMVY2Ljc4ODY2QzUuMDY5MjggNi42NDIzMyA1LjEwNzc2IDYuNDk4NTYgNS4xODA5IDYuMzcxODJDNS4yNTQwNSA2LjI0NTA4IDUuMzU5MjcgNi4xMzk4MyA1LjQ4NiA2LjA2NjY2TDcuNTg0IDQuODU1NjZaTTguMDg0IDUuNDMzQzguMDU4NjcgNS40MTgzNyA4LjAyOTkzIDUuNDEwNjcgOC4wMDA2NyA1LjQxMDY3QzcuOTcxNDEgNS40MTA2NyA3Ljk0MjY3IDUuNDE4MzcgNy45MTczNCA1LjQzM0w1LjgxOTM0IDYuNjQ0MzNDNS43OTQgNi42NTg5NiA1Ljc3Mjk2IDYuNjggNS43NTgzMyA2LjcwNTMzQzUuNzQzNyA2LjczMDY3IDUuNzM2IDYuNzU5NDEgNS43MzYgNi43ODg2NlY5LjIxMTMzQzUuNzM2IDkuMjQwNTkgNS43NDM3IDkuMjY5MzMgNS43NTgzMyA5LjI5NDY2QzUuNzcyOTYgOS4zMiA1Ljc5NCA5LjM0MTA0IDUuODE5MzQgOS4zNTU2Nkw3LjkxNzM0IDEwLjU2NjdDNy45NDI2NyAxMC41ODEzIDcuOTcxNDEgMTAuNTg5IDguMDAwNjcgMTAuNTg5QzguMDI5OTMgMTAuNTg5IDguMDU4NjcgMTAuNTgxMyA4LjA4NCAxMC41NjY3TDEwLjE4MiA5LjM1NTMzQzEwLjIwNzMgOS4zNDA3IDEwLjIyODQgOS4zMTk2NiAxMC4yNDMgOS4yOTQzM0MxMC4yNTc2IDkuMjY4OTkgMTAuMjY1MyA5LjI0MDI1IDEwLjI2NTMgOS4yMTFWNi43ODg2NkMxMC4yNjUzIDYuNzU5NDEgMTAuMjU3NiA2LjczMDY3IDEwLjI0MyA2LjcwNTMzQzEwLjIyODQgNi42OCAxMC4yMDczIDYuNjU4OTYgMTAuMTgyIDYuNjQ0MzNMOC4wODQgNS40MzNaIiBmaWxsPSIjNUM1QzVDIi8+CjwvZz4KPGNpcmNsZSBjeD0iOCIgY3k9IjgiIHI9IjcuNjkyMzEiIHN0cm9rZT0iIzVDNUM1QyIgc3Ryb2tlLXdpZHRoPSIwLjYxNTM4NSIvPgo8Y2lyY2xlIGN4PSI3Ljk5OTU1IiBjeT0iOC4wMDAwNCIgcj0iNS44NDYxNSIgc3Ryb2tlPSIjNUM1QzVDIiBzdHJva2Utd2lkdGg9IjAuNjE1Mzg1Ii8+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzQwNDhfNDIzMSI+CjxyZWN0IHdpZHRoPSI4IiBoZWlnaHQ9IjgiIGZpbGw9IndoaXRlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0IDQpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==",mA="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5IDIxVjE5QzE5IDE3LjkzOTEgMTguNTc4NiAxNi45MjE3IDE3LjgyODQgMTYuMTcxNkMxNy4wNzgzIDE1LjQyMTQgMTYuMDYwOSAxNSAxNSAxNUg5QzcuOTM5MTMgMTUgNi45MjE3MiAxNS40MjE0IDYuMTcxNTcgMTYuMTcxNkM1LjQyMTQzIDE2LjkyMTcgNSAxNy45MzkxIDUgMTlWMjEiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTEyIDExQzE0LjIwOTEgMTEgMTYgOS4yMDkxNCAxNiA3QzE2IDQuNzkwODYgMTQuMjA5MSAzIDEyIDNDOS43OTA4NiAzIDggNC43OTA4NiA4IDdDOCA5LjIwOTE0IDkuNzkwODYgMTEgMTIgMTFaIiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",Bx="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjY2NjcgNC42NjY2N1YyLjY2NjY3QzEyLjY2NjcgMi40ODk4NiAxMi41OTY0IDIuMzIwMjkgMTIuNDcxNCAyLjE5NTI2QzEyLjM0NjQgMi4wNzAyNCAxMi4xNzY4IDIgMTIgMkgzLjMzMzMzQzIuOTc5NzEgMiAyLjY0MDU3IDIuMTQwNDggMi4zOTA1MiAyLjM5MDUyQzIuMTQwNDggMi42NDA1NyAyIDIuOTc5NzEgMiAzLjMzMzMzQzIgMy42ODY5NiAyLjE0MDQ4IDQuMDI2MDkgMi4zOTA1MiA0LjI3NjE0QzIuNjQwNTcgNC41MjYxOSAyLjk3OTcxIDQuNjY2NjcgMy4zMzMzMyA0LjY2NjY3SDEzLjMzMzNDMTMuNTEwMSA0LjY2NjY3IDEzLjY3OTcgNC43MzY5IDEzLjgwNDcgNC44NjE5M0MxMy45Mjk4IDQuOTg2OTUgMTQgNS4xNTY1MiAxNCA1LjMzMzMzVjhNMTQgOEgxMkMxMS42NDY0IDggMTEuMzA3MiA4LjE0MDQ4IDExLjA1NzIgOC4zOTA1MkMxMC44MDcxIDguNjQwNTcgMTAuNjY2NyA4Ljk3OTcxIDEwLjY2NjcgOS4zMzMzM0MxMC42NjY3IDkuNjg2OTYgMTAuODA3MSAxMC4wMjYxIDExLjA1NzIgMTAuMjc2MUMxMS4zMDcyIDEwLjUyNjIgMTEuNjQ2NCAxMC42NjY3IDEyIDEwLjY2NjdIMTRDMTQuMTc2OCAxMC42NjY3IDE0LjM0NjQgMTAuNTk2NCAxNC40NzE0IDEwLjQ3MTRDMTQuNTk2NCAxMC4zNDY0IDE0LjY2NjcgMTAuMTc2OCAxNC42NjY3IDEwVjguNjY2NjdDMTQuNjY2NyA4LjQ4OTg2IDE0LjU5NjQgOC4zMjAyOSAxNC40NzE0IDguMTk1MjZDMTQuMzQ2NCA4LjA3MDI0IDE0LjE3NjggOCAxNCA4WiIgc3Ryb2tlPSIjMzM4NUZGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIgMy4zMzM1VjEyLjY2NjhDMiAxMy4wMjA1IDIuMTQwNDggMTMuMzU5NiAyLjM5MDUyIDEzLjYwOTZDMi42NDA1NyAxMy44NTk3IDIuOTc5NzEgMTQuMDAwMiAzLjMzMzMzIDE0LjAwMDJIMTMuMzMzM0MxMy41MTAxIDE0LjAwMDIgMTMuNjc5NyAxMy45Mjk5IDEzLjgwNDcgMTMuODA0OUMxMy45Mjk4IDEzLjY3OTkgMTQgMTMuNTEwMyAxNCAxMy4zMzM1VjEwLjY2NjgiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",yA="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzU2MzlfMzIpIj4KPHBhdGggZD0iTTcuOTk5NTkgNi42NjY1QzcuNjQ1OTYgNi42NjY1IDcuMzA2ODMgNi44MDY5OCA3LjA1Njc4IDcuMDU3MDNDNi44MDY3MyA3LjMwNzA4IDYuNjY2MjUgNy42NDYyMiA2LjY2NjI1IDcuOTk5ODRDNi42NjYyNSA4LjY3OTg0IDYuNTk5NTkgOS42NzMxNyA2LjQ5MjkyIDEwLjY2NjUiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLXdpZHRoPSIxLjI1NDkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNOS4zMzI5MyA4Ljc0NjU4QzkuMzMyOTMgMTAuMzMzMiA5LjMzMjkzIDEyLjk5OTkgOC42NjYyNiAxNC42NjY2IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTExLjUyNzMgMTQuMDEzM0MxMS42MDczIDEzLjYxMzMgMTEuODE0IDEyLjQ4IDExLjg2MDcgMTIiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLXdpZHRoPSIxLjI1NDkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMS4zMzM5OCA4LjAwMDE2QzEuMzMzOTggNi42MDA5NSAxLjc3NDIzIDUuMjM3MiAyLjU5MjM3IDQuMTAyMDlDMy40MTA1MSAyLjk2Njk5IDQuNTY1MDUgMi4xMTgwOCA1Ljg5MjQ3IDEuNjc1NjFDNy4yMTk4OCAxLjIzMzE0IDguNjUyODYgMS4yMTk1NCA5Ljk4ODQ0IDEuNjM2NzRDMTEuMzI0IDIuMDUzOTQgMTIuNDk0NSAyLjg4MDc5IDEzLjMzNCA0LjAwMDE2IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTEuMzMzOTggMTAuNjY2NUgxLjMzOTE0IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTE0LjUzMjcgMTAuNjY2NUMxNC42NjYgOS4zMzMxNyAxNC42MiA3LjA5NzE3IDE0LjUzMjcgNi42NjY1IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTMuMzMzOTggMTIuOTk5OEMzLjY2NzMyIDExLjk5OTggNC4wMDA2NSA5Ljk5OTg0IDQuMDAwNjUgNy45OTk4NEMzLjk5OTk4IDcuNTQ1NzUgNC4wNzY2MyA3LjA5NDg2IDQuMjI3MzIgNi42NjY1IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTUuNzY3MDkgMTQuNjY2OEM1LjkwNzA5IDE0LjIyNjggNi4wNjcwOSAxMy43ODY4IDYuMTQ3MDkgMTMuMzMzNSIgc3Ryb2tlPSIjMzM4NUZGIiBzdHJva2Utd2lkdGg9IjEuMjU0OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik02IDQuNTMzNDZDNi42MDgyNyA0LjE4MjI4IDcuMjk4MjggMy45OTc0NSA4LjAwMDY0IDMuOTk3NTZDOC43MDMwMSAzLjk5NzY3IDkuMzkyOTYgNC4xODI3MiAxMC4wMDExIDQuNTM0MUMxMC42MDkzIDQuODg1NDggMTEuMTE0MiA1LjM5MDc5IDExLjQ2NTEgNS45OTkyM0MxMS44MTYgNi42MDc2NiAxMi4wMDA1IDcuMjk3NzYgMTIgOC4wMDAxMlY5LjMzMzQ2IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF81NjM5XzMyIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",ms={apple:jx,coinbase:Nx,discord:vx,facebook:Tx,farcaster:Ax,github:kx,google:Lx,line:Sx,steam:Px,telegram:Dx,twitch:Ox,x:zx,tiktok:Rx,epic:Ux};function Vx(e){switch(e){case"google":return Lx;case"coinbase":return Nx;case"apple":return jx;case"facebook":return Tx;case"phone":return fA;case"email":return hA;case"passkey":return yA;case"discord":return vx;case"line":return Sx;case"x":return zx;case"tiktok":return Rx;case"epic":return Ux;case"farcaster":return Ax;case"telegram":return Dx;case"twitch":return Ox;case"github":return kx;case"steam":return Px;case"guest":return mA;default:return Bx}}function gA(e){const{id:t}=Wv();return xe({queryFn:async()=>pA({id:t}),queryKey:["walletIcon",t],...e.queryOptions})}async function pA(e){var i;const{getInstalledWalletProviders:t}=await h(async()=>{const{getInstalledWalletProviders:r}=await Promise.resolve().then(()=>Zl);return{getInstalledWalletProviders:r}},void 0),n=(i=t().find(r=>r.info.rdns===e.id))==null?void 0:i.info.icon;return n||Sc(e.id,!0)}const td=e=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size,viewBox:"0 0 24 24",role:"presentation",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-mail-icon lucide-mail",style:{color:e.color},children:[c.jsx("path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"}),c.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"})]}),qs=e=>c.jsxs("svg",{"aria-hidden":"true",fill:"none",height:e.size,viewBox:"0 0 36 36",width:e.size,children:[c.jsx("path",{d:"M18.0001 15C17.2045 15 16.4414 15.3161 15.8788 15.8787C15.3162 16.4413 15.0001 17.2044 15.0001 18C15.0001 19.53 14.8501 21.765 14.6101 24",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),c.jsx("path",{d:"M21.0002 19.6801C21.0002 23.2501 21.0002 29.2501 19.5002 33.0001",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),c.jsx("path",{d:"M25.9348 31.53C26.1148 30.63 26.5798 28.08 26.6848 27",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),c.jsx("path",{d:"M2.99976 18C2.99976 14.8518 3.99032 11.7833 5.83112 9.22935C7.67193 6.67536 10.2697 4.76531 13.2563 3.76975C16.243 2.77419 19.4672 2.74359 22.4723 3.6823C25.4773 4.621 28.1108 6.48141 29.9998 9",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),c.jsx("path",{d:"M2.99976 24H3.01628",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),c.jsx("path",{d:"M32.7 24C33 21 32.8965 15.969 32.7 15",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),c.jsx("path",{d:"M7.49976 29.25C8.24976 27 8.99976 22.5 8.99976 18C8.99824 16.9783 9.17071 15.9638 9.50976 15",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),c.jsx("path",{d:"M12.9751 33C13.2901 32.01 13.6501 31.02 13.8301 30",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),c.jsx("path",{d:"M13.5 10.2C14.8686 9.40988 16.4211 8.99401 18.0014 8.99426C19.5818 8.99452 21.1342 9.41088 22.5025 10.2015C23.8708 10.9921 25.0069 12.129 25.7964 13.498C26.5859 14.867 27.001 16.4197 27 18V21",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"})]}),dm=e=>c.jsxs("svg",{fill:"none",height:e.size,role:"presentation",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}),c.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Rs=e=>c.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",style:e.style,children:[c.jsx("path",{d:"M19 7V4C19 3.73478 18.8946 3.48043 18.7071 3.29289C18.5196 3.10536 18.2652 3 18 3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5C3 5.53043 3.21071 6.03914 3.58579 6.41421C3.96086 6.78929 4.46957 7 5 7H20C20.2652 7 20.5196 7.10536 20.7071 7.29289C20.8946 7.48043 21 7.73478 21 8V12M21 12H18C17.4696 12 16.9609 12.2107 16.5858 12.5858C16.2107 12.9609 16 13.4696 16 14C16 14.5304 16.2107 15.0391 16.5858 15.4142C16.9609 15.7893 17.4696 16 18 16H21C21.2652 16 21.5196 15.8946 21.7071 15.7071C21.8946 15.5196 22 15.2652 22 15V13C22 12.7348 21.8946 12.4804 21.7071 12.2929C21.5196 12.1054 21.2652 12 21 12Z",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),c.jsx("path",{d:"M3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H20C20.2652 21 20.5196 20.8946 20.7071 20.7071C20.8946 20.5196 21 20.2652 21 20V16",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]}),nd=e=>{const t=w.useId();return c.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 16 16",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("g",{clipPath:`url(#${t})`,children:c.jsx("path",{d:"M14.6669 11.2802V13.2802C14.6677 13.4659 14.6297 13.6497 14.5553 13.8198C14.4809 13.9899 14.3718 14.1426 14.235 14.2681C14.0982 14.3937 13.9367 14.4892 13.7608 14.5487C13.5849 14.6082 13.3985 14.6303 13.2136 14.6136C11.1622 14.3907 9.19161 13.6897 7.46028 12.5669C5.8495 11.5433 4.48384 10.1777 3.46028 8.56689C2.3336 6.8277 1.63244 4.84756 1.41361 2.78689C1.39695 2.60254 1.41886 2.41673 1.47795 2.24131C1.53703 2.06589 1.63199 1.90469 1.75679 1.76797C1.88159 1.63126 2.03348 1.52203 2.20281 1.44724C2.37213 1.37245 2.55517 1.33374 2.74028 1.33356H4.74028C5.06382 1.33038 5.37748 1.44495 5.62279 1.65592C5.8681 1.86689 6.02833 2.15986 6.07361 2.48023C6.15803 3.12027 6.31458 3.74871 6.54028 4.35356C6.62998 4.59218 6.64939 4.8515 6.59622 5.10081C6.54305 5.35012 6.41952 5.57897 6.24028 5.76023L5.39361 6.60689C6.34265 8.27592 7.72458 9.65786 9.39361 10.6069L10.2403 9.76023C10.4215 9.58099 10.6504 9.45746 10.8997 9.40429C11.149 9.35112 11.4083 9.37053 11.6469 9.46023C12.2518 9.68593 12.8802 9.84248 13.5203 9.92689C13.8441 9.97258 14.1399 10.1357 14.3513 10.3852C14.5627 10.6348 14.6751 10.9533 14.6669 11.2802Z",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.33333"})}),c.jsx("defs",{children:c.jsx("clipPath",{id:t,children:c.jsx("rect",{fill:"white",height:"16",width:"16"})})})]})},ge=e=>c.jsx(xA,{className:e.className||"",color:e.color,style:{height:e.height,width:e.width||"auto",...e.style}}),wA=$t`
74
+ 0% {
75
+ opacity: 0.5;
76
+ }
77
+ 100% {
78
+ opacity: 1;
79
+ }
80
+ `,xA=ke(e=>{const t=X();return{animation:`${wA} 500ms ease-in-out infinite alternate`,backgroundColor:t.colors[e.color||"skeletonBg"],backgroundSize:"200% 200%",borderRadius:Z.sm}}),Xe=e=>{const[t,n]=w.useState("pending"),i=w.useRef(null),r=e.src,s=`${e.width}px`,o=`${e.height||e.width}px`,l=(()=>{if(r!==void 0)try{return Fi({client:e.client,uri:r})}catch{return e.src}})(),u=l===void 0?"pending":l===""?"fallback":t,d=u==="loaded";return w.useEffect(()=>{const f=i.current;if(f)if(f.complete)n("loaded");else{let m=function(){n("loaded")};return f.addEventListener("load",m),()=>{f.removeEventListener("load",m)}}},[]),c.jsxs("div",{style:{alignItems:"center",display:"inline-flex",flexShrink:0,justifyItems:"center",position:"relative"},children:[u==="pending"&&c.jsx(ge,{height:o,width:s,color:e.skeletonColor,style:e.style}),u==="fallback"&&(e.fallback||c.jsx(M,{bg:"tertiaryBg",borderColor:"borderColor",style:{height:o,width:s,borderRadius:Z.md,borderWidth:"1px",borderStyle:"solid",...e.style},children:c.jsx("div",{})})),c.jsx("img",{alt:e.alt||"",className:e.className,decoding:"async",draggable:!1,height:e.height,loading:e.loading,onError:f=>{e.fallbackImage&&f.currentTarget.src!==e.fallbackImage?f.currentTarget.src=e.fallbackImage:n("fallback")},onLoad:()=>{n("loaded")},src:l||void 0,style:{height:d?e.height?`${e.height}px`:void 0:0,objectFit:"contain",opacity:d?1:0,transition:"opacity 0.4s ease",userSelect:"none",visibility:d?"visible":"hidden",width:d?e.width?`${e.width}px`:void 0:0,...e.style},width:e.width},l)]})};function si(e){const t=X(),[n,i]=w.useState(void 0),r=bt();return w.useEffect(()=>{async function s(){var u;const o=Ut,a=e.id;let l;if(a==="inApp"&&r&&(r.id==="inApp"||r.id==="smart")){const d=await Mx(o);l=d?{authProvider:d,uri:Vx(d)}:{authProvider:"wallet",uri:""}}else{const d=(u=Hi().find(f=>f.info.rdns===a))==null?void 0:u.info.icon;d?l={uri:d}:l={uri:await Sc(a,!0)}}i(l)}s()},[e.id,r]),(n==null?void 0:n.authProvider)==="email"?c.jsx(td,{color:t.colors.accentText,size:e.size}):(n==null?void 0:n.authProvider)==="phone"?c.jsx(nd,{color:t.colors.accentText,size:e.size}):(n==null?void 0:n.authProvider)==="passkey"?c.jsx(qs,{color:t.colors.accentText,size:e.size}):(n==null?void 0:n.authProvider)==="wallet"?c.jsx(Rs,{color:t.colors.accentText,size:e.size}):(n==null?void 0:n.authProvider)==="guest"?c.jsx(dm,{color:t.colors.accentText,size:e.size}):n!=null&&n.uri?c.jsx(Xe,{client:e.client,height:e.size,loading:"eager",src:n.uri,style:{borderRadius:Z.md,...e.style},width:e.size}):c.jsx(_A,{client:e.client,id:e.id,size:e.size})}function _A(e){const t=Bv(e.id);return t.isFetched&&!t.data?c.jsx(Xe,{client:e.client,height:e.size,src:Bx,width:e.size}):c.jsx(Rs,{size:e.size})}function id(e){const{termsOfServiceUrl:t,privacyPolicyUrl:n,locale:i,requireApproval:r}=e;if(!t&&!n&&!r)return null;const s=t&&n;return c.jsx(M,{center:"x",flex:"row",children:c.jsxs(P,{balance:!0,center:!0,inline:!0,multiline:!0,size:"xs",style:{maxWidth:"250px"},children:[r&&c.jsx("input",{checked:e.isApproved,disabled:!r,onChange:e.onApprove,style:{marginRight:z["3xs"],transform:"translateY(3px)"},type:"checkbox"}),i.prefix," ",t&&c.jsxs(Zr,{href:t,inline:!0,size:"xs",style:{whiteSpace:"nowrap"},target:"_blank",children:[" ",i.termsOfService," "]}),s&&`${i.and} `,n&&c.jsx(Zr,{href:n,inline:!0,size:"xs",target:"_blank",children:i.privacyPolicy}),!n&&!t&&c.jsx(P,{inline:!0,size:"xs",children:"Terms of Service and Privacy Policy"})]})})}function rd(e){return c.jsx(CA,{"data-error":e.error,children:c.jsx("div",{"data-container":!0,style:{alignItems:"center",display:"flex",justifyContent:"center",position:"relative"},children:c.jsxs("div",{"data-img-container":!0,children:[!e.hideSpinner&&c.jsx("svg",{role:"presentation",style:{display:e.error?"none":"block"},viewBox:"0 0 110 110",children:c.jsx("rect",{fill:"none",height:"106",rx:20,strokeDasharray:"132 261",strokeDashoffset:-388,strokeLinecap:"round",strokeWidth:4,width:"106",x:"2",y:"2"})}),c.jsx(bA,{children:c.jsx(si,{client:e.client,id:e.id,size:"68"})})]})})})}const bA=ke(()=>{const e=X();return{alignItems:"center",background:e.colors.tertiaryBg,border:`1px solid ${e.colors.borderColor}`,borderRadius:"13px",display:"flex",justifyContent:"center",padding:z.xs}}),MA=$t`
81
+ from {
82
+ stroke-dashoffset: 0px;
83
+ }
84
+ `,IA=$t`
85
+ 0% {
86
+ transform: translateX(0);
87
+ }
88
+ 25% {
89
+ transform: translateX(-5px);
90
+ }
91
+ 50% {
92
+ transform: translateX(5px);
93
+ }
94
+ 75% {
95
+ transform: translateX(-5px);
96
+ }
97
+ 100% {
98
+ transform: translateX(0);
99
+ }
100
+ `,EA=$t`
101
+ 0% {
102
+ transform: scale(0.95);
103
+ }
104
+ 100% {
105
+ opacity: 0;
106
+ transform: scale(1.3);
107
+ }
108
+ `,CA=ke(e=>{const t=X();return{"[data-img-container]":{alignItems:"center",display:"flex",justifyContent:"center",position:"relative"},"&[data-error='true'] [data-container]":{animation:`${IA} 0.25s linear`},"&[data-error='true'] [data-img-container]::before":{animation:`${EA} 1.5s ease infinite`,background:t.colors.danger,borderRadius:"20px",content:'""',inset:0,position:"absolute",zIndex:-1},borderRadius:Z.xl,display:"flex",img:{zIndex:100},justifyContent:"center",position:"relative",rect:{animation:`${MA} 1.2s linear infinite`,stroke:t.colors.accentText},svg:{animation:`${Gs} 400ms ease`,height:"calc(100% + 16px)",left:"-8px",position:"absolute",top:"-8px",width:"calc(100% + 16px)"}}}),Wx=e=>{const{onDone:t,modalSize:n,onClose:i,termsOfServiceUrl:r,privacyPolicyUrl:s,connectLocale:o}=e,a=bt(),l=Hu(),u=Tt(),d=W1(a,u,e.auth),[f,m]=w.useState(void 0),[y,p]=w.useState(f?"failed":"idle"),{disconnect:g}=Gu(),x=o.signatureScreen,_=w.useCallback(async()=>{try{m(void 0),p("signing"),await d.doLogin(),t==null||t()}catch(I){await Cx(1e3),m(I.message),p("failed")}},[t,d]);if(!a||d.isPending)return c.jsx(wt,{"data-testid":"loading-screen"});if(Ng(a.id)||a.id==="smart"&&l&&Ng(l.id))return c.jsx(LA,{connectLocale:o,error:f,signIn:_,status:y,wallet:a});const b=()=>{_()};return c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[c.jsx(M,{p:"lg",style:{paddingBottom:0},children:c.jsx(be,{title:x.instructionScreen.title})}),c.jsx(M,{center:"y",expand:!0,flex:"column",px:n==="compact"?"lg":"xxl",style:{paddingBottom:z.xl,paddingTop:0},children:y==="idle"?c.jsxs(c.Fragment,{children:[c.jsx(M,{animate:"fadein",center:"x",flex:"row",py:"3xl",children:c.jsx(jA,{children:c.jsx(si,{client:e.client,id:a.id,size:"80"})})}),c.jsx(P,{balance:!0,center:!0,multiline:!0,children:x.instructionScreen.instruction}),c.jsx($,{y:"lg"}),c.jsx(ae,{"data-testid":"sign-in-button",fullWidth:!0,onClick:_,style:{alignItems:"center",padding:z.md},variant:"accent",children:o.signatureScreen.instructionScreen.signInButton}),c.jsx($,{y:"sm"}),c.jsx(ae,{"data-testid":"disconnect-button",fullWidth:!0,onClick:()=>{i==null||i(),g(a)},style:{alignItems:"center",padding:z.md},variant:"secondary",children:o.signatureScreen.instructionScreen.disconnectWallet})]}):c.jsxs(c.Fragment,{children:[c.jsx(M,{py:"3xl",children:c.jsx(rd,{client:e.client,error:y==="failed",id:a.id})}),c.jsxs(M,{animate:"fadein",flex:"column",gap:"md",children:[c.jsxs(P,{center:!0,color:"primaryText",size:"lg",className:"tw-screen-title",children:[y==="failed"?f||x.signingScreen.failedToSignIn:x.signingScreen.inProgress," "]}),y==="signing"&&c.jsx(P,{balance:!0,center:!0,multiline:!0,className:"tw-screen-description",children:o.signatureScreen.signingScreen.prompt}),y==="failed"&&c.jsxs(M,{children:[c.jsx($,{y:"sm"}),c.jsxs(ae,{fullWidth:!0,onClick:b,style:{alignItems:"center",gap:z.xs,padding:z.md},variant:"accent",children:[c.jsx(Ac,{height:A.sm,width:A.sm}),x.signingScreen.tryAgain]}),c.jsx($,{y:"sm"}),c.jsx(ae,{fullWidth:!0,onClick:()=>{g(a)},style:{alignItems:"center",padding:z.md},variant:"secondary",children:x.instructionScreen.disconnectWallet})]})]},y)]})}),(r||s)&&c.jsx(M,{animate:"fadein",p:"md",children:c.jsx(id,{locale:o.agreement,privacyPolicyUrl:s,termsOfServiceUrl:r})})]})};function Ng(e){return e==="inApp"||e==="embedded"||e.startsWith("ecosystem")}function LA({signIn:e,error:t,status:n,connectLocale:i,wallet:r}){const s=i.signatureScreen,o=w.useRef(!1),{disconnect:a}=Gu();return w.useEffect(()=>{o.current||(o.current=!0,e())},[e]),c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,p:"lg",children:[c.jsx(be,{title:s.signingScreen.title}),c.jsxs(M,{center:"both",expand:!0,flex:"row",style:{minHeight:"250px"},children:[n==="signing"&&c.jsx($e,{color:"accentText",size:"xl"}),n==="failed"&&c.jsxs(M,{children:[c.jsx($,{y:"lg"}),c.jsx(P,{center:!0,color:"danger",size:"lg",children:t||s.signingScreen.failedToSignIn}),c.jsx($,{y:"lg"}),c.jsxs(ae,{fullWidth:!0,onClick:()=>{e()},style:{alignItems:"center",gap:z.xs,padding:z.md},variant:"accent",children:[c.jsx(Ac,{height:A.sm,width:A.sm}),s.signingScreen.tryAgain]}),c.jsx($,{y:"sm"}),c.jsx(ae,{"data-testid":"disconnect-button",fullWidth:!0,onClick:()=>{a(r)},style:{alignItems:"center",padding:z.md},variant:"secondary",children:s.instructionScreen.disconnectWallet})]})]})]})}const TA=$t`
109
+ 0% {
110
+ transform: scale(0.9);
111
+ }
112
+ 100% {
113
+ opacity: 0;
114
+ transform: scale(1.4);
115
+ }
116
+ `,jA=ke(e=>{const t=X();return{"&::before":{animation:`${TA} 2s cubic-bezier(0.175, 0.885, 0.32, 1.1) infinite`,background:t.colors.accentText,borderRadius:Z.xl,bottom:0,content:'""',display:"block",left:0,position:"absolute",right:0,top:0,zIndex:-1},position:"relative"}}),vA=e=>c.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 129 131",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M59.7178 0C62.7511 0 65.788 0 68.8212 0C71.4429 0.423181 74.1011 0.679982 76.6755 1.29848C103.785 7.78725 120.277 24.7723 126.755 51.5485C127.428 54.3335 127.712 57.2089 128.175 60.0446V69.8103C127.803 72.1722 127.472 74.5449 127.057 76.8995C122.582 102.298 103.177 122.722 77.9136 128.56C74.8003 129.28 71.6104 129.67 68.457 130.213H59.3537C57.3838 129.913 55.4065 129.663 53.4475 129.305C27.0442 124.491 6.91125 104.974 1.44197 78.8526C0.841148 75.9808 0.473373 73.0656 0 70.1684C0 66.9132 0 63.6579 0 60.4027C0.371416 58.0408 0.706418 55.6718 1.11425 53.3135C5.52026 28.0493 24.9905 7.50151 50.0902 1.70719C53.2618 0.97657 56.5062 0.560624 59.7178 0ZM96.8813 10.3119C96.8959 10.2865 96.9104 10.2576 96.9286 10.2323C96.8886 10.2504 96.8522 10.2648 96.8121 10.2829C96.8085 10.2287 96.8048 10.178 96.8012 10.1238C96.8303 10.1853 96.8558 10.2504 96.8849 10.3119H96.8813ZM25.1762 115.709C25.2089 115.716 25.2454 115.72 25.2781 115.727C25.249 115.749 25.2235 115.771 25.1944 115.792C25.2053 115.767 25.2162 115.742 25.2271 115.716C25.1252 115.525 25.0196 115.333 24.9176 115.141C22.7328 113.087 21.127 110.421 18.3305 109.014C18.2977 109.032 18.2613 109.05 18.2285 109.065C18.2758 109.058 18.3232 109.054 18.3705 109.047C18.4397 109.365 18.3997 109.795 18.5926 109.984C20.3587 111.687 22.1502 113.362 23.9745 115.004C24.1675 115.177 24.5972 115.083 24.9176 115.116C25.0014 115.311 25.0851 115.51 25.1725 115.706L25.1762 115.709ZM27.594 12.4567L27.2262 12.9197C27.1898 13.1439 27.1571 13.3682 27.1206 13.5924C26.8038 13.5924 26.4871 13.596 26.1703 13.5996C26.0683 13.813 25.9663 14.0264 25.8607 14.2362L25.7661 14.2652L25.8243 14.1856C25.9336 13.9686 26.0428 13.7479 26.1557 13.5309C26.4688 13.5418 26.7856 13.5526 27.0988 13.5671C27.1243 13.332 27.1498 13.0969 27.1753 12.8618C27.2954 12.7352 27.412 12.6122 27.5321 12.4856C27.543 12.511 27.554 12.5399 27.5649 12.5652C27.5758 12.529 27.5831 12.4893 27.594 12.4531V12.4567ZM106.589 111.926C106.738 111.868 106.891 111.806 107.041 111.749C107.616 111.354 108.286 111.043 108.756 110.548C110.281 108.924 111.771 107.26 113.205 105.553C113.919 104.703 114.483 103.726 115.113 102.808C113.981 103.448 112.849 104.084 111.716 104.725C111.669 104.753 111.632 104.811 111.6 104.862C110.088 107.166 108.577 109.474 107.07 111.778L106.556 111.958L106.625 112.06L106.589 111.926ZM79.6906 2.95141C79.6906 2.92971 79.6906 2.90801 79.6906 2.88631C79.6724 2.89716 79.6505 2.91163 79.6323 2.92248C79.8253 2.9478 80.0146 2.97311 80.2076 2.99843C80.0328 2.98397 79.8617 2.96588 79.6869 2.95141H79.6906ZM95.1662 8.90488C95.1116 8.90488 95.0533 8.89764 94.9987 8.90849C94.9732 8.91211 94.955 8.94828 94.9368 8.96998C95.0242 8.93381 95.1116 8.89764 95.199 8.86147C95.301 9.07125 95.3956 9.28827 95.5194 9.49082C95.5376 9.51975 95.6796 9.47273 95.7634 9.45827C95.5668 9.2738 95.3665 9.08934 95.1699 8.90126L95.1662 8.90488ZM86.7729 124.603C85.8772 124.921 84.9778 125.229 84.0893 125.565C83.94 125.623 83.8417 125.811 83.7215 125.941C83.8562 125.988 84.031 126.111 84.1184 126.068C85.0069 125.605 85.8808 125.117 86.7584 124.636C86.8021 124.621 86.8494 124.592 86.8895 124.596C86.9259 124.6 86.9623 124.643 86.9951 124.665C86.9186 124.643 86.8458 124.621 86.7693 124.603H86.7729ZM82.2431 4.35478L82.2941 4.31138V4.32223C82.5672 4.5935 82.793 5.00583 83.1207 5.11072C85.8189 5.99325 88.5317 6.82153 91.2445 7.6498C91.4193 7.70406 91.6341 7.64257 91.8271 7.63172C91.6596 7.46896 91.514 7.25917 91.3173 7.14705C88.4844 5.599 85.4912 4.56456 82.2395 4.35116L82.2431 4.35478ZM29.9609 10.9991C30.2995 11.0135 30.6928 11.1438 30.9732 11.0208C33.8389 9.75847 36.6937 8.46361 39.5376 7.15428C39.9054 6.98429 40.2331 6.70217 40.5244 6.41643C40.7319 6.21388 40.8412 5.91729 40.9941 5.66049C40.6664 5.68943 40.2913 5.62432 40.0219 5.76177C36.6573 7.49066 33.3109 9.2521 29.9609 11.0027C29.9864 11.0461 30.0119 11.0895 30.041 11.1293C30.0701 11.1655 30.1102 11.1944 30.1466 11.2233L29.9609 10.9991ZM8.93219 95.5918C8.89213 95.628 8.84844 95.6677 8.80838 95.7039C8.85208 95.6641 8.89942 95.6243 8.94311 95.5845C8.99773 96.0801 8.91398 96.6443 9.12882 97.0566C11.7397 102.034 14.7984 106.641 19.9509 109.43C19.9436 109.437 19.9363 109.445 19.9327 109.455C19.7579 108.913 19.6413 108.345 19.401 107.828C18.4943 105.875 17.6204 103.903 16.5899 102.015C16.1347 101.18 15.4283 100.417 14.6746 99.82C12.8102 98.3479 10.8512 96.9915 8.93219 95.5918ZM23.0533 112.295C23.097 112.248 23.1407 112.201 23.1844 112.15C23.1443 112.19 23.1006 112.23 23.0606 112.269C23.279 112.472 23.5449 112.646 23.7087 112.888C27.1206 117.861 32.1275 120.35 37.7861 121.818C38.1648 121.916 38.5763 121.887 38.9732 121.919C38.813 121.608 38.6709 121.283 38.4925 120.983C37.7861 119.789 37.1525 118.541 36.3259 117.434C35.8344 116.776 35.1206 116.125 34.3669 115.843C31.1917 114.657 27.9691 113.597 24.7501 112.53C24.2149 112.353 23.6177 112.367 23.0496 112.291L23.0533 112.295ZM69.8298 86.3252C73.0378 86.3252 75.4666 86.2927 77.8917 86.3397C78.9514 86.3614 79.4029 86.025 79.4284 84.9074C79.5049 81.4134 79.6432 77.9195 79.818 74.4291C79.8763 73.25 79.4757 72.9353 78.2777 72.8919C71.4903 72.6605 64.7065 72.353 57.9227 71.9986C56.8048 71.9407 56.2804 72.1107 56.204 73.3477C55.9855 76.8344 55.7015 80.3211 55.341 83.797C55.2135 85.0267 55.665 85.3595 56.8048 85.4282C61.4074 85.7067 66.0028 86.0539 69.8262 86.3216L69.8298 86.3252ZM69.9245 72.2192C72.2076 72.2192 74.9969 72.1505 77.7789 72.2481C79.2937 72.3024 79.9527 71.9371 79.869 70.2697C79.7015 66.9638 79.6796 63.6507 79.7088 60.3412C79.7197 58.8836 79.2536 58.4315 77.7315 58.3881C71.6177 58.2217 65.5076 57.9251 59.4011 57.5779C58.1994 57.5092 57.828 57.8274 57.7224 58.9776C57.3838 62.6307 56.9832 66.2838 56.528 69.9261C56.3897 71.0401 56.8776 71.2571 57.8171 71.3222C61.6842 71.5862 65.5513 71.8937 69.9281 72.2228L69.9245 72.2192ZM55.3956 74.3749C55.4247 74.0892 55.432 73.5394 55.5412 73.0149C55.7415 72.0564 55.2936 71.7852 54.4088 71.6333C47.8471 70.5048 41.2927 69.3401 34.742 68.1429C33.9481 67.9982 33.4748 68.0019 33.3655 68.9459C32.9249 72.6496 32.4115 76.3461 32.0401 80.0571C32 80.473 32.6118 81.2905 33.0269 81.3664C39.7488 82.6396 46.4852 83.8151 53.2181 85.0267C54.2267 85.2076 54.6091 84.8531 54.671 83.8115C54.853 80.7479 55.1334 77.688 55.3956 74.3749ZM54.143 71.2065C55.4757 71.3511 55.7634 70.7073 55.8726 69.5788C56.2222 65.9294 56.6264 62.2835 57.0888 58.6449C57.2272 57.5489 56.7429 57.3645 55.8253 57.2089C49.8644 56.1926 43.9108 55.1437 37.9718 54.0297C37.0178 53.8488 36.6464 54.0731 36.4461 54.9484C35.6122 58.5798 34.7638 62.2075 33.9008 65.8317C33.6823 66.754 33.8753 67.2966 34.9131 67.4955C41.3255 68.7144 47.7342 69.9659 54.1466 71.2101L54.143 71.2065ZM68.519 99.3606C71.5449 99.3606 73.97 99.3172 76.3915 99.3787C77.564 99.4077 78.1612 99.0894 78.2595 97.8198C78.5035 94.702 78.8203 91.5879 79.1808 88.4809C79.3119 87.3524 78.9514 87.0558 77.8262 87.0161C70.8093 86.7629 63.7925 86.4554 56.7793 86.0901C55.6286 86.0286 55.1334 86.2565 55.0897 87.4646C54.9805 90.5896 54.813 93.7146 54.5981 96.836C54.518 97.9753 54.8676 98.4094 56.0656 98.4781C60.417 98.7277 64.7611 99.0857 68.5153 99.3606H68.519ZM80.5244 79.623H80.4261C80.3278 81.3664 80.2659 83.1134 80.1202 84.8531C80.0365 85.8442 80.3023 86.318 81.3947 86.2095C87.7816 85.5621 94.1721 84.9616 100.555 84.2636C101.007 84.2129 101.728 83.4968 101.739 83.0772C101.826 79.3482 101.779 75.6155 101.772 71.8864C101.772 71.1486 101.488 70.852 100.654 70.9388C94.3287 71.5935 88.0001 72.2083 81.6678 72.8015C80.8339 72.8811 80.4989 73.1849 80.5171 74.0277C80.5572 75.894 80.5281 77.7603 80.5281 79.6267L80.5244 79.623ZM80.3788 65.1156C80.437 65.1156 80.4953 65.1156 80.5536 65.1156C80.5536 66.9819 80.5936 68.8518 80.5353 70.7182C80.5062 71.6911 80.7393 72.2011 81.8389 72.089C88.0474 71.4633 94.2559 70.852 100.468 70.2624C101.418 70.172 101.699 69.7271 101.579 68.8374C101.058 65.0794 100.559 61.3178 100.057 57.5598C99.9473 56.7424 99.5795 56.5217 98.7056 56.6158C93.0433 57.2234 87.3738 57.7768 81.7006 58.2868C80.7138 58.3772 80.3096 58.6557 80.3533 59.6938C80.4297 61.4986 80.3751 63.3071 80.3751 65.1119L80.3788 65.1156ZM54.1393 91.8881C54.1393 91.8881 54.1466 91.8881 54.1503 91.8881C54.2413 90.2677 54.2959 88.6401 54.4416 87.0233C54.518 86.1805 54.2304 85.8767 53.3892 85.7357C46.6527 84.5819 39.9199 83.4027 33.198 82.173C32.1675 81.9849 31.7342 82.173 31.7379 83.2581C31.7451 86.5639 31.6687 89.8734 31.7379 93.1793C31.7488 93.6386 32.3496 94.4054 32.7829 94.485C39.3774 95.7365 45.99 96.8939 52.599 98.0802C53.5385 98.2502 53.9026 97.8777 53.9136 96.93C53.9391 95.2482 54.0592 93.5663 54.1393 91.8844V91.8881ZM70.1758 44.2893C66.5199 44.018 63.8508 43.8878 61.2035 43.5912C60.0929 43.4682 59.7106 43.7395 59.5831 44.8391C59.1717 48.3656 58.7019 51.8884 58.1594 55.3969C57.9773 56.5724 58.4033 56.8653 59.4702 56.9087C65.6423 57.1619 71.8144 57.4404 77.9864 57.7406C79.2063 57.8021 79.5631 57.3211 79.4612 56.1492C79.1516 52.6118 78.8822 49.0709 78.6819 45.5263C78.62 44.4412 78.1102 44.264 77.1817 44.2784C74.5162 44.3182 71.8508 44.2929 70.1758 44.2929V44.2893ZM82.6983 99.3715C87.9782 98.7168 93.2582 98.0513 98.5417 97.4147C99.4084 97.3098 100.006 97.0747 100.14 96.0728C100.585 92.7995 101.091 89.5334 101.579 86.2637C101.728 85.2655 101.458 84.9182 100.319 85.0412C94.0665 85.714 87.8107 86.3397 81.544 86.8678C80.2695 86.9763 79.9163 87.4428 79.8471 88.593C79.7088 90.8717 79.5085 93.1504 79.2427 95.4182C78.7912 99.2919 78.762 99.2883 82.6983 99.3715ZM58.9495 44.0035C58.9714 43.4682 58.9714 43.4755 57.6423 43.2368C52.6427 42.3398 47.6396 41.4681 42.6509 40.5168C41.6823 40.3324 41.2308 40.553 40.9213 41.4789C39.7633 44.9584 38.5617 48.4234 37.3309 51.8776C37.0105 52.7782 37.1999 53.2159 38.1539 53.3822C44.1694 54.4311 50.1776 55.5162 56.204 56.5109C56.5499 56.5688 57.3146 56.019 57.3692 55.6754C57.9372 51.9318 58.4033 48.1739 58.9532 44.0035H58.9495ZM83.798 57.7225C88.5499 57.1619 93.3019 56.6122 98.0538 56.0371C98.8767 55.9358 99.8308 55.9539 99.4484 54.5903C98.4289 50.9372 97.4603 47.2696 96.488 43.6057C96.2732 42.7919 95.8071 42.6472 95.0097 42.734C90.2541 43.2476 85.4948 43.7504 80.7283 44.1518C79.6177 44.2459 79.2572 44.5497 79.3738 45.6637C79.6651 48.4777 79.8981 51.2989 80.0693 54.1237C80.2841 57.6647 80.2477 57.6683 83.798 57.7189V57.7225ZM32.6154 68.0344C32.437 67.9259 31.9673 67.5244 31.4283 67.3255C26.538 65.546 21.6222 63.8279 16.7392 62.0231C15.8835 61.7084 15.421 61.571 15.2535 62.6669C14.711 66.2404 14.092 69.7995 13.5895 73.3766C13.5239 73.8396 13.8443 74.7004 14.1939 74.8306C19.5175 76.8344 24.8667 78.7622 30.2376 80.643C30.467 80.7226 31.188 80.2162 31.2244 79.9233C31.7124 76.1617 32.1202 72.3856 32.6154 68.0308V68.0344ZM32.6919 66.8951C32.8485 66.5189 33.0851 66.1174 33.1907 65.687C34.0574 62.0629 34.8439 58.417 35.7797 54.8073C36.0565 53.7403 35.6705 53.5052 34.7893 53.1978C30.2813 51.6389 25.777 50.0547 21.3164 48.3692C20.3223 47.993 19.9181 48.116 19.594 49.0781C18.4324 52.554 17.249 56.0262 16.0364 59.4876C15.6759 60.5148 16.0328 61.0465 17.005 61.3901C21.9026 63.1226 26.7893 64.8768 31.6832 66.6202C31.909 66.6998 32.1493 66.7468 32.6955 66.8915L32.6919 66.8951ZM67.1207 110.645C69.8116 110.645 72.2404 110.598 74.6619 110.667C75.7324 110.696 76.1767 110.298 76.3405 109.282C76.7738 106.605 77.2363 103.936 77.7679 101.278C77.9828 100.207 77.5203 100.098 76.6282 100.062C69.7242 99.7874 62.8239 99.4836 55.9236 99.1364C54.9259 99.0857 54.5035 99.2774 54.5071 100.359C54.5144 102.949 54.467 105.538 54.3287 108.124C54.2595 109.383 54.7292 109.817 55.9527 109.886C59.7652 110.099 63.574 110.396 67.1207 110.642V110.645ZM53.615 104.106C53.6769 104.106 53.7351 104.106 53.797 104.106C53.797 102.844 53.7351 101.578 53.8153 100.319C53.8772 99.3642 53.6113 98.9483 52.5918 98.7783C46.0264 97.6679 39.472 96.5141 32.9249 95.306C31.8871 95.1143 31.7706 95.4471 31.8835 96.2935C32.2658 99.093 32.6518 101.892 32.9759 104.699C33.0924 105.712 33.6059 106.15 34.5672 106.32C40.4698 107.358 46.3651 108.407 52.2604 109.488C53.3637 109.691 53.655 109.257 53.6223 108.258C53.5786 106.877 53.6113 105.491 53.6113 104.106H53.615ZM30.9586 87.8552C30.9805 87.8552 31.0059 87.8552 31.0278 87.8552C31.0278 86.2927 30.9513 84.7229 31.0533 83.164C31.1225 82.0717 30.7583 81.6304 29.6951 81.2688C24.6627 79.5543 19.6596 77.7495 14.6746 75.9085C13.7351 75.5612 13.3309 75.5793 13.3673 76.6716C13.4766 80.0354 13.5166 83.4027 13.7169 86.7629C13.7497 87.3199 14.3359 88.1337 14.8566 88.329C19.8307 90.2026 24.8448 91.964 29.8444 93.7761C30.7474 94.1052 31.0096 93.8267 30.9768 92.908C30.9186 91.2262 30.9622 89.5407 30.9622 87.8552H30.9586ZM40.6009 40.2564C40.1785 40.0719 39.7524 39.8622 39.3118 39.703C35.554 38.343 31.7706 37.0518 28.0492 35.5978C27.0587 35.2108 26.6436 35.417 26.2103 36.2308C24.477 39.4752 22.7547 42.7268 20.9595 45.935C20.3769 46.9803 20.701 47.4396 21.7023 47.7941C26.152 49.3674 30.6054 50.9372 35.0369 52.5684C36.0783 52.9518 36.3915 52.5467 36.6901 51.6497C37.848 48.1594 39.0715 44.6944 40.2695 41.2185C40.3496 40.9906 40.4261 40.7628 40.6045 40.26L40.6009 40.2564ZM117.997 64.3632C117.018 60.4172 116.082 56.5688 115.062 52.742C115.004 52.5214 114.236 52.2791 113.897 52.3767C109.786 53.5776 105.69 54.8218 101.611 56.1275C101.233 56.2505 100.734 56.9124 100.774 57.2704C101.225 61.1478 101.753 65.0179 102.332 68.8772C102.383 69.2063 103.039 69.7633 103.257 69.6982C107.882 68.331 112.488 66.9023 117.083 65.4302C117.422 65.3217 117.63 64.8045 117.994 64.3632H117.997ZM81.0087 110.443C81.016 110.501 81.0269 110.555 81.0342 110.613C85.666 110.034 90.3014 109.484 94.9222 108.848C95.4903 108.768 96.3205 108.367 96.4807 107.918C97.5513 104.978 98.4762 101.983 99.4339 99.0025C99.6523 98.3262 99.4776 98.0296 98.651 98.1164C92.3187 98.7602 85.9828 99.3425 79.6541 100.015C79.2463 100.059 78.6601 100.641 78.5654 101.061C78.1539 102.88 77.8808 104.732 77.5859 106.576C77.3783 107.86 77.2181 109.155 77.036 110.443H81.0051H81.0087ZM102.518 77.131C102.518 77.131 102.529 77.131 102.533 77.131C102.533 78.9973 102.54 80.86 102.529 82.7264C102.525 83.3485 102.423 84.0827 103.414 83.7789C108.148 82.3249 112.878 80.8528 117.582 79.3156C117.946 79.1962 118.354 78.5126 118.351 78.0967C118.311 74.4291 118.172 70.7652 118.081 67.0976C118.059 66.2259 117.852 66.0053 116.89 66.3164C112.524 67.7306 108.133 69.0797 103.72 70.3456C102.682 70.6422 102.402 71.022 102.485 72.0745C102.616 73.7492 102.522 75.4419 102.522 77.1237L102.518 77.131ZM70.8895 43.5767C73.1871 43.5767 75.1243 43.537 77.0579 43.5912C78.1102 43.6201 78.4634 43.2512 78.3105 42.2168C77.8226 38.9471 77.3565 35.6774 76.9414 32.3968C76.8285 31.4962 76.4607 31.2069 75.554 31.1815C71.4429 31.0658 67.3319 30.9103 63.2245 30.6933C62.2559 30.6426 61.7861 30.8849 61.6368 31.8651C61.1562 35.0119 60.661 38.1586 60.0893 41.2945C59.8671 42.5134 60.3187 42.8968 61.4657 42.9583C64.7283 43.1391 67.9837 43.3814 70.8858 43.5731L70.8895 43.5767ZM58.3596 42.857C58.7056 42.3723 59.2372 41.9491 59.3319 41.4428C59.9181 38.2454 60.3587 35.0191 60.9559 31.8217C61.1489 30.7873 60.9122 30.4871 59.8781 30.3207C56.051 29.7058 52.2349 29.0078 48.4297 28.2771C47.5048 28.0999 46.9659 28.2771 46.5617 29.1524C45.1489 32.216 43.696 35.2614 42.2212 38.2996C41.7879 39.1894 41.7916 39.6958 42.9532 39.9092C47.9563 40.8351 52.9486 41.8153 58.356 42.857H58.3596ZM101.029 55.8743C105.457 54.3841 109.691 52.9808 113.894 51.4906C114.156 51.3965 114.414 50.5466 114.276 50.2102C112.779 46.6041 111.224 43.0197 109.611 39.4643C109.484 39.1858 108.745 38.9362 108.395 39.0375C104.863 40.0647 101.342 41.1462 97.8426 42.2819C97.5295 42.3832 97.118 43.027 97.1872 43.3091C98.1375 47.096 99.1535 50.8649 100.191 54.6301C100.29 54.9918 100.628 55.2884 101.025 55.8671L101.029 55.8743ZM82.5089 43.5731C86.4816 43.0993 90.4507 42.6183 94.4234 42.1625C95.4648 42.0432 95.9746 41.7611 95.4502 40.5783C94.0374 37.3846 92.7484 34.1329 91.2918 30.9573C91.0843 30.5016 90.1922 30.0603 89.6532 30.1001C86.0301 30.3713 82.4179 30.8235 78.7948 31.1056C77.6951 31.1888 77.4985 31.5432 77.666 32.5451C78.0993 35.1602 78.4379 37.7897 78.8094 40.4119C79.1055 42.5098 80.3375 43.5635 82.5053 43.5731H82.5089ZM118.245 81.8981C117.735 81.3881 119.017 79.8762 117.357 80.3283C112.692 81.6015 108.082 83.0772 103.479 84.5529C103.006 84.7048 102.442 85.345 102.361 85.8297C101.812 89.1537 101.397 92.4993 100.89 95.8305C100.745 96.7818 101.04 97.0675 101.946 96.7854C106.276 95.4399 110.624 94.1486 114.91 92.6838C115.583 92.4523 116.268 91.4866 116.446 90.7451C117.153 87.8226 117.662 84.8531 118.245 81.8981ZM32.1857 105.224C31.7925 101.784 31.4866 98.7313 31.0533 95.6967C30.9914 95.2699 30.3906 94.749 29.9281 94.579C24.9868 92.7778 20.0128 91.0706 15.0751 89.2622C14.0519 88.886 13.8844 89.1247 14.1102 90.0507C14.8494 93.0853 15.574 96.1271 16.3569 99.1545C16.4661 99.5704 16.8157 100.106 17.1834 100.243C21.9317 102.034 26.7019 103.77 31.4793 105.48C31.716 105.564 32.0911 105.26 32.1821 105.224H32.1857ZM65.8244 119.662C67.8854 119.662 69.9464 119.626 72.0037 119.681C72.9832 119.706 73.6023 119.449 73.8717 118.433C74.3815 116.516 74.9313 114.606 75.5358 112.714C75.8599 111.691 75.6341 111.376 74.5126 111.34C68.2786 111.134 62.0447 110.902 55.8143 110.551C54.4743 110.475 54.2704 110.924 54.3432 112.038C54.4634 113.839 54.5435 115.644 54.5472 117.449C54.5472 118.512 54.955 118.928 56.0292 118.99C59.2955 119.171 62.5544 119.435 65.8244 119.666V119.662ZM40.7174 39.2871C40.914 39.023 41.2672 38.6794 41.4639 38.2671C42.9495 35.171 44.3769 32.0496 45.8881 28.968C46.3068 28.1144 46.2558 27.778 45.2727 27.4525C42.3451 26.4831 39.4757 25.351 36.5481 24.3817C36.0783 24.2262 35.1971 24.3926 34.9131 24.7362C32.579 27.5755 30.3505 30.5052 28.0601 33.3842C27.361 34.2632 27.5977 34.737 28.5772 35.0842C32.3387 36.4116 36.0965 37.7571 39.858 39.0954C40.0292 39.1569 40.2112 39.1749 40.7137 39.2871H40.7174ZM53.757 114.577C53.6732 113.26 54.0774 111.492 53.3783 110.75C52.6209 109.947 50.833 110.103 49.493 109.839C49.3146 109.803 49.1361 109.781 48.9577 109.745C44.3259 108.877 39.6796 108.067 35.066 107.112C33.5658 106.801 33.391 107.199 33.828 108.468C34.4943 110.399 35.1243 112.342 35.7215 114.291C36.0201 115.271 36.6282 115.738 37.6368 115.923C41.6787 116.657 45.6987 117.532 49.7552 118.194C53.8881 118.867 53.9026 118.784 53.757 114.573V114.577ZM10.4215 40.8894C10.163 41.3017 9.90442 41.6128 9.75513 41.9672C8.40055 45.1863 7.09696 48.4234 5.71325 51.6316C5.2508 52.7023 5.49113 53.5305 6.34684 54.1816C8.84116 56.0732 11.3755 57.9215 13.888 59.7878C14.8603 60.5076 15.1297 60.0446 15.4392 59.0825C16.5644 55.5886 17.7369 52.1018 19.026 48.6658C19.4047 47.6566 19.0587 47.3709 18.3123 46.8537C15.8908 45.1682 13.5494 43.3634 11.1825 41.5983C10.9458 41.4211 10.7492 41.1968 10.4215 40.8894ZM97.2272 41.9564C100.996 40.6977 104.605 39.5041 108.188 38.2454C108.37 38.1803 108.534 37.3882 108.373 37.1458C106.229 33.8725 104.047 30.6245 101.804 27.4199C101.604 27.1306 100.861 26.9859 100.468 27.1016C97.8572 27.8503 95.2755 28.7112 92.6719 29.4816C91.9618 29.6914 91.6487 29.8433 92.0128 30.6824C93.4803 34.0425 94.8603 37.4424 96.3023 40.817C96.4589 41.1823 96.8157 41.4645 97.2272 41.96V41.9564ZM14.5872 61.3503C14.4961 61.2635 14.1102 60.8331 13.655 60.4931C11.0879 58.5942 8.4661 56.7604 5.94265 54.8001C5.22531 54.2394 4.90852 53.9718 4.71917 55.0677C4.11106 58.5653 3.46655 62.0592 2.93491 65.5677C2.85116 66.1247 3.10242 66.9927 3.51753 67.3255C6.24124 69.5065 9.04507 71.5899 11.8416 73.6804C12.4752 74.1543 12.7519 73.883 12.8575 73.1343C13.3855 69.3763 13.9536 65.6255 14.5872 61.3431V61.3503ZM26.1703 34.8817C25.868 34.661 25.584 34.4621 25.3073 34.2523C23.2353 32.7006 21.1197 31.2069 19.1206 29.5684C18.4288 29.0005 18.1411 29.1488 17.7369 29.7348C15.5885 32.8598 13.4511 35.9957 11.2808 39.1026C10.7346 39.8839 10.9641 40.477 11.6013 40.9653C13.8953 42.7195 16.2185 44.434 18.5198 46.1773C19.4447 46.8754 19.878 46.5933 20.3842 45.595C22.0446 42.3217 23.8289 39.1135 25.5694 35.8799C25.7406 35.5616 25.9372 35.2614 26.1666 34.878L26.1703 34.8817ZM77.6332 119.492C79.7488 119.308 81.8644 119.156 83.9764 118.935C91.5431 118.147 91.7106 118.02 95.0643 111.21C95.1189 111.101 95.1844 110.996 95.2208 110.884C95.3483 110.494 95.4648 110.099 95.585 109.709C95.1699 109.705 94.7511 109.662 94.3396 109.705C89.6387 110.182 84.9414 110.732 80.2331 111.137C76.6865 111.445 76.6828 111.362 75.7106 114.859C75.5649 115.38 75.4193 115.904 75.2627 116.422C74.6194 118.541 75.4096 119.565 77.6332 119.492ZM97.7625 108.812C102.398 107.17 106.669 105.665 110.926 104.131C111.17 104.045 111.396 103.733 111.509 103.477C112.834 100.446 114.141 97.4039 115.427 94.3584C115.529 94.1161 115.448 93.8014 115.452 93.5193C115.172 93.5772 114.884 93.6169 114.611 93.6965C110.267 94.995 105.919 96.279 101.59 97.6281C101.102 97.78 100.493 98.2177 100.341 98.6626C99.3246 101.621 98.4143 104.616 97.4967 107.607C97.4275 107.828 97.5986 108.121 97.7625 108.819V108.812ZM70.5399 30.5052C72.3205 30.5052 73.8353 30.4726 75.3501 30.516C76.3587 30.545 76.6173 30.1326 76.4061 29.2067C75.7834 26.447 75.2445 23.6692 74.5454 20.9312C74.4361 20.4971 73.6933 19.9618 73.2053 19.9257C70.5508 19.7195 67.8817 19.6869 65.2235 19.5206C64.3788 19.4663 64.0219 19.7448 63.869 20.5405C63.3592 23.199 62.8348 25.8574 62.2668 28.505C62.0228 29.6335 62.4379 30.0024 63.5485 30.0494C65.9664 30.1543 68.3842 30.3605 70.5363 30.5052H70.5399ZM60.4862 29.9011C60.8103 29.525 61.371 29.1633 61.4766 28.7003C62.1029 25.937 62.5981 23.1483 63.1917 20.3814C63.3665 19.5712 63.0897 19.3252 62.3287 19.2023C59.8162 18.7936 57.3219 18.28 54.8057 17.911C54.3323 17.8423 53.564 18.0846 53.32 18.4463C51.5176 21.0867 49.828 23.7994 48.0729 26.4723C47.534 27.2933 47.9636 27.4923 48.681 27.6297C52.4898 28.3567 56.295 29.0946 60.4862 29.9011ZM80.2841 30.3677C80.2877 30.4075 80.295 30.4473 80.2987 30.4835C83.2955 30.1182 86.2923 29.7348 89.2928 29.3984C90.2286 29.2935 90.4361 28.9607 89.93 28.1469C88.2186 25.3908 86.5727 22.5913 84.7848 19.8859C84.4898 19.4374 83.5904 19.148 82.9932 19.1806C80.7648 19.3035 78.5472 19.6508 76.3187 19.7846C75.2736 19.8461 75.1498 20.215 75.3647 21.112C75.9109 23.3871 76.366 25.6838 76.8831 27.9661C77.5167 30.762 76.7993 30.4509 79.9236 30.3822C80.0438 30.3822 80.1639 30.3713 80.2841 30.3677ZM12.5553 81.0915C12.5954 81.0915 12.6318 81.0915 12.6718 81.0915C12.6718 79.4639 12.6136 77.8363 12.6937 76.2123C12.741 75.2972 12.3805 74.8668 11.6377 74.364C8.98681 72.5809 6.42331 70.6712 3.8234 68.8084C3.53938 68.6059 3.25171 68.4033 2.96404 68.2008C2.86209 68.5914 2.65453 68.9857 2.67638 69.3691C2.85845 72.6749 3.05508 75.9772 3.31361 79.2794C3.35367 79.775 3.6122 80.4007 3.98362 80.7009C6.61266 82.8023 9.29268 84.8495 11.9763 86.8822C12.6172 87.3669 12.9413 87.1571 12.8794 86.3216C12.7447 84.5782 12.6573 82.8349 12.5517 81.0915H12.5553ZM28.7774 19.0395C28.457 19.2529 28.1293 19.4121 27.878 19.6508C25.1216 22.2622 22.3796 24.8953 19.6231 27.5031C18.9859 28.1035 19.0332 28.6642 19.6814 29.1488C21.6987 30.6679 23.716 32.1907 25.8025 33.6157C26.0829 33.8074 26.9604 33.6049 27.208 33.3011C29.5931 30.3496 31.8835 27.3259 34.2504 24.3564C34.7711 23.7053 34.6728 23.4594 34.0064 23C32.4188 21.9113 30.9222 20.6961 29.3892 19.5278C29.2035 19.3867 29.0287 19.2348 28.7811 19.0359L28.7774 19.0395ZM126.128 57.5272C125.076 53.9971 123.962 50.25 122.808 46.5173C122.786 46.4414 122.159 46.4016 121.977 46.5426C120.098 48.0364 118.223 49.5411 116.421 51.1217C116.071 51.4291 115.783 52.1308 115.874 52.5648C116.65 56.2758 117.502 59.9687 118.402 63.6543C118.471 63.9328 119.203 64.3488 119.381 64.2547C121.799 62.9454 123.995 61.354 125.499 58.9921C125.717 58.6485 125.83 58.2362 126.132 57.5309L126.128 57.5272ZM122.083 44.745C122.028 44.5388 122.017 44.4086 121.963 44.3074C120.091 40.8062 118.223 37.305 116.311 33.8255C116.253 33.7206 115.634 33.7604 115.43 33.9232C113.835 35.1963 112.259 36.4912 110.737 37.8475C110.449 38.1043 110.194 38.759 110.321 39.0664C111.825 42.6761 113.391 46.2605 115.001 49.8232C115.139 50.127 115.929 50.4959 116.057 50.3947C117.965 48.8575 119.822 47.2552 121.661 45.6312C121.905 45.4178 121.966 45.0018 122.087 44.745H122.083ZM17.4238 101.245C17.4529 101.668 17.3874 101.994 17.5075 102.225C18.8038 104.735 20.1002 107.246 21.4657 109.72C21.706 110.157 22.1939 110.573 22.6637 110.75C26.4434 112.193 30.2449 113.586 34.0465 114.964C34.3487 115.073 34.731 114.968 35.077 114.964C34.9932 114.624 34.924 114.277 34.8221 113.94C34.203 111.929 33.4966 109.944 32.9795 107.907C32.721 106.895 32.2404 106.475 31.2499 106.146C27.0041 104.743 22.8057 103.213 18.589 101.722C18.305 101.621 18.0282 101.491 17.4238 101.241V101.245ZM45.7096 14.9271C45.6878 14.9379 45.4402 14.9922 45.2763 15.1405C42.4288 17.6542 39.5849 20.1716 36.7593 22.7035C36.0492 23.34 36.6464 23.6294 37.1707 23.8175C40.0692 24.8628 42.9641 25.9081 45.8881 26.8738C46.2522 26.9931 46.9987 26.7653 47.2026 26.4578C49.0051 23.756 50.7383 21.0035 52.4534 18.2402C52.5918 18.0159 52.5153 17.3613 52.3842 17.3142C50.2395 16.504 48.0692 15.7553 45.7133 14.9271H45.7096ZM119.254 73.0873C119.214 73.0873 119.177 73.0909 119.137 73.0945C119.137 74.5376 119.174 75.9844 119.123 77.4276C119.093 78.3354 119.447 78.5995 120.135 78.0352C122.079 76.4402 124.024 74.8306 125.848 73.1017C126.354 72.6243 126.671 71.6984 126.664 70.9822C126.635 67.557 126.467 64.1317 126.329 60.7065C126.318 60.4461 126.132 60.1893 126.03 59.9325C125.808 60.1025 125.579 60.2689 125.36 60.4461C123.481 61.9435 121.653 63.5133 119.698 64.9058C118.951 65.4375 118.653 65.8896 118.747 66.7902C118.973 68.8844 119.09 70.9858 119.254 73.0873ZM91.0807 29.3948C94.5945 28.241 97.2891 27.3765 99.9582 26.4289C100.118 26.371 100.235 25.474 100.049 25.2787C97.4603 22.5949 94.8312 19.9474 92.1548 17.3504C91.8599 17.0647 91.1608 16.9706 90.7311 17.0828C89.158 17.4915 87.6287 18.0666 86.0592 18.5006C85.229 18.7285 85.1489 19.0106 85.5932 19.7231C87.3446 22.5262 89.0561 25.3547 90.742 28.194C90.9823 28.6027 91.0115 29.1344 91.0843 29.3948H91.0807ZM115.401 32.5053C115.139 32.093 114.931 31.6626 114.629 31.3081C112.452 28.7401 110.216 26.2191 108.086 23.6113C107.103 22.4105 106.487 22.4503 105.548 23.6836C104.914 24.5155 103.942 25.1376 103.024 25.6983C102.219 26.1902 102.092 26.5121 102.667 27.3367C104.801 30.3894 106.869 33.4891 108.898 36.6142C109.378 37.3556 109.775 37.7282 110.554 37.0844C111.938 35.9378 113.333 34.8021 114.684 33.6193C114.986 33.3553 115.139 32.9249 115.401 32.5089V32.5053ZM63.7197 125.876C64.5317 125.876 65.5003 125.869 66.4689 125.876C70.8021 125.916 70.762 125.902 72.5317 121.858C73.0633 120.639 72.8558 120.364 71.5267 120.339C67.2845 120.266 63.046 120.093 58.8075 119.905C54.0155 119.691 54.5472 118.44 55.1807 123.967C55.29 124.932 55.7306 125.316 56.6628 125.374C58.9605 125.515 61.2581 125.695 63.716 125.873L63.7197 125.876ZM110.263 105.679C109.87 105.679 109.575 105.614 109.32 105.69C105.438 106.819 101.56 107.944 97.6969 109.134C97.1981 109.289 96.6665 109.723 96.397 110.172C95.1444 112.291 93.9719 114.458 92.7848 116.617C92.6501 116.863 92.5882 117.149 92.4935 117.416C92.7848 117.416 93.0943 117.492 93.3601 117.409C96.6373 116.375 99.9145 115.337 103.174 114.248C103.661 114.085 104.157 113.723 104.477 113.322C106.269 111.061 108.006 108.757 109.761 106.464C109.906 106.276 110.023 106.063 110.267 105.679H110.263ZM37.3018 116.834C37.2909 116.935 37.1307 117.301 37.2508 117.492C38.2085 119.019 39.1807 120.541 40.2331 122.003C40.5207 122.4 41.0742 122.748 41.5622 122.842C45.5385 123.609 49.5258 124.328 53.5203 124.99C53.8007 125.037 54.4671 124.498 54.4561 124.256C54.3979 122.939 54.2486 121.616 53.9755 120.324C53.8954 119.945 53.3528 119.449 52.9559 119.384C47.8908 118.519 42.8111 117.72 37.3018 116.834ZM3.87074 82.8421C4.34411 84.5348 4.95221 86.3108 5.32363 88.1337C6.3869 93.3601 10.0319 96.3622 14.3905 98.7855C14.6746 98.9411 15.0278 98.97 15.3519 99.0568C15.3227 98.7711 15.3191 98.4781 15.2572 98.1996C14.5981 95.2626 13.9536 92.3257 13.2399 89.4032C13.1124 88.8824 12.7847 88.2892 12.3623 87.9818C9.78062 86.0974 7.14794 84.2817 4.52982 82.4515C4.36232 82.3321 4.14384 82.2851 3.9472 82.2055C3.929 82.3755 3.90715 82.5455 3.87074 82.8493V82.8421ZM44.7301 14.5147C44.6209 14.3267 44.5881 14.2001 44.508 14.135C43.361 13.256 42.2285 12.3554 41.0342 11.5416C40.8412 11.4078 40.3278 11.585 40.0474 11.755C36.752 13.7696 33.4748 15.8168 30.1903 17.8495C29.4839 18.2872 29.4729 18.7646 30.1138 19.2384C31.6104 20.3488 33.0888 21.4954 34.6582 22.4973C34.975 22.6998 35.8052 22.5045 36.1475 22.2043C38.8348 19.8714 41.4602 17.4698 44.1038 15.0862C44.3187 14.8945 44.5262 14.6956 44.7228 14.5111L44.7301 14.5147ZM75.1935 125.71C77.6551 125.406 80.2477 125.164 82.8075 124.733C83.7689 124.571 84.7848 124.129 85.5495 123.533C86.8239 122.538 87.9382 121.33 89.0816 120.176C89.3911 119.861 89.5622 119.413 89.7989 119.022C89.3255 119.033 88.8522 119.011 88.3824 119.055C84.4134 119.431 80.448 119.966 76.468 120.147C74.5563 120.234 73.442 120.755 72.9286 122.614C72.6337 123.681 72.0802 124.679 71.6396 125.71H75.1899H75.1935ZM126.474 75.4925C126.314 74.9464 126.223 74.6389 126.132 74.3315C125.903 74.5051 125.677 74.6823 125.448 74.8559C123.678 76.1978 121.897 77.5252 120.149 78.8924C119.712 79.236 119.133 79.6701 119.046 80.1439C118.394 83.6198 117.848 87.1173 117.273 90.6077C117.182 91.1538 117.164 91.6783 117.954 91.1972C120.557 89.6166 123.201 87.9384 124.177 84.9218C125.189 81.7968 125.753 78.5271 126.474 75.4961V75.4925ZM95.4248 13.7552C94.6783 14.4207 94.0338 15.1513 93.2436 15.6577C92.3442 16.2328 92.4716 16.58 93.1598 17.2347C95.3009 19.2746 97.4311 21.329 99.4594 23.4775C101.844 26.0057 102.026 26.06 104.619 23.633C104.881 23.3871 105.111 23.1013 105.369 22.8481C106.09 22.1464 106.036 21.5424 105.216 20.9348C102.212 18.7031 99.2263 16.4498 96.2295 14.2109C95.9928 14.0337 95.7124 13.9179 95.4248 13.7552ZM69.9099 19.1625C70.9696 19.1625 71.9382 19.1299 72.9068 19.1733C73.8426 19.2131 74.0865 18.8514 73.7989 17.9906C73.2126 16.2219 72.6992 14.4279 72.0693 12.6773C71.8653 12.1095 71.4393 11.245 71.0242 11.1872C69.4876 10.981 67.9108 11.0352 66.3487 11.0606C66.2176 11.0606 66.0501 11.5561 65.9773 11.8382C65.4821 13.7588 65.0196 15.6866 64.5135 17.6072C64.2841 18.4789 64.5972 18.8044 65.4712 18.8478C66.9823 18.9201 68.4898 19.0612 69.9099 19.1661V19.1625ZM62.7584 18.6633C63.0497 18.327 63.6032 17.9436 63.7816 17.4336C64.1967 16.2472 64.4261 14.9958 64.7392 13.7733C65.4639 10.9593 65.4712 10.9267 62.5508 10.3625C61.7898 10.2142 60.65 10.0406 60.2349 10.4421C58.3778 12.2397 56.7138 14.2398 54.9878 16.1677C54.467 16.75 54.6309 17.1298 55.3701 17.2708C57.686 17.7157 60.0055 18.1461 62.762 18.6633H62.7584ZM76.4134 19.1444C78.3906 18.9238 80.3678 18.6706 82.3487 18.4934C83.5431 18.3885 83.503 17.9544 82.8403 17.1949C81.6569 15.8349 80.3715 14.54 79.3483 13.0716C77.8444 10.9123 75.9254 10.3914 73.453 10.9267C72.5535 11.1221 72.3678 11.3137 72.681 12.1782C73.351 14.0373 73.9955 15.9145 74.4762 17.8315C74.7638 18.9853 75.3574 19.2891 76.4134 19.1408V19.1444ZM17.1725 23.7741C17.4311 24.8266 17.584 25.5861 17.8061 26.3276C18.1375 27.4308 18.5307 27.6297 19.4629 26.6604C21.5931 24.4432 23.7633 22.2441 26.1084 20.262C27.5467 19.0431 28.7192 18.034 27.4556 16.0772C27.3646 15.9362 27.35 15.7264 27.361 15.5492C27.4338 14.3447 27.0223 14.1567 26.1011 14.9271C23.5521 17.0538 20.9413 19.1082 18.4798 21.329C17.7952 21.9475 17.5476 23.0398 17.1725 23.7741ZM8.80838 35.2072C9.11425 36.2597 9.35458 37.2435 9.69323 38.1948C10.0027 39.0628 10.3414 39.193 10.9386 38.2779C12.6718 35.6087 14.3942 32.9177 16.3387 30.4039C17.4165 29.0114 18.2103 27.8684 17.005 26.1938C16.7174 25.7923 16.7647 25.1557 16.6482 24.6313C16.5863 24.3528 16.5025 24.0779 16.4261 23.7994C16.153 23.9766 15.7997 24.096 15.6177 24.3419C13.6441 26.9895 11.6377 29.619 9.77698 32.3426C9.23078 33.1419 9.12154 34.2306 8.80474 35.2072H8.80838ZM56.2877 8.43468C56.102 8.50701 55.8617 8.56488 55.6578 8.68786C52.8467 10.3553 50.0428 12.0263 47.239 13.7045C46.427 14.1928 46.802 14.5256 47.4284 14.7498C49.1361 15.3683 50.8403 16.0121 52.5772 16.5294C52.985 16.6523 53.7024 16.4751 53.9864 16.1677C55.7597 14.2688 57.4602 12.3048 59.1498 10.3336C59.2991 10.1563 59.3027 9.56316 59.219 9.52699C58.2759 9.12913 57.3 8.79999 56.2841 8.43829L56.2877 8.43468ZM84.8394 18.1714C86.5727 17.6434 88.1312 17.1659 89.6897 16.6885C90.5927 16.4136 90.7784 16.0447 89.8972 15.4479C87.4502 13.7877 84.9814 12.1565 82.5927 10.4168C81.3801 9.53422 80.2841 9.51975 78.9259 10.0623C77.9791 10.4421 77.9391 10.6048 78.5945 11.321C80.3824 13.2777 82.0902 15.3068 83.8453 17.2925C84.1366 17.6217 84.508 17.8857 84.8358 18.1714H84.8394ZM27.838 14.7064C28.1584 15.7662 28.3041 16.4787 28.6063 17.1153C28.701 17.3179 29.3273 17.5132 29.5166 17.3974C32.9723 15.3068 36.4133 13.1909 39.818 11.028C41.016 10.2648 39.5995 9.30997 39.8726 8.44914C39.4356 8.40212 38.9113 8.17787 38.5763 8.34064C35.4702 9.81272 32.3678 11.292 29.3382 12.9088C28.6609 13.2705 28.2713 14.1639 27.8343 14.71L27.838 14.7064ZM3.23714 47.9894C3.53573 48.9913 3.81976 50.0293 4.16568 51.0493C4.24579 51.2844 4.5371 51.4508 4.73009 51.6461C4.88303 51.411 5.07602 51.1904 5.17797 50.9336C6.20483 48.4234 7.09332 45.8518 8.26947 43.4176C9.22714 41.4355 10.3013 39.6054 8.65181 37.5003C8.44789 37.2399 8.47338 36.8095 8.3605 36.4659C8.28039 36.2163 8.1493 35.9848 8.04006 35.7425C7.858 35.9631 7.61038 36.1548 7.50843 36.4044C6.32135 39.3015 5.13064 42.1951 3.99818 45.1139C3.65226 46.0037 3.49932 46.9658 3.2335 47.9894H3.23714ZM122.837 89.1862C122.775 88.9837 122.727 88.8426 122.684 88.6979C122.534 88.7847 122.378 88.8607 122.24 88.9583C120.608 90.0941 118.977 91.2298 117.36 92.3836C117.076 92.5861 116.741 92.8248 116.617 93.125C115.368 96.185 114.159 99.263 112.947 102.337C112.885 102.493 112.892 102.674 112.87 102.844C113.074 102.818 113.307 102.844 113.478 102.753C113.854 102.558 114.192 102.305 114.549 102.081C117.404 100.283 118.82 97.3894 120.291 94.5573C121.205 92.7959 121.992 90.973 122.837 89.1826V89.1862ZM53.5421 6.52494C52.8102 6.72749 52.3915 6.81068 51.9946 6.95535C49.1034 8.01873 46.2012 9.05317 43.3391 10.1853C41.5476 10.8942 41.5585 11.1221 43.077 12.3012C45.3564 14.0698 45.3273 14.0301 47.7197 12.4893C49.7479 11.1835 51.8526 9.99719 53.9136 8.73488C54.3432 8.47084 54.7147 8.11277 55.1152 7.79448C54.5362 7.3279 53.9573 6.8577 53.5385 6.5177L53.5421 6.52494ZM102.107 115.854C101.364 115.951 101.098 115.959 100.85 116.027C98.0538 116.787 95.2536 117.532 92.4753 118.349C91.8781 118.527 91.27 118.888 90.8258 119.326C89.5804 120.549 88.4152 121.847 87.2281 123.127C87.0315 123.341 86.8749 123.59 86.7001 123.826C86.9769 123.811 87.2645 123.833 87.534 123.782C92.8576 122.744 97.3219 120.096 101.265 116.49C101.397 116.367 101.553 116.273 102.11 115.861L102.107 115.854ZM83.0806 7.8415C82.7238 8.14532 82.3305 8.47808 81.9336 8.81445C82.1885 9.09657 82.3997 9.43657 82.7056 9.64635C85.1344 11.3174 87.6141 12.9233 90.0174 14.6305C91.7907 15.8928 92.184 15.8964 93.7716 14.352C94.5108 13.6358 94.6273 13.1186 93.564 12.6303C90.3924 11.1618 87.239 9.66443 84.0747 8.18511C83.8053 8.05851 83.5103 7.98618 83.0806 7.83788V7.8415ZM95.5449 12.0118C95.8144 12.4856 95.971 13.1041 96.3715 13.408C99.4302 15.7481 102.536 18.0304 105.639 20.3163C105.85 20.4718 106.152 20.5007 106.411 20.5912C106.48 20.3091 106.691 19.9618 106.596 19.7557C106.039 18.544 105.704 16.9996 104.75 16.2472C102.351 14.3556 99.6596 12.8256 97.0816 11.1618C96.204 10.594 95.443 10.301 95.5486 12.0154L95.5449 12.0118ZM116.148 30.0639C115.947 29.2899 115.966 28.4363 115.554 27.9263C113.063 24.8411 110.482 21.8318 107.911 18.8116C107.82 18.7068 107.463 18.667 107.368 18.7502C107.103 18.9889 107.452 21.9584 107.732 22.2767C110.125 24.9966 112.51 27.7201 114.906 30.4401C115.135 30.7005 115.416 30.9211 115.674 31.1598C115.834 30.7909 115.995 30.4256 116.151 30.0639H116.148ZM62.4525 126.603C62.4525 126.567 62.4525 126.531 62.4525 126.495C60.7593 126.383 59.0661 126.238 57.3728 126.173C56.8376 126.151 56.2914 126.336 55.7524 126.426C56.0583 127.124 56.3023 127.858 56.7028 128.499C56.8339 128.708 57.3728 128.712 57.7297 128.73C60.3915 128.86 63.0606 129.117 65.7151 129.012C66.793 128.969 67.8562 128.162 68.8831 127.623C69.1161 127.5 69.1708 127.052 69.3055 126.752C69.0215 126.701 68.7374 126.611 68.4498 126.611C66.4507 126.6 64.4516 126.603 62.4525 126.603ZM0.666364 60.938C0.972236 62.1678 1.20892 63.2167 1.51115 64.2439C1.58034 64.4754 1.88257 64.6417 2.07556 64.837C2.14474 64.6092 2.23214 64.3849 2.27583 64.1535C2.77834 61.3756 3.0041 58.5147 3.85253 55.8454C4.51889 53.7584 4.02731 52.138 3.1097 50.4272C3.00774 50.2355 2.82567 50.0872 2.68002 49.9208C2.59627 50.1415 2.47246 50.3549 2.43241 50.5864C1.82795 54.0731 1.23805 57.5634 0.662723 60.938H0.666364ZM40.5826 8.26468C40.7793 9.6572 40.8812 10.4529 42.3159 9.8706C45.5676 8.55404 48.8849 7.40385 52.1584 6.14154C52.5044 6.00772 52.7301 5.57369 53.0105 5.2771C52.6355 5.09263 52.2131 4.68754 51.8963 4.75988C48.4734 5.5339 45.0578 6.34409 41.6678 7.24471C41.1762 7.37492 40.823 8.02596 40.5826 8.26468ZM54.2522 128.354C55.0752 128.484 55.5485 128.408 55.2281 127.352C54.9441 126.415 54.6236 125.858 53.4693 125.703C50.1776 125.261 46.9113 124.618 43.6341 124.071C43.2044 123.999 42.7602 124.032 42.3196 124.014C42.6473 124.346 42.9495 124.715 43.31 125.008C46.4925 127.627 50.5162 127.536 54.2522 128.35V128.354ZM122.928 41.8804C122.666 40.9906 122.516 40.0213 122.108 39.1713C120.885 36.6214 119.589 34.104 118.252 31.6083C117.928 31.0043 117.338 30.5413 116.872 30.0097C116.778 30.9428 116.661 31.8724 116.61 32.8055C116.599 33.0008 116.861 33.2034 116.978 33.4132C118.591 36.3067 120.197 39.2039 121.813 42.0938C122.006 42.4374 122.265 42.7412 122.491 43.0668C122.622 42.7051 122.753 42.347 122.924 41.8768L122.928 41.8804ZM95.0934 11.8961C95.1553 11.6899 95.2172 11.4837 95.2828 11.2776C94.7074 10.6555 94.2486 9.75124 93.5349 9.4655C90.5709 8.28276 87.534 7.27364 84.508 6.24643C84.1803 6.13431 83.7543 6.32239 83.3719 6.36941C83.6086 6.71302 83.7689 7.21215 84.0966 7.3713C87.4102 8.96998 90.742 10.5216 94.092 12.0444C94.3506 12.1601 94.7584 11.9539 95.0934 11.8961ZM71.0096 128.915C75.463 128.549 78.6091 127.808 81.1835 126.401C81.4348 126.263 81.6496 126.064 81.879 125.894C81.5695 125.855 81.2527 125.757 80.9468 125.779C77.8699 126.021 74.7893 126.26 71.716 126.56C71.2281 126.607 70.6892 126.857 70.3214 127.178C69.8444 127.594 69.5167 128.177 69.1234 128.687L71.006 128.915H71.0096ZM69.3565 10.3733C71.1698 10.4059 71.2281 10.3155 70.4452 8.62999C70.2449 8.19596 70.0483 7.75831 69.808 7.3496C69.3637 6.59366 68.8904 5.85581 68.4279 5.11072C68.0456 5.93176 67.5941 6.7311 67.2955 7.5847C66.3342 10.3155 66.356 10.3227 69.3565 10.3733ZM52.6318 2.81759C50.4725 3.17566 48.4188 3.39268 46.4343 3.88458C45.0615 4.22457 43.7761 4.92264 42.4689 5.50496C42.2613 5.599 42.1557 5.92453 42.0064 6.14154C42.2358 6.13431 42.4725 6.15963 42.6946 6.11261C45.9937 5.38199 49.2927 4.6586 52.5845 3.8882C52.9377 3.80501 53.229 3.4614 53.5494 3.24077C53.2254 3.09247 52.9049 2.94418 52.6318 2.81759ZM64.9286 10.1274C65.2782 9.80187 65.8025 9.52699 65.9846 9.10381C66.4361 8.0549 66.7383 6.9445 67.077 5.85219C67.1425 5.64602 67.0952 5.40731 67.0988 5.17944C66.8804 5.23731 66.6255 5.23731 66.4507 5.35667C65.5585 5.97878 64.6555 6.59366 63.8144 7.28088C63.0861 7.87767 62.4306 8.5685 61.7461 9.21593C62.711 9.49082 63.676 9.7657 64.925 10.1202L64.9286 10.1274ZM73.0815 10.5867C73.1799 10.4819 73.2818 10.377 73.3801 10.2721C73.6787 10.2504 73.9882 10.2612 74.2795 10.1997C74.7274 10.1057 75.1644 9.96464 75.605 9.84166C75.3246 9.4872 75.0988 9.06764 74.7529 8.79637C73.4784 7.7981 72.1712 6.83961 70.8567 5.88836C70.5799 5.68943 70.2377 5.5773 69.9281 5.42539C70.0228 5.79794 70.0702 6.18856 70.2231 6.53579C70.6091 7.41109 70.955 8.32255 71.4866 9.10742C71.8835 9.69337 72.5426 10.1021 73.0852 10.5904L73.0815 10.5867ZM126.824 54.6662C125.972 51.4074 125.072 47.9351 124.144 44.4665C124.042 44.0867 123.78 43.7467 123.59 43.3887C123.416 43.8263 123.201 44.2567 123.081 44.7088C123.026 44.915 123.139 45.1718 123.204 45.3961C124.162 48.6079 125.12 51.8197 126.092 55.0279C126.154 55.2305 126.358 55.3933 126.493 55.5705C126.565 55.3679 126.638 55.1654 126.82 54.6662H126.824ZM64.6446 5.11072C62.4889 5.92091 60.2386 6.75642 58.0028 7.6281C57.8972 7.66789 57.8863 8.23574 57.9008 8.23936C58.8621 8.43829 60.0565 9.04594 60.752 8.68786C62.2704 7.91022 63.5412 6.64791 64.9031 5.57007C65.0087 5.48688 65.0342 5.30603 65.0961 5.17221C64.9832 5.15774 64.8703 5.13965 64.6482 5.11072H64.6446ZM1.90442 71.749C1.94447 71.749 1.98088 71.749 2.02094 71.749C2.02094 70.4252 2.08648 69.0978 1.99545 67.7776C1.94811 67.094 1.65316 66.4177 1.42012 65.7558C1.35093 65.5604 1.11789 65.423 0.961312 65.2602C0.881203 65.4555 0.717342 65.6545 0.735549 65.8389C1.0305 69.3148 1.33637 72.7907 1.67137 76.2593C1.69322 76.5016 1.94811 76.7223 2.09012 76.9538C2.12654 76.7223 2.19936 76.4836 2.18844 76.2557C2.10469 74.7547 1.99909 73.25 1.90078 71.749H1.90442ZM77.3674 9.71869C77.7352 9.63911 77.9828 9.61741 78.2049 9.53061C78.6382 9.36061 79.0606 9.15806 79.4866 8.96636C79.1225 8.70233 78.7912 8.36957 78.387 8.18872C76.5736 7.38215 74.7384 6.61536 72.9068 5.84496C72.6992 5.75815 72.4625 5.73645 72.2404 5.68581C72.3424 5.85942 72.4006 6.08729 72.5463 6.20303C73.8644 7.25194 75.1899 8.29 76.5299 9.30636C76.7993 9.5089 77.1453 9.61379 77.3674 9.71869ZM42.6218 125.355C42.163 125.005 41.9372 124.889 41.7843 124.712C39.7379 122.31 36.5116 122.578 33.9663 121.312C33.879 121.268 33.7479 121.323 33.635 121.33C33.7151 121.456 33.7661 121.652 33.8826 121.706C36.4971 122.932 39.1152 124.144 41.737 125.345C41.8826 125.413 42.0902 125.352 42.6218 125.352V125.355ZM62.0046 4.78881C59.9108 5.19391 57.726 5.60624 55.5485 6.05112C55.3082 6.09814 55.1079 6.32962 54.8894 6.4743C55.046 6.6443 55.1662 6.89025 55.3628 6.96982C55.7852 7.14705 56.3132 7.45087 56.6737 7.33151C58.549 6.69855 60.3879 5.94985 62.2304 5.23008C62.3833 5.16859 62.4925 4.99859 62.62 4.88285C62.4489 4.85753 62.2777 4.83222 62.0046 4.79243V4.78881ZM75.3319 5.50135C75.026 5.55198 74.9131 5.57007 74.7966 5.59177C74.8986 5.7039 74.9787 5.86304 75.1061 5.92091C76.8503 6.72749 78.5872 7.55215 80.3606 8.29C80.6701 8.42021 81.1653 8.23936 81.5185 8.0766C81.635 8.02235 81.6314 7.35321 81.5695 7.33513C79.443 6.68047 77.3055 6.0692 75.3319 5.50135ZM54.4743 5.47603C56.5936 5.06732 58.4871 4.70562 60.3842 4.3367C60.4971 4.315 60.5991 4.25351 60.7083 4.2101C60.5881 4.15223 60.4643 4.03649 60.3478 4.04011C58.4179 4.145 56.488 4.23904 54.5654 4.40542C54.3178 4.42712 54.0993 4.81775 53.8699 5.03838C54.1211 5.21923 54.3687 5.40007 54.478 5.47603H54.4743ZM77.0287 4.76711C76.854 4.80328 76.5918 4.85392 76.3333 4.90817C76.5991 5.03838 76.854 5.21561 77.138 5.29518C78.5363 5.69666 79.9345 6.09452 81.3474 6.44175C81.686 6.52494 82.0756 6.40196 82.4434 6.37664C82.1667 6.10176 81.9263 5.65326 81.6023 5.58454C80.1239 5.26263 78.62 5.042 77.0324 4.77073L77.0287 4.76711ZM69.4293 1.27316C68.4789 1.19359 67.8271 1.10316 67.1717 1.09955C66.9459 1.09955 66.7201 1.30933 66.4907 1.42507C67.0697 1.89889 67.6487 2.3727 68.224 2.85014C68.5408 2.43781 68.854 2.02548 69.4256 1.27316H69.4293ZM77.2581 3.55544C77.2545 3.58799 77.2509 3.62055 77.2472 3.6531C76.8867 3.6531 76.5226 3.64225 76.1621 3.65671C75.9254 3.66756 75.6887 3.72182 75.452 3.75437C75.6705 3.82309 75.8817 3.92075 76.1038 3.9533C77.3565 4.13777 78.6091 4.31499 79.8653 4.47052C80.0583 4.49584 80.2659 4.39818 80.4662 4.3584C80.2914 4.21372 80.1312 3.98224 79.9345 3.94607C79.0497 3.78331 78.1539 3.67842 77.2618 3.55182L77.2581 3.55544ZM72.7575 1.71804C72.0073 1.59145 71.4794 1.38167 71.006 1.46124C70.5362 1.54081 70.1066 1.89889 69.6878 2.17739C69.5859 2.24611 69.6041 2.48845 69.564 2.64759C70.0192 2.59695 70.4743 2.57525 70.9222 2.48845C71.3337 2.40887 71.7379 2.27866 72.1384 2.14122C72.2768 2.0942 72.3897 1.97123 72.7575 1.71081V1.71804ZM55.5631 3.55906C57.067 3.45778 58.3269 3.37821 59.5904 3.28055C59.7579 3.26609 59.9181 3.16843 60.082 3.10694C59.9327 3.04907 59.7798 2.94418 59.6305 2.94056C58.3669 2.89716 57.1034 2.84291 55.8398 2.86822C55.5376 2.87546 55.239 3.17205 54.9368 3.33481C55.2172 3.43608 55.4975 3.53736 55.5667 3.56267L55.5631 3.55906ZM63.5267 1.05976C63.29 1.12486 63.0169 1.20082 62.7474 1.27678C62.9841 1.43592 63.2026 1.63485 63.4575 1.74698C63.7889 1.89165 64.1421 2.00739 64.4953 2.06165C64.965 2.13399 65.4457 2.13399 65.919 2.16654C65.4966 1.84825 65.1034 1.46847 64.6373 1.22614C64.3351 1.07061 63.9309 1.1104 63.5267 1.05614V1.05976ZM59.9036 1.57336C59.889 1.61677 59.8781 1.65655 59.8635 1.69996C59.7433 1.69272 59.6195 1.65655 59.5067 1.68187C59.1644 1.75421 58.8294 1.85187 58.4871 1.93867C58.793 2.0291 59.0952 2.13399 59.4047 2.20633C59.5758 2.24611 59.7615 2.23164 59.94 2.2425C60.7629 2.2859 61.5859 2.3293 62.4052 2.3727C61.5713 2.10867 60.7338 1.84102 59.8999 1.57698L59.9036 1.57336ZM54.3214 2.25696C54.7183 2.10867 55.2354 1.91335 55.7561 1.72166C55.5594 1.66017 55.3519 1.51911 55.1698 1.54805C54.4161 1.65655 53.6696 1.8157 52.9195 1.95676C53.3237 2.04356 53.7279 2.13037 54.3214 2.26058V2.25696ZM75.2008 2.97311C75.452 2.92248 75.9946 2.81397 76.5372 2.70546C75.9291 2.60419 75.3246 2.48121 74.7165 2.40887C74.4871 2.37994 74.2395 2.43419 74.0137 2.4993C73.8062 2.55717 73.6168 2.67291 73.4165 2.76333C73.6095 2.83205 73.7989 2.94056 73.9992 2.96588C74.2905 3.00205 74.5927 2.97311 75.2008 2.97311ZM127.064 58.5436C127.017 58.4496 126.966 58.3555 126.919 58.2579C126.875 58.3447 126.78 58.4459 126.795 58.5219C126.82 58.6413 126.919 58.7425 126.984 58.851C127.01 58.7498 127.035 58.6485 127.064 58.5436Z",fill:"currentColor"})}),NA=e=>{const t=w.useId();return c.jsxs("svg",{fill:"none",height:e.height,role:"presentation",viewBox:"0 0 74 11",width:e.height*74/11,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{clipRule:"evenodd",d:"M34.1489 0.373291C33.5297 0.373291 33.022 0.874761 33.022 1.51414C33.022 2.14097 33.5297 2.64244 34.1489 2.64244C34.7681 2.64244 35.2758 2.14097 35.2758 1.51414C35.2758 0.874761 34.7681 0.373291 34.1489 0.373291ZM35.1396 3.21913H33.1706V9.97644H35.1396V3.21913ZM21.6787 0.624035H23.5982V3.21914H25.0718V5.02444H23.5982V7.40642C23.5982 7.75745 23.8706 8.03326 24.205 8.03326H25.0594V9.95138H24.205C22.818 9.95138 21.6787 8.81054 21.6787 7.39389V5.0119H20.7871V3.20661H21.6787V0.624035ZM29.7652 3.0687C28.8736 3.0687 28.1677 3.44481 27.8953 4.03403V0.624035H25.9263V9.96392H27.8953V6.17782C27.8953 5.388 28.403 4.83639 29.1213 4.83639C29.8519 4.83639 30.2605 5.31278 30.2605 6.11514V9.97646H32.2295V5.8644C32.2295 4.10925 31.3379 3.0687 29.7652 3.0687ZM37.9507 3.2066V4.13432C38.2479 3.45734 38.9661 3.0687 39.8701 3.05616C40.0063 3.05616 40.1797 3.0687 40.3902 3.09377V4.97429C40.1921 4.93668 39.9692 4.9116 39.7339 4.9116C38.607 4.9116 37.9507 5.55098 37.9507 6.66675V9.96392H35.9817V3.2066H37.9507ZM45.9257 4.09672C45.7275 3.50749 44.9474 3.09378 43.9443 3.09378C43.0032 3.09378 42.2106 3.43227 41.5791 4.10926C40.9599 4.7737 40.6379 5.61367 40.6379 6.59154C40.6379 7.5694 40.9599 8.39683 41.5791 9.08635C42.2106 9.7508 43.0032 10.0893 43.9443 10.0893C44.9474 10.0893 45.7275 9.67558 45.9257 9.08635V9.97646H47.8946V0.624035H45.9257V4.09672ZM45.5294 7.79506C45.195 8.12102 44.7864 8.27146 44.3034 8.27146C43.8329 8.27146 43.4242 8.10848 43.1022 7.79506C42.7679 7.45657 42.6069 7.0554 42.6069 6.59154C42.6069 6.12767 42.7679 5.7265 43.1022 5.40054C43.4366 5.06205 43.8329 4.89907 44.3034 4.89907C44.7988 4.89907 45.2074 5.06205 45.5294 5.40054C45.8761 5.7265 46.0495 6.12767 46.0495 6.59154C46.0495 7.0554 45.8761 7.45657 45.5294 7.79506ZM53.5787 3.2442L55.3619 6.45361L56.5631 3.21913H58.4949L55.7458 10.3651L53.5787 6.47868L51.4115 10.3651L48.6748 3.21913H50.6066L51.7954 6.45361L53.5787 3.2442ZM61.7394 3.05616C60.7239 3.05616 59.8694 3.38212 59.2007 4.03403C58.5444 4.6734 58.2101 5.5259 58.2101 6.57899V6.64167C58.2101 7.69476 58.5444 8.54726 59.2007 9.18664C59.8818 9.81347 60.7487 10.1394 61.8384 10.1394C62.8539 10.1394 63.6836 9.93884 64.3151 9.52513V7.78252C63.6959 8.22131 62.9034 8.43443 61.9499 8.43443C60.9097 8.43443 60.2286 7.92042 60.1914 7.11807H65.0829C65.1077 6.91748 65.12 6.69182 65.12 6.46616C65.12 5.50083 64.7981 4.69848 64.1789 4.04657C63.5597 3.38212 62.73 3.05616 61.7394 3.05616ZM60.1914 5.82679C60.2038 5.51337 60.3648 5.25009 60.662 5.03697C60.9716 4.82385 61.3183 4.71101 61.7394 4.71101C62.5195 4.71101 63.1263 5.22502 63.1263 5.82679H60.1914ZM69.8135 3.09378C70.7546 3.09378 71.5472 3.43227 72.1663 4.10925C72.7979 4.78624 73.1199 5.60113 73.1199 6.579C73.1199 7.55686 72.7979 8.38429 72.1663 9.07381C71.5472 9.73826 70.7546 10.0768 69.8135 10.0768C68.8104 10.0768 68.0302 9.66304 67.8321 9.07381V9.96392H65.8631V0.624035H67.8321V4.09672C68.0302 3.50749 68.8104 3.09378 69.8135 3.09378ZM69.4543 8.27146C69.9249 8.27146 70.3212 8.12102 70.6555 7.79506C70.9899 7.45657 71.1509 7.05539 71.1509 6.59153C71.1509 6.12767 70.9899 5.7265 70.6555 5.40054C70.3336 5.06205 69.9249 4.89907 69.4543 4.89907C68.9714 4.89907 68.5627 5.06205 68.216 5.40054C67.8816 5.7265 67.7083 6.12767 67.7083 6.59153C67.7083 7.05539 67.8816 7.45657 68.216 7.79506C68.5503 8.10848 68.959 8.27146 69.4543 8.27146Z",fill:"currentColor",fillRule:"evenodd"}),c.jsx("g",{clipPath:`url(#${t})`,children:c.jsx("path",{clipRule:"evenodd",d:"M0.045011 0.900694C-0.126602 0.467742 0.193222 0 0.661257 0H3.56697C3.83999 0 4.08181 0.162357 4.18322 0.413623L6.49609 6.18115C6.55849 6.33578 6.55849 6.50973 6.49609 6.66822L5.04128 10.2903C4.81896 10.8431 4.03111 10.8431 3.80879 10.2903L0.045011 0.900694ZM5.65759 0.881366C5.50158 0.45228 5.8214 0 6.28164 0H8.81292C9.09374 0 9.34336 0.173954 9.43697 0.432951L11.5392 6.20048C11.5899 6.34351 11.5899 6.502 11.5392 6.6489L10.2755 10.1164C10.0649 10.6962 9.23805 10.6962 9.02744 10.1164L5.65759 0.881366ZM11.3404 0C10.8724 0 10.5525 0.467742 10.7241 0.900694L14.4879 10.2903C14.7102 10.8431 15.4981 10.8431 15.7204 10.2903L17.1752 6.66822C17.2376 6.50973 17.2376 6.33578 17.1752 6.18115L14.8623 0.413623C14.7609 0.162357 14.5191 0 14.2461 0H11.3404Z",fill:"currentColor",fillRule:"evenodd"})}),c.jsx("defs",{children:c.jsx("clipPath",{id:t,children:c.jsx("rect",{fill:"white",height:"10.7049",width:"17.219"})})})]})};function sd(e){const t=e.link||"https://playground.thirdweb.com/connect/sign-in/button?utm_source=cw_text";return c.jsx(Zr,{color:"secondaryText",hoverColor:"primaryText",href:t,target:"_blank",children:c.jsxs(M,{center:"both",flex:"row",style:{color:"currentColor",gap:4},children:[c.jsx(P,{size:"xs",style:{color:"currentColor"},weight:600,children:"Powered by"}),c.jsx(NA,{height:11})]})})}function SA(e){const t=e.welcomeScreen;if(t&&typeof t=="function")return c.jsx(t,{});const n=(typeof t=="object"?t==null?void 0:t.title:void 0)||e.connectLocale.welcomeScreen.defaultTitle,i=(typeof t=="object"?t==null?void 0:t.subtitle:void 0)||e.connectLocale.welcomeScreen.defaultSubtitle,r=typeof t=="object"?t==null?void 0:t.img:void 0,s=e.meta.termsOfServiceUrl||e.meta.privacyPolicyUrl;return c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[c.jsxs(M,{center:"both",expand:!0,flex:"column",p:"lg",style:{minHeight:"300px"},children:[c.jsx(M,{center:"x",flex:"row",children:r?c.jsx(Xe,{client:e.client,height:r.height?String(r.height):void 0,src:r.src,width:r.width?String(r.width):void 0}):c.jsx(DA,{children:c.jsx(vA,{size:"150"})})}),c.jsx($,{y:"xxl"}),c.jsx(P,{center:!0,color:"primaryText",multiline:!0,weight:600,children:n}),c.jsx($,{y:"md"}),c.jsx(P,{color:"secondaryText",multiline:!0,style:{textAlign:"center"},children:i}),c.jsx($,{y:"lg"}),c.jsx(Zr,{center:!0,href:"https://blog.thirdweb.com/web3-wallet/",target:"_blank",children:e.connectLocale.newToWallets})]}),c.jsx(M,{flex:"column",gap:"lg",py:"lg",children:c.jsxs("div",{children:[s&&c.jsx(id,{locale:e.connectLocale.agreement,privacyPolicyUrl:e.meta.privacyPolicyUrl,termsOfServiceUrl:e.meta.termsOfServiceUrl}),e.meta.showThirdwebBranding!==!1&&c.jsx(M,{style:{paddingTop:z.xl},children:c.jsx(sd,{})})]})})]})}const AA=$t`
117
+ from {
118
+ transform: translateY(4px);
119
+ }
120
+ to {
121
+ transform: translateY(-4px);
122
+ }
123
+ `,DA=ke(()=>{const e=X();return{animation:`${AA} 2s ease infinite alternate`,color:e.colors.accentText,filter:`drop-shadow(0px 6px 10px ${e.colors.accentText})`}});function od(){try{if(typeof window<"u"&&window.localStorage)return window.localStorage.getItem($f)}catch{}return null}function OA(){try{if(typeof window<"u"&&window.localStorage)return window.localStorage.getItem(um)}catch{}return null}function hm(e,t){const n=Hi(),i=od();return e.sort((r,s)=>{const o=n.find(l=>l.info.rdns===r.id),a=n.find(l=>l.info.rdns===s.id);return o&&!a?-1:!o&&a?1:0}).sort((r,s)=>{const o=t==null?void 0:t.find(l=>l.id===r.id),a=t==null?void 0:t.find(l=>l.id===s.id);return o&&!a?-1:!o&&a?1:0}).sort((r,s)=>r.id===i?-1:s.id===i?1:0).sort((r,s)=>{const o=r.id==="inApp"||r.id==="embedded",a=s.id==="inApp"||s.id==="embedded";return o&&!a?-1:!o&&a?1:0})}const fm=w.createContext(void 0);function mm(e){let t=Wt.main;const n=e.wallets.find(a=>a.id==="embedded"||a.id==="inApp");e.wallets.length===1&&e.wallets[0]?t=e.wallets[0]:e.size==="wide"&&!e.welcomeScreen&&n&&(t=n);const[i,r]=w.useState(t),s=w.useRef(t),o=Tt();return w.useEffect(()=>{t!==s.current&&(s.current=t,r(t))},[t]),w.useEffect(()=>{!o&&i===Wt.signIn&&r(Wt.main)},[o,i]),{initialScreen:t,screen:i,setScreen:r}}function ym(){const e=w.useContext(fm);if(!e)throw new Error("useScreenContext must be used within a <ScreenSetupContext.Provider />");return e}async function zc(e,t){return Oa(e,async n=>{const{InAppWebConnector:i}=await h(async()=>{const{InAppWebConnector:r}=await import("./web-connector-DDEmzUHA.js");return{InAppWebConnector:r}},__vite__mapDeps([33,1,2,34,11,3,4,5]));return new i({client:n,ecosystem:t})},t)}async function Fx(e){const{client:t,ecosystem:n}=e,r=await(await zc(t,n)).getUser();switch(r.status){case"Logged In, Wallet Initialized":return r}}async function PA(e){const t=await Fx(e);if(t&&"email"in t.authDetails)return t.authDetails.email}async function kA(e){const t=await Fx(e);if(t&&"phoneNumber"in t.authDetails)return t.authDetails.phoneNumber}async function Vf(e){return(await zc(e.client,e.ecosystem)).preAuthenticate(e)}async function qr(e){return await(await zc(e.client,e.ecosystem)).linkProfile(e)}async function Yx(e){return await(await zc(e.client,e.ecosystem)).unlinkProfile(e.profileToUnlink,e.allowAccountDeletion)}async function Qx(e){return(await zc(e.client,e.ecosystem)).getProfiles()}const zA=Object.freeze(Object.defineProperty({__proto__:null,getProfiles:Qx,getUserEmail:PA,getUserPhoneNumber:kA,linkProfile:qr,preAuthenticate:Vf,unlinkProfile:Yx},Symbol.toStringTag,{value:"Module"})),Hx=e=>{if(!RS.includes(e))throw new Error(`Unknown auth option ${e}`);switch(e){case"wallet":return"siwe";default:return e}},gm=({authOption:e,client:t,ecosystem:n,mode:i="popup",redirectUrl:r,authFlow:s})=>{if(i==="popup"&&r)throw new Error("Redirect URL is not supported for popup mode");if(i==="window"&&!r)throw new Error("Redirect URL is required for window mode");const o=Hx(e);let a=`${it("inAppWallet")}/api/2024-05-05/login/${o}?clientId=${t.clientId}`;if(n!=null&&n.partnerId?a=`${a}&ecosystemId=${n.id}&ecosystemPartnerId=${n.partnerId}`:n&&(a=`${a}&ecosystemId=${n.id}`),i!=="popup"){const l=new URL(r||window.location.href);l.searchParams.set("walletId",(n==null?void 0:n.id)||"inApp"),l.searchParams.set("authProvider",e),s&&l.searchParams.set("authFlow",s),a=`${a}&redirectUrl=${encodeURIComponent(l.toString())}`}return a},iX=({authOption:e,client:t,ecosystem:n})=>{const i=Hx(e);let r=`${it("inAppWallet")}/api/2024-05-05/login/${i}/callback?clientId=${t.clientId}`;return n!=null&&n.partnerId?r=`${r}&ecosystemId=${n.id}&ecosystemPartnerId=${n.partnerId}`:n&&(r=`${r}&ecosystemId=${n.id}`),r},RA="width=350, height=500",Sg=({isWindowOpenedByFn:e,win:t,closeOpenedWindow:n})=>{e?t==null||t.close():t&&n?n(t):t&&t.close()};async function Gx(e){const t=gm({...e,mode:e.mode||"redirect",authFlow:e.authFlow});e.mode==="redirect"?window.location.href=t:window.open(t),await new Promise(n=>setTimeout(n,5e3))}const rX=async e=>{let t=e.openedWindow,n=!1;if(t||(t=window.open(gm({...e,mode:"popup"}),`Login to ${e.authOption}`,RA),n=!0),!t)throw new Error("Something went wrong opening pop-up");return await new Promise((r,s)=>{const o=window.setInterval(async()=>{t.closed&&(clearInterval(o),window.removeEventListener("message",a),s(new Error("User closed login window")))},1e3),a=async l=>{if(l.origin===it("inAppWallet")){if(typeof l.data!="object"){s(new Error("Invalid event data"));return}switch(l.data.eventType){case"oauthSuccessResult":{window.removeEventListener("message",a),clearInterval(o),Sg({closeOpenedWindow:e.closeOpenedWindow,isWindowOpenedByFn:n,win:t}),l.data.authResult&&r(l.data.authResult);break}case"oauthFailureResult":{window.removeEventListener("message",a),clearInterval(o),Sg({closeOpenedWindow:e.closeOpenedWindow,isWindowOpenedByFn:n,win:t}),s(new Error(l.data.errorString));break}}}};window.addEventListener("message",a)})};function UA(e){return c.jsx(M,{bg:"modalBg",color:"secondaryText",borderColor:"borderColor",flex:"row",center:"y",style:{borderRadius:Z.full,padding:`${z["3xs"]} ${z.xs}`,borderWidth:"1px",borderStyle:"solid"},children:c.jsx(P,{style:{fontSize:10,whiteSpace:"nowrap"},children:e.text})})}function pm(){return c.jsx("div",{style:{position:"absolute",top:-10,right:-10,zIndex:1,pointerEvents:"none",cursor:"default"},children:c.jsx(UA,{text:"Last used"})})}const $A=12;function ls(e){return c.jsxs(ae,{disabled:e.disabled,className:e.className,fullWidth:!0,onClick:()=>{e.onClick()},style:{display:"flex",justifyContent:"flex-start",padding:z.sm,position:"relative"},variant:"outline",children:[e.lastUsedBadge&&c.jsx(pm,{}),c.jsxs(M,{center:"y",color:"accentText",flex:"row",gap:"sm",children:[c.jsx(e.icon,{size:A.md}),c.jsx(P,{color:"primaryText",children:e.title})]})]})}const Zx=e=>c.jsx(BA,{style:{paddingBlock:e.py?z[e.py]:0},children:c.jsxs("span",{children:[" ",e.text]})}),BA=ke(()=>{const e=X();return{"&::before, &::after":{borderBottom:`1px solid ${e.colors.separatorLine}`,content:'""',flex:1},alignItems:"center",color:e.colors.secondaryText,display:"flex",fontSize:ie.sm,span:{margin:"0 16px"}}}),ih=rN(e=>({color:X().colors[e.color||"primaryText"],display:"block",fontSize:ie.sm,fontWeight:500})),Kr=sN(e=>{const t=X();return{"&:-webkit-autofill":{boxShadow:`0 0 0px 1000px ${t.colors.inputAutofillBg} inset !important`,transition:"background-color 5000s ease-in-out 0s",WebkitBoxShadow:`0 0 0px 1000px ${t.colors.inputAutofillBg} inset !important`,WebkitTextFillColor:t.colors.primaryText},"&:-webkit-autofill:focus":{boxShadow:`0 0 0px 1000px ${t.colors.inputAutofillBg} inset, 0 0 0 2px ${e.variant==="outline"?t.colors.accentText:"transparent"} !important`,WebkitBoxShadow:`0 0 0px 1000px ${t.colors.inputAutofillBg} inset, 0 0 0 2px ${e.variant==="outline"?t.colors.accentText:"transparent"} !important`},"&::placeholder":{color:t.colors.secondaryText},"&:focus":{boxShadow:`0 0 0 2px ${t.colors.accentText}`},"&:not([type='password'])":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"&[data-error='true']":{boxShadow:`0 0 0 2px ${t.colors.danger} !important`},"&[data-focus='false']:focus":{boxShadow:"none"},"&[data-placeholder='true']":{color:t.colors.secondaryText},"&[disabled]":{cursor:"not-allowed"},"&[type='number']":{appearance:"none",MozAppearance:"textfield"},"&[type='number']::-webkit-outer-spin-button, &[type='number']::-webkit-inner-spin-button":{margin:0,WebkitAppearance:"none"},appearance:"none",background:e.bg?t.colors[e.bg]:"transparent",border:"none",borderRadius:Z.md,boxShadow:`0 0 0 1.5px ${e.variant==="outline"?t.colors.borderColor:"transparent"}`,boxSizing:"border-box",color:t.colors.primaryText,display:"block",fontFamily:"inherit",fontSize:ie.sm,outline:"none",padding:e.sm?z.sm:ie.sm,WebkitAppearance:"none",width:"100%",[k1.mobile]:{fontSize:ie.md}}}),VA=ke(()=>{const e=X();return{"&:focus-within":{boxShadow:`0 0 0px 1px ${e.colors.accentText}`},"&[data-error='true']":{boxShadow:`0 0 0px 1px ${e.colors.danger}`},borderRadius:Z.md,boxShadow:`0 0 0px 1px ${e.colors.borderColor}`,display:"flex","input:focus":{boxShadow:"none"}}}),Wf=[{countryIsoCode:"AD",countryName:"Andorra",phoneNumberCode:"376"},{countryIsoCode:"AE",countryName:"United Arab Emirates",phoneNumberCode:"971"},{countryIsoCode:"AF",countryName:"Afghanistan",phoneNumberCode:"93"},{countryIsoCode:"AG",countryName:"Antigua and Barbuda",phoneNumberCode:"1268"},{countryIsoCode:"AI",countryName:"Anguilla",phoneNumberCode:"1264"},{countryIsoCode:"AL",countryName:"Albania",phoneNumberCode:"355"},{countryIsoCode:"AM",countryName:"Armenia",phoneNumberCode:"374"},{countryIsoCode:"AN",countryName:"Netherlands Antilles",phoneNumberCode:"599"},{countryIsoCode:"AO",countryName:"Angola",phoneNumberCode:"244"},{countryIsoCode:"AQ",countryName:"Antarctica",phoneNumberCode:"672"},{countryIsoCode:"AR",countryName:"Argentina",phoneNumberCode:"54"},{countryIsoCode:"AS",countryName:"American Samoa",phoneNumberCode:"1684"},{countryIsoCode:"AT",countryName:"Austria",phoneNumberCode:"43"},{countryIsoCode:"AU",countryName:"Australia",phoneNumberCode:"61"},{countryIsoCode:"AW",countryName:"Aruba",phoneNumberCode:"297"},{countryIsoCode:"AX",countryName:"Aland Islands",phoneNumberCode:"35818"},{countryIsoCode:"AZ",countryName:"Azerbaijan",phoneNumberCode:"994"},{countryIsoCode:"BA",countryName:"Bosnia and Herzegovina",phoneNumberCode:"387"},{countryIsoCode:"BB",countryName:"Barbados",phoneNumberCode:"1246"},{countryIsoCode:"BD",countryName:"Bangladesh",phoneNumberCode:"880"},{countryIsoCode:"BE",countryName:"Belgium",phoneNumberCode:"32"},{countryIsoCode:"BF",countryName:"Burkina Faso",phoneNumberCode:"226"},{countryIsoCode:"BG",countryName:"Bulgaria",phoneNumberCode:"359"},{countryIsoCode:"BH",countryName:"Bahrain",phoneNumberCode:"973"},{countryIsoCode:"BI",countryName:"Burundi",phoneNumberCode:"257"},{countryIsoCode:"BJ",countryName:"Benin",phoneNumberCode:"229"},{countryIsoCode:"BL",countryName:"Saint Barthelemy",phoneNumberCode:"590"},{countryIsoCode:"BM",countryName:"Bermuda",phoneNumberCode:"1441"},{countryIsoCode:"BN",countryName:"Brunei Darussalam",phoneNumberCode:"673"},{countryIsoCode:"BO",countryName:"Bolivia",phoneNumberCode:"591"},{countryIsoCode:"BR",countryName:"Brazil",phoneNumberCode:"55"},{countryIsoCode:"BS",countryName:"Bahamas",phoneNumberCode:"1242"},{countryIsoCode:"BT",countryName:"Bhutan",phoneNumberCode:"975"},{countryIsoCode:"BV",countryName:"Bouvet Island",phoneNumberCode:"47"},{countryIsoCode:"BW",countryName:"Botswana",phoneNumberCode:"267"},{countryIsoCode:"BY",countryName:"Belarus",phoneNumberCode:"375"},{countryIsoCode:"BZ",countryName:"Belize",phoneNumberCode:"501"},{countryIsoCode:"CA",countryName:"Canada",phoneNumberCode:"1"},{countryIsoCode:"CC",countryName:"Cocos (Keeling) Islands",phoneNumberCode:"672"},{countryIsoCode:"CF",countryName:"Central African Republic",phoneNumberCode:"236"},{countryIsoCode:"CG",countryName:"Congo",phoneNumberCode:"242"},{countryIsoCode:"CH",countryName:"Switzerland",phoneNumberCode:"41"},{countryIsoCode:"CI",countryName:"Cote d`Ivoire",phoneNumberCode:"225"},{countryIsoCode:"CK",countryName:"Cook Islands",phoneNumberCode:"682"},{countryIsoCode:"CL",countryName:"Chile",phoneNumberCode:"56"},{countryIsoCode:"CM",countryName:"Cameroon",phoneNumberCode:"237"},{countryIsoCode:"CN",countryName:"China",phoneNumberCode:"86"},{countryIsoCode:"CO",countryName:"Colombia",phoneNumberCode:"57"},{countryIsoCode:"CR",countryName:"Costa Rica",phoneNumberCode:"506"},{countryIsoCode:"CU",countryName:"Cuba",phoneNumberCode:"53"},{countryIsoCode:"CV",countryName:"Cape Verde",phoneNumberCode:"238"},{countryIsoCode:"CW",countryName:"Curacao",phoneNumberCode:"5999"},{countryIsoCode:"CX",countryName:"Christmas Island",phoneNumberCode:"6189164"},{countryIsoCode:"CY",countryName:"Cyprus",phoneNumberCode:"357"},{countryIsoCode:"CZ",countryName:"Czechia",phoneNumberCode:"420"},{countryIsoCode:"DE",countryName:"Germany",phoneNumberCode:"49"},{countryIsoCode:"DJ",countryName:"Djibouti",phoneNumberCode:"253"},{countryIsoCode:"DK",countryName:"Denmark",phoneNumberCode:"45"},{countryIsoCode:"DM",countryName:"Dominica",phoneNumberCode:"1767"},{countryIsoCode:"DO",countryName:"Dominican Republic",phoneNumberCode:"1809"},{countryIsoCode:"DZ",countryName:"Algeria",phoneNumberCode:"213"},{countryIsoCode:"EC",countryName:"Ecuador",phoneNumberCode:"593"},{countryIsoCode:"EE",countryName:"Estonia",phoneNumberCode:"372"},{countryIsoCode:"EG",countryName:"Egypt",phoneNumberCode:"20"},{countryIsoCode:"EH",countryName:"Western Sahara",phoneNumberCode:"212"},{countryIsoCode:"ER",countryName:"Eritrea",phoneNumberCode:"291"},{countryIsoCode:"ES",countryName:"Spain",phoneNumberCode:"34"},{countryIsoCode:"ET",countryName:"Ethiopia",phoneNumberCode:"251"},{countryIsoCode:"FI",countryName:"Finland",phoneNumberCode:"358"},{countryIsoCode:"FJ",countryName:"Fiji",phoneNumberCode:"679"},{countryIsoCode:"FO",countryName:"Faroe Islands",phoneNumberCode:"298"},{countryIsoCode:"FR",countryName:"France",phoneNumberCode:"33"},{countryIsoCode:"GA",countryName:"Gabon",phoneNumberCode:"241"},{countryIsoCode:"GB",countryName:"United Kingdom",phoneNumberCode:"44"},{countryIsoCode:"GD",countryName:"Grenada",phoneNumberCode:"1473"},{countryIsoCode:"GE",countryName:"Georgia",phoneNumberCode:"995"},{countryIsoCode:"GF",countryName:"French Guiana",phoneNumberCode:"594"},{countryIsoCode:"GG",countryName:"Guernsey",phoneNumberCode:"441481"},{countryIsoCode:"GH",countryName:"Ghana",phoneNumberCode:"233"},{countryIsoCode:"GI",countryName:"Gibraltar",phoneNumberCode:"350"},{countryIsoCode:"GL",countryName:"Greenland",phoneNumberCode:"299"},{countryIsoCode:"GM",countryName:"Gambia",phoneNumberCode:"220"},{countryIsoCode:"GN",countryName:"Guinea",phoneNumberCode:"224"},{countryIsoCode:"GP",countryName:"Guadeloupe",phoneNumberCode:"590"},{countryIsoCode:"GQ",countryName:"Equatorial Guinea",phoneNumberCode:"240"},{countryIsoCode:"GR",countryName:"Greece",phoneNumberCode:"30"},{countryIsoCode:"GT",countryName:"Guatemala",phoneNumberCode:"502"},{countryIsoCode:"GU",countryName:"Guam",phoneNumberCode:"1671"},{countryIsoCode:"GW",countryName:"Guinea-Bissau",phoneNumberCode:"245"},{countryIsoCode:"GY",countryName:"Guyana",phoneNumberCode:"592"},{countryIsoCode:"HN",countryName:"Honduras",phoneNumberCode:"504"},{countryIsoCode:"HR",countryName:"Croatia",phoneNumberCode:"385"},{countryIsoCode:"HT",countryName:"Haiti",phoneNumberCode:"509"},{countryIsoCode:"HU",countryName:"Hungary",phoneNumberCode:"36"},{countryIsoCode:"ID",countryName:"Indonesia",phoneNumberCode:"62"},{countryIsoCode:"IE",countryName:"Ireland",phoneNumberCode:"353"},{countryIsoCode:"IL",countryName:"Israel",phoneNumberCode:"972"},{countryIsoCode:"IM",countryName:"Isle Of Man",phoneNumberCode:"441624"},{countryIsoCode:"IN",countryName:"India",phoneNumberCode:"91"},{countryIsoCode:"IO",countryName:"British Indian Ocean Territory",phoneNumberCode:"246"},{countryIsoCode:"IQ",countryName:"Iraq",phoneNumberCode:"964"},{countryIsoCode:"IR",countryName:"Iran (Islamic Republic of)",phoneNumberCode:"98"},{countryIsoCode:"IS",countryName:"Iceland",phoneNumberCode:"354"},{countryIsoCode:"IT",countryName:"Italy",phoneNumberCode:"39"},{countryIsoCode:"JE",countryName:"Jersey",phoneNumberCode:"441534"},{countryIsoCode:"JM",countryName:"Jamaica",phoneNumberCode:"1876"},{countryIsoCode:"JO",countryName:"Jordan",phoneNumberCode:"962"},{countryIsoCode:"JP",countryName:"Japan",phoneNumberCode:"81"},{countryIsoCode:"KE",countryName:"Kenya",phoneNumberCode:"254"},{countryIsoCode:"KG",countryName:"Kyrgyzstan",phoneNumberCode:"996"},{countryIsoCode:"KH",countryName:"Cambodia",phoneNumberCode:"855"},{countryIsoCode:"KI",countryName:"Kiribati",phoneNumberCode:"686"},{countryIsoCode:"KM",countryName:"Comoros",phoneNumberCode:"269"},{countryIsoCode:"KN",countryName:"Saint Kitts and Nevis",phoneNumberCode:"1869"},{countryIsoCode:"KR",countryName:"Republic of Korea",phoneNumberCode:"82"},{countryIsoCode:"KW",countryName:"Kuwait",phoneNumberCode:"965"},{countryIsoCode:"KY",countryName:"Cayman Islands",phoneNumberCode:"1345"},{countryIsoCode:"KZ",countryName:"Kazakhstan",phoneNumberCode:"7"},{countryIsoCode:"LB",countryName:"Lebanon",phoneNumberCode:"961"},{countryIsoCode:"LC",countryName:"Saint Lucia",phoneNumberCode:"1758"},{countryIsoCode:"LI",countryName:"Liechtenstein",phoneNumberCode:"423"},{countryIsoCode:"LK",countryName:"Sri Lanka",phoneNumberCode:"94"},{countryIsoCode:"LR",countryName:"Liberia",phoneNumberCode:"231"},{countryIsoCode:"LS",countryName:"Lesotho",phoneNumberCode:"266"},{countryIsoCode:"LT",countryName:"Lithuania",phoneNumberCode:"370"},{countryIsoCode:"LU",countryName:"Luxembourg",phoneNumberCode:"352"},{countryIsoCode:"LV",countryName:"Latvia",phoneNumberCode:"371"},{countryIsoCode:"LY",countryName:"Libyan Arab Jamahiriya",phoneNumberCode:"218"},{countryIsoCode:"MA",countryName:"Morocco",phoneNumberCode:"212"},{countryIsoCode:"MC",countryName:"Monaco",phoneNumberCode:"377"},{countryIsoCode:"MD",countryName:"Moldova (Republic of)",phoneNumberCode:"373"},{countryIsoCode:"ME",countryName:"Montenegro",phoneNumberCode:"382"},{countryIsoCode:"MF",countryName:"Saint Martin French",phoneNumberCode:"590"},{countryIsoCode:"MG",countryName:"Madagascar",phoneNumberCode:"261"},{countryIsoCode:"MH",countryName:"Marshall Islands",phoneNumberCode:"692"},{countryIsoCode:"ML",countryName:"Mali",phoneNumberCode:"223"},{countryIsoCode:"MM",countryName:"Myanmar",phoneNumberCode:"95"},{countryIsoCode:"MN",countryName:"Mongolia",phoneNumberCode:"976"},{countryIsoCode:"MP",countryName:"Northern Mariana Islands",phoneNumberCode:"1670"},{countryIsoCode:"MQ",countryName:"Martinique",phoneNumberCode:"596"},{countryIsoCode:"MR",countryName:"Mauritania",phoneNumberCode:"222"},{countryIsoCode:"MS",countryName:"Montserrat",phoneNumberCode:"1664"},{countryIsoCode:"MT",countryName:"Malta",phoneNumberCode:"356"},{countryIsoCode:"MU",countryName:"Mauritius",phoneNumberCode:"230"},{countryIsoCode:"MV",countryName:"Maldives",phoneNumberCode:"960"},{countryIsoCode:"MW",countryName:"Malawi",phoneNumberCode:"265"},{countryIsoCode:"MX",countryName:"Mexico",phoneNumberCode:"52"},{countryIsoCode:"MY",countryName:"Malaysia",phoneNumberCode:"60"},{countryIsoCode:"MZ",countryName:"Mozambique",phoneNumberCode:"258"},{countryIsoCode:"NA",countryName:"Namibia",phoneNumberCode:"264"},{countryIsoCode:"NC",countryName:"New Caledonia",phoneNumberCode:"687"},{countryIsoCode:"NE",countryName:"Niger",phoneNumberCode:"227"},{countryIsoCode:"NF",countryName:"Norfolk Island",phoneNumberCode:"672"},{countryIsoCode:"NG",countryName:"Nigeria",phoneNumberCode:"234"},{countryIsoCode:"NI",countryName:"Nicaragua",phoneNumberCode:"505"},{countryIsoCode:"NL",countryName:"Netherlands",phoneNumberCode:"31"},{countryIsoCode:"NO",countryName:"Norway",phoneNumberCode:"47"},{countryIsoCode:"NP",countryName:"Nepal",phoneNumberCode:"977"},{countryIsoCode:"NR",countryName:"Nauru",phoneNumberCode:"674"},{countryIsoCode:"NU",countryName:"Niue",phoneNumberCode:"683"},{countryIsoCode:"NZ",countryName:"New Zealand",phoneNumberCode:"64"},{countryIsoCode:"OM",countryName:"Oman",phoneNumberCode:"968"},{countryIsoCode:"PA",countryName:"Panama",phoneNumberCode:"507"},{countryIsoCode:"PE",countryName:"Peru",phoneNumberCode:"51"},{countryIsoCode:"PF",countryName:"French Polynesia",phoneNumberCode:"689"},{countryIsoCode:"PG",countryName:"Papua New Guinea",phoneNumberCode:"675"},{countryIsoCode:"PH",countryName:"Philippines",phoneNumberCode:"63"},{countryIsoCode:"PK",countryName:"Pakistan",phoneNumberCode:"92"},{countryIsoCode:"PL",countryName:"Poland",phoneNumberCode:"48"},{countryIsoCode:"PM",countryName:"Saint Pierre and Miquelon",phoneNumberCode:"508"},{countryIsoCode:"PN",countryName:"Pitcairn",phoneNumberCode:"64"},{countryIsoCode:"PR",countryName:"Puerto Rico",phoneNumberCode:"1787"},{countryIsoCode:"PT",countryName:"Portugal",phoneNumberCode:"351"},{countryIsoCode:"PW",countryName:"Palau",phoneNumberCode:"680"},{countryIsoCode:"PY",countryName:"Paraguay",phoneNumberCode:"595"},{countryIsoCode:"QA",countryName:"Qatar",phoneNumberCode:"974"},{countryIsoCode:"RE",countryName:"Reunion",phoneNumberCode:"262"},{countryIsoCode:"RO",countryName:"Romania",phoneNumberCode:"40"},{countryIsoCode:"RS",countryName:"Serbia",phoneNumberCode:"381"},{countryIsoCode:"RU",countryName:"Russian Federation",phoneNumberCode:"7"},{countryIsoCode:"RW",countryName:"Rwanda",phoneNumberCode:"250"},{countryIsoCode:"SA",countryName:"Saudi Arabia",phoneNumberCode:"966"},{countryIsoCode:"SB",countryName:"Solomon Islands",phoneNumberCode:"677"},{countryIsoCode:"SC",countryName:"Seychelles",phoneNumberCode:"248"},{countryIsoCode:"SD",countryName:"Sudan",phoneNumberCode:"249"},{countryIsoCode:"SE",countryName:"Sweden",phoneNumberCode:"46"},{countryIsoCode:"SG",countryName:"Singapore",phoneNumberCode:"65"},{countryIsoCode:"SH",countryName:"Saint Helena",phoneNumberCode:"290"},{countryIsoCode:"SI",countryName:"Slovenia",phoneNumberCode:"386"},{countryIsoCode:"SK",countryName:"Slovakia",phoneNumberCode:"421"},{countryIsoCode:"SL",countryName:"Sierra Leone",phoneNumberCode:"232"},{countryIsoCode:"SM",countryName:"San Marino",phoneNumberCode:"378"},{countryIsoCode:"SN",countryName:"Senegal",phoneNumberCode:"221"},{countryIsoCode:"SO",countryName:"Somalia",phoneNumberCode:"252"},{countryIsoCode:"SR",countryName:"Suriname",phoneNumberCode:"597"},{countryIsoCode:"SS",countryName:"South Sudan",phoneNumberCode:"211"},{countryIsoCode:"ST",countryName:"Sao Tome and Principe",phoneNumberCode:"239"},{countryIsoCode:"SV",countryName:"El Salvador",phoneNumberCode:"503"},{countryIsoCode:"SX",countryName:"Sint Maarten Dutch",phoneNumberCode:"1721"},{countryIsoCode:"SY",countryName:"Syrian Arab Republic",phoneNumberCode:"963"},{countryIsoCode:"SZ",countryName:"Swaziland",phoneNumberCode:"268"},{countryIsoCode:"TC",countryName:"Turks and Caicos Islands",phoneNumberCode:"1649"},{countryIsoCode:"TD",countryName:"Chad",phoneNumberCode:"235"},{countryIsoCode:"TF",countryName:"French Southern Territories",phoneNumberCode:"1"},{countryIsoCode:"TG",countryName:"Togo",phoneNumberCode:"228"},{countryIsoCode:"TH",countryName:"Thailand",phoneNumberCode:"66"},{countryIsoCode:"TJ",countryName:"Tajikistan",phoneNumberCode:"992"},{countryIsoCode:"TK",countryName:"Tokelau",phoneNumberCode:"690"},{countryIsoCode:"TL",countryName:"Timor-Leste (East Timor)",phoneNumberCode:"670"},{countryIsoCode:"TM",countryName:"Turkmenistan",phoneNumberCode:"993"},{countryIsoCode:"TN",countryName:"Tunisia",phoneNumberCode:"216"},{countryIsoCode:"TO",countryName:"Tonga",phoneNumberCode:"676"},{countryIsoCode:"TR",countryName:"Turkey",phoneNumberCode:"90"},{countryIsoCode:"TT",countryName:"Trinidad and Tobago",phoneNumberCode:"1868"},{countryIsoCode:"TV",countryName:"Tuvalu",phoneNumberCode:"688"},{countryIsoCode:"TW",countryName:"Taiwan (Province of China)",phoneNumberCode:"886"},{countryIsoCode:"TZ",countryName:"Tanzania (United Republic of)",phoneNumberCode:"255"},{countryIsoCode:"UA",countryName:"Ukraine",phoneNumberCode:"380"},{countryIsoCode:"UG",countryName:"Uganda",phoneNumberCode:"256"},{countryIsoCode:"US",countryName:"United States",phoneNumberCode:"1"},{countryIsoCode:"UY",countryName:"Uruguay",phoneNumberCode:"598"},{countryIsoCode:"UZ",countryName:"Uzbekistan",phoneNumberCode:"998"},{countryIsoCode:"VE",countryName:"Venezuela",phoneNumberCode:"58"},{countryIsoCode:"VG",countryName:"Virgin Islands British",phoneNumberCode:"1284"},{countryIsoCode:"VI",countryName:"Virgin Islands US",phoneNumberCode:"1340"},{countryIsoCode:"VN",countryName:"Vietnam",phoneNumberCode:"84"},{countryIsoCode:"VU",countryName:"Vanuatu",phoneNumberCode:"678"},{countryIsoCode:"WF",countryName:"Wallis and Futuna Islands",phoneNumberCode:"681"},{countryIsoCode:"WS",countryName:"Samoa",phoneNumberCode:"685"},{countryIsoCode:"XK",countryName:"Kosovo",phoneNumberCode:"383"},{countryIsoCode:"YE",countryName:"Yemen",phoneNumberCode:"967"},{countryIsoCode:"YT",countryName:"Mayotte",phoneNumberCode:"262269"},{countryIsoCode:"YU",countryName:"Yugoslavia",phoneNumberCode:"38"},{countryIsoCode:"ZA",countryName:"South Africa",phoneNumberCode:"27"},{countryIsoCode:"ZM",countryName:"Zambia",phoneNumberCode:"260"},{countryIsoCode:"ZW",countryName:"Zimbabwe",phoneNumberCode:"263"}];function Ff(e){const t=Wf.find(n=>n.countryIsoCode===e);return t?`${t.countryIsoCode} +${t.phoneNumberCode}`:"US +1"}function WA({countryCode:e,setCountryCode:t,allowedCountryCodes:n}){const i=w.useRef(null),r=n&&n.length>0?Wf.filter(s=>n.includes(s.countryIsoCode)):Wf??[{countryIsoCode:"US",countryName:"United States",phoneNumberCode:1}];return c.jsxs(FA,{name:"countries",onChange:s=>{t(s.target.value)},ref:i,style:{padding:`${z.sm} ${z.md}`},value:e,children:[c.jsx(Ag,{style:{display:"none"},value:e,children:e}),r.map(s=>c.jsxs(Ag,{value:Ff(s.countryIsoCode),children:[s.countryName," +",s.phoneNumberCode]},s.countryIsoCode))]})}const Ag=lN(()=>{const e=X();return{"&:hover":{background:e.colors.tertiaryBg},background:e.colors.modalBg,color:e.colors.primaryText,transition:"background 0.3s ease"}}),FA=cN(e=>{const t=X();return{"&::placeholder":{color:t.colors.secondaryText},"&[disabled]":{cursor:"not-allowed"},appearance:"none",background:"transparent",border:"none",borderRadius:Z.lg,boxSizing:"border-box",color:t.colors.primaryText,cursor:"pointer",display:"block",maxWidth:"90px",minWidth:"0px",outline:"none",overflow:"hidden",padding:z.sm,textOverflow:"ellipsis",WebkitAppearance:"none",whiteSpace:"nowrap"}});function Yf(e){const[t,n]=w.useState(e.defaultSmsCountryCode?Ff(e.defaultSmsCountryCode):e.allowedSmsCountryCodes&&e.allowedSmsCountryCodes.length>0&&e.allowedSmsCountryCodes[0]?Ff(e.allowedSmsCountryCodes[0]):"US +1"),[i,r]=w.useState(""),[s,o]=w.useState(),[a,l]=w.useState(!1),u=()=>{l(!0),!(!i||s)&&e.onSelect(e.format==="phone"?`+${t.split("+")[1]}${i}`:i)},d=a&&!!s||!i&&!!e.emptyErrorMessage&&a;return c.jsxs("div",{style:{width:"100%"},children:[c.jsxs(VA,{className:e.className,"data-error":d,style:{display:"flex",flexDirection:"row",position:"relative"},children:[e.lastUsedBadge&&c.jsx(pm,{}),e.format==="phone"&&c.jsx(WA,{allowedCountryCodes:e.allowedSmsCountryCodes,countryCode:t,setCountryCode:n}),c.jsx(Kr,{disabled:e.disabled,name:e.name,onChange:f=>{r(f.target.value),e.errorMessage?o(e.errorMessage(f.target.value)):o(void 0)},onKeyDown:f=>{f.key==="Enter"&&u()},placeholder:e.placeholder,style:{flexGrow:1,padding:`${z.sm} ${e.format==="phone"?0:z.sm}`},tabIndex:-1,type:e.type,value:i,variant:"transparent"}),c.jsx(Yi,{disabled:e.disabled,onClick:u,style:{borderRadius:`0 ${Z.md} ${Z.md} 0`,padding:z.sm},children:c.jsx(fN,{height:A.md,width:A.md})})]}),a&&s&&c.jsxs(c.Fragment,{children:[c.jsx($,{y:"xs"}),c.jsx(P,{color:"danger",size:"sm",children:s})]}),!(a&&s)&&!i&&e.emptyErrorMessage&&a&&c.jsxs(c.Fragment,{children:[c.jsx($,{y:"xs"}),c.jsx(P,{color:"danger",size:"sm",children:e.emptyErrorMessage})]})]})}function YA(e){return/^\S+@\S+\.\S+$/.test(e.replace(/\+/g,""))}function QA(e){switch(e){case"google":return"Sign In - Google Accounts";default:return`Sign In - ${e.slice(0,1).toUpperCase()}${e.slice(1)}`}}function HA(e){switch(e){case"facebook":return{height:555,width:715};default:return{height:500,width:350}}}function GA(e,t,n){switch(e){case"apple":case"facebook":case"google":case"farcaster":case"telegram":case"github":case"twitch":case"steam":case"line":case"x":case"tiktok":case"epic":case"guest":case"coinbase":case"discord":return gm({authOption:e,client:t,ecosystem:n});default:throw new Error(`Unsupported auth option: ${e}`)}}function qx({authOption:e,themeObj:t,client:n,ecosystem:i}){const{height:r,width:s}=HA(e),o=(window.innerHeight-r)/2,a=(window.innerWidth-s)/2,l=window.open(GA(e,n,i),void 0,`width=${s}, height=${r}, top=${o}, left=${a}`);if(l){const u=QA(e);l.document.title=u,l.document.body.innerHTML=ZA,l.document.body.style.background=t.colors.modalBg,l.document.body.style.color=t.colors.accentText}return l&&window.addEventListener("beforeunload",()=>{l==null||l.close()}),l}const ZA=`
124
+ <svg class="loader" viewBox="0 0 50 50">
125
+ <circle
126
+ cx="25"
127
+ cy="25"
128
+ r="20"
129
+ fill="none"
130
+ stroke="currentColor"
131
+ stroke-width="4"
132
+ />
133
+ </svg>
134
+
135
+ <style>
136
+ body,
137
+ html {
138
+ height: 100%;
139
+ margin: 0;
140
+ padding: 0;
141
+ }
142
+
143
+ body {
144
+ display: flex;
145
+ justify-content: center;
146
+ align-items: center;
147
+ }
148
+
149
+ .loader {
150
+ width: 50px;
151
+ height: 50px;
152
+ animation: spin 2s linear infinite;
153
+ }
154
+
155
+ .loader circle {
156
+ animation: loading 1.5s linear infinite;
157
+ }
158
+
159
+ @keyframes loading {
160
+ 0% {
161
+ stroke-dasharray: 1, 150;
162
+ stroke-dashoffset: 0;
163
+ }
164
+ 50% {
165
+ stroke-dasharray: 90, 150;
166
+ stroke-dashoffset: -35;
167
+ }
168
+ 100% {
169
+ stroke-dasharray: 90, 150;
170
+ stroke-dashoffset: -124;
171
+ }
172
+ }
173
+
174
+ @keyframes spin {
175
+ 100% {
176
+ transform: rotate(360deg);
177
+ }
178
+ }
179
+ </style>
180
+ `,Qf=["email","phone","google","apple","facebook","passkey"],Kx=e=>{var Y,Q,G,ne,ce,q,he;const t=e.locale,{wallet:n}=e,i=Zs(),r=X(),s=w.useMemo(()=>OA(),[]),o=w.useMemo(()=>od(),[]),a=w.useMemo(()=>{var re,se;return e.wallet.id==="inApp"?(se=(re=e.wallet.getConfig())==null?void 0:re.metadata)==null?void 0:se.image:void 0},[e.wallet]),l={apple:t.signInWithApple,coinbase:"Coinbase",discord:t.signInWithDiscord,facebook:t.signInWithFacebook,farcaster:"Farcaster",github:"GitHub",google:t.signInWithGoogle,line:"LINE",steam:"Steam",telegram:"Telegram",twitch:"Twitch",x:"X",tiktok:"TikTok",epic:"Epic"},{data:u,isLoading:d}=xe({enabled:Oe(n),queryFn:async()=>{if(Oe(n)){const re=await ex(n.id);return(re==null?void 0:re.authOptions)??null}return null},queryKey:["auth-options",n.id],retry:!1}),f=Oe(n)?u??Qf:((Q=(Y=n.getConfig())==null?void 0:Y.auth)==null?void 0:Q.options)??Qf,m=w.useMemo(()=>!s||n.id!==o?f:[...f].sort((re,se)=>s===re?-1:s===se?1:0),[f,s,n.id,o]),y=m.indexOf("email"),p=y!==-1,g=m.indexOf("phone"),x=g!==-1,_=m.filter(re=>ed.includes(re)),b=w.useMemo(()=>{switch(_.length){case 7:return 4;case 6:return 4;default:return 5}},[_.length]),I=w.useMemo(()=>Array.from({length:Math.ceil(_.length/b)},(re,se)=>_.slice(se*b,(se+1)*b)),[_,b]),[E,C]=w.useState(null),T=w.useMemo(()=>E||(p&&x?y<g?"email":"phone":p?"email":x?"phone":"none"),[p,x,y,g,E]);if(Oe(n)&&d)return c.jsx(wt,{});const j=m.includes("passkey"),O=m.includes("guest"),L=m.includes("wallet"),N=T==="email"?t.emailPlaceholder:t.phonePlaceholder,v=T==="email"?t.emailRequired:t.phoneRequired;let D="text";T==="email"?D="email":T==="phone"&&(D="tel");const k=_.length>0,U=Oe(n)?{id:n.id,partnerId:(G=n.getConfig())==null?void 0:G.partnerId}:void 0,R=async()=>{const re={chain:e.chain,client:e.client,ecosystem:U,strategy:"guest"},se=(async()=>{const le=await n.connect(re);return Gi("guest",Ut),le})();i({guestLogin:{connectionPromise:se}}),e.select()},B=async re=>{var Le,Fe;const se=n.getConfig(),le=((Le=se==null?void 0:se.auth)==null?void 0:Le.mode)??"popup";if(se&&"auth"in se&&le!=="popup"&&!e.isLinking)return Gx({authOption:re,client:e.client,ecosystem:U,mode:le,redirectUrl:(Fe=se==null?void 0:se.auth)==null?void 0:Fe.redirectUrl});try{const rt=qx({authOption:re,client:e.client,ecosystem:U,themeObj:r});if(!rt)throw new Error("Failed to open login window");const mt={chain:e.chain,client:e.client,closeOpenedWindow:fe=>{fe.close()},ecosystem:U,openedWindow:rt,strategy:re},ue=(()=>{if(e.isLinking){if(n.id!=="inApp"&&!Oe(n))throw new Error("Only in-app wallets support multi-auth");return qr(mt)}const fe=n.connect(mt);return Gi(re,Ut),fe})();i({socialLogin:{connectionPromise:ue,type:re}}),e.select()}catch(rt){console.error(`Error signing in with ${re}`,rt)}};function F(){i({passkeyLogin:!0}),e.select()}function W(){i({walletLogin:{linking:e.isLinking||!1}}),e.select()}const V=_.length>2;return c.jsxs(M,{flex:"column",gap:"md",style:{position:"relative"},children:[a&&c.jsxs(c.Fragment,{children:[c.jsx(Xe,{alt:a.alt,client:e.client,height:`${a.height}`,src:a.src,style:{margin:"auto"},width:`${a.width}`}),c.jsx($,{y:"xxs"})]}),k&&c.jsx(M,{flex:"column",gap:_.length>4?"xs":"sm",children:I.map(re=>c.jsx(qA,{children:re.map(se=>{const le=!V||_.length>4?A.md:A.lg;return c.jsxs(KA,{className:"tw-social-button","aria-label":`Login with ${se}`,"data-variant":V?"icon":"full",disabled:e.disabled,onClick:()=>{B(se)},style:{flexGrow:_.length<7?1:0,position:"relative"},variant:"outline",children:[o===n.id&&s===se&&c.jsx(pm,{}),c.jsx(Xe,{client:e.client,height:le,src:ms[se],width:le}),!V&&`${_.length===1?"Continue with ":""}${l[se]}`]},se)})},re[0]))}),e.size==="wide"&&k&&(p||x)&&c.jsx(Zx,{text:t.or}),p&&(T==="email"?c.jsx(Yf,{className:"tw-input-container tw-input-container__email",lastUsedBadge:o===n.id&&s==="email",disabled:e.disabled,emptyErrorMessage:v,errorMessage:re=>{if(!YA(re.toLowerCase()))return t.invalidEmail},name:"email",onSelect:re=>{i({emailLogin:re}),e.select()},placeholder:N,submitButtonText:t.submitEmail,type:D}):c.jsx(ls,{lastUsedBadge:o===n.id&&s==="email",className:"tw-select-button tw-select-button__email",client:e.client,disabled:e.disabled,icon:td,onClick:()=>{C("email")},title:t.emailPlaceholder})),x&&(T==="phone"?c.jsx(Yf,{className:"tw-input-container tw-input-container__phone",allowedSmsCountryCodes:(ce=(ne=n.getConfig())==null?void 0:ne.auth)==null?void 0:ce.allowedSmsCountryCodes,defaultSmsCountryCode:(he=(q=n.getConfig())==null?void 0:q.auth)==null?void 0:he.defaultSmsCountryCode,lastUsedBadge:o===n.id&&s==="phone",disabled:e.disabled,emptyErrorMessage:v,errorMessage:re=>{const se=re.replace(/[-() ]/g,"");if(!/^[0-9]+$/.test(se)&&x)return t.invalidPhone},format:"phone",name:"phone",onSelect:re=>{i({phoneLogin:re.replace(/[-() ]/g,"")}),e.select()},placeholder:N,submitButtonText:t.submitEmail,type:D}):c.jsx(ls,{lastUsedBadge:o===n.id&&s==="phone",className:"tw-select-button tw-select-button__phone",client:e.client,disabled:e.disabled,icon:nd,onClick:()=>{C("phone")},title:t.phonePlaceholder})),j&&c.jsx(ls,{lastUsedBadge:o===n.id&&s==="passkey",className:"tw-select-button tw-select-button__passkey",client:e.client,disabled:e.disabled,icon:qs,onClick:()=>{F()},title:t.passkey}),L&&!e.isLinking&&c.jsx(ls,{lastUsedBadge:o===n.id&&s==="wallet",className:"tw-select-button tw-select-button__link-wallet",client:e.client,icon:Rs,onClick:()=>{W()},title:t.signInWithWallet}),O&&c.jsx(ls,{lastUsedBadge:o===n.id&&s==="guest",className:"tw-select-button tw-select-button__guest",client:e.client,disabled:e.disabled,icon:dm,onClick:()=>{R()},title:t.loginAsGuest}),e.isLinking&&c.jsx(ls,{lastUsedBadge:!1,className:"tw-select-button tw-select-button__link-wallet",client:e.client,icon:Rs,onClick:()=>{W()},title:t.linkWallet})]})},qA=e=>c.jsx(M,{center:"x",flex:"row",gap:e.children.length>4?"xs":"sm",style:{display:"flex",justifyContent:"center","& > *":{flexBasis:`${100/e.children.length}%`,maxWidth:`${100/e.children.length}%`}},children:e.children}),KA=Be(ae)({"&[data-variant='full']":{"&:active":{boxShadow:"none"},display:"flex",fontSize:ie.md,fontWeight:500,gap:z.sm,justifyContent:"flex-start",padding:z.md,transition:"background-color 0.2s ease"},"&[data-variant='icon']":{padding:z.sm}});function JA(e){var f,m;const t=(((m=(f=e.wallet.getConfig())==null?void 0:f.auth)==null?void 0:m.options)||Qf).slice().sort((y,p)=>y in ms&&!(p in ms)?-1:!(y in ms)&&p in ms?1:0),n=X(),i=t[0],r=t[1],s=t[2],o=t[3],a="4px",l="6px",u="20",d="12";return i&&r?c.jsxs("div",{style:{width:`${A.xl}px`,height:`${A.xl}px`,position:"relative",gap:z["3xs"],border:`1px solid ${n.colors.borderColor}`,borderRadius:Z.md,backgroundColor:n.colors.tertiaryBg},children:[c.jsx("div",{style:{position:"absolute",top:a,left:a,display:"flex"},children:c.jsx(xa,{authOption:i,client:e.client,size:u})}),c.jsx("div",{style:{position:"absolute",bottom:a,right:a,display:"flex"},children:c.jsx(xa,{authOption:r,client:e.client,size:u})}),c.jsxs("div",{children:[s&&c.jsx("div",{style:{position:"absolute",top:l,right:l,display:"flex"},children:c.jsx(xa,{authOption:s,client:e.client,size:d})}),o&&c.jsx("div",{style:{position:"absolute",bottom:l,left:l,display:"flex"},children:c.jsx(xa,{authOption:o,client:e.client,size:d})})]})]}):i?c.jsx("div",{style:{width:`${A.xl}px`,height:`${A.xl}px`,display:"flex",justifyContent:"center",alignItems:"center",border:`1px solid ${n.colors.borderColor}`,borderRadius:Z.md,backgroundColor:n.colors.tertiaryBg},children:c.jsx(xa,{authOption:i,client:e.client,size:A.lg},i)}):null}function xa(e){const t=X();if(e.authOption in ms){const n=ms[e.authOption];return c.jsx(Xe,{src:n,width:e.size,height:e.size,client:e.client})}return e.authOption==="phone"?c.jsx(nd,{size:e.size,color:t.colors.secondaryText}):e.authOption==="email"?c.jsx(td,{size:e.size,color:t.colors.secondaryText}):e.authOption==="passkey"?c.jsx(qs,{size:e.size,color:t.colors.secondaryText}):e.authOption==="guest"?c.jsx(dm,{size:e.size,color:t.colors.secondaryText}):null}function wm(e){var f,m,y,p,g,x;const{selectWallet:t,wallet:n}=e,i=n.id,r=(f=e.recommendedWallets)==null?void 0:f.find(_=>_.id===i),s=oa(i),o=((m=Hi().find(_=>_.info.rdns===i))==null?void 0:m.info.name)||((y=s.data)==null?void 0:y.name),a=Hi().find(_=>_.info.rdns===i),l=n&&i==="inApp"?(p=n.getConfig())==null?void 0:p.metadata:void 0;let u=(l==null?void 0:l.name)||o;const d=l==null?void 0:l.icon;if(n.id==="inApp"){const _=n.getConfig();if(((g=_==null?void 0:_.auth)==null?void 0:g.options.length)===1){const b=(x=_.auth)==null?void 0:x.options[0];b&&(u=XA({text:b}))}}return c.jsxs(xm,{className:e.className,"data-active":e.isActive,onClick:t,type:"button",children:[d?c.jsx(Xe,{alt:"",client:e.client,height:`${A.xl}`,src:d,width:`${A.xl}`}):n.id==="inApp"?c.jsx(JA,{client:e.client,wallet:n}):c.jsx(si,{client:e.client,id:i,size:A.xl}),c.jsxs(M,{expand:!0,flex:"column",gap:"xxs",children:[u?c.jsx(P,{color:"primaryText",weight:500,children:u}):c.jsx(ge,{height:ie.md,width:"100px"}),e.badge?c.jsx(P,{size:"sm",children:e.badge}):r?c.jsx(P,{size:"sm",children:e.connectLocale.recommended}):a?c.jsx(P,{size:"sm",children:e.connectLocale.installed}):null]})]})}const xm=Xi(e=>{const t=X();return{all:"unset","&:hover":{backgroundColor:t.colors.tertiaryBg,transform:"scale(1.01)"},'&[data-active="true"]':{backgroundColor:t.colors.tertiaryBg},alignItems:"center",borderRadius:Z.md,boxSizing:"border-box",color:t.colors.secondaryText,cursor:"pointer",display:"flex",flexDirection:"row",gap:z.sm,padding:`${z.xs} ${z.xs}`,transition:"background-color 200ms ease, transform 200ms ease",width:"100%"}});function XA(e){return e.text.charAt(0).toUpperCase()+e.text.slice(1)}async function eD(e){switch(e){case"es_ES":return(await h(async()=>{const{default:t}=await import("./es-D1JvwHmW.js");return{default:t}},[])).default;case"ja_JP":return(await h(async()=>{const{default:t}=await import("./ja-qsQcCBfK.js");return{default:t}},[])).default;case"tl_PH":return(await h(async()=>{const{default:t}=await import("./tl-LjGyFSL6.js");return{default:t}},[])).default;case"vi_VN":return(await h(async()=>{const{default:t}=await import("./vi-BmXdTnDJ.js");return{default:t}},[])).default;case"de_DE":return(await h(async()=>{const{default:t}=await import("./de-HLnDQwsk.js");return{default:t}},[])).default;case"ko_KR":return(await h(async()=>{const{default:t}=await import("./kr-CBFJeZbH.js");return{default:t}},[])).default;case"fr_FR":return(await h(async()=>{const{default:t}=await import("./fr-DQrXBak2.js");return{default:t}},[])).default;case"ru_RU":return(await h(async()=>{const{default:t}=await import("./ru-BDcqn2vv.js");return{default:t}},[])).default;case"pt_BR":return(await h(async()=>{const{default:t}=await import("./br-Bh5kquYi.js");return{default:t}},[])).default;case"zh_CN":return(await h(async()=>{const{default:t}=await import("./zh-8Oiy2Jay.js");return{default:t}},[])).default;default:return(await h(async()=>{const{default:t}=await import("./en-lXclJmNl.js");return{default:t}},[])).default}}function Jx(e){const[t,n]=w.useState(void 0);return w.useEffect(()=>{eD(e).then(i=>{n(i)})},[e]),t}function tD(e){const{screen:t}=ym(),n=Zs(),i=Jx(e.connectLocale.id);return e.size==="wide"||t!==Wt.main&&e.size==="compact"?c.jsx(wm,{badge:void 0,client:e.client,connectLocale:e.connectLocale,isActive:t===e.wallet,recommendedWallets:e.recommendedWallets,selectWallet:()=>{n({}),e.select()},wallet:e.wallet}):i?c.jsx(Kx,{chain:e.chain,client:e.client,disabled:e.disabled,done:e.done,goBack:e.goBack,locale:i,select:e.select,size:e.size,wallet:e.wallet}):c.jsx(wt,{height:"195px"})}async function nD(e){switch(e){case"es_ES":return(await h(async()=>{const{default:t}=await import("./es-BoeWNXZK.js");return{default:t}},[])).default;case"ja_JP":return(await h(async()=>{const{default:t}=await import("./ja-B_14a7-i.js");return{default:t}},[])).default;case"tl_PH":return(await h(async()=>{const{default:t}=await import("./tl-DgU76fWy.js");return{default:t}},[])).default;case"vi_VN":return(await h(async()=>{const{default:t}=await import("./vi-CeeFZUD3.js");return{default:t}},[])).default;case"de_DE":return(await h(async()=>{const{default:t}=await import("./de-DxwDt0Si.js");return{default:t}},[])).default;case"ko_KR":return(await h(async()=>{const{default:t}=await import("./kr-C28WMrvF.js");return{default:t}},[])).default;case"fr_FR":return(await h(async()=>{const{default:t}=await import("./fr-Cl9YKZtN.js");return{default:t}},[])).default;case"ru_RU":return(await h(async()=>{const{default:t}=await import("./ru-CRpUAoj9.js");return{default:t}},[])).default;case"pt_BR":return(await h(async()=>{const{default:t}=await import("./br-Bzf0kdCg.js");return{default:t}},[])).default;case"zh_CN":return(await h(async()=>{const{default:t}=await import("./zh-DNrmKyYe.js");return{default:t}},[])).default;default:return(await h(async()=>{const{default:t}=await import("./en-wiTKdR4T.js");return{default:t}},[])).default}}async function iD(e){switch(e){case"es_ES":return(await h(async()=>{const{default:t}=await import("./es-Dar-xg4p.js");return{default:t}},[])).default;case"ja_JP":return(await h(async()=>{const{default:t}=await import("./ja-DI56VDCk.js");return{default:t}},[])).default;case"tl_PH":return(await h(async()=>{const{default:t}=await import("./tl-DNpoqKxi.js");return{default:t}},[])).default;case"vi_VN":return(await h(async()=>{const{default:t}=await import("./vi-rl4iq8bS.js");return{default:t}},[])).default;case"de_DE":return(await h(async()=>{const{default:t}=await import("./de-BIWVAXLP.js");return{default:t}},[])).default;case"ko_KR":return(await h(async()=>{const{default:t}=await import("./kr-BP_x8d-4.js");return{default:t}},[])).default;case"fr_FR":return(await h(async()=>{const{default:t}=await import("./fr-Biip2F0B.js");return{default:t}},[])).default;case"ru_RU":return(await h(async()=>{const{default:t}=await import("./ru-ov3iIk3P.js");return{default:t}},[])).default;case"pt_BR":return(await h(async()=>{const{default:t}=await import("./br-OOdQ3ULT.js");return{default:t}},[])).default;case"zh_CN":return(await h(async()=>{const{default:t}=await import("./zh-DrVkc5qI.js");return{default:t}},[])).default;default:return(await h(async()=>{const{default:t}=await import("./en-C9j038gl.js");return{default:t}},[])).default}}const Dg=e=>c.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 23 28",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M22.4181 21.6041C22.008 22.5506 21.5224 23.422 20.9599 24.223C20.1931 25.3151 19.5652 26.0711 19.0814 26.4908C18.3313 27.1799 17.5277 27.5327 16.6671 27.5528C16.0493 27.5528 15.3043 27.3772 14.437 27.021C13.5669 26.6664 12.7673 26.4908 12.0362 26.4908C11.2694 26.4908 10.447 26.6664 9.56734 27.021C8.68636 27.3772 7.97665 27.5628 7.43403 27.5812C6.60879 27.6164 5.78624 27.2534 4.96519 26.4908C4.44116 26.0343 3.78569 25.2516 3.00047 24.1428C2.15799 22.9587 1.46536 21.5857 0.92274 20.0203C0.341611 18.3295 0.050293 16.6922 0.050293 15.1071C0.050293 13.2914 0.44307 11.7253 1.2298 10.413C1.84809 9.35886 2.67065 8.52734 3.70014 7.91691C4.72963 7.30648 5.84199 6.99541 7.03991 6.97551C7.69538 6.97551 8.55493 7.17804 9.6231 7.57607C10.6882 7.97544 11.3722 8.17797 11.672 8.17797C11.8962 8.17797 12.656 7.94116 13.944 7.46904C15.162 7.0312 16.19 6.84991 17.0321 6.92133C19.3141 7.10529 21.0285 8.00387 22.1687 9.62276C20.1278 10.858 19.1182 12.5881 19.1383 14.8076C19.1567 16.5363 19.7846 17.9749 21.0185 19.1172C21.5777 19.6473 22.2022 20.0571 22.897 20.3481C22.7463 20.7846 22.5872 21.2027 22.4181 21.6041ZM17.1845 1.03178C17.1845 2.38678 16.6889 3.65194 15.7011 4.82296C14.509 6.21507 13.0672 7.0195 11.5036 6.89256C11.4837 6.73 11.4721 6.55892 11.4721 6.37913C11.4721 5.07833 12.039 3.68622 13.0457 2.54798C13.5484 1.97167 14.1876 1.49247 14.9628 1.11021C15.7363 0.733653 16.4679 0.525407 17.156 0.489746C17.1761 0.670889 17.1845 0.85206 17.1845 1.03178Z",fill:"#959CA0"})}),rD=e=>c.jsx("svg",{height:e.size,role:"presentation",viewBox:"0 0 190.5 190.5",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:c.jsxs("g",{transform:"translate(90.669 -507.469)",children:[c.jsx("path",{clipPath:"none",d:"M4.583 650.342c26.304 0 47.627-21.324 47.627-47.628s-21.323-47.628-47.627-47.628-47.627 21.324-47.627 47.628 21.323 47.628 47.627 47.628z",fill:"#fff",mask:"none"}),c.jsx("path",{clipPath:"none",d:"M-36.664 626.539l-41.24-71.43c-8.362 14.479-12.765 30.904-12.765 47.625s4.401 33.146 12.762 47.625 20.387 26.503 34.868 34.86 30.908 12.755 47.628 12.75l41.24-71.43v-.011c-4.177 7.244-10.188 13.26-17.428 17.443a47.62 47.62 0 0 1-47.632.007 47.62 47.62 0 0 1-17.433-17.437z",fill:"#229342",mask:"none"}),c.jsx("path",{clipPath:"none",d:"M45.826 626.536l-41.239 71.43c16.72.003 33.146-4.398 47.626-12.757s26.504-20.384 34.863-34.865a95.24 95.24 0 0 0 12.755-47.627c-.003-16.72-4.408-33.145-12.772-47.623H4.58l-.01.007a47.62 47.62 0 0 1 23.819 6.372c7.243 4.179 13.257 10.19 17.439 17.431a47.62 47.62 0 0 1-.001 47.633z",fill:"#fbc116",mask:"none"}),c.jsx("path",{clipPath:"none",d:"M4.583 640.43c20.824 0 37.705-16.881 37.705-37.706s-16.881-37.705-37.705-37.705-37.705 16.881-37.705 37.705 16.881 37.706 37.705 37.706z",fill:"#1a73e8",mask:"none"}),c.jsx("path",{clipPath:"none",d:"M4.583 555.097h82.479c-8.358-14.481-20.381-26.507-34.861-34.868a95.23 95.23 0 0 0-47.625-12.76c-16.72.001-33.145 4.404-47.623 12.767a95.23 95.23 0 0 0-34.856 34.872l41.24 71.43.011.006a47.62 47.62 0 0 1-.015-47.633c4.179-7.242 10.193-13.256 17.434-17.436s15.456-6.381 23.818-6.379z",fill:"#e33b2e",mask:"none"})]})}),Og=e=>c.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 23 26",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M10.5832 12.0978L0.0976562 23.2275C0.0980507 23.2298 0.0988382 23.2317 0.0992076 23.2341C0.420793 24.4427 1.52467 25.3326 2.83473 25.3326C3.35844 25.3326 3.85012 25.191 4.27179 24.9424L4.30528 24.9228L16.1087 18.1117L10.5838 12.0977",fill:"#EB3131"}),c.jsx("path",{d:"M21.1922 10.2046L21.1821 10.1977L16.0862 7.2435L10.345 12.3523L16.1061 18.1127L21.1752 15.1879C22.0639 14.7081 22.6672 13.7712 22.6672 12.6908C22.6672 11.6182 22.072 10.6859 21.1922 10.2046Z",fill:"#F6B60B"}),c.jsx("path",{d:"M0.0961678 2.10416C0.0331317 2.33661 0 2.58009 0 2.83292V22.5002C0 22.7526 0.0327407 22.9969 0.0965672 23.2285L10.9441 12.3832L0.0965672 2.10444",fill:"#5778C5"}),c.jsx("path",{d:"M10.6603 12.6667L16.088 7.24061L4.29785 0.404818C3.8693 0.148138 3.36912 0 2.83391 0C1.52384 0 0.418474 0.891502 0.0968301 2.10147C0.0964356 2.10265 0.0964355 2.10347 0.0964355 2.1045L10.6603 12.6669",fill:"#3BAD49"})]}),sD=w.lazy(()=>h(()=>import("./QRCodeRenderer-dTVEF8IB.js"),__vite__mapDeps([40,1,2]))),_m=e=>{const t=e.size||310,n=c.jsxs(lD,{style:{height:`${t}px`,width:`${t}px`},children:[c.jsx("span",{"data-v1":!0}),c.jsx("span",{"data-v2":!0}),c.jsx("span",{"data-v3":!0}),c.jsx("div",{})]});return c.jsxs("div",{style:{display:"flex",justifyContent:"center",position:"relative"},children:[e.qrCodeUri?c.jsx(w.Suspense,{fallback:n,children:c.jsx(aD,{children:c.jsx(sD,{clearSize:e.QRIcon?70:void 0,ecl:"M",size:t+20,uri:e.qrCodeUri})})}):n,e.QRIcon&&c.jsx(oD,{children:e.QRIcon})]})},oD=ke({alignContent:"center",display:"flex",justifyContent:"center",left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)",zIndex:1e3}),aD=ke(()=>{const e=X();return{"--ck-body-background":e.colors.modalBg,"--ck-qr-background":e.colors.modalBg,"--ck-qr-dot-color":e.colors.primaryText,animation:`${Gs} 600ms ease`}}),cD=$t`
181
+ 0%{ background-position: 100% 0; }
182
+ 100%{ background-position: -100% 0; }
183
+ `,lD=ke(e=>{const t=X();return{"--bg":t.colors.modalBg,"--color":t.colors.skeletonBg,"&::after":{animation:`${cD} 1000ms linear infinite both`,background:"linear-gradient(90deg, transparent 50%, var(--color), transparent)",backgroundSize:"200% 100%",content:'""',inset:0,position:"absolute",transform:"scale(1.5) rotate(45deg)",zIndex:100},"&:before":{background:"repeat",backgroundImage:"radial-gradient(var(--color) 41%, transparent 41%)",backgroundSize:"1.888% 1.888%",content:'""',inset:0,position:"absolute",zIndex:3},"> div":{background:"var(--bg)",borderRadius:"5px",boxShadow:"0 0 0 7px var(--bg)",height:"28%",position:"relative",width:"28%",zIndex:4},"> span":{"&:before":{borderRadius:"3px",boxShadow:"0 0 0 4px var(--bg)",content:'""',inset:"9px",position:"absolute"},"&[data-v1]":{left:0,top:0},"&[data-v2]":{right:0,top:0},"&[data-v3]":{bottom:0,left:0},background:"var(--color)",borderRadius:"12px",boxShadow:"0 0 0 4px var(--bg)",height:"13.25%",position:"absolute",width:"13.25%",zIndex:4},alignItems:"center",borderRadius:Z.md,display:"flex",justifyContent:"center",overflow:"hidden",position:"relative"}}),Pg=({wallet:e,walletInfo:t,header:n,footer:i,onBack:r,locale:s,client:o})=>{const[a,l]=w.useState("base"),u=a==="android-scan"||a==="ios-scan",d=r?()=>{a==="base"?r():l("base")}:void 0;return c.jsx(M,{animate:"fadein",flex:"column",fullHeight:!0,children:c.jsxs(M,{expand:!0,flex:"column",p:"lg",children:[a==="android-scan"&&t.app.android&&c.jsx(kg,{client:o,locale:{scanToDownload:s.getStartedScreen.instruction},onBack:d,platform:"Google Play",platformIcon:c.jsx(Og,{size:A.md}),url:t.app.android,walletId:e.id,walletName:t.name}),a==="ios-scan"&&t.app.ios&&c.jsx(kg,{client:o,locale:{scanToDownload:s.getStartedScreen.instruction},onBack:d,platform:"App Store",platformIcon:c.jsx(Dg,{size:A.md}),url:t.app.ios,walletId:e.id,walletName:t.name}),a==="base"&&c.jsxs(M,{expand:!0,flex:"column",children:[n||c.jsx(be,{onBack:d,title:t.name}),c.jsx($,{y:"xl"}),c.jsx(M,{animate:"fadein",center:"y",expand:!0,flex:"column",style:{minHeight:"250px"},children:c.jsxs(M,{flex:"column",gap:"xs",children:[t.app.chrome&&c.jsxs(rh,{onClick:()=>{$r(t.app.chrome||"")},children:[c.jsx(rD,{size:A.lg}),c.jsx("span",{children:s.download.chrome})]}),t.app.android&&c.jsxs(rh,{as:"button",onClick:()=>{Qi()?$r(t.app.android||""):l("android-scan")},children:[c.jsx(Og,{size:A.lg}),c.jsx("span",{children:s.download.android})]}),t.app.ios&&c.jsxs(rh,{as:"button",onClick:()=>{Qi()?$r(t.app.ios||""):l("ios-scan")},children:[c.jsx(Dg,{size:A.lg}),c.jsx("span",{children:s.download.iOS})]})]})})]}),!u&&i]})})},kg=e=>c.jsxs(M,{animate:"fadein",expand:!0,children:[c.jsx(be,{onBack:e.onBack,title:e.walletName}),c.jsx($,{y:"xl"}),c.jsxs(M,{center:"both",expand:!0,flex:"column",style:{textAlign:"center"},children:[c.jsx(_m,{QRIcon:c.jsx(si,{client:e.client,id:e.walletId,size:A.xxl}),qrCodeUri:e.url}),c.jsx($,{y:"xl"}),c.jsx(P,{balance:!0,center:!0,multiline:!0,children:e.locale.scanToDownload}),c.jsx($,{y:"xs"})]})]}),rh=Xi(e=>{const t=X();return{all:"unset","&:hover":{background:t.colors.secondaryButtonHoverBg,color:t.colors.primaryText,textDecoration:"none"},alignItems:"center",background:t.colors.secondaryButtonBg,borderRadius:Z.sm,boxSizing:"border-box",color:t.colors.secondaryButtonText,cursor:"pointer",display:"flex",fontWeight:500,gap:z.md,padding:`${z.sm} ${z.md}`,textDecoration:"none",transition:"100ms ease",width:"100%"}});function uD(e){return new Promise(t=>{setTimeout(t,e)})}const bm=e=>{const{locale:t}=e;return c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-connecting-wallet-screen",children:[c.jsx(M,{p:"lg",style:{paddingBottom:0},children:c.jsx(be,{onBack:e.onBack,title:e.walletName})}),c.jsxs(M,{center:"y",expand:!0,flex:"column",px:e.size==="compact"?"lg":"xxl",relative:!0,style:{paddingTop:0},children:[c.jsx(M,{py:"3xl",children:c.jsx(rd,{client:e.client,error:e.errorConnecting,id:e.walletId})}),c.jsxs(M,{animate:"fadein",style:{animationDuration:"200ms"},children:[c.jsx(P,{center:!0,color:"primaryText",size:"lg",weight:500,className:"tw-screen-title","data-status":e.errorConnecting?"failed":"in-progress",children:e.errorConnecting?t.failed:t.inProgress}),c.jsx($,{y:"md"}),e.errorConnecting?c.jsx(M,{animate:"fadein",center:"x",flex:"row",children:c.jsxs(ae,{className:"tw-retry-button",fullWidth:!0,onClick:e.onRetry,style:{alignItems:"center",gap:z.xs},variant:"accent",children:[c.jsx(Ac,{height:A.sm,width:A.sm}),t.tryAgain]})}):c.jsx(P,{balance:!0,center:!0,multiline:!0,className:"tw-screen-description",children:t.instruction})]})]}),e.onGetStarted?c.jsxs(c.Fragment,{children:[c.jsx($,{y:"xl"}),c.jsx(We,{}),c.jsx(M,{center:"x",flex:"row",p:"lg",children:c.jsx(ae,{onClick:e.onGetStarted,variant:"link",className:"tw-get-started-button",children:t.getStartedLink})})]}):c.jsx($,{y:e.size==="compact"?"lg":"xxl"})]})},Xx=e=>{const{connectModalSize:t,client:n}=e,[i,r]=w.useState(!1);return c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-qr-scan-screen",children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.walletName})}),c.jsx($,{y:"sm"}),c.jsxs(M,{center:"both",expand:!0,flex:"column",px:"lg",children:[!e.error&&c.jsxs("div",{style:{textAlign:"center"},children:[c.jsx(_m,{QRIcon:c.jsx(si,{client:n,id:e.walletId,size:A.xxl}),qrCodeUri:e.qrCodeUri}),c.jsx($,{y:"xs"}),c.jsxs(ae,{className:"tw-copy-link-button",disabled:e.qrCodeUri===void 0,onClick:()=>{navigator.clipboard.writeText(e.qrCodeUri).then(()=>{r(!0),setTimeout(()=>r(!1),3e3)}).catch(s=>{console.error("Failed to copy link to clipboard",s)})},style:{cursor:e.qrCodeUri===void 0?"default":"pointer",fontSize:"12px",opacity:e.qrCodeUri===void 0?.5:1},variant:"link",children:[i?c.jsx(aa,{height:14,width:14}):c.jsx(k3,{height:14,width:14}),c.jsx("span",{style:{padding:"0 4px"},children:"Copy Link"})]}),c.jsx($,{y:"lg"}),c.jsx(P,{balance:!0,center:!0,multiline:!0,className:"tw-screen-description",style:{paddingInline:z.lg},children:e.qrScanInstruction})]}),e.error&&c.jsxs(M,{animate:"fadein",style:{width:"100%"},children:[c.jsx($,{y:"xxl"}),c.jsx(M,{center:"x",flex:"row",children:c.jsx(tm,{size:A["3xl"]})}),c.jsx($,{y:"lg"}),c.jsx(P,{center:!0,color:"primaryText",size:"lg",className:"tw-screen-title","data-status":"failed",children:"Connection Failed"}),c.jsx($,{y:"3xl"}),c.jsx(ae,{fullWidth:!0,onClick:e.onRetry,variant:"accent",className:"tw-retry-button",children:"Try again"})]})]}),c.jsx($,{y:"lg"}),e.onGetStarted&&c.jsx($3,{style:{border:t==="compact"?void 0:"none"},children:c.jsx(ae,{onClick:e.onGetStarted,className:"tw-get-started-button",style:{fontSize:ie.sm,textAlign:"center"},variant:"link",children:e.getStartedLink})})]})},dD=e=>{const{onBack:t,onGetStarted:n,wallet:i,walletInfo:r,locale:s,done:o}=e,[a,l]=w.useState(),[u,d]=w.useState(!1),f=w.useCallback(()=>{var y;d(!1),i.connect({chain:e.chain,client:e.client,walletConnect:{onDisplayUri(p){try{if(Qi()){const g=r.mobile.native||r.mobile.universal;$r(g?Y3(g,p).redirect:p)}else l(p)}catch(g){console.error(g),d(!0)}},optionalChains:e.chains,projectId:(y=e.walletConnect)==null?void 0:y.projectId,showQrModal:!1}}).then(()=>{o()}).catch(p=>{d(!0),console.error(p)})},[e.walletConnect,r.mobile.native,r.mobile.universal,i,e.chain,e.client,e.chains,o]),m=w.useRef(!1);return w.useEffect(()=>{m.current||(m.current=!0,f())},[f]),Qi()?c.jsx(bm,{client:e.client,errorConnecting:u,locale:{failed:s.connectionScreen.failed,getStartedLink:s.getStartedLink,inProgress:s.connectionScreen.inProgress,instruction:s.connectionScreen.instruction,tryAgain:s.connectionScreen.retry},onBack:t,onGetStarted:n,onRetry:f,size:e.size,walletId:i.id,walletName:r.name}):c.jsx(Xx,{client:e.client,connectModalSize:e.size,error:u,getStartedLink:s.getStartedLink,onBack:t,onGetStarted:n,onRetry:f,qrCodeUri:a,qrScanInstruction:s.scanScreen.instruction,walletId:i.id,walletName:r.name})},hD=e=>{const{onBack:t,wallet:n,walletInfo:i,locale:r,done:s,setModalVisibility:o}=e,[a,l]=w.useState(),[u,d]=w.useState(!1),f=w.useCallback(()=>{var y,p;if(d(!1),Qi()){let g=!1;uD(2e3).then(()=>{g||o(!1)}),n.connect({chain:e.chain,client:e.client,optionalChains:e.chains,projectId:(y=e.walletConnect)==null?void 0:y.projectId,showQrModal:!0}).then(()=>{g=!0,o(!0),s()}).catch(x=>{g=!0,o(!0),d(!0),console.error(x)})}else n.connect({chain:e.chain,client:e.client,onDisplayUri(g){l(g)},optionalChains:e.chains,projectId:(p=e.walletConnect)==null?void 0:p.projectId,showQrModal:!1}).then(()=>{s()}).catch(g=>{d(!0),console.error(g)})},[e.walletConnect,n,e.chain,e.client,e.chains,s,o]),m=w.useRef(!1);return w.useEffect(()=>{m.current||(m.current=!0,f())},[f]),Qi()?c.jsx(bm,{client:e.client,errorConnecting:u,locale:{failed:r.connectionScreen.failed,getStartedLink:r.getStartedLink,inProgress:r.connectionScreen.inProgress,instruction:r.connectionScreen.instruction,tryAgain:r.connectionScreen.retry},onBack:t,onRetry:f,size:e.size,walletId:n.id,walletName:i.name}):c.jsx(Xx,{client:e.client,connectModalSize:e.size,error:u,getStartedLink:r.getStartedLink,onBack:t,onRetry:f,qrCodeUri:a,qrScanInstruction:r.scanScreen.instruction,walletId:n.id,walletName:i.name})},fD=e=>{let t=window.location.toString();e.wallet.id==="io.metamask"?t=t.replace("https://",""):t=encodeURIComponent(t);const n=`${e.deepLinkPrefix}${t}?ref=${t}`;return c.jsxs(M,{animate:"fadein",children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.walletInfo.name})}),c.jsx(M,{animate:"fadein",center:"x",flex:"row",py:"3xl",children:c.jsx(yD,{children:c.jsx(si,{client:e.client,id:e.wallet.id,size:"80"})})}),c.jsx(M,{p:"lg",children:c.jsxs(U3,{fullWidth:!0,gap:"xs",href:n,variant:"accent",children:["Continue in ",e.walletInfo.name,c.jsx(R3,{height:A.sm,width:A.sm})]})})]})},mD=$t`
184
+ 0% {
185
+ transform: scale(0.9);
186
+ }
187
+ 100% {
188
+ opacity: 0;
189
+ transform: scale(1.4);
190
+ }
191
+ `,yD=ke(e=>{const t=X();return{"&::before":{animation:`${mD} 2s cubic-bezier(0.175, 0.885, 0.32, 1.1) infinite`,background:t.colors.accentText,borderRadius:Z.xl,bottom:0,content:'""',display:"block",left:0,position:"absolute",right:0,top:0,zIndex:-1},position:"relative"}}),zg=e=>{const{wallet:t,done:n}=e,[i,r]=w.useState(!1),s=e.locale,o=w.useCallback(async()=>{try{a.current=!0,r(!1),await Cx(1e3),await t.connect({chain:e.chain,client:e.client}),n()}catch(l){r(!0),console.error(l)}},[e.client,e.chain,n,t]),a=w.useRef(!1);return w.useEffect(()=>{a.current||o()},[o]),c.jsx(bm,{client:e.client,errorConnecting:i,locale:{failed:s.connectionScreen.failed,getStartedLink:s.getStartedLink,inProgress:s.connectionScreen.inProgress,instruction:s.connectionScreen.instruction,tryAgain:s.connectionScreen.retry},onBack:e.onBack,onGetStarted:e.onGetStarted,onRetry:()=>{o()},size:e.size,walletId:e.wallet.id,walletName:e.walletName})},gD=w.lazy(()=>h(()=>import("./CoinbaseSDKConnection-0Z70hEdE.js"),__vite__mapDeps([41,1,2,3,4,5]))),pD=w.lazy(()=>h(()=>import("./InAppWalletConnectUI-DUi7oMdq.js"),__vite__mapDeps([42,1,2,3,4,5]))),wD=w.lazy(()=>h(()=>Promise.resolve().then(()=>CU),void 0));function e_(e){var f,m,y;const[t,n]=w.useState("main"),{wallet:i}=e,r=oa(e.wallet.id),s=e.connectLocale.id,o=xe({queryFn:async()=>iD(s),queryKey:["injectedWalletLocale",s,(f=r.data)==null?void 0:f.name],refetchOnMount:!1,refetchOnWindowFocus:!1});if(r.isLoading||!o.data)return c.jsx(wt,{});const a=o.data;if(!r.data){const p=Hi().find(g=>g.info.rdns===i.id);return p?c.jsx(zg,{chain:e.chain,client:e.client,done:e.done,locale:a(p.info.name),onBack:e.onBack,size:e.size,wallet:e.wallet,walletName:p.info.name}):c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:"Not Supported"})}),c.jsxs(M,{center:"both",expand:!0,flex:"column",p:"lg",style:{minHeight:"300px"},children:[c.jsx(tm,{size:A["3xl"]}),c.jsx($,{y:"lg"}),c.jsx(P,{center:!0,color:"primaryText",children:"Wallet is not supported"}),c.jsx($,{y:"xxl"})]})]})}const l=a(r.data.name),u=Hi().find(p=>p.info.rdns===r.data.rdns);if(t==="get-started")return c.jsx(Pg,{client:e.client,locale:l,onBack:()=>{n("main")},wallet:e.wallet,walletInfo:r.data});const d=r.data.deepLink&&!u&&Qi()&&(((m=i.getConfig())==null?void 0:m.preferDeepLink)||i.id==="app.phantom");return(y=r.data.deepLink)!=null&&y.mobile&&d?c.jsx(fD,{client:e.client,deepLinkPrefix:r.data.deepLink.mobile,locale:l,onBack:e.onBack,onGetStarted:()=>{n("get-started")},wallet:e.wallet,walletInfo:r.data}):r.data.rdns&&u?c.jsx(zg,{chain:e.chain,client:e.client,done:e.done,locale:l,onBack:e.onBack,onGetStarted:()=>{n("get-started")},size:e.size,wallet:e.wallet,walletName:r.data.name}):r.data.mobile.native||r.data.mobile.universal?c.jsx(dD,{chain:e.chain,chains:e.chains,client:e.client,done:e.done,locale:l,onBack:e.onBack,onGetStarted:()=>{n("get-started")},size:e.size,wallet:e.wallet,walletConnect:e.walletConnect,walletInfo:r.data}):e.wallet.id==="walletConnect"?c.jsx(hD,{chain:e.chain,chains:e.chains,client:e.client,done:e.done,locale:l,onBack:e.onBack,setModalVisibility:e.setModalVisibility,size:e.size,wallet:e.wallet,walletConnect:e.walletConnect,walletInfo:r.data}):e.wallet.id==="inApp"||e.wallet.id==="embedded"?c.jsx(w.Suspense,{fallback:c.jsx(wt,{}),children:c.jsx(pD,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,done:e.done,goBack:e.onBack,meta:e.meta,size:e.size,wallet:e.wallet,walletConnect:e.walletConnect})}):Oe(e.wallet.id)?c.jsx(w.Suspense,{fallback:c.jsx(wt,{}),children:c.jsx(wD,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,done:e.done,goBack:e.onBack,meta:e.meta,size:e.size,wallet:e.wallet,walletConnect:e.walletConnect})}):e.wallet.id?c.jsx(w.Suspense,{fallback:c.jsx(wt,{}),children:c.jsx(gD,{chain:e.chain,client:e.client,done:e.done,locale:l,onBack:e.onBack,onGetStarted:()=>{n("get-started")},size:e.size,wallet:e.wallet,walletInfo:r.data})}):c.jsx(Pg,{client:e.client,locale:l,onBack:e.onBack,wallet:e.wallet,walletInfo:r.data})}function t_(e){const t=oa(e.personalWallet.id),[n,i]=w.useState(!1);return t.data?n?c.jsx(xD,{accountAbstraction:e.accountAbstraction,client:e.client,done:e.done,localeId:e.connectLocale.id,onBack:e.onBack,personalWallet:e.personalWallet,personalWalletInfo:t.data,size:e.size}):c.jsx(e_,{chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:()=>{i(!0)},meta:e.meta,onBack:e.onBack,setModalVisibility:e.setModalVisibility,size:e.size,wallet:e.personalWallet,walletConnect:e.walletConnect}):c.jsx(wt,{})}function xD(e){const t=xe({queryFn:()=>nD(e.localeId),queryKey:["getSmartWalletLocale",e.localeId]}),{personalWallet:n}=e,{done:i}=e,[r,s]=w.useState("idle"),o=Q1(),a=w.useCallback(async()=>{if(!n)throw new Error("No personal wallet");s("connecting");try{const u=await o.handleConnection(n,{accountAbstraction:e.accountAbstraction,client:e.client});i(u),s("idle")}catch(u){console.error(u),s("connect-error")}},[i,n,e.client,e.accountAbstraction,o]),l=w.useRef(!1);return w.useEffect(()=>{l.current||(a(),l.current=!0)},[a]),t.data?r==="connect-error"?c.jsx(M,{animate:"fadein",center:"both",flex:"column",fullHeight:!0,p:"lg",style:{minHeight:"300px"},children:c.jsx(P,{color:"danger",children:t.data.failedToConnect})}):c.jsxs(M,{center:"both",flex:"column",fullHeight:!0,style:{minHeight:"300px"},children:[c.jsx(P,{center:!0,color:"primaryText",multiline:!0,children:t.data.connecting}),c.jsx($,{y:"lg"}),c.jsx($e,{color:"accentText",size:"lg"})]}):c.jsx(wt,{})}const Rg="inApp";function n_(e){const[t,n]=w.useState(null);return e.accountAbstraction?t?c.jsx(t_,{accountAbstraction:e.accountAbstraction,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:e.done,meta:e.meta,onBack:e.goBack,personalWallet:t,setModalVisibility:e.setModalVisibility,size:e.size,walletConnect:e.walletConnect}):c.jsx(Ug,{...e,done:i=>{n(i)}}):c.jsx(Ug,{...e})}const Ug=e=>{const{walletIdsToHide:t}=e,n=e.size==="compact",[i,r]=w.useState(!1),[s,o]=w.useState(!1),a=_D(),l=w.useMemo(()=>od(),[]),u=e.wallets;let d=[...u];for(const L of a)u.find(N=>N.id===L.id)||d.push(L);t&&(d=d.filter(L=>!(t!=null&&t.includes(L.id))));const f=!1,m=d,y=m.filter(L=>L.id===Rg),p=hm(m.filter(L=>L.id!==Rg),e.recommendedWallets),g=f,x=w.useRef(!1);w.useEffect(()=>{setTimeout(()=>{x.current=!0},1e3)},[]);const _=e.modalHeader?c.jsx(be,{onBack:e.modalHeader.onBack,title:e.modalHeader.title}):c.jsxs(M,{center:"y",flex:"row",gap:"xs",className:"tw-header",children:[e.meta.titleIconUrl?c.jsx(Xe,{client:e.client,height:A.md,src:e.meta.titleIconUrl,width:A.md}):null,c.jsxs(Ju,{children:[" ",e.title," "]})]}),b=async L=>{e.selectWallet(L)},I=c.jsx(ls,{className:"tw-select-connect-a-wallet-button",lastUsedBadge:!!l&&l!=="inApp"&&!l.startsWith("ecosystem."),client:e.client,disabled:e.meta.requireApproval&&!s,icon:Rs,onClick:()=>{r(!0)},title:e.connectLocale.connectAWallet}),E=c.jsxs(M,{className:"tw-get-started-container",flex:"row",style:{justifyContent:"space-between"},children:[c.jsx(P,{color:"secondaryText",size:"sm",weight:500,children:e.connectLocale.newToWallets}),c.jsx(Zr,{href:"https://blog.thirdweb.com/web3-wallet/",size:"sm",target:"_blank",weight:500,children:e.connectLocale.getStarted})]}),C=e.meta.requireApproval||e.meta.termsOfServiceUrl||e.meta.privacyPolicyUrl?c.jsx(id,{isApproved:s,locale:e.connectLocale.agreement,onApprove:()=>o(!s),privacyPolicyUrl:e.meta.privacyPolicyUrl,requireApproval:e.meta.requireApproval,termsOfServiceUrl:e.meta.termsOfServiceUrl}):void 0;let T,j;n?y.length===0?(T=c.jsx(_a,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!s,done:e.done,goBack:e.goBack,onShowAll:e.onShowAll,recommendedWallets:e.recommendedWallets,selectWallet:b,showAllWallets:e.showAllWallets,size:e.size,wallets:m}),j=c.jsxs(c.Fragment,{children:[c.jsx(We,{}),c.jsxs(M,{flex:"column",gap:"md",px:"lg",py:"md+",children:[E,g]}),c.jsx(We,{}),C&&c.jsx(M,{px:"md",style:{paddingBottom:z.md,paddingTop:z.md},children:C})]})):i?(T=c.jsx(_a,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!s,done:e.done,goBack:e.goBack,onShowAll:e.onShowAll,recommendedWallets:e.recommendedWallets,selectWallet:b,showAllWallets:e.showAllWallets,size:e.size,wallets:p}),j=c.jsx($3,{children:E})):(T=c.jsxs(M,{px:"xs",children:[c.jsx(_a,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!s,done:e.done,goBack:e.goBack,recommendedWallets:e.recommendedWallets,selectWallet:b,showAllWallets:e.showAllWallets,size:e.size,wallets:y}),p.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(Zx,{text:e.connectLocale.or}),c.jsx($,{y:"lg"})]})]}),p.length===0?j=C||g?c.jsxs(c.Fragment,{children:[c.jsx($,{y:"md"}),c.jsx(We,{}),g,C&&c.jsxs(M,{p:"md",children:[" ",C," "]})]}):c.jsx($,{y:"sm"}):p.length>1?j=c.jsxs(M,{flex:"column",gap:"sm",style:{position:"relative"},children:[c.jsx(CD,{}),c.jsxs(M,{flex:"column",gap:"md",px:"lg",children:[I,g]}),C?c.jsxs(M,{p:"md",children:[" ",C," "]}):c.jsx($,{y:"xxs"})]}):j=c.jsxs(c.Fragment,{children:[c.jsx(M,{px:"lg",children:c.jsx(_a,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!s,done:e.done,goBack:e.goBack,onShowAll:e.onShowAll,recommendedWallets:e.recommendedWallets,selectWallet:b,showAllWallets:e.showAllWallets,size:e.size,wallets:p})}),g,C?c.jsxs(c.Fragment,{children:[c.jsx(We,{}),c.jsxs(M,{p:"md",children:[" ",C," "]})]}):g]})):T=c.jsx(_a,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!s,done:e.done,goBack:e.goBack,onShowAll:e.onShowAll,recommendedWallets:e.recommendedWallets,selectWallet:b,showAllWallets:e.showAllWallets,size:e.size,wallets:m});const O=!e.hideHeader||e.modalHeader;return c.jsxs(M,{animate:"fadein",className:"tw-wallet-selection",flex:"column",fullHeight:!0,scrollY:!0,style:{maxHeight:e.size==="compact"?am:void 0},children:[O&&c.jsx(M,{px:"lg",pt:"lg",pb:"xs",children:i?c.jsx(be,{onBack:()=>{r(!1)},title:_}):_}),c.jsxs(M,{expand:!0,scrollY:!0,style:O?{paddingTop:"2px"}:{paddingTop:z.md},children:[!O&&i&&c.jsx(M,{px:"md",children:c.jsx(M,{center:"y",flex:"row",style:{padding:z.sm,paddingTop:0},children:c.jsxs(Yi,{onClick:()=>{r(!1)},style:{gap:z.xxs,paddingBlock:z.xxs,paddingRight:z.xs,transform:`translateX(-${z.xs})`},children:[c.jsx(P3,{height:A.sm,width:A.sm}),e.connectLocale.goBackButton]})})}),T]}),j,n&&e.meta.showThirdwebBranding!==!1&&c.jsx(M,{py:"md",children:c.jsx(sd,{})})]})};let sh=[];function _D(){return sh.length===0&&(sh=Hi().map(n=>n.info.rdns).map(n=>Rt(n))),sh}const _a=e=>{const t=hm(e.wallets,e.recommendedWallets),{screen:n}=ym(),i=Zs(),r=w.useMemo(()=>od(),[]);return c.jsxs(ED,{style:{maxHeight:"370px",minHeight:"100%",paddingTop:e.size==="wide"?0:$A},children:[t.map(s=>{const o=n?typeof n=="object"&&n.id===s.id:!1;return c.jsx("li",{children:s.id==="inApp"&&e.size==="compact"?c.jsx(tD,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,disabled:e.disabled,done:()=>e.done(s),goBack:e.goBack,recommendedWallets:e.recommendedWallets,select:()=>e.selectWallet(s),size:e.size,wallet:s}):c.jsx(wm,{className:"tw-wallet-select-wallet-button",badge:r===s.id?"Last used":void 0,client:e.client,connectLocale:e.connectLocale,isActive:o,recommendedWallets:e.recommendedWallets,selectWallet:()=>{e.diableSelectionDataReset||i({}),e.selectWallet(s)},wallet:s})},s.id)}),e.onShowAll&&e.showAllWallets!==!1&&c.jsx(MD,{className:"tw-show-all-wallets-button",children:c.jsxs(xm,{onClick:e.onShowAll,children:[c.jsxs(ID,{children:[c.jsx("div",{"data-dot":!0}),c.jsx("div",{"data-dot":!0}),c.jsx("div",{"data-dot":!0}),c.jsx("div",{"data-dot":!0})]}),c.jsxs(M,{flex:"row",gap:"xs",children:[c.jsx(P,{color:"primaryText",children:"All Wallets"}),c.jsx(bD,{children:" 500+ "})]})]})})]})},bD=ke(()=>{const e=X();return{backgroundColor:e.colors.secondaryButtonBg,borderRadius:Z.sm,color:e.colors.secondaryText,fontSize:ie.xs,paddingBlock:"3px",paddingInline:z.xxs}}),MD=ke(()=>({"&:hover [data-dot]":{background:X().colors.primaryText}})),ID=ke(()=>{const e=X();return{"& div":{background:e.colors.secondaryText,borderRadius:"50%",height:"10px",transition:"background 200ms ease",width:"10px"},alignItems:"center",backgroundColor:e.colors.tertiaryBg,border:`1px solid ${e.colors.borderColor}`,borderRadius:Z.md,display:"grid",gap:z["4xs"],gridTemplateColumns:"1fr 1fr",height:`${A.xl}px`,justifyItems:"center",padding:z.xs,width:`${A.xl}px`}}),ED=O3({all:"unset",boxSizing:"border-box",display:"flex",flex:1,flexDirection:"column",gap:"2px",listStyleType:"none",overflowY:"auto",...Dc,margin:"-2px",marginBottom:0,paddingInline:z.md,paddingBottom:z.lg}),CD=ke(e=>{const t=X();return t.colors.modalBg,{background:`linear-gradient(to bottom, transparent 0%, ${t.colors.modalBg} 80%)`,height:z.lg,left:0,pointerEvents:"none",position:"absolute",top:`-${z.lg}`,width:"100%"}});function LD(e){return c.jsxs("div",{style:{display:"grid",gridTemplateColumns:"300px 1fr",height:"100%"},children:[c.jsxs(jD,{children:[" ",e.left," "]}),c.jsx(M,{flex:"column",relative:!0,scrollY:!0,children:e.right})]})}function TD(e){return c.jsx(M,{flex:"column",relative:!0,scrollY:!0,style:{maxHeight:am},children:e.children})}const jD=ke(e=>{const t=X();return{display:"flex",flexDirection:"column",overflowY:"auto",...Dc,borderRight:`1px solid ${t.colors.separatorLine}`,position:"relative"}}),vD=w.lazy(()=>h(()=>Promise.resolve().then(()=>$R),void 0)),i_=e=>{const{setModalVisibility:t,onClose:n,shouldSetActive:i}=e,{screen:r,setScreen:s,initialScreen:o}=e.screenSetup,a=M3(),l=Zs(),u=bt(),d=Tt(),f=W1(u,d,e.auth),m=f.requiresAuth&&!f.isLoggedIn,y=Q1(),p=w.useCallback(T=>{i?a(T):y.addConnectedWallet(T),e.onConnect&&e.onConnect(T,y.connectedWallets.getValue()),ql(()=>{l({}),t(!0)}),m?s(Wt.signIn):(s(o),n==null||n())},[t,n,e.onConnect,a,m,s,l,i,o,y]),g=w.useCallback(()=>{l({}),s(o)},[s,o,l]),x=c.jsx(n_,{accountAbstraction:e.accountAbstraction,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:p,goBack:e.wallets.length>1?g:void 0,hideHeader:e.hideHeader,meta:e.meta,modalHeader:e.modalHeader,onShowAll:()=>{s(Wt.showAll)},recommendedWallets:e.recommendedWallets,selectWallet:T=>{T.onConnectRequested?T.onConnectRequested().then(()=>s(T)).catch(console.error):s(T)},setModalVisibility:t,showAllWallets:e.showAllWallets,size:e.size,title:e.meta.title||e.connectLocale.defaultModalTitle,walletConnect:e.walletConnect,walletIdsToHide:e.walletIdsToHide,wallets:e.wallets}),_=c.jsx(w.Suspense,{fallback:c.jsx(wt,{}),children:c.jsx(vD,{client:e.client,connectLocale:e.connectLocale,onBack:g,onSelect:s,recommendedWallets:e.recommendedWallets,walletIdsToHide:e.walletIdsToHide,size:e.size})}),b=c.jsx(SA,{client:e.client,connectLocale:e.connectLocale,meta:e.meta,welcomeScreen:e.welcomeScreen}),I=e.wallets.length>1?g:void 0,E=T=>e.accountAbstraction?c.jsx(t_,{accountAbstraction:e.accountAbstraction,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:j=>{p(j)},meta:e.meta,onBack:I,personalWallet:T,setModalVisibility:e.setModalVisibility,size:e.size,walletConnect:e.walletConnect},T.id):c.jsx(e_,{chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:()=>{p(T)},meta:e.meta,onBack:I,setModalVisibility:e.setModalVisibility,size:e.size,wallet:T,walletConnect:e.walletConnect},T.id),C=c.jsx(Wx,{auth:e.auth,client:e.client,connectLocale:e.connectLocale,modalSize:e.size,onClose:n,onDone:n,privacyPolicyUrl:e.meta.privacyPolicyUrl,termsOfServiceUrl:e.meta.termsOfServiceUrl});return c.jsx(fm.Provider,{value:e.screenSetup,children:e.size==="wide"?c.jsx(LD,{left:x,right:c.jsxs(c.Fragment,{children:[r===Wt.signIn&&C,r===Wt.main&&b,r===Wt.getStarted&&b,r===Wt.showAll&&_,typeof r!="string"&&E(r)]})}):c.jsxs(TD,{children:[r===Wt.signIn&&C,r===Wt.main&&x,r===Wt.getStarted&&b,r===Wt.showAll&&_,typeof r!="string"&&E(r)]})})},ND=ke(e=>{const{modalSize:t}=e,n=X();return{"& *":{boxSizing:"border-box"},"& *::selection":{backgroundColor:n.colors.selectedTextBg,color:n.colors.selectedTextColor},background:n.colors.modalBg,border:`1px solid ${n.colors.borderColor}`,borderRadius:Z.xl,boxSizing:"border-box",color:n.colors.primaryText,fontFamily:n.fontFamily,height:t==="compact"?"auto":mx,lineHeight:"normal",overflow:"hidden",position:"relative",maxWidth:"100%",width:t==="compact"?dx:fx}});function SD(e){return e==="INTERNAL_SERVER_ERROR"||e==="UNKNOWN_ERROR"}function AD(e){const{error:t}=e;if(!t)return{errorCode:null,isClientError:!1,isRetryable:!1,isServerError:!1,mappedError:null,statusCode:null,userMessage:""};let n;t instanceof pt?n=t:n=new pt({code:"UNKNOWN_ERROR",message:t.message||"An unknown error occurred",statusCode:500});const i=n.statusCode||null,r=i!==null&&i>=400&&i<500,s=i!==null&&i>=500,o=DD(n);return{errorCode:n.code,isClientError:r,isRetryable:SD(n.code),isServerError:s,mappedError:n,statusCode:i,userMessage:o}}function DD(e){switch(e.code){case"INVALID_INPUT":return"Invalid input provided. Please check your parameters and try again.";case"ROUTE_NOT_FOUND":return"No route found for this transaction. Please try a different token pair or amount.";case"AMOUNT_TOO_LOW":return"The amount is too low for this transaction. Please increase the amount.";case"AMOUNT_TOO_HIGH":return"The amount is too high for this transaction. Please decrease the amount.";case"INTERNAL_SERVER_ERROR":return"A temporary error occurred. Please try again in a moment.";default:return e.message||"An unexpected error occurred. Please try again."}}function OD({error:e,onRetry:t,onCancel:n,client:i}){const r=X(),{userMessage:s}=AD({error:e}),o=w.useRef(!1);return w.useEffect(()=>{o.current||(o.current=!0,xn({client:i,error:e.message,event:"ub:ui:error"}))},[i,e.message]),c.jsx(M,{flex:"column",fullHeight:!0,gap:"md",p:"md",children:c.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"flex-start"},children:[c.jsx(M,{center:"both",style:{backgroundColor:r.colors.tertiaryBg,borderRadius:"50%",flexShrink:0,height:"24px",width:"24px"},children:c.jsx(is,{color:r.colors.danger,height:A.md,width:A.md})}),c.jsxs(M,{flex:"column",fullHeight:!0,gap:"sm",style:{flex:1},children:[c.jsx(P,{color:"primaryText",size:"lg",children:"Error"}),c.jsx(M,{flex:"column",gap:"sm",style:{minHeight:"100px"},children:c.jsx(M,{flex:"column",gap:"sm",style:{flex:1},children:c.jsx(P,{color:"secondaryText",size:"sm",children:s})})}),c.jsxs(M,{flex:"row",gap:"sm",style:{justifyContent:"flex-end"},children:[c.jsx(ae,{onClick:t,variant:"primary",children:"Try Again"}),n&&c.jsx(ae,{onClick:n,variant:"secondary",children:"Cancel"})]})]})]})})}function Rc(e,t){if(e===0)return 0;const n=10**t,i=1/10**t,r=e<i?"ceil":"round";return Math[r]((e+Number.EPSILON)*n)/n}function rc(e,t=!0,n=5){return Rc(Number(e.displayValue),n)+(t?` ${e.symbol}`:"")}function Ft(e,t,n=5){return Rc(Number.parseFloat(Un(e,t)),n).toString()}function Ss(e,t){return PD(t,"en-US",e)}function PD(e,t,n){return e<0?new Intl.NumberFormat(t,{style:"currency",currency:n,maximumFractionDigits:6,minimumFractionDigits:0}).format(e):new Intl.NumberFormat(t,{style:"currency",currency:n,maximumFractionDigits:2,minimumFractionDigits:0,notation:"compact"}).format(e)}function kD(e){var a;let t=e;"source_metadata"in e&&(t=e.source_metadata);const n=t.settings.compilationTarget,i=Object.keys(n),r=n[i[0]],s={author:t.output.devdoc.author,details:t.output.devdoc.detail,notice:t.output.userdoc.notice,title:t.output.devdoc.title},o=[...new Set(Object.entries(t.sources).map(([,l])=>l.license))];return{abi:((a=t==null?void 0:t.output)==null?void 0:a.abi)||[],info:s,isPartialAbi:t.isPartialAbi,licenses:o,metadata:t,name:r,zk_version:e.zk_version}}async function zD(e){const{address:t,chain:n}=e,i=await fetch(`https://contract.thirdweb.com/metadata/${n.id}/${t}`,{headers:{"Content-Type":"application/json"},method:"GET"});if(!i.ok){const s=await i.json();throw new Error(s.message||s.error||"Failed to get compiler metadata")}const r=await i.json();return kD(r)}function RD({transaction:e,client:t,wallet:n}){const i=Yu(e.chain),r=Fv(n);return xe({enabled:!!e.to&&!!i.data,queryFn:async()=>{var E,C;const s=qt({address:e.to,chain:e.chain,client:t}),[o,a,l,u]=await Promise.all([zD(s).catch(()=>null),nt(e.value),nt(e.erc20Value),Du(e).catch(()=>"0x")]),[d,f]=await Promise.all([Oc(t,(l==null?void 0:l.tokenAddress)||Yt,e.chain.id),r?0n:mj(e).catch(()=>null)]);let m={description:void 0,functionName:"Contract Call",selector:"0x"};if(o!=null&&o.abi&&u.length>=10)try{const T=u.slice(0,10),j=o.abi,N=(Array.isArray(j)?j:[]).filter(v=>v&&typeof v=="object"&&"type"in v&&v.type==="function").map(v=>v).find(v=>Nu(v)===T);N&&(m={description:void 0,functionName:N.name,selector:T})}catch{}const p=await(async()=>d?d.decimals:l?V5({contract:qt({address:l.tokenAddress,chain:e.chain,client:t})}):18)(),g=l?l.amountWei:a||0n,x=((C=(E=i.data)==null?void 0:E.nativeCurrency)==null?void 0:C.symbol)||"ETH",_=(d==null?void 0:d.symbol)||x,b=l&&l.tokenAddress.toLowerCase()!==Yt?l.amountWei:(a||0n)+(f||0n),I=Un(b,p);return{contractMetadata:o,costWei:g,functionInfo:m,gasCostDisplay:f?`${Ft(f,18)} ${x}`:null,gasCostWei:f,tokenInfo:d,totalCost:I,totalCostWei:b,txCostDisplay:`${Ft(g,p)} ${_}`}},queryKey:["transaction-details",Me(e),r]})}const UD=e=>{const t=w.useId();return c.jsxs("svg",{"aria-hidden":"true",height:e.size,viewBox:"0 0 512 512",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("mask",{id:t,children:c.jsx("circle",{cx:"256",cy:"256",fill:"#fff",r:"256"})}),c.jsxs("g",{mask:`url(#${t})`,children:[c.jsx("path",{d:"M0 0v512h144l112-64 112 64h144V0H368L256 64 144 0Z",fill:"#d80027"}),c.jsx("path",{d:"M144 0h224v512H144Z",fill:"#eee"}),c.jsx("path",{d:"m301 289 44-22-22-11v-22l-45 22 23-44h-23l-22-34-22 33h-23l23 45-45-22v22l-22 11 45 22-12 23h45v33h22v-33h45z",fill:"#d80027"})]})]})},$D=e=>{const t=w.useId();return c.jsxs("svg",{"aria-hidden":"true",height:e.size,viewBox:"0 0 512 512",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("mask",{id:t,children:c.jsx("circle",{cx:"256",cy:"256",fill:"#fff",r:"256"})}),c.jsxs("g",{mask:`url(#${t})`,children:[c.jsx("path",{d:"M0 0h512v512H0z",fill:"#0052b4"}),c.jsx("path",{d:"m256 100.2 8.3 25.5H291l-21.7 15.7 8.3 25.6-21.7-15.8-21.7 15.8 8.3-25.6-21.7-15.7h26.8zm-110.2 45.6 24 12.2 18.9-19-4.2 26.5 23.9 12.2-26.5 4.2-4.2 26.5-12.2-24-26.5 4.3 19-19zM100.2 256l25.5-8.3V221l15.7 21.7 25.6-8.3-15.8 21.7 15.8 21.7-25.6-8.3-15.7 21.7v-26.8zm45.6 110.2 12.2-24-19-18.9 26.5 4.2 12.2-23.9 4.2 26.5 26.5 4.2-24 12.2 4.3 26.5-19-19zM256 411.8l-8.3-25.5H221l21.7-15.7-8.3-25.6 21.7 15.8 21.7-15.8-8.3 25.6 21.7 15.7h-26.8zm110.2-45.6-24-12.2-18.9 19 4.2-26.5-23.9-12.2 26.5-4.2 4.2-26.5 12.2 24 26.5-4.3-19 19zM411.8 256l-25.5 8.3V291l-15.7-21.7-25.6 8.3 15.8-21.7-15.8-21.7 25.6 8.3 15.7-21.7v26.8zm-45.6-110.2-12.2 24 19 18.9-26.5-4.2-12.2 23.9-4.2-26.5-26.5-4.2 24-12.2-4.3-26.5 19 19z",fill:"#ffda44"})]})]})},BD=e=>c.jsxs("svg",{"aria-hidden":"true",height:e.size,version:"1.1",viewBox:"0 0 512 512",width:e.size,x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px",children:[c.jsx("circle",{cx:"256",cy:"256",fill:"#F0F0F0",r:"256"}),c.jsxs("g",{children:[c.jsx("path",{d:"M52.92,100.142c-20.109,26.163-35.272,56.318-44.101,89.077h133.178L52.92,100.142z",fill:"#0052B4"}),c.jsx("path",{d:"M503.181,189.219c-8.829-32.758-23.993-62.913-44.101-89.076l-89.075,89.076H503.181z",fill:"#0052B4"}),c.jsx("path",{d:"M8.819,322.784c8.83,32.758,23.993,62.913,44.101,89.075l89.074-89.075L8.819,322.784L8.819,322.784 z",fill:"#0052B4"}),c.jsx("path",{d:"M411.858,52.921c-26.163-20.109-56.317-35.272-89.076-44.102v133.177L411.858,52.921z",fill:"#0052B4"}),c.jsx("path",{d:"M100.142,459.079c26.163,20.109,56.318,35.272,89.076,44.102V370.005L100.142,459.079z",fill:"#0052B4"}),c.jsx("path",{d:"M189.217,8.819c-32.758,8.83-62.913,23.993-89.075,44.101l89.075,89.075V8.819z",fill:"#0052B4"}),c.jsx("path",{d:"M322.783,503.181c32.758-8.83,62.913-23.993,89.075-44.101l-89.075-89.075V503.181z",fill:"#0052B4"}),c.jsx("path",{d:"M370.005,322.784l89.075,89.076c20.108-26.162,35.272-56.318,44.101-89.076H370.005z",fill:"#0052B4"})]}),c.jsxs("g",{children:[c.jsx("path",{d:"M509.833,222.609h-220.44h-0.001V2.167C278.461,0.744,267.317,0,256,0 c-11.319,0-22.461,0.744-33.391,2.167v220.44v0.001H2.167C0.744,233.539,0,244.683,0,256c0,11.319,0.744,22.461,2.167,33.391 h220.44h0.001v220.442C233.539,511.256,244.681,512,256,512c11.317,0,22.461-0.743,33.391-2.167v-220.44v-0.001h220.442 C511.256,278.461,512,267.319,512,256C512,244.683,511.256,233.539,509.833,222.609z",fill:"#D80027"}),c.jsx("path",{d:"M322.783,322.784L322.783,322.784L437.019,437.02c5.254-5.252,10.266-10.743,15.048-16.435 l-97.802-97.802h-31.482V322.784z",fill:"#D80027"}),c.jsx("path",{d:"M189.217,322.784h-0.002L74.98,437.019c5.252,5.254,10.743,10.266,16.435,15.048l97.802-97.804 V322.784z",fill:"#D80027"}),c.jsx("path",{d:"M189.217,189.219v-0.002L74.981,74.98c-5.254,5.252-10.266,10.743-15.048,16.435l97.803,97.803 H189.217z",fill:"#D80027"}),c.jsx("path",{d:"M322.783,189.219L322.783,189.219L437.02,74.981c-5.252-5.254-10.743-10.266-16.435-15.047 l-97.802,97.803V189.219z",fill:"#D80027"})]})]}),VD=e=>c.jsx("svg",{height:e.size,role:"presentation",viewBox:"0 0 32 32",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:c.jsxs("g",{fill:"none",fillRule:"evenodd",children:[c.jsx("circle",{cx:"16",cy:"16",fill:"#a81b1b",r:"16"}),c.jsx("path",{d:"M17.548 18.711v1.878h5.063v2.288h-5.063V25.5h-3.096v-2.623H9.389v-2.288h5.063v-1.878H9.389v-2.288h4.171L7.5 7.5h3.752l4.8 7.534L20.853 7.5H24.5l-6.086 8.923h4.197v2.288z",fill:"#ffffff"})]})}),WD=e=>c.jsxs("svg",{"aria-hidden":"true",height:e.size,version:"1.1",viewBox:"0 0 512 512",width:e.size,x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px",children:[c.jsx("circle",{cx:"256",cy:"256",fill:"#F0F0F0",r:"256"}),c.jsxs("g",{children:[c.jsx("path",{d:"M244.87,256H512c0-23.106-3.08-45.49-8.819-66.783H244.87V256z",fill:"#D80027"}),c.jsx("path",{d:"M244.87,122.435h229.556c-15.671-25.572-35.708-48.175-59.07-66.783H244.87V122.435z",fill:"#D80027"}),c.jsx("path",{d:"M256,512c60.249,0,115.626-20.824,159.356-55.652H96.644C140.374,491.176,195.751,512,256,512z",fill:"#D80027"}),c.jsx("path",{d:"M37.574,389.565h436.852c12.581-20.529,22.338-42.969,28.755-66.783H8.819 C15.236,346.596,24.993,369.036,37.574,389.565z",fill:"#D80027"})]}),c.jsx("path",{d:"M118.584,39.978h23.329l-21.7,15.765l8.289,25.509l-21.699-15.765L85.104,81.252l7.16-22.037 C73.158,75.13,56.412,93.776,42.612,114.552h7.475l-13.813,10.035c-2.152,3.59-4.216,7.237-6.194,10.938l6.596,20.301l-12.306-8.941 c-3.059,6.481-5.857,13.108-8.372,19.873l7.267,22.368h26.822l-21.7,15.765l8.289,25.509l-21.699-15.765l-12.998,9.444 C0.678,234.537,0,245.189,0,256h256c0-141.384,0-158.052,0-256C205.428,0,158.285,14.67,118.584,39.978z M128.502,230.4 l-21.699-15.765L85.104,230.4l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822l-21.7,15.765L128.502,230.4z M120.213,130.317l8.289,25.509l-21.699-15.765l-21.699,15.765l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822 L120.213,130.317z M220.328,230.4l-21.699-15.765L176.93,230.4l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822 l-21.7,15.765L220.328,230.4z M212.039,130.317l8.289,25.509l-21.699-15.765l-21.699,15.765l8.289-25.509l-21.7-15.765h26.822 l8.288-25.509l8.288,25.509h26.822L212.039,130.317z M212.039,55.743l8.289,25.509l-21.699-15.765L176.93,81.252l8.289-25.509 l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822L212.039,55.743z",fill:"#0052B4"})]}),FD={countryCode:"US",icon:WD,name:"US Dollar",shorthand:"USD",symbol:"$"},YD=[FD,{countryCode:"CA",icon:UD,name:"Canadian Dollar",shorthand:"CAD",symbol:"$"},{countryCode:"GB",icon:BD,name:"British Pound",shorthand:"GBP",symbol:"£"},{countryCode:"EU",icon:$D,name:"Euro",shorthand:"EUR",symbol:"€"},{countryCode:"JP",icon:VD,name:"Japanese Yen",shorthand:"JPY",symbol:"¥"},{countryCode:"AU",name:"Australian Dollar",shorthand:"AUD",symbol:"$"},{countryCode:"NZ",name:"New Zealand Dollar",shorthand:"NZD",symbol:"$"}];function QD(e){return YD.find(t=>t.shorthand.toLowerCase()===e.toLowerCase())??{countryCode:"US",icon:ZD,name:e,shorthand:e,symbol:"$"}}function HD(e,t){return e.icon?c.jsx(e.icon,{size:A[t]}):c.jsx("img",{alt:e.shorthand,height:A[t],src:`https://flagsapi.com/${e.countryCode.toUpperCase()}/flat/64.png`,width:A[t]})}function GD(e){return HD(QD(e.currency),e.size)}const ZD=e=>c.jsx($N,{height:e.size,width:e.size});async function r_(e){const{client:t,fromTokenAddress:n,chain:i,fromAmount:r,to:s}=e;if(Number(r)===0)return{result:0};if(i.testnet===!0)throw new Error(`Cannot fetch price for a testnet (chainId: ${i.id})`);if(!ni(n))throw new Error("Invalid fromTokenAddress. Expected a valid EVM contract address");const o=await Oc(t,n,i.id),a=(o==null?void 0:o.prices[s])||0;if(!o||a===0)throw new Error(`Error: Failed to fetch price for token ${n} on chainId: ${i.id}`);return{result:a*r}}function ad(e,t){const[n,i]=w.useState(e);return w.useEffect(()=>{let r=!1;const s=setTimeout(()=>{r||i(e)},t);return()=>{r=!0,clearTimeout(s)}},[e,t]),n}const Kl={nativeToken:!0};function Br(e){var t;return e&&("nativeToken"in e||((t=e.address)==null?void 0:t.toLowerCase())===Yt.toLowerCase()||(e==null?void 0:e.address)===fC)||!1}function $g(e){return Br(e)?Yt:me(e.address)}function s_(e){var i;const t=ad(e.tokenAmount,500),n=xe({queryFn:()=>r_({chain:e.chain,client:e.client,fromAmount:Number(t),fromTokenAddress:$g(e.token),to:e.currency||"USD"}),queryKey:["cryptoToFiat",e.chain.id,$g(e.token),t,e.currency]});return n.isLoading?c.jsx(ge,{height:ie.lg,width:"50px"}):(i=n.data)!=null&&i.result?c.jsx(P,{...e,trackingTight:!0,children:Ss(e.currency||"USD",n.data.result)}):null}function qD(){const e=X();return c.jsx(M,{center:"both",flex:"row",style:{marginBottom:"-12px",marginTop:"-12px",position:"relative",width:"100%",zIndex:1e3},children:c.jsx(M,{center:"both",color:"secondaryText",flex:"row",style:{backgroundColor:e.colors.modalBg,border:`1px solid ${e.colors.borderColor}`,borderRadius:Z.full,padding:"6px"},children:c.jsx(qu,{height:A["sm+"],width:A["sm+"]})})})}function o_(e){const t=Hs(),n=t.length>0&&t.some(i=>i.id==="inApp"||Oe(i));return xe({enabled:n,queryFn:async()=>{var s;const i=t.find(o=>Oe(o)),r=i?{id:i.id,partnerId:(s=i.getConfig())==null?void 0:s.partnerId}:void 0;return Qx({client:e.client,ecosystem:r})},queryKey:["profiles",t.map(i=>{var r;return`${i.id}-${(r=i.getAccount())==null?void 0:r.address}`})]})}function Hf(e){var f,m,y,p;const{client:t,address:n}=e,i=Hs(),r=o_({client:t}),s=i.find(g=>{var x,_;return((_=(x=g.getAccount())==null?void 0:x.address)==null?void 0:_.toLowerCase())===n.toLowerCase()}),o=s&&(s.id==="inApp"||Oe(s)||Vo(s))?(m=(f=r.data)==null?void 0:f.find(g=>!!g.details.email))==null?void 0:m.details.email:void 0,a=oa(s==null?void 0:s.id),l=j3({address:n,client:t}),u=n?l.data||_n(n):"",d=A[e.iconSize||"md"];return c.jsx(M,{flex:"row",style:{justifyContent:"space-between"},children:c.jsxs(M,{center:"y",color:"secondaryText",flex:"row",gap:"sm",children:[s?c.jsx(si,{client:e.client,id:s.id,size:d}):c.jsx(M,{borderColor:"borderColor",bg:"modalBg",flex:"row",center:"both",style:{borderStyle:"solid",borderWidth:"1px",borderRadius:Z.full,width:`${d}px`,height:`${d}px`,position:"relative"},children:c.jsx(Rs,{style:{position:"absolute",inset:"25%"}})}),c.jsxs(M,{flex:"column",gap:"3xs",children:[e.label?c.jsx(P,{color:"secondaryText",size:"xs",children:e.label}):null,c.jsx(P,{color:"primaryText",size:e.textSize||"xs",children:u||_n(e.address)}),r.isLoading?c.jsx(ge,{height:ie.sm,width:"100px"}):o||(y=a==null?void 0:a.data)!=null&&y.name?c.jsx(P,{color:"secondaryText",size:"xs",children:o||((p=a==null?void 0:a.data)==null?void 0:p.name)}):null]})]})})}const a_=e=>{const{name:t}=g3(e.chain);return t?c.jsx(P,{color:e.color,size:e.size,style:e.style,children:e.short?Gf(t):t}):c.jsx(ge,{height:ie[e.size],width:"50px"})};function Gf(e){const t=e.split(" "),n=new Set(["mainnet","testnet","chain"]);return t.filter(i=>!n.has(i.toLowerCase())).join(" ")}const Jr="data:image/svg+xml;charset=UTF-8,%3csvg width='15' height='14' viewBox='0 0 15 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7 8.04238e-07C5.1435 8.04238e-07 3.36301 0.737501 2.05025 2.05025C0.7375 3.36301 0 5.1435 0 7C0 7.225 -1.52737e-07 7.445 0.0349998 7.665C0.16385 9.0151 0.68213 10.2988 1.52686 11.3598C2.37158 12.4209 3.50637 13.2137 4.79326 13.642C6.0801 14.0702 7.4637 14.1153 8.7758 13.7719C10.0879 13.4285 11.2719 12.7113 12.184 11.7075C13.0961 10.7038 13.6969 9.4567 13.9135 8.1178C14.1301 6.7789 13.9531 5.406 13.4039 4.16587C12.8548 2.92574 11.9573 1.87184 10.8204 1.13228C9.6835 0.392721 8.3563 -0.000649196 7 8.04238e-07ZM7 1C8.581 1.00137 10.0975 1.62668 11.22 2.74V3.24C9.2438 2.55991 7.0956 2.56872 5.125 3.265C4.96758 3.1116 4.76997 3.00586 4.555 2.96H4.43C4.37 2.75 4.315 2.54 4.27 2.325C4.225 2.11 4.2 1.92 4.175 1.715C5.043 1.24658 6.0137 1.00091 7 1ZM5.5 3.935C7.3158 3.32693 9.2838 3.34984 11.085 4C10.8414 5.2703 10.3094 6.4677 9.53 7.5C9.312 7.4077 9.0707 7.3855 8.8395 7.4366C8.6083 7.4877 8.3988 7.6094 8.24 7.785C8.065 7.685 7.89 7.585 7.74 7.47C6.7307 6.7966 5.8877 5.9023 5.275 4.855C5.374 4.73221 5.4461 4.58996 5.4866 4.43749C5.5271 4.28502 5.5351 4.12575 5.51 3.97L5.5 3.935ZM3.5 2.135C3.5 2.24 3.53 2.35 3.55 2.455C3.595 2.675 3.655 2.89 3.715 3.105C3.52353 3.21838 3.36943 3.38531 3.2717 3.58522C3.17397 3.78513 3.13688 4.00927 3.165 4.23C2.37575 4.7454 1.67078 5.3795 1.075 6.11C1.19455 5.3189 1.47112 4.55966 1.88843 3.87701C2.30575 3.19437 2.85539 2.60208 3.505 2.135H3.5ZM3.5 9.99C3.30481 10.0555 3.13037 10.1714 2.9943 10.3259C2.85822 10.4804 2.76533 10.6681 2.725 10.87H2.405C1.59754 9.9069 1.1146 8.7136 1.025 7.46L1.08 7.365C1.70611 6.3942 2.52463 5.562 3.485 4.92C3.62899 5.0704 3.81094 5.179 4.01162 5.2345C4.2123 5.2899 4.42423 5.2901 4.625 5.235C5.2938 6.3652 6.208 7.3306 7.3 8.06C7.505 8.195 7.715 8.32 7.925 8.44C7.9082 8.6312 7.9391 8.8237 8.015 9C7.1 9.7266 6.0445 10.256 4.915 10.555C4.78401 10.3103 4.57028 10.1201 4.31199 10.0184C4.05369 9.9167 3.76766 9.9102 3.505 10L3.5 9.99ZM7 12.99C5.9831 12.9903 4.98307 12.7304 4.095 12.235L4.235 12.205C4.43397 12.1397 4.61176 12.0222 4.74984 11.8648C4.88792 11.7074 4.98122 11.5158 5.02 11.31C6.2985 10.984 7.4921 10.3872 8.52 9.56C8.7642 9.7027 9.0525 9.75 9.3295 9.6927C9.6064 9.6355 9.8524 9.4778 10.02 9.25C10.7254 9.4334 11.4511 9.5275 12.18 9.53H12.445C11.9626 10.5673 11.1938 11.4451 10.2291 12.0599C9.2643 12.6747 8.144 13.0009 7 13V12.99ZM10.255 8.54C10.2545 8.3304 10.1975 8.1249 10.09 7.945C10.9221 6.8581 11.5012 5.5991 11.785 4.26C12.035 4.37667 12.2817 4.50667 12.525 4.65C13.0749 5.9495 13.1493 7.4012 12.735 8.75C11.9049 8.8142 11.0698 8.7484 10.26 8.555L10.255 8.54Z' fill='%23646D7A'/%3e%3c/svg%3e";function c_({token:e,client:t,size:n,style:i}){const r=X(),s=Pe(e.chainId);return c.jsxs(M,{center:"y",flex:"row",gap:"sm",style:{flexWrap:"nowrap",...i},children:[c.jsxs(M,{style:{height:A[n],position:"relative",width:A[n]},children:[c.jsx(KD,{client:t,size:n,token:e}),s.id!==1&&c.jsx(M,{style:{background:r.colors.borderColor,border:`1.5px solid ${r.colors.modalBg}`,borderRadius:"50%",bottom:"-2px",height:n==="lg"||n==="xl"?A.sm:A.xs,position:"absolute",right:"-2px",width:n==="lg"||n==="xl"?A.sm:A.xs},children:c.jsx(JD,{chain:s,client:t,size:n==="xl"||n==="lg"?"sm":"xs"})})]}),c.jsxs(M,{flex:"column",gap:"4xs",style:{minWidth:0},children:[c.jsx(P,{color:"primaryText",size:n==="xl"?"lg":"sm",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},weight:500,trackingTight:!0,children:e.name}),c.jsx(a_,{chain:s,client:t,short:!0,size:n==="xl"?"sm":"xs"})]})]})}function KD(e){var s;const t=Pe(e.token.chainId),n=Yu(t).data,i=X(),r=w.useMemo(()=>{var o;return Br(e.token)||e.token.address===Yt?(n==null?void 0:n.nativeCurrency.symbol)==="ETH"?"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png":(o=n==null?void 0:n.icon)==null?void 0:o.url:e.token.iconUri},[e.token,(s=n==null?void 0:n.icon)==null?void 0:s.url,n==null?void 0:n.nativeCurrency.symbol]);return r?c.jsx(Xe,{client:e.client,fallbackImage:$x,height:A[e.size],src:r,style:{borderRadius:"50%"},width:A[e.size]}):c.jsx(M,{style:{alignItems:"center",backgroundColor:i.colors.secondaryButtonBg,border:`1px solid ${i.colors.borderColor}`,borderRadius:"50%",display:"flex",height:`${A[e.size]}px`,justifyContent:"center",padding:z.xs,width:`${A[e.size]}px`},children:c.jsx(P,{color:"secondaryText",size:e.size==="xl"?"sm":"xs",style:{fontWeight:600},children:e.token.symbol.slice(0,1)})})}const JD=e=>{const{url:t}=F1(e.chain);return c.jsx(M,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:c.jsx(Xe,{client:e.client,fallbackImage:Jr,height:A[e.size],src:XD({chainIconUrl:t,client:e.client}),width:A[e.size]})})},XD=e=>{const t=e.chainIconUrl;if(!t)return Jr;try{return Fi({client:e.client,uri:t})}catch{return Jr}};function Bg({client:e,token:t,amount:n,onClick:i,style:r,currency:s}){const o=Pe(t.chainId);return c.jsxs(eO,{onClick:()=>i(t),style:{display:"flex",justifyContent:"space-between",padding:`${z.md} ${z.md}`,...r},variant:"secondary",children:[c.jsx(c_,{client:e,size:"lg",style:{flex:1,maxWidth:"50%"},token:t}),c.jsx(M,{center:"y",color:"secondaryText",flex:"row",gap:"4xs",style:{flex:"1",flexWrap:"nowrap",justifyContent:"flex-end",maxWidth:"50%",minWidth:0},children:c.jsxs(M,{color:"secondaryText",flex:"column",gap:"3xs",style:{alignItems:"flex-end",minWidth:0,overflow:"hidden"},children:[c.jsx(P,{color:"primaryText",size:"sm",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${Number(n).toLocaleString(void 0,{maximumFractionDigits:6,minimumFractionDigits:0})} ${t.symbol}`}),c.jsx(s_,{currency:s,chain:o,client:e,color:"secondaryText",size:"sm",token:t,tokenAmount:n})]})})]})}const eO=Be(ae)(e=>({"&:hover":{background:X().colors.secondaryButtonBg},background:"transparent",flexDirection:"row",flexWrap:"nowrap",gap:z.sm,justifyContent:"space-between",padding:z.sm,paddingRight:z.xs,transition:"background 200ms ease, transform 150ms ease",...e.style}));function tO(e){var r;const t=X(),n=e.sender||(e.paymentMethod.type==="wallet"?(r=e.paymentMethod.payerWallet.getAccount())==null?void 0:r.address:void 0),i=e.receiver.toLowerCase()!==(n==null?void 0:n.toLowerCase());return c.jsxs(M,{children:[c.jsxs(M,{bg:"tertiaryBg",flex:"column",style:{border:`1px solid ${t.colors.borderColor}`,borderRadius:Z.xl},children:[n&&c.jsx(M,{flex:"row",gap:"sm",px:"md",py:"md",style:{borderBottom:`1px dashed ${t.colors.borderColor}`},children:c.jsx(Hf,{address:n,client:e.client,iconSize:"lg",textSize:"sm"})}),e.paymentMethod.type==="wallet"&&c.jsx(Bg,{currency:e.currency,amount:e.fromAmount,client:e.client,onClick:()=>{},style:{background:"transparent",border:"none",borderRadius:0},token:e.paymentMethod.originToken}),e.paymentMethod.type==="fiat"&&c.jsxs(M,{center:"y",flex:"row",gap:"sm",px:"md",py:"md",style:{justifyContent:"space-between"},children:[c.jsxs(M,{center:"y",flex:"row",gap:"sm",children:[GD({currency:e.paymentMethod.currency,size:"lg"}),c.jsxs(M,{center:"y",flex:"column",gap:"3xs",children:[c.jsx(P,{color:"primaryText",size:"sm",weight:500,children:e.paymentMethod.currency}),c.jsx(P,{color:"secondaryText",size:"xs",children:e.paymentMethod.onramp.charAt(0).toUpperCase()+e.paymentMethod.onramp.slice(1)})]})]}),c.jsx(P,{color:"primaryText",size:"sm",children:e.fromAmount})]})]}),c.jsx(qD,{}),c.jsxs(M,{bg:"tertiaryBg",flex:"column",style:{border:`1px solid ${t.colors.borderColor}`,borderRadius:Z.xl},children:[i&&c.jsx(M,{flex:"row",gap:"sm",px:"md",py:"md",style:{borderBottom:`1px dashed ${t.colors.borderColor}`},children:c.jsx(Hf,{address:e.receiver,client:e.client,iconSize:"lg",textSize:"sm"})}),e.modeInfo.mode==="direct_payment"&&c.jsxs(M,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[c.jsxs(M,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[c.jsx(P,{color:"primaryText",size:"sm",weight:500,children:e.metadata.title||"Payment"}),e.metadata.description&&c.jsx(P,{color:"secondaryText",size:"xs",children:e.metadata.description})]}),c.jsxs(M,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:[c.jsx(s_,{currency:e.currency,chain:Qe(e.toToken.chainId),client:e.client,color:"primaryText",size:"sm",token:e.toToken,tokenAmount:e.modeInfo.paymentInfo.amount}),c.jsxs(P,{color:"secondaryText",size:"xs",children:[e.modeInfo.paymentInfo.amount," ",e.toToken.symbol]})]})]}),e.modeInfo.mode==="fund_wallet"&&c.jsx(Bg,{currency:e.currency,amount:e.toAmount,client:e.client,onClick:()=>{},style:{background:"transparent",border:"none",borderRadius:0},token:e.toToken}),e.modeInfo.mode==="transaction"&&c.jsx(nO,{client:e.client,paymentMethod:e.paymentMethod,transaction:e.modeInfo.transaction,metadata:e.metadata})]})]})}const nO=e=>{const t=X(),n=RD({client:e.client,transaction:e.transaction,wallet:e.paymentMethod.payerWallet});return n.data?c.jsxs(M,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[c.jsxs(M,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[c.jsx(P,{color:"primaryText",size:"sm",weight:500,children:e.metadata.title||"Transaction"}),e.metadata.description&&c.jsx(P,{color:"secondaryText",size:"xs",children:e.metadata.description})]}),c.jsx(M,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:c.jsx(P,{color:"secondaryText",size:"xs",style:{backgroundColor:t.colors.secondaryButtonBg,borderRadius:z.sm,fontFamily:"monospace",padding:`${z.xs} ${z.sm}`,textAlign:"right"},children:n.data.functionInfo.functionName})})]}):c.jsxs(M,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[c.jsxs(M,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[c.jsx("div",{style:{backgroundColor:t.colors.skeletonBg,borderRadius:z.xs,height:"16px",width:"120px"}}),e.metadata.description&&c.jsx("div",{style:{backgroundColor:t.colors.skeletonBg,borderRadius:z.xs,height:"12px",width:"80px"}})]}),c.jsx(M,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:c.jsx("div",{style:{backgroundColor:t.colors.skeletonBg,borderRadius:z.sm,height:"24px",width:"100px"}})})]})};function iO({metadata:e,confirmButtonLabel:t,client:n,paymentMethod:i,preparedQuote:r,onConfirm:s,onBack:o,onError:a,currency:l,modeInfo:u}){var x,_;const d=X(),f=()=>{try{s()}catch(b){a(b)}},m=w3(r.steps.flatMap(b=>[Qe(b.originToken.chainId),Qe(b.destinationToken.chainId)]),10),y=w.useMemo(()=>m.map(b=>b.data),[m]).filter(b=>!!b),g=(()=>{var b,I,E,C,T,j;switch(r.type){case"transfer":{const O=i.type==="wallet"?i.originToken:void 0;return O?{destinationAmount:Ft(r.destinationAmount,O.decimals),destinationToken:O,estimatedTime:r.estimatedExecutionTimeMs,originAmount:Ft(r.originAmount,O.decimals),originToken:O}:(a(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"buy":{const O=i.type==="wallet"?i:void 0;return O?{destinationAmount:Ft(r.destinationAmount,((I=(b=r.steps[r.steps.length-1])==null?void 0:b.destinationToken)==null?void 0:I.decimals)??18),destinationToken:(E=r.steps[r.steps.length-1])==null?void 0:E.destinationToken,estimatedTime:r.estimatedExecutionTimeMs,originAmount:Ft(r.originAmount,O.originToken.decimals),originToken:i.type==="wallet"?i.originToken:void 0}:(a(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"sell":{const O=i.type==="wallet"?i:void 0;return O?{destinationAmount:Ft(r.destinationAmount,((T=(C=r.steps[r.steps.length-1])==null?void 0:C.destinationToken)==null?void 0:T.decimals)??18),destinationToken:(j=r.steps[r.steps.length-1])==null?void 0:j.destinationToken,estimatedTime:r.estimatedExecutionTimeMs,originAmount:Ft(r.originAmount,O.originToken.decimals),originToken:i.type==="wallet"?i.originToken:void 0}:(a(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"onramp":{const O=i.type==="fiat"?i:void 0;return O?{destinationAmount:Ft(r.destinationAmount,r.destinationToken.decimals),destinationToken:r.destinationToken,estimatedTime:void 0,originAmount:Ss(O.currency,Number(r.currencyAmount)),originToken:void 0}:(a(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}default:throw new Error(`Unsupported bridge prepare type: ${r.type}`)}})();return c.jsxs(M,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[c.jsx(be,{onBack:o,title:e.title||"Payment Details"}),c.jsx($,{y:"lg"}),c.jsxs(M,{flex:"column",children:[c.jsxs(M,{flex:"column",children:[g.destinationToken&&c.jsx(tO,{currency:l,metadata:e,modeInfo:u,client:n,fromAmount:g.originAmount,paymentMethod:i,receiver:r.intent.receiver,sender:r.intent.sender||((_=(x=i.payerWallet)==null?void 0:x.getAccount())==null?void 0:_.address),toAmount:g.destinationAmount,toToken:g.destinationToken}),c.jsx($,{y:"md"}),c.jsxs(M,{flex:"row",gap:"sm",children:[c.jsxs(M,{flex:"row",gap:"xs",style:{flex:1,justifyContent:"center"},children:[c.jsx(P,{color:"secondaryText",size:"sm",children:"Estimated Time"}),c.jsx(P,{color:"primaryText",size:"sm",children:g.estimatedTime?`~${Math.ceil(g.estimatedTime/6e4)} min`:"~2 min"})]}),r.steps.length>1?c.jsxs(M,{flex:"row",gap:"xs",style:{flex:1,justifyContent:"center"},children:[c.jsx(P,{color:"secondaryText",size:"sm",children:"Route Length"}),c.jsxs(P,{color:"primaryText",size:"sm",children:[r.steps.length," step",r.steps.length!==1?"s":""]})]}):null]})]}),r.steps.length>1&&c.jsxs(M,{flex:"column",children:[c.jsx($,{y:"sm"}),c.jsx(M,{flex:"column",gap:"md+",style:{backgroundColor:d.colors.tertiaryBg,border:`1px solid ${d.colors.borderColor}`,borderRadius:Z.xl,padding:`${z.md} ${z.md}`},children:r.steps.map((b,I)=>{var E,C,T;return c.jsx(M,{flex:"column",gap:"sm",children:c.jsxs(M,{flex:"row",gap:"sm",style:{alignItems:"center"},children:[c.jsx(M,{center:"both",flex:"row",style:{backgroundColor:d.colors.modalBg,border:`1px solid ${d.colors.borderColor}`,borderRadius:Z.full,color:d.colors.secondaryText,flexShrink:0,fontWeight:"bold",height:`${A.lg}px`,width:`${A.lg}px`},children:c.jsx(P,{color:"secondaryText",size:"sm",children:I+1})}),c.jsx(M,{center:"y",flex:"row",gap:"sm",style:{flex:1},children:c.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[c.jsx(P,{color:"primaryText",size:"sm",weight:500,children:b.destinationToken.chainId!==b.originToken.chainId?c.jsxs(c.Fragment,{children:["Bridge"," ",b.originToken.symbol===b.destinationToken.symbol?b.originToken.symbol:`${b.originToken.symbol} to ${b.destinationToken.symbol}`]}):c.jsxs(c.Fragment,{children:["Swap ",b.originToken.symbol," to"," ",b.destinationToken.symbol]})}),c.jsx(P,{color:"secondaryText",size:"xs",children:b.originToken.chainId!==b.destinationToken.chainId?c.jsxs(c.Fragment,{children:[(E=y.find(j=>j.chainId===b.originToken.chainId))==null?void 0:E.name," ","to"," ",(C=y.find(j=>j.chainId===b.destinationToken.chainId))==null?void 0:C.name]}):(T=y.find(j=>j.chainId===b.originToken.chainId))==null?void 0:T.name})]})})]})},`step-${I}-${b.originToken.address}-${b.destinationToken.address}`)})})]}),c.jsx($,{y:"md"}),c.jsx(M,{flex:"column",gap:"sm",children:c.jsx(ae,{fullWidth:!0,onClick:f,variant:"primary",style:{borderRadius:Z.full},children:t||"Confirm Payment"})})]})]})}function rO(e){var u;const{destinationToken:t,destinationAmount:n,client:i,payerWallet:r,supportedTokens:s}=e,o=bt(),a=r||o,l=xe({enabled:!!a,queryFn:async()=>{var E;const d=a==null?void 0:a.getAccount();if(!a||!d)throw new Error("No wallet connected");const f=new URL(`${it("bridge")}/v1/buy/quote/${d.address}`);f.searchParams.set("destinationChainId",t.chainId.toString()),f.searchParams.set("destinationTokenAddress",t.address),f.searchParams.set("amount",Jn(n,t.decimals).toString()),f.searchParams.set("includeQuotes","false");const y=await He(i)(f.toString());if(!y.ok){const C=await y.json();throw new pt({code:C.code||"UNKNOWN_ERROR",correlationId:C.correlationId||void 0,message:C.message||y.statusText,statusCode:y.status})}const{data:p}=await y.json(),x=p.map(C=>({balance:BigInt(C.balance),originToken:C.token,payerWallet:a,type:"wallet",quote:C.quote})).filter(C=>!!C.originToken.prices.USD).sort((C,T)=>Number.parseFloat(Un(T.balance,T.originToken.decimals))*(T.originToken.prices.USD||1)-Number.parseFloat(Un(C.balance,C.originToken.decimals))*(C.originToken.prices.USD||1)),_=s?Object.keys(s).flatMap(C=>{var T;return((T=s[Number(C)])==null?void 0:T.map(j=>({chainId:Number(C),address:j.address})))??[]}):[],b=s?x.filter(C=>_.find(T=>T.chainId===C.originToken.chainId&&T.address.toLowerCase()===C.originToken.address.toLowerCase())):x,I=(((E=t.prices)==null?void 0:E.USD)??0)*Number(n);return b.map(C=>{var O;const j=(((O=C.originToken.prices)==null?void 0:O.USD)??0)*Number(Un(C.balance,C.originToken.decimals))>=I;return{...C,action:"buy",hasEnoughBalance:j}})},queryKey:["payment-methods",t.chainId,t.address,n,(u=r==null?void 0:r.getAccount())==null?void 0:u.address,s],refetchOnWindowFocus:!1,staleTime:5*60*1e3});return{data:l.data||[],error:l.error,isError:l.isError,isLoading:l.isLoading,isSuccess:l.isSuccess,refetch:l.refetch}}function l_(e){const t=_t(),n=Hs(),i=e.wallets||Xu({appMetadata:e.appMetadata,chains:e.chains}).filter(s=>s.id!=="inApp"),r=mm({size:"compact",wallets:i,welcomeScreen:void 0});return c.jsx(i_,{accountAbstraction:e.accountAbstraction,auth:void 0,chain:e.chain||t,chains:e.chains,client:e.client,connectLocale:e.connectLocale,hideHeader:e.isEmbed,isOpen:!0,meta:{showThirdwebBranding:!1},modalHeader:{onBack:e.onBack,title:"Connect"},onClose:()=>{},onConnect:s=>{e.onSelect(s)},recommendedWallets:e.recommendedWallets,screenSetup:r,setModalVisibility:()=>{},shouldSetActive:!1,showAllWallets:e.showAllWallets,size:"compact",walletConnect:e.walletConnect,walletIdsToHide:n.map(s=>s.id),wallets:i,welcomeScreen:void 0})}function sO(e,t){return V1({queries:["coinbase","stripe","transak"].map(r=>({...t,enabled:!!e,queryFn:async()=>{if(!e)throw new Error("No params provided");const s=await Oc(e.client,e.tokenAddress,e.chainId),o=Jn(e.amount,s.decimals);return i1({amount:o,chainId:e.chainId,client:e.client,currency:e.currency||"USD",onramp:r,receiver:e.receiver,tokenAddress:e.tokenAddress,country:e.country})},queryKey:["onramp-prepare",r,e],retry:!1}))})}const oO=[{description:"Fast and secure payments",iconUri:"https://i.ibb.co/LDJ3Rk2t/Frame-5.png",id:"coinbase",name:"Coinbase"},{description:"Trusted payment processing",iconUri:"https://i.ibb.co/CpgQC2Lf/images-3.png",id:"stripe",name:"Stripe"},{description:"Global payment solution",iconUri:"https://i.ibb.co/Xx2r882p/Transak-official-symbol-1.png",id:"transak",name:"Transak"}];function aO({onProviderSelected:e,client:t,toChainId:n,toTokenAddress:i,toAddress:r,toAmount:s,currency:o,country:a}){const l=sO({amount:s||"0",chainId:n,client:t,currency:o||"USD",receiver:$o(r),tokenAddress:$o(i),country:a}),u=w.useMemo(()=>l.map(f=>f.data).filter(f=>!!f),[l]),d=l.some(f=>f.isLoading);return l.every(f=>f.isError)?c.jsx(M,{center:"both",flex:"column",style:{minHeight:"200px",flexGrow:1},children:c.jsx(P,{color:"secondaryText",size:"sm",children:"No quotes available"})}):c.jsx(M,{flex:"column",gap:"xs",style:{flexGrow:1},children:d?c.jsxs(M,{center:"both",flex:"column",style:{flexGrow:1,paddingBottom:z.lg},px:"md",children:[c.jsx($e,{color:"secondaryText",size:"xl"}),c.jsx($,{y:"lg"}),c.jsx(P,{center:!0,color:"primaryText",size:"lg",weight:600,trackingTight:!0,children:"Searching Providers"}),c.jsx($,{y:"xs"}),c.jsx(P,{center:!0,color:"secondaryText",size:"sm",multiline:!0,style:{textWrap:"pretty"},children:"Searching for the best providers for this payment"})]}):u.sort((f,m)=>f.currencyAmount-m.currencyAmount).map(f=>{const m=oO.find(y=>y.id===f.intent.onramp);return m?c.jsx(ae,{fullWidth:!0,onClick:()=>e(m.id),style:{borderRadius:Z.lg,textAlign:"left",padding:`${z.md}`},variant:"secondary",children:c.jsxs(M,{flex:"row",gap:"sm",style:{alignItems:"center",width:"100%"},children:[c.jsx(Xe,{alt:m.name,client:t,height:A.lg,src:m.iconUri,width:A.lg,style:{borderRadius:Z.full}}),c.jsx(M,{flex:"column",gap:"3xs",style:{flex:1},children:c.jsx(P,{color:"primaryText",size:"md",weight:500,children:m.name})}),c.jsxs(M,{flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:[c.jsx(P,{color:"primaryText",size:"sm",style:{fontWeight:500},children:Ss(o||"USD",f.currencyAmount)}),c.jsxs(P,{color:"secondaryText",size:"xs",children:[Rc(Number(Un(f.destinationAmount,f.destinationToken.decimals)),4)," ",f.destinationToken.symbol]})]})]})},m.id):null})})}function cO({paymentMethod:e,client:t,onPaymentMethodSelected:n,currency:i}){const r=X(),s=e.hasEnoughBalance,o=e.originToken.prices[i||"USD"];return c.jsx(ae,{disabled:!s,fullWidth:!0,onClick:()=>n(e),style:{backgroundColor:r.colors.tertiaryBg,borderRadius:Z.lg,padding:`${z.md} ${z.md}`,textAlign:"left"},variant:"secondary",children:c.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[c.jsx(c_,{client:t,size:"lg",style:{maxWidth:"50%"},token:e.originToken}),c.jsxs(M,{flex:"column",gap:"3xs",style:{alignItems:"flex-end",flex:1},children:[o&&c.jsx(P,{color:"primaryText",size:"sm",style:{fontWeight:500,textWrap:"nowrap"},children:Ss(i||"USD",Number(Ft(e.balance,e.originToken.decimals))*o)}),c.jsx(M,{flex:"row",gap:"3xs",children:c.jsxs(P,{color:s?"success":"danger",size:"xs",children:[Ft(e.balance,e.originToken.decimals)," ",e.originToken.symbol]})})]})]})},`${e.originToken.address}-${e.originToken.chainId}`)}function lO({paymentMethods:e,paymentMethodsLoading:t,client:n,onPaymentMethodSelected:i,onBack:r,destinationToken:s,destinationAmount:o,feePayer:a,currency:l}){const u=X();return t?c.jsx(M,{flex:"column",gap:"xs",pb:"lg",style:{maxHeight:"400px",overflowY:"auto",scrollbarWidth:"none"},children:new Array(10).fill(0).map((d,f)=>c.jsx(M,{style:{backgroundColor:u.colors.tertiaryBg,borderRadius:Z.lg,padding:`${z.md} ${z.md}`},children:c.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[c.jsxs(M,{center:"y",flex:"row",gap:"sm",style:{maxWidth:"50%"},children:[c.jsx("div",{style:{backgroundColor:u.colors.skeletonBg,borderRadius:"50%",height:"32px",width:"32px"}}),c.jsxs(M,{flex:"column",gap:"3xs",children:[c.jsx(ge,{height:"14px",width:"60px"}),c.jsx(ge,{height:"12px",width:"40px"})]})]}),c.jsxs(M,{flex:"column",gap:"3xs",style:{alignItems:"flex-end",flex:1},children:[c.jsx(ge,{height:"16px",width:"80px"}),c.jsxs(M,{flex:"row",gap:"3xs",children:[c.jsx(ge,{height:"12px",width:"50px"}),c.jsx(ge,{height:"12px",width:"40px"})]})]})]})},f))}):e.length===0?c.jsxs(M,{center:"both",flex:"column",style:{minHeight:"250px"},children:[c.jsx(P,{center:!0,color:"primaryText",size:"md",children:"No available tokens found for this wallet"}),c.jsx($,{y:"sm"}),c.jsx(P,{center:!0,color:"secondaryText",size:"sm",children:"Try connecting a different wallet or pay with card"}),c.jsx($,{y:"lg"}),c.jsx(ae,{onClick:r,variant:"primary",children:"Select another payment method"})]}):c.jsx(M,{flex:"column",gap:"xs",pb:"lg",style:{maxHeight:"400px",overflowY:"auto",scrollbarWidth:"none"},children:e.filter(d=>d.type==="wallet").map(d=>c.jsx(cO,{client:n,destinationAmount:o,destinationToken:s,feePayer:a,onPaymentMethodSelected:i,paymentMethod:d,currency:l},`${d.originToken.address}-${d.originToken.chainId}`))})}const uO=e=>c.jsxs("svg",{fill:"none",height:e.size,role:"presentation",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("rect",{height:"14",rx:"2",width:"20",x:"2",y:"5"}),c.jsx("line",{x1:"2",x2:"22",y1:"10",y2:"10"})]});function dO({connectedWallets:e,client:t,onWalletSelected:n,onFiatSelected:i,onConnectWallet:r,paymentMethods:s=["crypto","card"]}){const o=X();return c.jsxs(M,{flex:"column",gap:"xs",children:[s.includes("crypto")&&c.jsxs(c.Fragment,{children:[e.length>0&&c.jsx(M,{flex:"column",gap:"sm",children:e.map(a=>{const l=a.getAccount();return l!=null&&l.address?c.jsx(ae,{fullWidth:!0,onClick:()=>n(a),style:{borderRadius:Z.md,justifyContent:"space-between",padding:`${z.md} ${z.md}`},variant:"secondary",children:c.jsx(Hf,{address:l==null?void 0:l.address,client:t,iconSize:"lg",textSize:"sm"})},`${a.id}-${l.address}`):null})}),c.jsx(ae,{fullWidth:!0,onClick:r,style:{borderRadius:Z.md,height:"auto",padding:`${z.md} ${z.md}`,textAlign:"left"},variant:"secondary",children:c.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[c.jsx(M,{style:{alignItems:"center",border:`1px dashed ${o.colors.secondaryText}`,borderRadius:Z.full,display:"flex",height:`${A.lg}px`,justifyContent:"center",width:`${A.lg}px`},children:c.jsx(Ku,{color:o.colors.secondaryText,height:A["sm+"],width:A["sm+"]})}),c.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[c.jsx(P,{color:"primaryText",size:"sm",children:"Connect a Wallet"}),c.jsx(P,{color:"secondaryText",size:"xs",children:"Pay with any web3 wallet"})]})]})})]}),s.includes("card")&&c.jsx(ae,{fullWidth:!0,onClick:i,style:{borderRadius:Z.md,height:"auto",padding:`${z.md} ${z.md}`,textAlign:"left"},variant:"secondary",children:c.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[c.jsx(uO,{color:o.colors.secondaryText,size:A.lg}),c.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[c.jsx(P,{color:"primaryText",size:"sm",children:"Pay with Card"}),c.jsx(P,{color:"secondaryText",size:"xs",children:"Onramp and pay in one step"})]})]})})]})}function hO({destinationToken:e,client:t,destinationAmount:n,receiverAddress:i,onPaymentMethodSelected:r,onError:s,onBack:o,connectOptions:a,connectLocale:l,paymentMethods:u,supportedTokens:d,feePayer:f,currency:m,country:y}){var R,B;const p=Hs(),g=bt(),x=u.length===1&&u[0]==="card"?{type:"fiatProviderSelection"}:{type:"walletSelection"},[_,b]=w.useState(x),I=_.type==="tokenSelection"?_.selectedWallet:g,{data:E,isLoading:C,error:T}=rO({client:t,destinationAmount:n,destinationToken:e,payerWallet:I,supportedTokens:d});w.useEffect(()=>{T&&s(T)},[T,s]);const j=F=>{try{r(F)}catch(W){s(W)}},O=F=>{xn({client:t,event:"ub:ui:token_selection"}),b({selectedWallet:F,type:"tokenSelection"})},L=async()=>{b({type:"walletConnection"})},N=()=>{xn({client:t,event:"ub:ui:fiat_provider_selection"}),b({type:"fiatProviderSelection"})},v=()=>{b({type:"walletSelection"})},D=F=>{var Y;if(!(i||((Y=I==null?void 0:I.getAccount())==null?void 0:Y.address))){s(new Error("No recipient address available for fiat payment"));return}j({currency:m||"USD",onramp:F,payerWallet:I,type:"fiat"})},k=()=>{switch(_.type){case"walletSelection":return"Choose Payment Method";case"tokenSelection":return"Select Token";case"fiatProviderSelection":return"Select Payment Provider";case"walletConnection":return"Connect Wallet"}},U=()=>{if(u.length===1&&u[0]==="card")return o;switch(_.type){case"walletSelection":return o;case"tokenSelection":case"fiatProviderSelection":case"walletConnection":return v}};if(_.type==="walletConnection"){const F=e?Qe(e.chainId):void 0,W=F?[F,...(a==null?void 0:a.chains)||[]]:a==null?void 0:a.chains;return c.jsx(l_,{accountAbstraction:a==null?void 0:a.accountAbstraction,appMetadata:a==null?void 0:a.appMetadata,chain:F||(a==null?void 0:a.chain),chains:W,client:t,connectLocale:l,hiddenWallets:[],isEmbed:!1,onBack:v,onSelect:O,recommendedWallets:a==null?void 0:a.recommendedWallets,showAllWallets:(a==null?void 0:a.showAllWallets)===void 0?!0:a==null?void 0:a.showAllWallets,walletConnect:a==null?void 0:a.walletConnect,wallets:(R=a==null?void 0:a.wallets)==null?void 0:R.filter(V=>V.id!=="inApp")})}return c.jsxs(M,{flex:"column",px:"md",pt:"md+",children:[c.jsx(be,{onBack:U(),title:k()}),c.jsx($,{y:"lg"}),c.jsxs(M,{flex:"column",style:{minHeight:"300px"},children:[_.type==="walletSelection"&&c.jsx(dO,{client:t,connectedWallets:p,onConnectWallet:L,onFiatSelected:N,onWalletSelected:O,paymentMethods:u}),_.type==="tokenSelection"&&c.jsx(lO,{client:t,destinationAmount:Jn(n,e.decimals),destinationToken:e,feePayer:f,onBack:v,onPaymentMethodSelected:j,paymentMethods:E,paymentMethodsLoading:C,currency:m}),_.type==="fiatProviderSelection"&&c.jsx(aO,{country:y,client:t,onProviderSelected:D,toAddress:i||((B=I==null?void 0:I.getAccount())==null?void 0:B.address)||"",toAmount:n,toChainId:e.chainId,toTokenAddress:e.address,currency:m})]})]})}function u_(e){const[t,n]=w.useState(!1),i=w.useCallback(async()=>{await navigator.clipboard.writeText(e),n(!0)},[e]);return w.useEffect(()=>{let r=null;return t&&(r=window.setTimeout(()=>{n(!1)},1500)),()=>{r&&window.clearTimeout(r)}},[t]),{hasCopied:t,onCopy:i}}function an(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Vg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function d_(...e){return t=>{let n=!1;const i=e.map(r=>{const s=Vg(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<i.length;r++){const s=i[r];typeof s=="function"?s():Vg(e[r],null)}}}}function oi(...e){return w.useCallback(d_(...e),e)}function fO(e,t){const n=w.createContext(t),i=s=>{const{children:o,...a}=s,l=w.useMemo(()=>a,Object.values(a));return c.jsx(n.Provider,{value:l,children:o})};i.displayName=e+"Provider";function r(s){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[i,r]}function Mm(e,t=[]){let n=[];function i(s,o){const a=w.createContext(o),l=n.length;n=[...n,o];const u=f=>{var _;const{scope:m,children:y,...p}=f,g=((_=m==null?void 0:m[e])==null?void 0:_[l])||a,x=w.useMemo(()=>p,Object.values(p));return c.jsx(g.Provider,{value:x,children:y})};u.displayName=s+"Provider";function d(f,m){var g;const y=((g=m==null?void 0:m[e])==null?void 0:g[l])||a,p=w.useContext(y);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(o=>w.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return r.scopeName=e,[i,mO(r,...t)]}function mO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const o=i.reduce((a,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...a,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function h_(e){const t=yO(e),n=w.forwardRef((i,r)=>{const{children:s,...o}=i,a=w.Children.toArray(s),l=a.find(pO);if(l){const u=l.props.children,d=a.map(f=>f===l?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...o,ref:r,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return c.jsx(t,{...o,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function yO(e){const t=w.forwardRef((n,i)=>{const{children:r,...s}=n;if(w.isValidElement(r)){const o=xO(r),a=wO(s,r.props);return r.type!==w.Fragment&&(a.ref=i?d_(i,o):o),w.cloneElement(r,a)}return w.Children.count(r)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var f_=Symbol("radix.slottable");function gO(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=f_,t}function pO(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===f_}function wO(e,t){const n={...t};for(const i in t){const r=e[i],s=t[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...a)=>{const l=s(...a);return r(...a),l}:r&&(n[i]=r):i==="style"?n[i]={...r,...s}:i==="className"&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function xO(e){var i,r;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _O=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],un=_O.reduce((e,t)=>{const n=h_(`Primitive.${t}`),i=w.forwardRef((r,s)=>{const{asChild:o,...a}=r,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...a,ref:s})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function bO(e,t){e&&u4.flushSync(()=>e.dispatchEvent(t))}function Wo(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}function MO(e,t=globalThis==null?void 0:globalThis.document){const n=Wo(e);w.useEffect(()=>{const i=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var IO="DismissableLayer",Zf="dismissableLayer.update",EO="dismissableLayer.pointerDownOutside",CO="dismissableLayer.focusOutside",Wg,m_=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Im=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=e,u=w.useContext(m_),[d,f]=w.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=w.useState({}),p=oi(t,j=>f(j)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),_=g.indexOf(x),b=d?g.indexOf(d):-1,I=u.layersWithOutsidePointerEventsDisabled.size>0,E=b>=_,C=jO(j=>{const O=j.target,L=[...u.branches].some(N=>N.contains(O));!E||L||(r==null||r(j),o==null||o(j),j.defaultPrevented||a==null||a())},m),T=vO(j=>{const O=j.target;[...u.branches].some(N=>N.contains(O))||(s==null||s(j),o==null||o(j),j.defaultPrevented||a==null||a())},m);return MO(j=>{b===u.layers.size-1&&(i==null||i(j),!j.defaultPrevented&&a&&(j.preventDefault(),a()))},m),w.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Wg=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Fg(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Wg)}},[d,m,n,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Fg())},[d,u]),w.useEffect(()=>{const j=()=>y({});return document.addEventListener(Zf,j),()=>document.removeEventListener(Zf,j)},[]),c.jsx(un.div,{...l,ref:p,style:{pointerEvents:I?E?"auto":"none":void 0,...e.style},onFocusCapture:an(e.onFocusCapture,T.onFocusCapture),onBlurCapture:an(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:an(e.onPointerDownCapture,C.onPointerDownCapture)})});Im.displayName=IO;var LO="DismissableLayerBranch",TO=w.forwardRef((e,t)=>{const n=w.useContext(m_),i=w.useRef(null),r=oi(t,i);return w.useEffect(()=>{const s=i.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(un.div,{...e,ref:r})});TO.displayName=LO;function jO(e,t=globalThis==null?void 0:globalThis.document){const n=Wo(e),i=w.useRef(!1),r=w.useRef(()=>{});return w.useEffect(()=>{const s=a=>{if(a.target&&!i.current){let l=function(){y_(EO,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);i.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function vO(e,t=globalThis==null?void 0:globalThis.document){const n=Wo(e),i=w.useRef(!1);return w.useEffect(()=>{const r=s=>{s.target&&!i.current&&y_(CO,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Fg(){const e=new CustomEvent(Zf);document.dispatchEvent(e)}function y_(e,t,n,{discrete:i}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),i?bO(r,s):r.dispatchEvent(s)}var Xr=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},NO=d4[" useId ".trim().toString()]||(()=>{}),SO=0;function Ll(e){const[t,n]=w.useState(NO());return Xr(()=>{n(i=>i??String(SO++))},[e]),e||(t?`radix-${t}`:"")}var AO="Arrow",g_=w.forwardRef((e,t)=>{const{children:n,width:i=10,height:r=5,...s}=e;return c.jsx(un.svg,{...s,ref:t,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});g_.displayName=AO;var DO=g_;function OO(e){const[t,n]=w.useState(void 0);return Xr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var Em="Popper",[p_,w_]=Mm(Em),[PO,x_]=p_(Em),__=e=>{const{__scopePopper:t,children:n}=e,[i,r]=w.useState(null);return c.jsx(PO,{scope:t,anchor:i,onAnchorChange:r,children:n})};__.displayName=Em;var b_="PopperAnchor",M_=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...r}=e,s=x_(b_,n),o=w.useRef(null),a=oi(t,o);return w.useEffect(()=>{s.onAnchorChange((i==null?void 0:i.current)||o.current)}),i?null:c.jsx(un.div,{...r,ref:a})});M_.displayName=b_;var Cm="PopperContent",[kO,zO]=p_(Cm),I_=w.forwardRef((e,t)=>{var re,se,le,Le,Fe,rt;const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:y="optimized",onPlaced:p,...g}=e,x=x_(Cm,n),[_,b]=w.useState(null),I=oi(t,mt=>b(mt)),[E,C]=w.useState(null),T=OO(E),j=(T==null?void 0:T.width)??0,O=(T==null?void 0:T.height)??0,L=i+(s!=="center"?"-"+s:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},v=Array.isArray(u)?u:[u],D=v.length>0,k={padding:N,boundary:v.filter(UO),altBoundary:D},{refs:U,floatingStyles:R,placement:B,isPositioned:F,middlewareData:W}=h8({strategy:"fixed",placement:L,whileElementsMounted:(...mt)=>n8(...mt,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[m8({mainAxis:r+O,alignmentAxis:o}),l&&y8({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?g8():void 0,...k}),l&&p8({...k}),w8({...k,apply:({elements:mt,rects:ue,availableWidth:fe,availableHeight:Ye})=>{const{width:st,height:ot}=ue.reference,de=mt.floating.style;de.setProperty("--radix-popper-available-width",`${fe}px`),de.setProperty("--radix-popper-available-height",`${Ye}px`),de.setProperty("--radix-popper-anchor-width",`${st}px`),de.setProperty("--radix-popper-anchor-height",`${ot}px`)}}),E&&_8({element:E,padding:a}),$O({arrowWidth:j,arrowHeight:O}),m&&x8({strategy:"referenceHidden",...k})]}),[V,Y]=L_(B),Q=Wo(p);Xr(()=>{F&&(Q==null||Q())},[F,Q]);const G=(re=W.arrow)==null?void 0:re.x,ne=(se=W.arrow)==null?void 0:se.y,ce=((le=W.arrow)==null?void 0:le.centerOffset)!==0,[q,he]=w.useState();return Xr(()=>{_&&he(window.getComputedStyle(_).zIndex)},[_]),c.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:F?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:q,"--radix-popper-transform-origin":[(Le=W.transformOrigin)==null?void 0:Le.x,(Fe=W.transformOrigin)==null?void 0:Fe.y].join(" "),...((rt=W.hide)==null?void 0:rt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(kO,{scope:n,placedSide:V,onArrowChange:C,arrowX:G,arrowY:ne,shouldHideArrow:ce,children:c.jsx(un.div,{"data-side":V,"data-align":Y,...g,ref:I,style:{...g.style,animation:F?void 0:"none"}})})})});I_.displayName=Cm;var E_="PopperArrow",RO={top:"bottom",right:"left",bottom:"top",left:"right"},C_=w.forwardRef(function(t,n){const{__scopePopper:i,...r}=t,s=zO(E_,i),o=RO[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(DO,{...r,ref:n,style:{...r.style,display:"block"}})})});C_.displayName=E_;function UO(e){return e!==null}var $O=e=>({name:"transformOrigin",options:e,fn(t){var x,_,b;const{placement:n,rects:i,middlewareData:r}=t,o=((x=r.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=L_(n),f={start:"0%",center:"50%",end:"100%"}[d],m=(((_=r.arrow)==null?void 0:_.x)??0)+a/2,y=(((b=r.arrow)==null?void 0:b.y)??0)+l/2;let p="",g="";return u==="bottom"?(p=o?f:`${m}px`,g=`${-l}px`):u==="top"?(p=o?f:`${m}px`,g=`${i.floating.height+l}px`):u==="right"?(p=`${-l}px`,g=o?f:`${y}px`):u==="left"&&(p=`${i.floating.width+l}px`,g=o?f:`${y}px`),{data:{x:p,y:g}}}});function L_(e){const[t,n="center"]=e.split("-");return[t,n]}var BO=__,VO=M_,WO=I_,FO=C_,YO="Portal",Lm=w.forwardRef((e,t)=>{var a;const{container:n,...i}=e,[r,s]=w.useState(!1);Xr(()=>s(!0),[]);const o=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?FI.createPortal(c.jsx(un.div,{...i,ref:t}),o):null});Lm.displayName=YO;function QO(e,t){return w.useReducer((n,i)=>t[n][i]??n,e)}var ca=e=>{const{present:t,children:n}=e,i=HO(t),r=typeof n=="function"?n({present:i.isPresent}):w.Children.only(n),s=oi(i.ref,GO(r));return typeof n=="function"||i.isPresent?w.cloneElement(r,{ref:s}):null};ca.displayName="Presence";function HO(e){const[t,n]=w.useState(),i=w.useRef(null),r=w.useRef(e),s=w.useRef("none"),o=e?"mounted":"unmounted",[a,l]=QO(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=ol(i.current);s.current=a==="mounted"?u:"none"},[a]),Xr(()=>{const u=i.current,d=r.current;if(d!==e){const m=s.current,y=ol(u);e?l("MOUNT"):y==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&m!==y?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),Xr(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=y=>{const g=ol(i.current).includes(y.animationName);if(y.target===t&&g&&(l("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=y=>{y.target===t&&(s.current=ol(i.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(u=>{i.current=u?getComputedStyle(u):null,n(u)},[])}}function ol(e){return(e==null?void 0:e.animationName)||"none"}function GO(e){var i,r;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZO=d4[" useInsertionEffect ".trim().toString()]||Xr;function T_({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[r,s,o]=qO({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:r;{const d=w.useRef(e!==void 0);w.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${i} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,i])}const u=w.useCallback(d=>{var f;if(a){const m=KO(d)?d(e):d;m!==e&&((f=o.current)==null||f.call(o,m))}else s(d)},[a,e,s,o]);return[l,u]}function qO({defaultProp:e,onChange:t}){const[n,i]=w.useState(e),r=w.useRef(n),s=w.useRef(t);return ZO(()=>{s.current=t},[t]),w.useEffect(()=>{var o;r.current!==n&&((o=s.current)==null||o.call(s,n),r.current=n)},[n,r]),[n,i,s]}function KO(e){return typeof e=="function"}var JO=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),XO="VisuallyHidden",j_=w.forwardRef((e,t)=>c.jsx(un.span,{...e,ref:t,style:{...JO,...e.style}}));j_.displayName=XO;var eP=j_,[cd]=Mm("Tooltip",[w_]),ld=w_(),v_="TooltipProvider",tP=700,qf="tooltip.open",[nP,Tm]=cd(v_),N_=e=>{const{__scopeTooltip:t,delayDuration:n=tP,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:s}=e,o=w.useRef(!0),a=w.useRef(!1),l=w.useRef(0);return w.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),c.jsx(nP,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,i)},[i]),isPointerInTransitRef:a,onPointerInTransitChange:w.useCallback(u=>{a.current=u},[]),disableHoverableContent:r,children:s})};N_.displayName=v_;var sc="Tooltip",[iP,Uc]=cd(sc),S_=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:r,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=e,l=Tm(sc,e.__scopeTooltip),u=ld(t),[d,f]=w.useState(null),m=Ll(),y=w.useRef(0),p=o??l.disableHoverableContent,g=a??l.delayDuration,x=w.useRef(!1),[_,b]=T_({prop:i,defaultProp:r??!1,onChange:j=>{j?(l.onOpen(),document.dispatchEvent(new CustomEvent(qf))):l.onClose(),s==null||s(j)},caller:sc}),I=w.useMemo(()=>_?x.current?"delayed-open":"instant-open":"closed",[_]),E=w.useCallback(()=>{window.clearTimeout(y.current),y.current=0,x.current=!1,b(!0)},[b]),C=w.useCallback(()=>{window.clearTimeout(y.current),y.current=0,b(!1)},[b]),T=w.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{x.current=!0,b(!0),y.current=0},g)},[g,b]);return w.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),c.jsx(BO,{...u,children:c.jsx(iP,{scope:t,contentId:m,open:_,stateAttribute:I,trigger:d,onTriggerChange:f,onTriggerEnter:w.useCallback(()=>{l.isOpenDelayedRef.current?T():E()},[l.isOpenDelayedRef,T,E]),onTriggerLeave:w.useCallback(()=>{p?C():(window.clearTimeout(y.current),y.current=0)},[C,p]),onOpen:E,onClose:C,disableHoverableContent:p,children:n})})};S_.displayName=sc;var Kf="TooltipTrigger",A_=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,r=Uc(Kf,n),s=Tm(Kf,n),o=ld(n),a=w.useRef(null),l=oi(t,a,r.onTriggerChange),u=w.useRef(!1),d=w.useRef(!1),f=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(VO,{asChild:!0,...o,children:c.jsx(un.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:l,onPointerMove:an(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:an(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:an(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:an(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:an(e.onBlur,r.onClose),onClick:an(e.onClick,r.onClose)})})});A_.displayName=Kf;var jm="TooltipPortal",[rP,sP]=cd(jm,{forceMount:void 0}),D_=e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:r}=e,s=Uc(jm,t);return c.jsx(rP,{scope:t,forceMount:n,children:c.jsx(ca,{present:n||s.open,children:c.jsx(Lm,{asChild:!0,container:r,children:i})})})};D_.displayName=jm;var Fo="TooltipContent",O_=w.forwardRef((e,t)=>{const n=sP(Fo,e.__scopeTooltip),{forceMount:i=n.forceMount,side:r="top",...s}=e,o=Uc(Fo,e.__scopeTooltip);return c.jsx(ca,{present:i||o.open,children:o.disableHoverableContent?c.jsx(P_,{side:r,...s,ref:t}):c.jsx(oP,{side:r,...s,ref:t})})}),oP=w.forwardRef((e,t)=>{const n=Uc(Fo,e.__scopeTooltip),i=Tm(Fo,e.__scopeTooltip),r=w.useRef(null),s=oi(t,r),[o,a]=w.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=i,m=w.useCallback(()=>{a(null),f(!1)},[f]),y=w.useCallback((p,g)=>{const x=p.currentTarget,_={x:p.clientX,y:p.clientY},b=uP(_,x.getBoundingClientRect()),I=dP(_,b),E=hP(g.getBoundingClientRect()),C=mP([...I,...E]);a(C),f(!0)},[f]);return w.useEffect(()=>()=>m(),[m]),w.useEffect(()=>{if(l&&d){const p=x=>y(x,d),g=x=>y(x,l);return l.addEventListener("pointerleave",p),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",p),d.removeEventListener("pointerleave",g)}}},[l,d,y,m]),w.useEffect(()=>{if(o){const p=g=>{const x=g.target,_={x:g.clientX,y:g.clientY},b=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),I=!fP(_,o);b?m():I&&(m(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[l,d,o,u,m]),c.jsx(P_,{...e,ref:s})}),[aP,cP]=cd(sc,{isInside:!1}),lP=gO("TooltipContent"),P_=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=e,l=Uc(Fo,n),u=ld(n),{onClose:d}=l;return w.useEffect(()=>(document.addEventListener(qf,d),()=>document.removeEventListener(qf,d)),[d]),w.useEffect(()=>{if(l.trigger){const f=m=>{const y=m.target;y!=null&&y.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),c.jsx(Im,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:c.jsxs(WO,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(lP,{children:i}),c.jsx(aP,{scope:n,isInside:!0,children:c.jsx(eP,{id:l.contentId,role:"tooltip",children:r||i})})]})})});O_.displayName=Fo;var k_="TooltipArrow",z_=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,r=ld(n);return cP(k_,n).isInside?null:c.jsx(FO,{...r,...i,ref:t})});z_.displayName=k_;function uP(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function dP(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function hP(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}function fP(e,t){const{x:n,y:i}=e;let r=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s],l=t[o],u=a.x,d=a.y,f=l.x,m=l.y;d>i!=m>i&&n<(f-u)*(i-d)/(m-d)+u&&(r=!r)}return r}function mP(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),yP(t)}function yP(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const r=e[i];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var gP=N_,pP=S_,wP=A_,xP=D_,_P=O_,bP=z_;const Jl=e=>c.jsx(gP,{delayDuration:200,children:c.jsxs(pP,{children:[c.jsx(wP,{asChild:!0,children:e.children}),c.jsx(xP,{children:c.jsxs(IP,{align:e.align||"center",side:e.side||"top",sideOffset:e.sideOffset||6,children:[e.tip,c.jsx(EP,{})]})})]})}),MP=$t`
192
+ from {
193
+ opacity: 0;
194
+ transform: translateY(2px);
195
+ }
196
+ to {
197
+ opacity: 1;
198
+ transform: translateY(0);
199
+ }
200
+ `,IP=Be(_P)(e=>{const t=X();return{animation:`${MP} 200ms cubic-bezier(0.16, 1, 0.3, 1)`,background:t.colors.tooltipBg,borderRadius:Z.sm,boxShadow:Z5.sm,color:t.colors.tooltipText,fontSize:ie.sm,lineHeight:1.5,maxWidth:"300px",padding:`${z.xs} ${z.sm}`,userSelect:"none",willChange:"transform, opacity",zIndex:999999999999999}}),EP=Be(bP)(()=>({fill:X().colors.tooltipBg})),Yo=e=>{const{hasCopied:t,onCopy:n}=u_(e.text),i=e.hasCopied||t;return c.jsx(ae,{onClick:n,variant:"ghost-solid",style:{alignItems:"center",display:"flex",padding:2,justifyContent:"center",borderRadius:Z.sm},children:c.jsx(Jl,{align:e.align,side:e.side,tip:e.tip,children:c.jsx("div",{children:c.jsx(M,{center:"both",color:i?"success":"secondaryText",flex:"row",children:i?c.jsx(aa,{className:"tw-check-icon",width:e.iconSize||16,height:e.iconSize||16}):c.jsx(k3,{className:"tw-copy-icon",width:e.iconSize||16,height:e.iconSize||16})})})})})};function CP(e,t){var n;return e.type==="onramp"?e.id:(n=t.transactions[t.transactions.length-1])==null?void 0:n.transactionHash}function LP(e,t){return xe({enabled:!0,queryFn:async()=>{if(e.type==="onramp"&&t.type==="onramp")return{amountPaid:`${t.currencyAmount} ${t.currency}`,amountReceived:`${Ft(t.destinationAmount,t.destinationToken.decimals)} ${t.destinationToken.symbol}`,chain:await xt(Qe(t.destinationToken.chainId)),destinationToken:t.destinationToken,id:t.id,label:"Onramp Payment",type:"paymentId"};if((e.type==="buy"||e.type==="sell"||e.type==="transfer")&&e.transactions.length>0){const i=e.transactions[e.transactions.length-1];if(i){const[r,s]=await Promise.all([xt(Pe(e.destinationToken.chainId)),xt(Pe(e.originToken.chainId))]);return{amountPaid:`${Ft(e.originAmount,e.originToken.decimals)} ${e.originToken.symbol}`,amountReceived:`${Ft(e.destinationAmount,e.destinationToken.decimals)} ${e.destinationToken.symbol}`,chain:r,destinationChain:r,destinationToken:e.destinationToken,id:i.transactionHash,label:"Transaction",originChain:s,originToken:e.originToken,type:"transactionHash"}}}return null},queryKey:["transaction-info",e.type,CP(t,e)],staleTime:5*60*1e3})}function TP({status:e,preparedQuote:t}){const n=X(),{data:i,isPending:r}=LP(e,t);return r?c.jsx(ge,{height:"200px",style:{borderRadius:Z.lg}}):i?c.jsxs(M,{flex:"column",gap:"sm",style:{backgroundColor:n.colors.tertiaryBg,border:`1px solid ${n.colors.borderColor}`,borderRadius:Z.lg,padding:z.md},children:[c.jsxs(M,{flex:"row",gap:"sm",py:"4xs",style:{alignItems:"center",justifyContent:"space-between"},children:[c.jsx(P,{color:"primaryText",size:"sm",weight:500,children:i.label}),c.jsx(M,{style:{backgroundColor:n.colors.modalBg,borderRadius:Z.full,border:`1px solid ${n.colors.borderColor}`,padding:`${z["3xs"]} ${z.xs}`},children:c.jsx(P,{style:{color:n.colors.success,fontSize:10,letterSpacing:"0.025em"},children:"COMPLETED"})})]}),c.jsx(We,{}),i.amountPaid&&c.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[c.jsx(P,{color:"secondaryText",size:"sm",children:"Amount Paid"}),c.jsx(P,{color:"primaryText",size:"sm",children:i.amountPaid})]}),i.amountReceived&&c.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[c.jsx(P,{color:"secondaryText",size:"sm",children:"Amount Received"}),c.jsx(P,{color:"primaryText",size:"sm",children:i.amountReceived})]}),i.originChain&&c.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[c.jsx(P,{color:"secondaryText",size:"sm",children:"Origin Chain"}),c.jsx(P,{color:"primaryText",size:"sm",children:Gf(i.originChain.name)})]}),c.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[c.jsx(P,{color:"secondaryText",size:"sm",children:"Destination Chain"}),c.jsx(P,{color:"primaryText",size:"sm",children:Gf(i.chain.name)})]}),i.type==="paymentId"&&c.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[c.jsx(P,{color:"secondaryText",size:"sm",children:"Payment ID"}),c.jsxs(M,{flex:"row",gap:"3xs",center:"y",children:[c.jsx(Yo,{text:i.id,iconSize:12,tip:"Copy Payment ID"}),c.jsx(P,{color:"primaryText",weight:400,size:"sm",children:Ga(i.id)})]})]}),e.transactions.map(s=>{const o=`https://thirdweb.com/${s.chainId}/tx/${s.transactionHash}`;return c.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[c.jsx(P,{color:"secondaryText",size:"sm",children:"Transaction Hash"}),c.jsxs(M,{flex:"row",gap:"3xs",center:"y",children:[c.jsx(Yo,{text:s.transactionHash,iconSize:12,tip:"Copy Transaction Hash"}),c.jsx(Zr,{href:o,target:"_blank",rel:"noreferrer",color:"primaryText",hoverColor:"accentText",weight:400,size:"sm",children:Ga(s.transactionHash)})]})]},s.transactionHash)})]},i.id):null}function jP({preparedQuote:e,completedStatuses:t,onBack:n,windowAdapter:i}){return c.jsxs(M,{flex:"column",fullHeight:!0,px:"md",children:[c.jsx($,{y:"md+"}),c.jsx(be,{onBack:n,title:"Payment Receipt"}),c.jsx($,{y:"md+"}),c.jsx(M,{flex:"column",gap:"lg",scrollY:!0,style:{maxHeight:"500px",minHeight:"400px"},children:c.jsx(M,{flex:"column",gap:"sm",children:t.map((r,s)=>c.jsx(TP,{preparedQuote:e,status:r,windowAdapter:i},`${r.type}-${s}`))})}),c.jsx($,{y:"md+"})]})}function vP({preparedQuote:e,completedStatuses:t,onDone:n,windowAdapter:i,client:r,hasPaymentId:s=!1,showContinueWithTx:o,type:a}){const l=X(),[u,d]=w.useState("success"),f=Ji(),m=w.useRef(!1);if(w.useEffect(()=>{m.current||(m.current=!0,(e.type==="buy"||e.type==="sell")&&xn({chainId:e.intent.originChainId,client:r,event:"ub:ui:success_screen",fromToken:e.intent.originTokenAddress,toChainId:e.intent.destinationChainId,toToken:e.intent.destinationTokenAddress,walletAddress:e.intent.sender}),e.type==="transfer"&&xn({chainId:e.intent.chainId,client:r,event:"ub:ui:success_screen",fromToken:e.intent.tokenAddress,toChainId:e.intent.chainId,toToken:e.intent.tokenAddress,walletAddress:e.intent.sender}),f.invalidateQueries({queryKey:["bridge/v1/wallets"]}),f.invalidateQueries({queryKey:["walletBalance"]}),f.invalidateQueries({queryKey:["payment-methods"]}))},[r,e,f]),u==="detail")return c.jsx(jP,{completedStatuses:t,onBack:()=>d("success"),preparedQuote:e,windowAdapter:i});const y=a==="swap-success"?"Swap Successful":"Payment Successful",p=a==="swap-success"?"Your token swap has been completed successfully.":"Your payment has been completed successfully.";return c.jsxs(M,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[c.jsx($,{y:"3xl"}),c.jsxs(M,{center:"x",flex:"column",gap:"md",children:[c.jsx(M,{center:"both",flex:"row",style:{animation:"successBounce 0.6s ease-out",border:`2px solid ${l.colors.success}`,borderRadius:"50%",height:"64px",marginBottom:"16px",width:"64px"},children:c.jsx(aa,{color:l.colors.success,height:A.xl,style:{animation:"checkAppear 0.3s ease-out 0.3s both"},width:A.xl})}),c.jsxs("div",{children:[c.jsx(P,{center:!0,color:"primaryText",size:"xl",weight:600,trackingTight:!0,style:{marginBottom:z.xxs},children:y}),c.jsx(P,{center:!0,color:"secondaryText",size:"sm",children:s?"You can now close this page and return to the application.":o?"Click continue to execute your transaction.":p})]})]}),c.jsx($,{y:"3xl"}),c.jsxs(M,{flex:"column",gap:"sm",style:{width:"100%"},children:[c.jsx(ae,{fullWidth:!0,onClick:()=>d("detail"),variant:"secondary",children:"View Transaction Receipt"}),!s&&c.jsx(ae,{fullWidth:!0,onClick:n,variant:"accent",children:o?"Continue":"Done"})]}),c.jsx("style",{children:`
201
+ @keyframes successBounce {
202
+ 0% {
203
+ transform: scale(0.3);
204
+ opacity: 0;
205
+ }
206
+ 50% {
207
+ transform: scale(1.05);
208
+ }
209
+ 70% {
210
+ transform: scale(0.9);
211
+ }
212
+ 100% {
213
+ transform: scale(1);
214
+ opacity: 1;
215
+ }
216
+ }
217
+
218
+ @keyframes checkAppear {
219
+ 0% {
220
+ transform: scale(0);
221
+ opacity: 0;
222
+ }
223
+ 100% {
224
+ transform: scale(1);
225
+ opacity: 1;
226
+ }
227
+ }
228
+ `})]})}function NP(e){const{enabled:t=!0,type:n,...i}=e;return xe({enabled:t&&!!i.client,gcTime:5*60*1e3,queryFn:async()=>{switch(n){case"buy":return{type:"buy",...await $8(i)};case"sell":return{type:"sell",...await W8(i)};case"transfer":return{type:"transfer",...await Y8(i)};case"onramp":return{type:"onramp",...await i1(i)};default:throw new Error(`Unsupported bridge prepare type: ${n}`)}},queryKey:["bridge-prepare",n,Me(i)],retry:(r,s)=>{if(s instanceof pt){const o=s;if(o.statusCode&&o.statusCode>=400&&o.statusCode<500)return!1}return r<2},retryDelay:r=>Math.min(1e3*2**r,1e4),staleTime:2*60*1e3})}function SP({destinationToken:e,paymentMethod:t,amount:n,sender:i,receiver:r,client:s,onQuoteReceived:o,onError:a,purchaseData:l,paymentLinkId:u,feePayer:d,mode:f}){const m=AP({amount:n,client:s,destinationToken:e,feePayer:d,paymentLinkId:u,paymentMethod:t,purchaseData:l,receiver:r,sender:i}),y=NP(m);return w.useEffect(()=>{y.data&&o(y.data,m)},[y.data,o,m]),w.useEffect(()=>{y.error&&a(y.error)},[y.error,a]),c.jsxs(M,{center:"both",flex:"column",fullHeight:!0,p:"lg",style:{minHeight:"350px"},children:[c.jsx($e,{color:"secondaryText",size:"xl"}),c.jsx($,{y:"md"}),c.jsx(P,{center:!0,color:"primaryText",size:"lg",style:{fontWeight:600},children:"Finding the best route"}),c.jsx($,{y:"sm"}),c.jsx(P,{center:!0,color:"secondaryText",size:"sm",children:"We're searching for the most efficient path for this payment."})]})}function AP(e){var a,l;const{paymentMethod:t,amount:n,destinationToken:i,receiver:r,client:s,sender:o}=e;switch(t.type){case"fiat":return{amount:Jn(n,i.decimals),chainId:i.chainId,client:s,currency:t.currency,enabled:!!(i&&n&&s),onramp:t.onramp||"coinbase",paymentLinkId:e.paymentLinkId,purchaseData:e.purchaseData,receiver:r,sender:o,tokenAddress:i.address,type:"onramp"};case"wallet":return t.originToken.chainId===i.chainId&&t.originToken.address.toLowerCase()===i.address.toLowerCase()?{amount:Jn(n,i.decimals),chainId:i.chainId,client:s,enabled:!!(i&&n&&s),feePayer:e.feePayer||"sender",paymentLinkId:e.paymentLinkId,purchaseData:e.purchaseData,receiver:r,sender:o||((a=t.payerWallet.getAccount())==null?void 0:a.address)||r,tokenAddress:i.address,type:"transfer"}:{amount:t.action==="buy"?Jn(n,i.decimals):Jn(n,t.originToken.decimals),client:s,destinationChainId:i.chainId,destinationTokenAddress:i.address,enabled:!!(i&&n&&s),originChainId:t.originToken.chainId,originTokenAddress:t.originToken.address,paymentLinkId:e.paymentLinkId,purchaseData:e.purchaseData,receiver:r,sender:o||((l=t.payerWallet.getAccount())==null?void 0:l.address)||r,type:t.action}}}function DP(e){const t=[];return e.forEach((n,i)=>{var r;(r=n.transactions)==null||r.forEach((s,o)=>{t.push({...s,_index:t.length,_stepIndex:i})})}),t}function OP(e){const{wallet:t,windowAdapter:n,client:i,autoStart:r=!1,onComplete:s,preparedQuote:o}=e,a=w.useMemo(()=>o!=null&&o.steps?DP(o.steps):[],[o==null?void 0:o.steps]),[l,u]=w.useState(void 0),[d,f]=w.useState("idle"),[m,y]=w.useState(void 0),[p,g]=w.useState(new Set),[x,_]=w.useState((o==null?void 0:o.type)==="onramp"?"pending":void 0),b=w.useRef(null),I=w.useMemo(()=>{if(typeof(o==null?void 0:o.steps)>"u"||l===void 0)return;const R=a[l];return R?o.steps[R._stepIndex]:void 0},[l,a,o==null?void 0:o.steps]),E=w.useMemo(()=>{if(typeof(o==null?void 0:o.type)>"u")return 0;const R=a.length+(o.type==="onramp"?1:0);if(R===0)return 0;const B=p.size+(x==="completed"?1:0);return Math.round(B/R*100)},[p.size,a.length,o==null?void 0:o.type,x]),C=w.useCallback(async(R,B)=>{for(;!B.aborted;){if((await R()).completed)return;await new Promise(V=>{const Y=setTimeout(V,2e3);B.addEventListener("abort",()=>clearTimeout(Y),{once:!0})})}throw new Error("Polling aborted")},[]),T=w.useCallback(async(R,B,F,W)=>{if(typeof(o==null?void 0:o.type)>"u")throw new Error("No quote generated. This is unexpected.");const{prepareTransaction:V}=await h(async()=>{const{prepareTransaction:q}=await Promise.resolve().then(()=>Yd);return{prepareTransaction:q}},void 0),{sendTransaction:Y}=await h(async()=>{const{sendTransaction:q}=await Promise.resolve().then(()=>Mj);return{sendTransaction:q}},void 0),Q=V({chain:R.chain,client:R.client,data:R.data,to:R.to,value:R.value,extraGas:50000n}),G=await Y({account:B,transaction:Q}),ne=G.transactionHash;if(R.action==="approval"||R.action==="fee"){await Vu(G),await new Promise(q=>setTimeout(q,2e3));return}const{status:ce}=await h(async()=>{const{status:q}=await import("./index-C4kxCSEw.js").then(he=>he.S);return{status:q}},[]);await C(async()=>{const q=await ce({chainId:R.chainId,client:R.client,transactionHash:ne});if(q.status==="COMPLETED"){const he={type:o.type,...q};return F.push(he),{completed:!0}}if(q.status==="FAILED")throw new Error("Payment failed");return{completed:!1}},W)},[C,o==null?void 0:o.type]),j=w.useCallback(async(R,B,F,W)=>{if(typeof(o==null?void 0:o.type)>"u")throw new Error("No quote generated. This is unexpected.");if(!B.sendBatchTransaction)throw new Error("Account does not support batch transactions");const{prepareTransaction:V}=await h(async()=>{const{prepareTransaction:q}=await Promise.resolve().then(()=>Yd);return{prepareTransaction:q}},void 0),{sendBatchTransaction:Y}=await h(async()=>{const{sendBatchTransaction:q}=await import("./send-batch-transaction-C1RDZpKq.js");return{sendBatchTransaction:q}},__vite__mapDeps([39,1,2,3,4,5])),Q=await Promise.all(R.map(async q=>V({chain:q.chain,client:q.client,data:q.data,to:q.to,value:q.value,extraGas:50000n}))),G=await Y({account:B,transactions:Q});if(R.length===0)throw new Error("No transactions to batch");const ne=R[0];if(!ne)throw new Error("Invalid batch transaction");const{status:ce}=await h(async()=>{const{status:q}=await import("./index-C4kxCSEw.js").then(he=>he.S);return{status:q}},[]);await C(async()=>{const q=await ce({chainId:ne.chainId,client:ne.client,transactionHash:G.transactionHash});if(q.status==="COMPLETED"){const he={type:o.type,...q};return F.push(he),{completed:!0}}if(q.status==="FAILED")throw new Error("Payment failed");return{completed:!1}},W)},[C,o==null?void 0:o.type]),O=w.useCallback(async(R,B,F,W,V)=>{var se;if(typeof(o==null?void 0:o.type)>"u")throw new Error("No quote generated. This is unexpected.");if(!F.sendCalls)throw new Error("Account does not support eip5792 send calls");const{prepareTransaction:Y}=await h(async()=>{const{prepareTransaction:le}=await Promise.resolve().then(()=>Yd);return{prepareTransaction:le}},void 0),{sendCalls:Q}=await h(async()=>{const{sendCalls:le}=await Promise.resolve().then(()=>mv);return{sendCalls:le}},void 0);if(R.length===0)throw new Error("No transactions to batch");const G=R[0];if(!G)throw new Error("Invalid batch transaction");const ne=await Promise.all(R.map(async le=>Y({chain:le.chain,client:le.client,data:le.data,to:le.to,value:le.value,extraGas:50000n}))),ce=await Q({wallet:B,calls:ne}),q=await wv(ce);if(q.status==="failure")throw new pt({code:"UNKNOWN_ERROR",message:"Transaction failed. Please try a different payment token or amount.",statusCode:500});const he=(se=q.receipts)==null?void 0:se[q.receipts.length-1];if(!he)throw new Error("No receipts found");const{status:re}=await h(async()=>{const{status:le}=await import("./index-C4kxCSEw.js").then(Le=>Le.S);return{status:le}},[]);await C(async()=>{const le=await re({chainId:G.chainId,client:G.client,transactionHash:he.transactionHash});if(le.status==="COMPLETED"){const Le={type:o.type,...le};return W.push(Le),{completed:!0}}if(le.status==="FAILED")throw new Error("Payment failed");return{completed:!1}},V)},[C,o==null?void 0:o.type]),L=w.useCallback(async(R,B,F)=>{_("executing"),n.open(R.link);const{Onramp:W}=await h(async()=>{const{Onramp:V}=await import("./index-C4kxCSEw.js").then(Y=>Y.i);return{Onramp:V}},[]);await C(async()=>{const V=await W.status({client:i,id:R.id}),Y=V.status;if(Y==="COMPLETED"){await new Promise(G=>setTimeout(G,2e3)),_("completed");const Q={type:"onramp",...V};return B.push(Q),{completed:!0}}else Y==="FAILED"&&_("failed");return{completed:!1}},F)},[C,i,n]),N=w.useCallback(async()=>{var F,W,V,Y,Q,G,ne,ce,q,he,re,se,le,Le,Fe,rt,mt,ue,fe,Ye,st,ot;if(typeof(o==null?void 0:o.type)>"u")throw new Error("No quote generated. This is unexpected.");if(d!=="idle")return;xn({client:i,event:"ub:ui:execution:start",toChainId:(F=o.steps[o.steps.length-1])==null?void 0:F.destinationToken.chainId,toToken:(W=o.steps[o.steps.length-1])==null?void 0:W.destinationToken.address,fromToken:(V=o.steps[0])==null?void 0:V.originToken.address,chainId:(Y=o.steps[0])==null?void 0:Y.destinationToken.chainId,amountWei:(G=(Q=o.steps[0])==null?void 0:Q.originAmount)==null?void 0:G.toString(),walletAddress:(ne=t==null?void 0:t.getAccount())==null?void 0:ne.address,walletType:t==null?void 0:t.id}),f("executing"),y(void 0);const R=[],B=new AbortController;b.current=B;try{if(a.length>0&&!t)throw new pt({code:"INVALID_INPUT",message:"No wallet provided to execute transactions",statusCode:400});if(o.type==="onramp"&&x==="pending"&&await L(o,R,B.signal),a.length>0){if(!t)throw new pt({code:"INVALID_INPUT",message:"No wallet provided to execute transactions",statusCode:400});const de=t.getAccount();if(!de)throw new pt({code:"INVALID_INPUT",message:"Wallet not connected",statusCode:400});const yt=l??0;for(let vt=yt;vt<a.length&&!B.signal.aborted;vt++){const Ze=a[vt];if(!Ze)continue;if(u(vt),!o.steps[Ze._stepIndex])throw new Error(`Invalid step index: ${Ze._stepIndex}`);Ze.chainId!==((ce=t.getChain())==null?void 0:ce.id)&&await t.switchChain(Pe(Ze.chainId));const En=await PP(de,Ze.chainId)&&vt<a.length-1,Fn=de.sendBatchTransaction!==void 0&&vt<a.length-1;if(Fn||En){const Nt=[Ze];let Cn=vt+1;for(;Cn<a.length;){const tr=a[Cn];if(!tr||tr.chainId!==Ze.chainId)break;Nt.push(tr),Cn++}if(Nt.length>1){if(Fn)await j(Nt,de,R,B.signal);else if(En)await O(Nt,t,de,R,B.signal);else throw new Error("No supported execution mode found");for(const tr of Nt)g(Qc=>new Set(Qc).add(tr._index));vt=Cn-1;continue}}await T(Ze,de,R,B.signal),g(Nt=>new Set(Nt).add(Ze._index))}}B.signal.aborted||(u(void 0),s&&s(R),xn({client:i,event:"ub:ui:execution:success",toChainId:(q=o.steps[o.steps.length-1])==null?void 0:q.destinationToken.chainId,toToken:(he=o.steps[o.steps.length-1])==null?void 0:he.destinationToken.address,fromToken:(re=o.steps[0])==null?void 0:re.originToken.address,chainId:(se=o.steps[0])==null?void 0:se.destinationToken.chainId,amountWei:(Le=(le=o.steps[0])==null?void 0:le.originAmount)==null?void 0:Le.toString(),walletAddress:(Fe=t==null?void 0:t.getAccount())==null?void 0:Fe.address,walletType:t==null?void 0:t.id}))}catch(de){console.error("Error executing payment",de),xn({client:i,error:de instanceof Error?de.message:Me(de),event:"ub:ui:execution:error",toChainId:(rt=o.steps[o.steps.length-1])==null?void 0:rt.destinationToken.chainId,toToken:(mt=o.steps[o.steps.length-1])==null?void 0:mt.destinationToken.address,fromToken:(ue=o.steps[0])==null?void 0:ue.originToken.address,chainId:(fe=o.steps[0])==null?void 0:fe.destinationToken.chainId,amountWei:(st=(Ye=o.steps[0])==null?void 0:Ye.originAmount)==null?void 0:st.toString(),walletAddress:(ot=t==null?void 0:t.getAccount())==null?void 0:ot.address,walletType:t==null?void 0:t.id}),de instanceof pt?y(de):y(new pt({code:"UNKNOWN_ERROR",message:(de==null?void 0:de.message)||"An unknown error occurred",statusCode:500}))}finally{f("idle"),b.current=null}},[d,t,l,a,T,j,O,x,L,s,o,i]),v=w.useCallback(()=>{d==="idle"&&N()},[N,d]),D=w.useCallback(()=>{b.current&&b.current.abort(),f("idle"),x==="executing"&&_("pending")},[x]),k=w.useCallback(()=>{m&&(y(void 0),N())},[m,N]),U=w.useRef(!1);return w.useEffect(()=>{r&&d==="idle"&&l===void 0&&!U.current&&(U.current=!0,f("auto-starting"),setTimeout(()=>{v()},500))},[r,d,l,v]),w.useEffect(()=>()=>{b.current&&b.current.abort()},[]),{cancel:D,currentStep:I,currentTxIndex:l,error:m,executionState:d,onrampStatus:x,progress:E,retry:k,start:v,steps:o==null?void 0:o.steps}}const oh=new Map;async function PP(e,t){var s;const n=`${e.address}_${t}`,i=oh.get(n);if(i!==void 0)return i;const r=e.getCapabilities;if(!r)return oh.set(n,!1),!1;try{const a=(s=(await Promise.race([r({chainId:t}),new Promise((u,d)=>setTimeout(()=>d(new Error("Timeout")),5e3))]))[t])==null?void 0:s.atomic,l=(a==null?void 0:a.status)==="supported"||(a==null?void 0:a.status)==="ready";return oh.set(n,l),l}catch{return!1}}function kP({title:e,request:t,wallet:n,client:i,windowAdapter:r,onComplete:s,onCancel:o,onBack:a,autoStart:l,preparedQuote:u}){const d=X(),{currentStep:f,progress:m,executionState:y,onrampStatus:p,steps:g,error:x,start:_,cancel:b,retry:I}=OP({autoStart:l,client:i,onComplete:D=>{s(D)},wallet:n,preparedQuote:u,windowAdapter:r}),E=()=>{b(),o&&o()},C=()=>{I()},T=D=>{if(!f||!g)return D===0&&x?"failed":"pending";const k=g.findIndex(U=>U===f);return D<k?"completed":D===k&&y==="executing"?"executing":D===k&&x?"failed":D===k&&y==="idle"&&m===100?"completed":"pending"},j=D=>{switch(D){case"completed":return c.jsx(aa,{color:d.colors.accentButtonText,height:A.sm,width:A.sm});case"executing":return c.jsx($e,{color:"accentButtonText",size:"sm"});case"failed":return c.jsx(CN,{color:"white",height:A.sm,width:A.sm});default:return c.jsx(MN,{color:d.colors.primaryText,height:A.sm,width:A.sm})}},O=D=>{switch(D){case"completed":return d.colors.tertiaryBg;case"executing":return d.colors.tertiaryBg;case"failed":return d.colors.tertiaryBg;default:return d.colors.tertiaryBg}},L=D=>{switch(D){case"completed":return d.colors.success;case"executing":return d.colors.accentButtonBg;case"failed":return d.colors.danger;default:return d.colors.borderColor}},N=D=>{const{originToken:k,destinationToken:U}=D;return k.chainId!==U.chainId?c.jsxs(M,{flex:"row",gap:"3xs",children:[c.jsxs(P,{color:"primaryText",size:"sm",children:["Bridge ",k.symbol," to"," "]}),c.jsx(a_,{chain:zP(t),client:i,color:"primaryText",short:!0,size:"sm"})]}):k.symbol!==U.symbol?c.jsxs(P,{color:"primaryText",size:"sm",children:["Swap ",k.symbol," to ",U.symbol]}):c.jsx(P,{color:"primaryText",size:"sm",children:"Process transaction"})},v=D=>{switch(D){case"executing":return"Processing...";case"completed":return"Completed";case"pending":return"Waiting...";case"failed":return"Failed";default:return"Unknown"}};return c.jsxs(M,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[c.jsx(be,{onBack:a,title:e||"Processing Payment"}),c.jsx($,{y:"xl"}),c.jsxs(M,{flex:"column",children:[c.jsxs(M,{flex:"column",gap:"sm",children:[c.jsxs(M,{center:"y",flex:"row",children:[c.jsx(P,{color:"secondaryText",size:"sm",style:{flex:1},children:"Progress"}),c.jsxs(P,{color:"primaryText",size:"sm",children:[m,"%"]})]}),c.jsx(M,{style:{backgroundColor:d.colors.tertiaryBg,border:`1px solid ${d.colors.borderColor}`,borderRadius:"4px",height:"8px",overflow:"hidden",width:"100%"},children:c.jsx(M,{style:{backgroundColor:x?d.colors.danger:d.colors.accentButtonBg,height:"100%",transition:"width 0.3s ease",width:`${m}%`},children:c.jsx(P,{})})})]}),c.jsx($,{y:"lg"}),c.jsxs(M,{flex:"column",gap:"sm",children:[t.type==="onramp"&&p?c.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",backgroundColor:O(p),border:`1px solid ${d.colors.borderColor}`,borderRadius:Z.md,padding:`${z.sm} ${z.md}`},children:[c.jsx(M,{center:"both",flex:"row",style:{backgroundColor:L(p),borderRadius:"50%",color:d.colors.primaryButtonText,flexShrink:0,height:`${A.lg}px`,width:`${A.lg}px`},children:j(p)}),c.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[c.jsx(P,{color:"primaryText",size:"sm",children:t.onramp.slice(0,1).toUpperCase()+t.onramp.slice(1)}),c.jsx(P,{color:"secondaryText",size:"xs",children:v(p)})]})]}):null,g==null?void 0:g.map((D,k)=>{const U=T(k);return c.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",backgroundColor:O(U),border:`1px solid ${d.colors.borderColor}`,borderRadius:Z.md,padding:`${z.sm} ${z.md}`},children:[c.jsx(M,{center:"both",flex:"row",style:{backgroundColor:L(U),borderRadius:"50%",color:d.colors.primaryButtonText,flexShrink:0,height:`${A.lg}px`,width:`${A.lg}px`},children:j(U)}),c.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[N(D),c.jsx(P,{color:"secondaryText",size:"xs",children:v(U)})]})]},`${D.originToken.chainId}-${D.destinationToken.chainId}-${k}`)})]}),c.jsx($,{y:"md"}),c.jsx(P,{center:!0,color:x?"danger":"secondaryText",size:"xs",multiline:!0,children:x?x.message||"An error occurred. Please try again.":c.jsxs(c.Fragment,{children:["Keep this window open until all",c.jsx("br",{})," transactions are complete."]})}),c.jsx($,{y:"lg"}),x?c.jsx(M,{flex:"row",gap:"md",children:c.jsx(ae,{fullWidth:!0,onClick:C,variant:"primary",children:"Retry"})}):y==="idle"&&m===0?c.jsx(ae,{fullWidth:!0,onClick:_,variant:"accent",children:"Start Transaction"}):y==="executing"||y==="auto-starting"?c.jsx(ae,{fullWidth:!0,onClick:E,variant:"secondary",children:"Cancel Transaction"}):null]})]})}function zP(e){switch(e.type){case"onramp":return Qe(e.chainId);case"buy":case"sell":return Qe(e.destinationChainId);case"transfer":return Qe(e.chainId);default:throw new Error("Invalid quote type")}}var ah="focusScope.autoFocusOnMount",ch="focusScope.autoFocusOnUnmount",Yg={bubbles:!1,cancelable:!0},RP="FocusScope",vm=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...o}=e,[a,l]=w.useState(null),u=Wo(r),d=Wo(s),f=w.useRef(null),m=oi(t,g=>l(g)),y=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(i){let g=function(I){if(y.paused||!a)return;const E=I.target;a.contains(E)?f.current=E:yr(f.current,{select:!0})},x=function(I){if(y.paused||!a)return;const E=I.relatedTarget;E!==null&&(a.contains(E)||yr(f.current,{select:!0}))},_=function(I){if(document.activeElement===document.body)for(const C of I)C.removedNodes.length>0&&yr(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const b=new MutationObserver(_);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),b.disconnect()}}},[i,a,y.paused]),w.useEffect(()=>{if(a){Hg.add(y);const g=document.activeElement;if(!a.contains(g)){const _=new CustomEvent(ah,Yg);a.addEventListener(ah,u),a.dispatchEvent(_),_.defaultPrevented||(UP(FP(R_(a)),{select:!0}),document.activeElement===g&&yr(a))}return()=>{a.removeEventListener(ah,u),setTimeout(()=>{const _=new CustomEvent(ch,Yg);a.addEventListener(ch,d),a.dispatchEvent(_),_.defaultPrevented||yr(g??document.body,{select:!0}),a.removeEventListener(ch,d),Hg.remove(y)},0)}}},[a,u,d,y]);const p=w.useCallback(g=>{if(!n&&!i||y.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,_=document.activeElement;if(x&&_){const b=g.currentTarget,[I,E]=$P(b);I&&E?!g.shiftKey&&_===E?(g.preventDefault(),n&&yr(I,{select:!0})):g.shiftKey&&_===I&&(g.preventDefault(),n&&yr(E,{select:!0})):_===b&&g.preventDefault()}},[n,i,y.paused]);return c.jsx(un.div,{tabIndex:-1,...o,ref:m,onKeyDown:p})});vm.displayName=RP;function UP(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(yr(i,{select:t}),document.activeElement!==n)return}function $P(e){const t=R_(e),n=Qg(t,e),i=Qg(t.reverse(),e);return[n,i]}function R_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Qg(e,t){for(const n of e)if(!BP(n,{upTo:t}))return n}function BP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function VP(e){return e instanceof HTMLInputElement&&"select"in e}function yr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&VP(e)&&t&&e.select()}}var Hg=WP();function WP(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Gg(e,t),e.unshift(t)},remove(t){var n;e=Gg(e,t),(n=e[0])==null||n.resume()}}}function Gg(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function FP(e){return e.filter(t=>t.tagName!=="A")}var lh=0;function YP(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Zg()),document.body.insertAdjacentElement("beforeend",e[1]??Zg()),lh++,()=>{lh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),lh--}},[])}function Zg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Tl="right-scroll-bar-position",jl="width-before-scroll-bar",QP="with-scroll-bars-hidden",HP="--removed-body-scroll-bar-size";function uh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function GP(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var r=n.value;r!==i&&(n.value=i,n.callback(i,r))}}}})[0];return n.callback=t,n.facade}var ZP=typeof window<"u"?w.useLayoutEffect:w.useEffect,qg=new WeakMap;function qP(e,t){var n=GP(null,function(i){return e.forEach(function(r){return uh(r,i)})});return ZP(function(){var i=qg.get(n);if(i){var r=new Set(i),s=new Set(e),o=n.current;r.forEach(function(a){s.has(a)||uh(a,null)}),s.forEach(function(a){r.has(a)||uh(a,o)})}qg.set(n,e)},[e]),n}function KP(e){return e}function JP(e,t){t===void 0&&(t=KP);var n=[],i=!1,r={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var o=t(s,i);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(i=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){i=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(s),o=n}var l=function(){var d=o;o=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return r}function XP(e){e===void 0&&(e={});var t=JP(null);return t.options=Mr({async:!0,ssr:!1},e),t}var U_=function(e){var t=e.sideCar,n=h4(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return w.createElement(i,Mr({},n))};U_.isSideCarExport=!0;function ek(e,t){return e.useMedium(t),U_}var $_=XP(),dh=function(){},ud=w.forwardRef(function(e,t){var n=w.useRef(null),i=w.useState({onScrollCapture:dh,onWheelCapture:dh,onTouchMoveCapture:dh}),r=i[0],s=i[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,y=e.noRelative,p=e.noIsolation,g=e.inert,x=e.allowPinchZoom,_=e.as,b=_===void 0?"div":_,I=e.gapMode,E=h4(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,T=qP([n,t]),j=Mr(Mr({},E),r);return w.createElement(w.Fragment,null,d&&w.createElement(C,{sideCar:$_,removeScrollBar:u,shards:f,noRelative:y,noIsolation:p,inert:g,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:I}),o?w.cloneElement(w.Children.only(a),Mr(Mr({},j),{ref:T})):w.createElement(b,Mr({},j,{className:l,ref:T}),a))});ud.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ud.classNames={fullWidth:jl,zeroRight:Tl};var tk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nk(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tk();return t&&e.setAttribute("nonce",t),e}function ik(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rk(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sk=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nk())&&(ik(t,n),rk(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ok=function(){var e=sk();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},B_=function(){var e=ok(),t=function(n){var i=n.styles,r=n.dynamic;return e(i,r),null};return t},ak={left:0,top:0,right:0,gap:0},hh=function(e){return parseInt(e||"",10)||0},ck=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[hh(n),hh(i),hh(r)]},lk=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ak;var t=ck(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},uk=B_(),xo="data-scroll-locked",dk=function(e,t,n,i){var r=e.left,s=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),`
229
+ .`.concat(QP,` {
230
+ overflow: hidden `).concat(i,`;
231
+ padding-right: `).concat(a,"px ").concat(i,`;
232
+ }
233
+ body[`).concat(xo,`] {
234
+ overflow: hidden `).concat(i,`;
235
+ overscroll-behavior: contain;
236
+ `).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
237
+ padding-left: `.concat(r,`px;
238
+ padding-top: `).concat(s,`px;
239
+ padding-right: `).concat(o,`px;
240
+ margin-left:0;
241
+ margin-top:0;
242
+ margin-right: `).concat(a,"px ").concat(i,`;
243
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(i,";")].filter(Boolean).join(""),`
244
+ }
245
+
246
+ .`).concat(Tl,` {
247
+ right: `).concat(a,"px ").concat(i,`;
248
+ }
249
+
250
+ .`).concat(jl,` {
251
+ margin-right: `).concat(a,"px ").concat(i,`;
252
+ }
253
+
254
+ .`).concat(Tl," .").concat(Tl,` {
255
+ right: 0 `).concat(i,`;
256
+ }
257
+
258
+ .`).concat(jl," .").concat(jl,` {
259
+ margin-right: 0 `).concat(i,`;
260
+ }
261
+
262
+ body[`).concat(xo,`] {
263
+ `).concat(HP,": ").concat(a,`px;
264
+ }
265
+ `)},Kg=function(){var e=parseInt(document.body.getAttribute(xo)||"0",10);return isFinite(e)?e:0},hk=function(){w.useEffect(function(){return document.body.setAttribute(xo,(Kg()+1).toString()),function(){var e=Kg()-1;e<=0?document.body.removeAttribute(xo):document.body.setAttribute(xo,e.toString())}},[])},fk=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;hk();var s=w.useMemo(function(){return lk(r)},[r]);return w.createElement(uk,{styles:dk(s,!t,r,n?"":"!important")})},Jf=!1;if(typeof window<"u")try{var al=Object.defineProperty({},"passive",{get:function(){return Jf=!0,!0}});window.addEventListener("test",al,al),window.removeEventListener("test",al,al)}catch{Jf=!1}var to=Jf?{passive:!1}:!1,mk=function(e){return e.tagName==="TEXTAREA"},V_=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!mk(e)&&n[t]==="visible")},yk=function(e){return V_(e,"overflowY")},gk=function(e){return V_(e,"overflowX")},Jg=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=W_(e,i);if(r){var s=F_(e,i),o=s[1],a=s[2];if(o>a)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},pk=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},wk=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},W_=function(e,t){return e==="v"?yk(t):gk(t)},F_=function(e,t){return e==="v"?pk(t):wk(t)},xk=function(e,t){return e==="h"&&t==="rtl"?-1:1},_k=function(e,t,n,i,r){var s=xk(e,window.getComputedStyle(t).direction),o=s*i,a=n.target,l=t.contains(a),u=!1,d=o>0,f=0,m=0;do{if(!a)break;var y=F_(e,a),p=y[0],g=y[1],x=y[2],_=g-x-s*p;(p||_)&&W_(e,a)&&(f+=_,m+=p);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},cl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xg=function(e){return[e.deltaX,e.deltaY]},ep=function(e){return e&&"current"in e?e.current:e},bk=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Mk=function(e){return`
266
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
267
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
268
+ `)},Ik=0,no=[];function Ek(e){var t=w.useRef([]),n=w.useRef([0,0]),i=w.useRef(),r=w.useState(Ik++)[0],s=w.useState(B_)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var g=YI([e.lockRef.current],(e.shards||[]).map(ep),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var a=w.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var _=cl(g),b=n.current,I="deltaX"in g?g.deltaX:b[0]-_[0],E="deltaY"in g?g.deltaY:b[1]-_[1],C,T=g.target,j=Math.abs(I)>Math.abs(E)?"h":"v";if("touches"in g&&j==="h"&&T.type==="range")return!1;var O=window.getSelection(),L=O&&O.anchorNode,N=L?L===T||L.contains(T):!1;if(N)return!1;var v=Jg(j,T);if(!v)return!0;if(v?C=j:(C=j==="v"?"h":"v",v=Jg(j,T)),!v)return!1;if(!i.current&&"changedTouches"in g&&(I||E)&&(i.current=C),!C)return!0;var D=i.current||C;return _k(D,x,g,D==="h"?I:E)},[]),l=w.useCallback(function(g){var x=g;if(!(!no.length||no[no.length-1]!==s)){var _="deltaY"in x?Xg(x):cl(x),b=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&bk(C.delta,_)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var I=(o.current.shards||[]).map(ep).filter(Boolean).filter(function(C){return C.contains(x.target)}),E=I.length>0?a(x,I[0]):!o.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),u=w.useCallback(function(g,x,_,b){var I={name:g,delta:x,target:_,should:b,shadowParent:Ck(_)};t.current.push(I),setTimeout(function(){t.current=t.current.filter(function(E){return E!==I})},1)},[]),d=w.useCallback(function(g){n.current=cl(g),i.current=void 0},[]),f=w.useCallback(function(g){u(g.type,Xg(g),g.target,a(g,e.lockRef.current))},[]),m=w.useCallback(function(g){u(g.type,cl(g),g.target,a(g,e.lockRef.current))},[]);w.useEffect(function(){return no.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,to),document.addEventListener("touchmove",l,to),document.addEventListener("touchstart",d,to),function(){no=no.filter(function(g){return g!==s}),document.removeEventListener("wheel",l,to),document.removeEventListener("touchmove",l,to),document.removeEventListener("touchstart",d,to)}},[]);var y=e.removeScrollBar,p=e.inert;return w.createElement(w.Fragment,null,p?w.createElement(s,{styles:Mk(r)}):null,y?w.createElement(fk,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ck(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Lk=ek($_,Ek);var Y_=w.forwardRef(function(e,t){return w.createElement(ud,Mr({},e,{ref:t,sideCar:Lk}))});Y_.classNames=ud.classNames;var Tk=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},io=new WeakMap,ll=new WeakMap,ul={},fh=0,Q_=function(e){return e&&(e.host||Q_(e.parentNode))},jk=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=Q_(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},vk=function(e,t,n,i){var r=jk(t,Array.isArray(e)?e:[e]);ul[n]||(ul[n]=new WeakMap);var s=ul[n],o=[],a=new Set,l=new Set(r),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var y=m.getAttribute(i),p=y!==null&&y!=="false",g=(io.get(m)||0)+1,x=(s.get(m)||0)+1;io.set(m,g),s.set(m,x),o.push(m),g===1&&p&&ll.set(m,!0),x===1&&m.setAttribute(n,"true"),p||m.setAttribute(i,"true")}catch(_){console.error("aria-hidden: cannot operate on ",m,_)}})};return d(t),a.clear(),fh++,function(){o.forEach(function(f){var m=io.get(f)-1,y=s.get(f)-1;io.set(f,m),s.set(f,y),m||(ll.has(f)||f.removeAttribute(i),ll.delete(f)),y||f.removeAttribute(n)}),fh--,fh||(io=new WeakMap,io=new WeakMap,ll=new WeakMap,ul={})}},Nk=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=Tk(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),vk(i,r,n,"aria-hidden")):function(){return null}},dd="Dialog",[H_]=Mm(dd),[Sk,ai]=H_(dd),G_=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:r,onOpenChange:s,modal:o=!0}=e,a=w.useRef(null),l=w.useRef(null),[u,d]=T_({prop:i,defaultProp:r??!1,onChange:s,caller:dd});return c.jsx(Sk,{scope:t,triggerRef:a,contentRef:l,contentId:Ll(),titleId:Ll(),descriptionId:Ll(),open:u,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(f=>!f),[d]),modal:o,children:n})};G_.displayName=dd;var Z_="DialogTrigger",q_=w.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=ai(Z_,n),s=oi(t,r.triggerRef);return c.jsx(un.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Am(r.open),...i,ref:s,onClick:an(e.onClick,r.onOpenToggle)})});q_.displayName=Z_;var Nm="DialogPortal",[Ak,K_]=H_(Nm,{forceMount:void 0}),J_=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:r}=e,s=ai(Nm,t);return c.jsx(Ak,{scope:t,forceMount:n,children:w.Children.map(i,o=>c.jsx(ca,{present:n||s.open,children:c.jsx(Lm,{asChild:!0,container:r,children:o})}))})};J_.displayName=Nm;var Xl="DialogOverlay",X_=w.forwardRef((e,t)=>{const n=K_(Xl,e.__scopeDialog),{forceMount:i=n.forceMount,...r}=e,s=ai(Xl,e.__scopeDialog);return s.modal?c.jsx(ca,{present:i||s.open,children:c.jsx(Ok,{...r,ref:t})}):null});X_.displayName=Xl;var Dk=h_("DialogOverlay.RemoveScroll"),Ok=w.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=ai(Xl,n);return c.jsx(Y_,{as:Dk,allowPinchZoom:!0,shards:[r.contentRef],children:c.jsx(un.div,{"data-state":Am(r.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Us="DialogContent",eb=w.forwardRef((e,t)=>{const n=K_(Us,e.__scopeDialog),{forceMount:i=n.forceMount,...r}=e,s=ai(Us,e.__scopeDialog);return c.jsx(ca,{present:i||s.open,children:s.modal?c.jsx(Pk,{...r,ref:t}):c.jsx(kk,{...r,ref:t})})});eb.displayName=Us;var Pk=w.forwardRef((e,t)=>{const n=ai(Us,e.__scopeDialog),i=w.useRef(null),r=oi(t,n.contentRef,i);return w.useEffect(()=>{const s=i.current;if(s)return Nk(s)},[]),c.jsx(tb,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:an(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:an(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:an(e.onFocusOutside,s=>s.preventDefault())})}),kk=w.forwardRef((e,t)=>{const n=ai(Us,e.__scopeDialog),i=w.useRef(!1),r=w.useRef(!1);return c.jsx(tb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,s),s.defaultPrevented||(i.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const o=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),tb=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,...o}=e,a=ai(Us,n),l=w.useRef(null),u=oi(t,l);return YP(),c.jsxs(c.Fragment,{children:[c.jsx(vm,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:c.jsx(Im,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Am(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Rk,{titleId:a.titleId}),c.jsx($k,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Sm="DialogTitle",nb=w.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=ai(Sm,n);return c.jsx(un.h2,{id:r.titleId,...i,ref:t})});nb.displayName=Sm;var ib="DialogDescription",zk=w.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=ai(ib,n);return c.jsx(un.p,{id:r.descriptionId,...i,ref:t})});zk.displayName=ib;var rb="DialogClose",sb=w.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=ai(rb,n);return c.jsx(un.button,{type:"button",...i,ref:t,onClick:an(e.onClick,()=>r.onOpenChange(!1))})});sb.displayName=rb;function Am(e){return e?"open":"closed"}var ob="DialogTitleWarning",[sX,ab]=fO(ob,{contentName:Us,titleName:Sm,docsSlug:"dialog"}),Rk=({titleId:e})=>{const t=ab(ob),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
269
+
270
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
271
+
272
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Uk="DialogDescriptionWarning",$k=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ab(Uk).contentName}}.`;return w.useEffect(()=>{var s;const r=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},Bk=G_,Vk=q_,Wk=J_,Fk=X_,Yk=eb,Qk=nb,Hk=sb;const Gk=ke(e=>{const t=X();return{animation:`${Gs} 400ms cubic-bezier(0.16, 1, 0.3, 1)`,backdropFilter:"blur(10px)",backgroundColor:t.colors.modalOverlayBg,inset:0,position:"fixed",zIndex:9999}}),hd=e=>{const[t,n]=w.useState(e.open),i=w.useRef(null),r=w.useRef(null);return w.useEffect(()=>{var s;if(e.open)n(e.open);else if(i.current){const o={duration:Rf,easing:"ease",fill:"forwards"};i.current.animate([{opacity:0}],{...o}).onfinish=()=>{n(!1)},(s=r.current)==null||s.animate([{opacity:0}],{...o,duration:Rf+100})}else n(e.open)},[e.open]),c.jsxs(Bk,{onOpenChange:e.setOpen,open:t,children:[e.trigger&&c.jsx(Vk,{asChild:!0,children:e.trigger}),c.jsxs(Wk,{children:[!e.hide&&c.jsx(Fk,{asChild:!0,children:c.jsx(Gk,{ref:r})}),c.jsx(vm,{trapped:!e.hide,children:c.jsx(Yk,{"aria-describedby":void 0,asChild:!0,children:c.jsxs(Kk,{className:D3("tw-modal",e.className),ref:i,style:e.hide?{height:0,opacity:0,overflow:"hidden",width:0}:{height:e.size==="compact"?"auto":mx,maxWidth:e.size==="compact"?dx:fx},children:[c.jsx(Qk,{style:{borderWidth:0,clip:"rect(0, 0, 0, 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},children:e.title}),e.size==="compact"?c.jsx(Ex,{maxHeight:am,children:e.children}):e.children,!e.hideCloseIcon&&c.jsx("div",{style:{position:"absolute",right:z.lg,top:z.lg,transform:"translateX(6px)",...e.crossContainerStyles},children:c.jsx(Hk,{asChild:!0,children:c.jsx(Yi,{"aria-label":"Close",autoFocus:e.autoFocusCrossIcon===void 0?!0:e.autoFocusCrossIcon,type:"button",children:c.jsx(z3,{height:A.md,style:{color:"inherit"},width:A.md})})})})]})})})]})]})},Zk=$t`
273
+ from {
274
+ opacity: 0;
275
+ transform: translate(-50%, -48%) scale(0.96);
276
+ }
277
+ to {
278
+ opacity: 1;
279
+ transform: translate(-50%, -50%) scale(1);
280
+ }
281
+ `,qk=$t`
282
+ from {
283
+ opacity: 0;
284
+ transform: translate(0, 50%);
285
+ }
286
+ to {
287
+ opacity: 1;
288
+ transform: translate(0, 0);
289
+ }
290
+ `,Kk=ke(e=>{const t=X();return{"--bg":t.colors.modalBg,"& *":{boxSizing:"border-box"},animation:`${Zk} 300ms ease`,background:t.colors.modalBg,border:`1px solid ${t.colors.borderColor}`,borderRadius:Z.xl,boxShadow:Z5.lg,boxSizing:"border-box",color:t.colors.primaryText,fontFamily:t.fontFamily,left:"50%",lineHeight:"normal",outline:"none",overflow:"hidden",position:"fixed",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100vw - 40px)",zIndex:1e4,[k1.mobile]:{animation:`${qk} 0.35s cubic-bezier(0.15, 1.15, 0.6, 1)`,borderBottomLeftRadius:0,borderBottomRightRadius:0,bottom:0,left:0,maxWidth:"none !important",right:0,top:"auto",transform:"none",width:"100vw"},"& *::selection":{backgroundColor:t.colors.selectedTextBg,color:t.colors.selectedTextColor},...Dc}}),Jk={USD:"$",EUR:"€",GBP:"£",JPY:"¥",KRW:"₩",CNY:"¥",INR:"₹",NOK:"kr",SEK:"kr",CHF:"CHF",AUD:"$",CAD:"$",NZD:"$",MXN:"$",BRL:"R$",CLP:"$",CZK:"Kč",DKK:"kr",HKD:"$",HUF:"Ft",IDR:"Rp",ILS:"₪",ISK:"kr"};function Xf(e){return Jk[e]||"$"}function Xk(e){return e===0?"0.00":e<1e3?e.toString():e<1e4?e.toLocaleString("en-US"):e<1e6?mh(e,1e3,"k"):e<1e9?mh(e,1e6,"M"):mh(e,1e9,"B")}function mh(e,t,n){const i=e/t;return Number.isInteger(i)?Math.floor(i)+n:i.toFixed(1).replace(/\.0$/,"")+n}const tp=[["#fca5a5","#b91c1c"],["#fdba74","#c2410c"],["#fcd34d","#b45309"],["#fde047","#a16207"],["#a3e635","#4d7c0f"],["#86efac","#15803d"],["#67e8f9","#0e7490"],["#7dd3fc","#0369a1"],["#93c5fd","#1d4ed8"],["#a5b4fc","#4338ca"],["#c4b5fd","#6d28d9"],["#d8b4fe","#7e22ce"],["#f0abfc","#a21caf"],["#f9a8d4","#be185d"],["#fda4af","#be123c"]];async function ez(e){const{chain:t,client:n,address:i,tokenAddress:r,showBalanceInFiat:s}=e;if(!t)throw new Error("chain is required");if(r&&(r==null?void 0:r.toLowerCase())===Yt.toLowerCase())throw new Error(`Invalid tokenAddress - cannot be ${Yt}`);if(!ni(i))throw new Error("Invalid wallet address. Expected an EVM address");if(r&&!ni(r))throw new Error("Invalid tokenAddress. Expected an EVM contract address");const o=await Y1({address:i,chain:t,client:n,tokenAddress:r}).catch(()=>{});if(!o)throw new Error(`Failed to retrieve ${r?`token: ${r}`:"native token"} balance for address: ${i} on chainId:${t.id}`);if(s){const a=await r_({chain:t,client:n,fromAmount:Number(o.displayValue),fromTokenAddress:r||Yt,to:s}).catch(()=>{});if(a===void 0)throw new Error(`Failed to resolve fiat value for ${r?`token: ${r}`:"native token"} on chainId: ${t.id}`);return{balance:a==null?void 0:a.result,symbol:Xf(s)}}return{balance:Number(o.displayValue),symbol:o.symbol}}function eu(e){return`${Rc(e.balance,e.decimals)} ${e.symbol}`}function Dm(e){const t=Rc(e.balance,e.decimals),n=Xk(t);return`${e.symbol}${n}`}const Om={agreement:{and:"&",prefix:"By connecting, you agree to the",privacyPolicy:"Privacy Policy",termsOfService:"Terms of Service"},backupWallet:"Backup Wallet",buy:"Buy",confirmInWallet:"Confirm in wallet",connectAWallet:"Connect a Wallet",connectedToSmartWallet:"Smart Account",connecting:"Connecting",continueAsGuest:"Continue as guest",copyAddress:"Copy Address",currentNetwork:"Current network",defaultButtonTitle:"Connect",defaultModalTitle:"Sign in",disconnectWallet:"Disconnect Wallet",getStarted:"Get started",goBackButton:"Back",guest:"Guest",guestWalletWarning:"This is a temporary guest wallet. Backup wallet if you don't want to lose access to it",id:"en_US",installed:"Installed",manageWallet:{connectAnApp:"Connect an App",exportPrivateKey:"Export Private Key",linkedProfiles:"Linked Profiles",linkProfile:"Link a Profile",title:"Manage Wallet"},networkSelector:{addCustomNetwork:"Add Custom Network",allNetworks:"All",categoryLabel:{others:"All Networks",popular:"Popular",recentlyUsed:"Recently Used"},failedToSwitch:"Failed to switch network",inputPlaceholder:"Search Network or Chain ID",loading:"Loading",mainnets:"Mainnets",testnets:"Testnets",title:"Select Network"},newToWallets:"New to wallets?",or:"OR",passkeys:{linkPasskey:"Link a Passkey",title:"Passkeys"},payTransactions:"Fiat Transactions",personalWallet:"Personal Wallet",receive:"Receive",receiveFundsScreen:{instruction:"Copy the address to send funds to this wallet",title:"Receive Funds"},recommended:"Recommended",requestTestnetFunds:"Request Testnet Funds",send:"Send",sendFundsScreen:{amount:"Amount",insufficientFunds:"Insufficient Funds",invalidAddress:"Invalid Address",noTokensFound:"No Tokens Found",searchToken:"Search or Paste token address",selectTokenTitle:"Select a Token",sending:"Sending",sendTo:"Send to",submitButton:"Send",successMessage:"Transaction Successful",title:"Send Funds",token:"Token",transactionFailed:"Transaction Failed",transactionRejected:"Transaction Rejected"},signatureScreen:{instructionScreen:{disconnectWallet:"Disconnect Wallet",instruction:"Please sign the message request in your wallet to continue",signInButton:"Sign in",title:"Sign in"},signingScreen:{approveTransactionInSafe:"Approve transaction in Safe",failedToSignIn:"Failed to Sign in",inProgress:"Awaiting Confirmation",prompt:"Signing the signature request in your wallet",promptForSafe:"Sign signature request in your wallet & approve transaction in Safe",title:"Signing In",tryAgain:"Try Again"}},signIn:"Sign in",smartWallet:"Smart Wallet",switchAccount:"Switch Account",switchingNetwork:"Switching Network",switchNetwork:"Switch Network",switchTo:"Switch to",transactions:"Transactions",viewAllTransactions:"View All Transactions",viewFunds:{title:"View Funds",viewAssets:"View Assets",viewNFTs:"View NFTs",viewTokens:"View Tokens"},walletTransactions:"Wallet Transactions",welcomeScreen:{defaultSubtitle:"Connect a wallet to get started",defaultTitle:"Your gateway to the decentralized world"}},tz=Object.freeze(Object.defineProperty({__proto__:null,default:Om},Symbol.toStringTag,{value:"Module"})),cb=e=>c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18",width:e.size,height:e.size,style:{color:e.color},role:"presentation",children:c.jsx("path",{fill:"currentColor",d:"M15.6 4.6H1.85v-.55l12.1-.968v.968h1.65V2.4c0-1.21-.98-2.059-2.177-1.888L2.378 2.089C1.18 2.26.2 3.39.2 4.6v11a2.2 2.2 0 002.2 2.2h13.2a2.2 2.2 0 002.2-2.2V6.8a2.2 2.2 0 00-2.2-2.2zm-1.65 7.707a1.65 1.65 0 01-.63-3.176 1.65 1.65 0 11.63 3.176z"})}),yh=640;function lb(){const[e,t]=w.useState(void 0);return w.useEffect(()=>{const n=window.matchMedia(`(max-width: ${yh-1}px)`),i=()=>{t(window.innerWidth<yh)};return n.addEventListener("change",i),t(window.innerWidth<yh),()=>n.removeEventListener("change",i)},[]),!!e}function Pm({socialType:e,resolverAddress:t,resolverChain:n,loadingComponent:i,fallbackComponent:r,queryOptions:s,...o}){const{address:a,client:l}=Nc(),u=xe({queryFn:async()=>{var g;const[d,f]=await Promise.all([Z1({address:a,client:l}),J1({address:a||"",client:l,resolverAddress:t,resolverChain:n})]),m=(g=d==null?void 0:d.filter(x=>x.avatar&&(e?x.type===e:!0))[0])==null?void 0:g.avatar,[y,p]=await Promise.all([m?C3({client:l,uri:m}):void 0,f?kv({client:l,name:f}):void 0]);if(!y&&!p)throw new Error("Failed to resolve social + ens avatar");if(y)return y;if(p)return p;throw new Error("Failed to resolve social + ens avatar")},queryKey:["account-avatar",a,{socialType:e},{resolverAddress:t,resolverChain:n}],retry:!1,...s});return u.isLoading?i||null:u.data?c.jsx("img",{src:u.data,...o,alt:o.alt}):r||null}function ub(e){const t=w.useId(),n=w.useMemo(()=>tp[Number(a1(e.address.slice(2,4)))%tp.length],[e.address]);return c.jsx("div",{className:e.className,id:t,style:{...e.style,backgroundImage:`radial-gradient(ellipse at left bottom, ${n[0]}, ${n[1]})`,...e.size?{height:`${e.size}px`,width:`${e.size}px`}:void 0}})}function oc(e){const{address:t}=Nc();return c.jsx(ub,{...e,address:t})}function km({resolverAddress:e,resolverChain:t,socialType:n,formatFn:i,queryOptions:r,loadingComponent:s,fallbackComponent:o,...a}){const{address:l,client:u}=Nc(),d=xe({queryFn:async()=>{var p;const[f,m]=await Promise.all([Z1({address:l,client:u}),J1({address:l,client:u,resolverAddress:e,resolverChain:t})]),y=((p=f==null?void 0:f.filter(g=>g.name&&(n?g.type===n:!0))[0])==null?void 0:p.name)||m;if(!y)throw new Error("Failed to resolve account name");return i?i(y):y},queryKey:["account-name",l,{socialType:n},{resolverAddress:e,resolverChain:t}],retry:!1,...r});return d.isLoading?s||null:d.data?c.jsx("span",{...a,children:d.data}):o||null}function nz({loadingComponent:e,fallbackComponent:t,queryOptions:n,...i}){const r=gA({queryOptions:n});return r.isLoading?e||null:r.data?c.jsx("img",{src:r.data,...i,alt:i.alt}):t||null}function iz(e){const t=e.activeWalletInfo.activeWallet,n=e.activeWalletInfo.activeAccount,i=c.jsx(oc,{style:{width:`${A.xs}px`,height:`${A.xs}px`,borderRadius:Z.full}}),r=c.jsx(nz,{style:{width:`${A.xs}px`,height:`${A.xs}px`},fallbackComponent:i,loadingComponent:i});return c.jsx(rz,{variant:"ghost-solid",style:{paddingInline:z.xxs,paddingBlock:"2px"},onClick:e.onClick,children:c.jsx(P1,{address:n.address,client:e.client,children:c.jsx(Vv,{id:t.id,children:c.jsxs(M,{flex:"row",gap:"xxs",center:"y",children:[c.jsx(Pm,{style:{width:`${A.xs}px`,height:`${A.xs}px`,borderRadius:Z.full,objectFit:"cover"},fallbackComponent:r,loadingComponent:r}),c.jsx("span",{style:{fontSize:ie.xs,letterSpacing:"0.025em"},children:c.jsx(km,{fallbackComponent:c.jsx("span",{children:_n(n.address)}),loadingComponent:c.jsx("span",{children:_n(n.address)})})})]})})})})}const rz=Be(ae)(()=>{const e=X();return{color:e.colors.secondaryText,transition:"color 200ms ease","&:hover":{color:e.colors.primaryText}}});function np(e){const t=n=>{let i=n;i=i.replace(",","."),i.startsWith(".")&&(i=`0${i}`);const r=Number(i);Number.isNaN(r)||(i.length>1&&i.startsWith("0")&&!i.startsWith("0.")?e.setValue(i.slice(1)):e.setValue(i))};return c.jsx(Kr,{...e,inputMode:"decimal",onChange:n=>{t(n.target.value)},onClick:n=>{e.value===""&&n.currentTarget.setSelectionRange(n.currentTarget.value.length,n.currentTarget.value.length)},pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:"0.0",type:"text",variant:"transparent"})}function zm(e){return e.replace("Mainnet","")}const sz=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:5,minimumFractionDigits:2});function oz(e){var n,i,r,s,o,a,l;const t=X();return c.jsxs(ae,{variant:"ghost-solid",hoverBg:e.disabled?void 0:"secondaryButtonBg",fullWidth:!0,onClick:e.onSelectToken,gap:"sm",disabled:e.disabled,style:{borderBottom:`1px dashed ${t.colors.borderColor}`,justifyContent:"space-between",paddingInline:z.md,paddingBlock:z.md,borderRadius:0,background:e.disabled?"transparent":void 0,cursor:e.disabled?"default":"pointer",opacity:1},children:[c.jsxs(M,{gap:"sm",flex:"row",center:"y",children:[c.jsxs(M,{relative:!0,color:"secondaryText",children:[e.selectedToken&&!e.selectedToken.isError?c.jsx(Xe,{src:((n=e.selectedToken)==null?void 0:n.data)===void 0?void 0:e.selectedToken.data.iconUri||"",client:e.client,width:"40",height:"40",fallback:c.jsx(M,{style:{background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:Z.full,width:"40px",height:"40px"}}),style:{objectFit:"cover",borderRadius:Z.full}},(r=(i=e.selectedToken)==null?void 0:i.data)==null?void 0:r.iconUri):c.jsx(M,{style:{border:`1px solid ${t.colors.borderColor}`,background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:Z.full,width:"40px",height:"40px"}}),e.chain&&c.jsx(M,{bg:"modalBg",style:{padding:"2px",position:"absolute",bottom:-2,right:-2,display:"flex",borderRadius:Z.full},children:c.jsx(Xe,{src:((s=e.chain)==null?void 0:s.icon)||"",client:e.client,width:A.sm,height:A.sm,style:{borderRadius:Z.full},fallback:c.jsx(M,{style:{background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:Z.full,width:`${A.sm}px`,height:`${A.sm}px`}})})})]}),e.selectedToken&&!e.selectedToken.isError?c.jsxs(M,{flex:"column",style:{gap:"3px"},children:[(o=e.selectedToken)!=null&&o.isFetching?c.jsx(ge,{width:"60px",height:ie.md}):c.jsx(P,{size:"md",color:"primaryText",weight:500,style:{whiteSpace:"nowrap",maxWidth:"200px"},children:(l=(a=e.selectedToken)==null?void 0:a.data)==null?void 0:l.symbol}),e.chain?c.jsx(P,{size:"xs",color:"secondaryText",style:{whiteSpace:"nowrap"},children:zm(e.chain.name)}):c.jsx(ge,{width:"140px",height:ie.sm})]}):c.jsxs(M,{flex:"column",style:{gap:"3px"},children:[c.jsx(P,{size:"md",color:"primaryText",weight:500,children:"Select Token"}),c.jsx(P,{size:"xs",color:"secondaryText",children:"Required"})]})]}),!e.disabled&&c.jsx(M,{color:"secondaryText",flex:"row",center:"both",borderColor:"borderColor",style:{borderRadius:Z.full,borderWidth:1,borderStyle:"solid",padding:z.xs},children:c.jsx(qu,{width:A.sm,height:A.sm})})]})}function az(e){return Qu({address:e.walletAddress,chain:e.chainId?Qe(e.chainId):void 0,client:e.client,tokenAddress:e.tokenAddress?me(e.tokenAddress)===me(Yt)?void 0:me(e.tokenAddress):void 0})}function cz(e){return xe({enabled:!!e.chainId,queryFn:async()=>{if(!e.chainId)throw new Error("Chain ID is required");const t=e.tokenAddress||Yt,n=await Oc(e.client,t,e.chainId).catch(i=>{i.message.includes("not supported")||Promise.reject(i)});return n?{token:n,type:"success"}:{type:"unsupported_token"}},queryKey:["bridge.getToken",e],refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1})}function lz(e){const t=X();return c.jsxs(M,{flex:"column",children:[e.image&&c.jsx("div",{className:"tw-header-image",style:{aspectRatio:"16/9",backgroundColor:t.colors.tertiaryBg,backgroundImage:`url(${uz(e.client,e.image)})`,backgroundPosition:"center",backgroundSize:"cover",borderRadius:`${Z.md} ${Z.md} 0 0`,marginBottom:z.xxs,overflow:"hidden",width:"100%"}}),c.jsxs(M,{flex:"column",px:"md",children:[c.jsx($,{y:"md"}),(e.title||e.description)&&c.jsxs(c.Fragment,{children:[e.title&&c.jsx(P,{color:"primaryText",size:"lg",weight:500,trackingTight:!0,children:e.title}),e.description&&c.jsxs(c.Fragment,{children:[c.jsx($,{y:"xxs"}),c.jsx(P,{color:"secondaryText",size:"sm",multiline:!0,children:e.description})]}),c.jsx($,{y:"md"})]}),e.children]})]})}function uz(e,t){return t.startsWith("ipfs://")?Fi({client:e,uri:t}):t}function dz(e){const t=Tt(),n=bt(),i=_t();return w.useMemo(()=>{const r=n,s=i,o=t;return r&&s&&o?{activeChain:s,activeWallet:r,activeAccount:o}:void 0},[t,n,i,e])}function hz(e){return xe({queryKey:["token-price",e.token],enabled:!!e.token,queryFn:()=>{if(!e.token)throw new Error("Token is required");return Oc(e.client,e.token.tokenAddress,e.token.chainId)},refetchOnMount:!1,retry:!1,refetchOnWindowFocus:!1})}const fd=e=>c.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),c.jsx("path",{d:"M18.0901 10.37C19.0354 10.7224 19.8766 11.3075 20.5358 12.0712C21.1951 12.8349 21.6512 13.7524 21.8618 14.7391C22.0725 15.7257 22.031 16.7495 21.7411 17.7158C21.4513 18.6822 20.9224 19.5598 20.2035 20.2676C19.4846 20.9754 18.5988 21.4905 17.6281 21.7652C16.6573 22.04 15.633 22.0655 14.6498 21.8395C13.6666 21.6134 12.7562 21.1431 12.0029 20.472C11.2496 19.8009 10.6777 18.9507 10.3401 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),c.jsx("path",{d:"M7 6H8V10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),c.jsx("path",{d:"M16.7101 13.88L17.4101 14.59L14.5901 17.41",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]}),fz=e=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"presentation",width:e.size,style:{color:e.color},height:e.size,children:[c.jsx("circle",{cx:"12",cy:"12",r:"10"}),c.jsx("path",{d:"M12 16v-4"}),c.jsx("path",{d:"M12 8h.01"})]});function db(e){return c.jsxs("div",{style:{position:"relative"},children:[c.jsx(M,{color:"secondaryText",children:c.jsx(em,{width:A.md,height:A.md,style:{position:"absolute",left:z.sm,top:"50%",borderRadius:Z.lg,transform:"translateY(-50%)"}})}),c.jsx(Kr,{variant:"outline",placeholder:e.placeholder,value:e.value,sm:!0,style:{paddingLeft:"44px"},onChange:t=>e.onChange(t.target.value),autoFocus:e.autoFocus})]})}function mz(e){return c.jsxs(ae,{variant:"outline",bg:"tertiaryBg",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:ie.md,padding:`${z.sm} ${z.sm}`,borderRadius:Z.lg,minHeight:"48px"},gap:"sm",onClick:e.onClick,children:[c.jsx(Xe,{src:e.selectedChain.icon,client:e.client,width:A.lg,height:A.lg}),c.jsxs("span",{children:[" ",zm(e.selectedChain.name)," "]}),c.jsx(qu,{width:A.sm,height:A.sm,style:{marginLeft:"auto"}})]})}function hb(e){return xe({queryKey:["bridge-chains",e],queryFn:async()=>[...await B8(e)].sort((i,r)=>{var a,l;const s=(a=i.name[0])==null?void 0:a.match(/^\d/),o=(l=r.name[0])==null?void 0:l.match(/^\d/);return s&&!o?1:!s&&o?-1:i.name.localeCompare(r.name)}),refetchOnMount:!1,refetchOnWindowFocus:!1})}function yz({chainId:e,client:t}){var i;const n=hb({client:t});return{data:(i=n.data)==null?void 0:i.find(r=>r.chainId===e),isPending:n.isPending}}function fb(e){return hb({client:e.client,...e.type==="buy"?e.sellChainId?{originChainId:e.sellChainId}:{type:"destination"}:e.buyChainId?{destinationChainId:e.buyChainId}:{type:"origin"}})}function ip(e){const t=fb({client:e.client,type:e.type,buyChainId:e.selections.buyChainId,sellChainId:e.selections.sellChainId});return c.jsx(gz,{...e,isPending:t.isPending,onSelectChain:e.onSelectChain,chains:t.data??[]})}function gz(e){const[t,n]=w.useState(""),[i]=w.useState(e.selectedChain),s=w.useMemo(()=>i?[i,...e.chains.filter(o=>o.chainId!==i.chainId)]:e.chains,[e.chains,i]).filter(o=>o.name.toLowerCase().includes(t.toLowerCase()));return c.jsxs(M,{fullHeight:!0,flex:"column",children:[e.isMobile&&c.jsxs(c.Fragment,{children:[c.jsx(M,{px:"md",py:"md+",children:c.jsx(be,{onBack:e.onBack,title:"Select Chain"})}),c.jsx(We,{})]}),c.jsx($,{y:"md"}),c.jsx(M,{px:"md",style:{paddingBottom:0},children:c.jsx(db,{value:t,onChange:n,placeholder:"Search Chain"})}),c.jsx($,{y:"sm"}),c.jsxs(M,{expand:!0,px:"md",gap:e.isMobile?void 0:"xxs",flex:"column",style:{maxHeight:e.isMobile?"400px":"none",overflowY:"auto",scrollbarWidth:"none",paddingBottom:z.md},children:[s.map(o=>{var a;return c.jsx(wz,{chain:o,client:e.client,onClick:()=>e.onSelectChain(o),isSelected:o.chainId===((a=e.selectedChain)==null?void 0:a.chainId),isMobile:e.isMobile},o.chainId)}),e.isPending&&new Array(20).fill(0).map(()=>c.jsx(pz,{isMobile:e.isMobile})),s.length===0&&!e.isPending&&c.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:c.jsxs(P,{color:"secondaryText",size:"md",center:!0,multiline:!0,children:['No chains found for "',t,'"']})})]})]})}function pz(e){const t=e.isMobile?A.lg:A.md;return c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:z.sm,padding:e.isMobile?`${z.sm} ${z.sm}`:`${z.xs} ${z.xs}`},children:[c.jsx(ge,{height:`${t}px`,width:`${t}px`}),c.jsx(ge,{height:e.isMobile?ie.md:ie.sm,width:"160px"})]})}function wz(e){const t=X(),n=e.isMobile?A.lg:A.md;return c.jsxs(ae,{variant:e.isSelected?"secondary":"ghost-solid",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:e.isMobile?ie.md:ie.sm,border:"1px solid transparent",padding:e.isMobile?void 0:`${z.xs} ${z.xs}`},onClick:e.onClick,gap:"sm",children:[c.jsx(Xe,{src:e.chain.icon||"",client:e.client,width:n,height:n,style:{borderRadius:Z.full},fallback:c.jsx(M,{color:"secondaryText",children:c.jsx(M,{style:{background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:Z.full,width:`${n}px`,height:`${n}px`}})})}),zm(e.chain.name)]})}function xz(e){return xe({queryKey:["tokens",e],enabled:!!e.chainId,retry:!1,queryFn:()=>{if(!e.chainId)throw new Error("Chain ID is required");const t=e.search?ni(e.search):!1;return W4({chainId:e.chainId,client:e.client,offset:e.offset,limit:e.limit,includePrices:!1,query:e.search&&!t?e.search:void 0,tokenAddress:e.search&&t?e.search:void 0})}})}function _z(e){return xe({queryKey:["bridge/v1/wallets",e],enabled:!!e.chainId&&!!e.walletAddress,queryFn:async()=>{if(!e.chainId||!e.walletAddress)throw new Error("invalid options");const n=it("bridge").includes("thirdweb-dev"),i=new URL(`https://api.${n?"thirdweb-dev":"thirdweb"}.com/v1/wallets/${e.walletAddress}/tokens`);i.searchParams.set("chainId",e.chainId.toString()),i.searchParams.set("limit",e.limit.toString()),i.searchParams.set("page",e.page.toString()),i.searchParams.set("metadata","true"),i.searchParams.set("resolveMetadataLinks","true"),i.searchParams.set("includeSpam","false"),i.searchParams.set("includeNative","true"),i.searchParams.set("sortBy","usd_value"),i.searchParams.set("sortOrder","desc"),i.searchParams.set("includeWithoutPrice","false");const s=await He(e.client)(i.toString());if(!s.ok)throw new Error(`Failed to fetch token balances: ${s.statusText}`);return(await s.json()).result},refetchOnMount:"always"})}function gh(e,t){if(t)return e.find(n=>n.chainId===t)}const ph=100;function bz(e){var g,x,_,b,I;const t=fb({client:e.client,type:e.type,buyChainId:e.selections.buyChainId,sellChainId:e.selections.sellChainId}),[n,i]=w.useState(""),r=ad(n,500),[s,o]=w.useState(ph),a=w.useCallback(E=>{i(E),o(ph)},[]),[l,u]=w.useState(void 0),d=l||(t.data?gh(t.data,(g=e.selectedToken)==null?void 0:g.chainId)||gh(t.data,(x=e.activeWalletInfo)==null?void 0:x.activeChain.id)||gh(t.data,1):void 0),f=xz({client:e.client,chainId:d==null?void 0:d.chainId,search:r,limit:s,offset:0}),m=_z({client:e.client,chainId:d==null?void 0:d.chainId,limit:s,page:1,walletAddress:(_=e.activeWalletInfo)==null?void 0:_.activeAccount.address}),y=w.useMemo(()=>{var E,C;return(C=(E=m.data)==null?void 0:E.tokens)==null?void 0:C.filter(T=>T.symbol.toLowerCase().includes(r.toLowerCase())||T.name.toLowerCase().includes(r.toLowerCase())||T.token_address.toLowerCase().includes(r.toLowerCase()))},[(b=m.data)==null?void 0:b.tokens,r]),p=f.isFetching||m.isFetching;return c.jsx(Mz,{...e,ownedTokens:y||[],allTokens:f.data||[],isFetching:p,selectedChain:d,setSelectedChain:u,search:n,setSearch:a,selectedToken:e.selectedToken,setSelectedToken:e.setSelectedToken,showMore:((I=f.data)==null?void 0:I.length)===s?()=>{o(s+ph)}:void 0})}function Mz(e){var a,l;const t=lb(),[n,i]=w.useState("select-token"),r=w.useMemo(()=>e.ownedTokens.sort((u,d)=>u.icon_uri&&!d.icon_uri?-1:!u.icon_uri&&d.icon_uri?1:0),[e.ownedTokens]),s=w.useMemo(()=>{const u=new Set(r.map(d=>`${d.token_address}-${d.chain_id}`.toLowerCase()));return e.allTokens.filter(d=>!u.has(`${d.address}-${d.chainId}`.toLowerCase()))},[e.allTokens,r]),o=w.useMemo(()=>s.sort((u,d)=>u.iconUri&&!d.iconUri?-1:!u.iconUri&&d.iconUri?1:0),[s]);return t?n==="select-token"?c.jsx(sp,{onSelectToken:u=>{e.setSelectedToken(u),e.onClose()},selectedToken:e.selectedToken,isFetching:e.isFetching,ownedTokens:e.ownedTokens,otherTokens:o,showMore:e.showMore,selectedChain:e.selectedChain,isMobile:!0,onSelectChain:()=>i("select-chain"),client:e.client,search:e.search,setSearch:e.setSearch,currency:e.currency},(l=e.selectedChain)==null?void 0:l.chainId):n==="select-chain"?c.jsx(ip,{isMobile:!0,onBack:()=>i("select-token"),client:e.client,onSelectChain:u=>{e.setSelectedChain(u),i("select-token")},selectedChain:e.selectedChain,type:e.type,selections:e.selections}):null:c.jsxs(M,{style:{display:"grid",gridTemplateColumns:"300px 1fr",height:"100%"},children:[c.jsx(Cz,{children:c.jsx(ip,{type:e.type,selections:e.selections,onBack:()=>i("select-token"),client:e.client,isMobile:!1,onSelectChain:u=>{e.setSelectedChain(u),i("select-token")},selectedChain:e.selectedChain})}),c.jsx(M,{flex:"column",relative:!0,scrollY:!0,children:c.jsx(sp,{onSelectToken:u=>{e.setSelectedToken(u),e.onClose()},isMobile:!1,selectedToken:e.selectedToken,isFetching:e.isFetching,ownedTokens:e.ownedTokens,otherTokens:o,showMore:e.showMore,selectedChain:e.selectedChain,onSelectChain:()=>i("select-chain"),client:e.client,search:e.search,setSearch:e.setSearch,currency:e.currency},(a=e.selectedChain)==null?void 0:a.chainId)})]})}function Iz(){return c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:z.sm,padding:`${z.xs} ${z.xs}`,height:"70px"},children:[c.jsx(ge,{height:`${A.lg}px`,width:`${A.lg}px`}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[c.jsx(ge,{height:ie.sm,width:"100px"}),c.jsx(ge,{height:ie.md,width:"200px"})]})]})}function rp(e){const t=X(),n="balance"in e.token?Un(BigInt(e.token.balance),e.token.decimals):void 0,i="balance"in e.token?e.token.price_data.price_usd*Number(n):void 0,r="balance"in e.token?e.token.token_address:e.token.address,s="balance"in e.token?e.token.chain_id:e.token.chainId;return c.jsxs(ae,{variant:e.isSelected?"secondary":"ghost-solid",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:ie.md,border:"1px solid transparent",padding:`${z.xs} ${z.xs}`,textAlign:"left",lineHeight:"1.5",borderRadius:Z.lg},gap:"sm",onClick:async()=>{e.onSelect({tokenAddress:r,chainId:s})},children:[c.jsx(Xe,{src:("balance"in e.token?e.token.icon_uri:e.token.iconUri)||"",client:e.client,width:A.lg,height:A.lg,style:{flexShrink:0,borderRadius:Z.full},fallback:c.jsx(M,{color:"secondaryText",children:c.jsx(M,{style:{background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:Z.full,width:`${A.lg}px`,height:`${A.lg}px`}})})}),c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:z["3xs"],flex:1},children:[c.jsxs(M,{flex:"row",style:{justifyContent:"space-between",width:"100%"},children:[c.jsx(P,{size:"md",color:"primaryText",weight:500,style:{maxWidth:"200px",whiteSpace:"nowrap"},children:e.token.symbol}),"balance"in e.token&&c.jsx(P,{size:"md",color:"primaryText",children:sz.format(Number(Un(BigInt(e.token.balance),e.token.decimals)))})]}),c.jsxs(M,{flex:"row",style:{justifyContent:"space-between",width:"100%"},children:[c.jsx(P,{size:"xs",color:"secondaryText",style:{whiteSpace:"nowrap",maxWidth:"200px"},children:e.token.name}),i&&c.jsx(M,{flex:"row",children:c.jsxs(P,{size:"xs",color:"secondaryText",weight:400,children:["$",i.toFixed(2)]})})]})]}),c.jsx(Yi,{onClick:o=>{o.stopPropagation(),o.preventDefault(),e.onInfoClick(r,s)},style:{padding:z.xxs,borderRadius:Z.full},children:c.jsx(fz,{size:A.sm})})]})}function Ez(e){const t=X(),n=hz({token:{tokenAddress:e.tokenAddress,chainId:e.chainId},client:e.client}),i=n.data,r=hC(e.tokenAddress),s=r?`https://thirdweb.com/${e.chainId}`:`https://thirdweb.com/${e.chainId}/${e.tokenAddress}`;return c.jsxs(M,{flex:"column",expand:!0,style:{minHeight:"450px"},animate:"fadein",children:[c.jsx(M,{px:"md",py:"md+",children:c.jsx(be,{onBack:e.onBack,title:"Token Details"})}),c.jsx(We,{dashed:!0}),n.isPending?c.jsx(M,{flex:"column",center:"both",expand:!0,children:c.jsx($e,{size:"lg",color:"secondaryText"})}):i?c.jsxs(M,{flex:"column",gap:"md",px:"md",py:"lg",children:[c.jsxs(M,{flex:"row",style:{justifyContent:"space-between",alignItems:"center"},children:[c.jsx(P,{size:"sm",color:"secondaryText",children:"Name"}),c.jsxs(M,{flex:"row",gap:"xxs",center:"y",children:[c.jsx(Xe,{src:i.iconUri||"",client:e.client,width:A.sm,height:A.sm,style:{borderRadius:Z.full},fallback:c.jsx(M,{style:{background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:Z.full,width:`${A.sm}px`,height:`${A.sm}px`}})}),c.jsx(P,{size:"sm",color:"primaryText",weight:500,style:{maxWidth:"200px",whiteSpace:"nowrap"},children:i.name})]})]}),c.jsx(dl,{label:"Symbol",value:i.symbol}),"prices"in i&&c.jsx(dl,{label:"Price",value:i.prices[e.currency]?Ss(e.currency,i.prices[e.currency]):"N/A"}),!!i.marketCapUsd&&c.jsx(dl,{label:"Market Cap",value:Ss(e.currency,i.marketCapUsd)}),!!i.volume24hUsd&&c.jsx(dl,{label:"Volume (24h)",value:Ss(e.currency,i.volume24hUsd)}),c.jsxs(M,{flex:"row",style:{justifyContent:"space-between",alignItems:"center"},children:[c.jsx(P,{size:"sm",color:"secondaryText",children:"Contract Address"}),c.jsxs(M,{flex:"row",gap:"3xs",center:"y",children:[!r&&c.jsx(Yo,{text:e.tokenAddress,iconSize:13,tip:"Copy Address"}),c.jsx(Zr,{href:s,target:"_blank",rel:"noreferrer",color:"accentText",hoverColor:"primaryText",weight:500,size:"sm",children:r?"Native Currency":_n(e.tokenAddress)})]})]})]}):c.jsx(M,{flex:"column",center:"both",expand:!0,children:c.jsx(P,{size:"sm",color:"secondaryText",children:"Token not found"})})]})}function dl(e){return c.jsxs(M,{flex:"row",style:{justifyContent:"space-between",alignItems:"center"},children:[c.jsx(P,{size:"sm",color:"secondaryText",children:e.label}),c.jsx(P,{size:"sm",color:"primaryText",weight:500,style:{maxWidth:"200px",whiteSpace:"nowrap"},children:e.value})]})}function sp(e){const[t,n]=w.useState(null),i=!e.isFetching&&e.otherTokens.length===0&&e.ownedTokens.length===0;return t?c.jsx(Ez,{tokenAddress:t.tokenAddress,chainId:t.chainId,client:e.client,onBack:()=>n(null),currency:e.currency}):c.jsxs(M,{fullHeight:!0,flex:"column",children:[c.jsxs(M,{px:"md",pt:"md+",children:[c.jsx(P,{size:"lg",weight:600,color:"primaryText",trackingTight:!0,children:"Select Token"}),c.jsx($,{y:"3xs"}),c.jsx(P,{size:"sm",color:"secondaryText",multiline:!0,style:{textWrap:"pretty"},children:"Select a token from the list or use the search"})]}),!e.selectedChain&&c.jsx(M,{flex:"column",center:"both",expand:!0,style:{minHeight:"300px"},children:c.jsx($e,{color:"secondaryText",size:"lg"})}),e.selectedChain&&c.jsxs(c.Fragment,{children:[e.isMobile?c.jsx(M,{p:"md",children:c.jsx(mz,{onClick:e.onSelectChain,selectedChain:e.selectedChain,client:e.client})}):c.jsx($,{y:"md"}),c.jsx(M,{px:"md",children:c.jsx(db,{value:e.search,onChange:e.setSearch,placeholder:"Search by token or address",autoFocus:!e.isMobile})}),c.jsx($,{y:"xs"}),c.jsxs(M,{pb:"md",px:"md",expand:!0,gap:"xxs",flex:"column",style:{minHeight:"300px",maxHeight:e.isMobile?"450px":"none",overflowY:"auto",scrollbarWidth:"none",paddingBottom:z.md},children:[e.isFetching&&new Array(20).fill(0).map((r,s)=>c.jsx(Iz,{},s)),!e.isFetching&&e.ownedTokens.length>0&&c.jsxs(M,{px:"xs",py:"xs",flex:"row",gap:"xs",center:"y",color:"secondaryText",children:[c.jsx(cb,{size:"14"}),c.jsx(P,{size:"sm",color:"secondaryText",style:{overflow:"unset"},children:"Your Tokens"})]}),!e.isFetching&&e.ownedTokens.map(r=>c.jsx(rp,{token:r,client:e.client,onSelect:e.onSelectToken,onInfoClick:(s,o)=>n({tokenAddress:s,chainId:o}),isSelected:!!e.selectedToken&&e.selectedToken.tokenAddress.toLowerCase()===r.token_address.toLowerCase()&&r.chain_id===e.selectedToken.chainId},r.token_address)),!e.isFetching&&e.ownedTokens.length>0&&c.jsxs(M,{px:"xs",py:"xs",flex:"row",gap:"xs",center:"y",color:"secondaryText",style:{marginTop:z.sm},children:[c.jsx(fd,{size:"14"}),c.jsx(P,{size:"sm",color:"secondaryText",style:{overflow:"unset"},children:"Other Tokens"})]}),!e.isFetching&&e.otherTokens.map(r=>c.jsx(rp,{token:r,client:e.client,onSelect:e.onSelectToken,onInfoClick:(s,o)=>n({tokenAddress:s,chainId:o}),isSelected:!!e.selectedToken&&e.selectedToken.tokenAddress.toLowerCase()===r.address.toLowerCase()&&r.chainId===e.selectedToken.chainId},r.address)),e.showMore&&c.jsxs(ae,{variant:"outline",fullWidth:!0,style:{borderRadius:Z.full},gap:"xs",onClick:()=>{var r;(r=e.showMore)==null||r.call(e)},children:[c.jsx(Ku,{width:A.sm,height:A.sm}),"Load More"]}),i&&c.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:c.jsx(P,{size:"sm",color:"secondaryText",children:"No Tokens Found"})})]})]})]})}const Cz=ke(e=>{const t=X();return{display:"flex",flexDirection:"column",overflowY:"auto",...Dc,borderRight:`1px solid ${t.colors.separatorLine}`,position:"relative"}});function Lz(e){var g,x,_,b,I,E,C,T,j,O,L,N,v,D,k,U;const t=X(),n=dz(),i=e.receiverAddress??((g=n==null?void 0:n.activeAccount)==null?void 0:g.address),[r,s]=w.useState(!1),[o,a]=w.useState(!1),l=e.receiverAddress&&ni(e.receiverAddress)&&((x=n==null?void 0:n.activeAccount)!=null&&x.address?$o(e.receiverAddress)!==$o((_=n==null?void 0:n.activeAccount)==null?void 0:_.address):!0),u=cz({tokenAddress:(b=e.selectedToken)==null?void 0:b.tokenAddress,chainId:(I=e.selectedToken)==null?void 0:I.chainId,client:e.client}),d=((E=u.data)==null?void 0:E.type)==="success"?u.data.token:void 0,f=az({chainId:(C=e.selectedToken)==null?void 0:C.chainId,tokenAddress:(T=e.selectedToken)==null?void 0:T.tokenAddress,client:e.client,walletAddress:(j=n==null?void 0:n.activeAccount)==null?void 0:j.address}),m=l?"Pay":"Buy",y=lb(),p=!e.receiverAddress&&!n;return c.jsxs(lz,{client:e.client,title:e.metadata.title,description:e.metadata.description,image:e.metadata.image,children:[r&&c.jsx(vI,{client:e.client,locale:Om,detailsModal:{hideBuyFunds:!0},theme:e.theme,closeModal:()=>{s(!1)},onDisconnect:()=>{var R;(R=e.onDisconnect)==null||R.call(e)},chains:[],connectOptions:e.connectOptions}),c.jsx(hd,{hide:!1,className:"tw-modal__buy-widget",size:y?"compact":"wide",title:"Select Token",open:o,crossContainerStyles:{right:z.md,top:z["md+"],transform:"none"},setOpen:R=>a(R),autoFocusCrossIcon:!1,children:c.jsx(bz,{type:"buy",currency:e.currency,selections:{buyChainId:(O=e.selectedToken)==null?void 0:O.chainId,sellChainId:void 0},activeWalletInfo:n,onClose:()=>a(!1),client:e.client,selectedToken:e.selectedToken,setSelectedToken:R=>{e.setSelectedToken(R),a(!1)}})}),c.jsxs(M,{flex:"column",children:[c.jsx(Tz,{title:m,presetOptions:e.presetOptions,amountSelection:e.amountSelection,setAmount:e.setAmountSelection,activeWalletInfo:n,selectedToken:e.selectedToken?{data:((L=u.data)==null?void 0:L.type)==="success"?u.data.token:void 0,isFetching:u.isFetching,isError:u.isError||((N=u.data)==null?void 0:N.type)==="unsupported_token"}:void 0,balance:{data:f.data,isFetching:f.isFetching},client:e.client,isConnected:!!n,onSelectToken:()=>{a(!0)},onWalletClick:()=>{s(!0)},currency:e.currency,amountEditable:e.amountEditable,tokenEditable:e.tokenEditable}),i&&l&&c.jsxs(c.Fragment,{children:[c.jsx(vz,{}),c.jsx(jz,{address:i,client:e.client})]})]}),c.jsx($,{y:"md"}),(u.isError||((v=u.data)==null?void 0:v.type)==="unsupported_token")&&c.jsx("div",{style:{border:`1px solid ${t.colors.borderColor}`,borderRadius:Z.full,padding:z.xs,marginBottom:z.md},children:c.jsx(P,{size:"sm",color:"danger",center:!0,children:"Failed to fetch token details"})}),p?c.jsx(NI,{client:e.client,connectButton:{label:e.buttonLabel||m,style:{width:"100%",borderRadius:Z.full}},theme:t,...e.connectOptions,autoConnect:!1,wallets:((D=e.connectOptions)==null?void 0:D.wallets)||MS({appMetadata:(k=e.connectOptions)==null?void 0:k.appMetadata,chains:(U=e.connectOptions)==null?void 0:U.chains})}):c.jsx(ae,{disabled:!i,fullWidth:!0,onClick:()=>{if(!i||!d)return;const R=d.prices[e.currency],{tokenValue:B}=mb(e.amountSelection,R);B&&e.onContinue(String(B),d,me(i))},style:{fontSize:ie.md,borderRadius:Z.full},variant:"primary",children:e.buttonLabel||m}),e.showThirdwebBranding?c.jsxs("div",{children:[c.jsx($,{y:"md"}),c.jsx(sd,{link:"https://playground.thirdweb.com/payments/fund-wallet"})]}):c.jsx($,{y:"xxs"}),c.jsx($,{y:"md"})]})}function mb(e,t){const n=e.type==="usd"?e.value:t?t*Number(e.value):void 0,i=e.type==="token"?e.value:t?Number(e.value)/t:void 0;return{fiatValue:n,tokenValue:i}}function Tz(e){var a,l,u,d,f;const t=X(),i=yz({chainId:(l=(a=e.selectedToken)==null?void 0:a.data)==null?void 0:l.chainId,client:e.client}).data,r=(d=(u=e.selectedToken)==null?void 0:u.data)==null?void 0:d.prices[e.currency],{fiatValue:s,tokenValue:o}=mb(e.amountSelection,r);return c.jsxs(yb,{header:c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx(M,{flex:"row",center:"y",gap:"3xs",color:"secondaryText",children:c.jsx(P,{size:"xs",color:"primaryText",style:{letterSpacing:"0.07em",textTransform:"uppercase"},children:e.title})}),e.activeWalletInfo&&c.jsx(iz,{activeWalletInfo:e.activeWalletInfo,client:e.client,onClick:e.onWalletClick})]}),children:[c.jsx(oz,{selectedToken:e.selectedToken,client:e.client,onSelectToken:e.onSelectToken,chain:i,disabled:e.tokenEditable===!1}),c.jsxs(M,{px:"md",py:"md",children:[c.jsx(np,{value:o?String(o):"",setValue:m=>{e.setAmount({type:"token",value:m})},disabled:e.amountEditable===!1,style:{border:"none",boxShadow:"none",fontSize:ie.xl,fontWeight:500,paddingInline:0,paddingBlock:0,letterSpacing:"-0.025em"}}),c.jsx($,{y:"xs"}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"2px"},children:[c.jsx(P,{size:"md",color:"secondaryText",style:{flexShrink:0},children:Xf(e.currency)}),(f=e.selectedToken)!=null&&f.isFetching?c.jsx(ge,{width:"120px",height:"20px",style:{transform:"translateX(4px)"}}):c.jsx(np,{value:String(s||0),setValue:m=>{e.setAmount({type:"usd",value:m})},disabled:e.amountEditable===!1,style:{border:"none",boxShadow:"none",fontSize:ie.md,fontWeight:400,color:t.colors.secondaryText,paddingInline:0,height:"20px",paddingBlock:0}})]}),e.amountEditable&&c.jsxs(c.Fragment,{children:[c.jsx($,{y:"md"}),c.jsx(M,{flex:"row",gap:"xxs",children:e.presetOptions.map(m=>{var y;return c.jsxs(ae,{disabled:!((y=e.selectedToken)!=null&&y.data)||e.amountEditable===!1,onClick:()=>e.setAmount({type:"usd",value:String(m)}),style:{backgroundColor:"transparent",color:t.colors.secondaryText,fontSize:ie.xs,fontWeight:400,borderRadius:Z.full,gap:"0.5px",padding:`${z.xxs} ${z.sm}`},variant:"outline",children:[c.jsx("span",{children:Xf(e.currency)}),c.jsx("span",{children:m})]},m)})})]})]}),e.isConnected&&e.selectedToken&&c.jsx(M,{px:"md",py:"md",style:{borderTop:`1px dashed ${t.colors.borderColor}`,justifyContent:"start"},children:c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"3px"},children:[c.jsx(P,{size:"xs",color:"secondaryText",children:"Current Balance"}),e.balance.data===void 0?c.jsx(ge,{height:ie.xs,width:"100px"}):c.jsxs(P,{size:"xs",color:"primaryText",children:[Ft(e.balance.data.value,e.balance.data.decimals,5)," ",e.balance.data.symbol]})]})})]})}function jz(e){const t=j3({address:e.address,client:e.client});return c.jsx(yb,{header:c.jsx(P,{size:"xs",color:"primaryText",style:{letterSpacing:"0.07em",textTransform:"uppercase"},children:"To"}),children:c.jsxs(M,{px:"md",py:"md",flex:"row",center:"y",gap:"xs",color:"secondaryText",children:[c.jsx(cb,{size:A.xs,color:"secondaryText"}),c.jsx(P,{size:"sm",color:"primaryText",children:t.data||_n(e.address)}),c.jsx(Yo,{text:e.address,tip:"Copy address",iconSize:14})]})})}function yb(e){const t=X();return c.jsxs(M,{style:{borderRadius:Z.xl,borderWidth:1,borderStyle:"solid",position:"relative",overflow:"hidden"},borderColor:"borderColor",children:[c.jsx(M,{bg:"tertiaryBg",style:{position:"absolute",inset:0,opacity:.5,zIndex:0}}),c.jsx(M,{style:{position:"relative",zIndex:1},children:c.jsx(M,{px:"md",py:"sm",relative:!0,children:e.header})}),c.jsx(M,{bg:"tertiaryBg",style:{position:"relative",overflow:"hidden",borderRadius:Z.xl,borderTop:`1px solid ${t.colors.borderColor}`},children:e.children})]})}function vz(){return c.jsx("div",{style:{display:"flex",justifyContent:"center",marginBlock:"-13px",zIndex:2,position:"relative"},children:c.jsx(M,{p:"xs",center:"both",flex:"row",color:"primaryText",bg:"modalBg",borderColor:"borderColor",style:{borderRadius:Z.full,borderWidth:1,borderStyle:"solid"},children:c.jsx(dN,{width:A["sm+"],height:A["sm+"]})})})}function Nz(e){var i,r,s,o,a,l,u,d,f;const t=w.useRef(!1);w.useEffect(()=>{var m;t.current||(t.current=!0,xn({client:e.client,event:"ub:ui:buy_widget:render",toChainId:(m=e.chain)==null?void 0:m.id,toToken:e.tokenAddress}))},[e.client,(i=e.chain)==null?void 0:i.id,e.tokenAddress]);const n=w.useMemo(()=>{var m;return e.showThirdwebBranding===!1?{...e.connectOptions,connectModal:{...(m=e.connectOptions)==null?void 0:m.connectModal,showThirdwebBranding:!1}}:e.connectOptions},[e.connectOptions,e.showThirdwebBranding]);return c.jsxs(Az,{theme:e.theme,className:e.className,style:e.style,children:[((r=e.connectOptions)==null?void 0:r.autoConnect)!==!1&&c.jsx(Ix,{client:e.client,wallets:(s=e.connectOptions)==null?void 0:s.wallets,timeout:typeof((o=e.connectOptions)==null?void 0:o.autoConnect)=="object"?(l=(a=e.connectOptions)==null?void 0:a.autoConnect)==null?void 0:l.timeout:void 0,appMetadata:(u=e.connectOptions)==null?void 0:u.appMetadata,accountAbstraction:(d=e.connectOptions)==null?void 0:d.accountAbstraction,chain:(f=e.connectOptions)==null?void 0:f.chain}),c.jsx(Sz,{...e,theme:e.theme||"dark",currency:e.currency||"USD",paymentMethods:e.paymentMethods||["crypto","card"],presetOptions:e.presetOptions||[5,10,20],connectOptions:n,showThirdwebBranding:e.showThirdwebBranding===void 0?!0:e.showThirdwebBranding})]})}function Sz(e){const[t,n]=w.useState({id:"1:buy-ui"}),i=w.useCallback((f,m)=>{var y,p;console.error(f),(m==null?void 0:m.type)==="buy"||(m==null?void 0:m.type)==="onramp"?(y=e.onError)==null||y.call(e,f,m):(p=e.onError)==null||p.call(e,f,void 0),n({id:"error",preparedQuote:m,error:f})},[e.onError]),r=w.useCallback(f=>{var m,y;(f==null?void 0:f.type)==="buy"||(f==null?void 0:f.type)==="onramp"?(m=e.onCancel)==null||m.call(e,f):(y=e.onCancel)==null||y.call(e,void 0)},[e.onCancel]),[s,o]=w.useState({type:"token",value:e.amount??""}),[a,l]=w.useState(()=>{var f;if((f=e.chain)!=null&&f.id)return{chainId:e.chain.id,tokenAddress:e.tokenAddress||Yt}}),u=e.amountEditable===void 0?!0:e.amountEditable,d=e.tokenEditable===void 0?!0:e.tokenEditable;return t.id==="1:buy-ui"?c.jsx(Lz,{theme:e.theme,onDisconnect:e.onDisconnect,client:e.client,connectOptions:e.connectOptions,onContinue:(f,m,y)=>{xn({client:e.client,event:"payment_selection",toChainId:m.chainId,toToken:m.address}),n({id:"2:methodSelection",destinationAmount:f,destinationToken:m,receiverAddress:y})},presetOptions:e.presetOptions,receiverAddress:e.receiverAddress,showThirdwebBranding:e.showThirdwebBranding,metadata:{title:e.title,description:e.description,image:e.image},buttonLabel:e.buttonLabel,currency:e.currency,selectedToken:a,setSelectedToken:l,amountSelection:s,setAmountSelection:o,amountEditable:u,tokenEditable:d}):t.id==="2:methodSelection"?c.jsx(hO,{client:e.client,connectLocale:Om,connectOptions:e.connectOptions,paymentMethods:e.paymentMethods,currency:e.currency,supportedTokens:e.supportedTokens,country:e.country,destinationToken:t.destinationToken,destinationAmount:t.destinationAmount,receiverAddress:t.receiverAddress,feePayer:void 0,onBack:()=>{n({id:"1:buy-ui"})},onError:f=>{i(f,void 0)},onPaymentMethodSelected:f=>{xn({chainId:f.type==="wallet"?f.originToken.chainId:void 0,client:e.client,event:"ub:ui:loading_quote:fund_wallet",fromToken:f.type==="wallet"?f.originToken.address:void 0,toChainId:t.destinationToken.chainId,toToken:t.destinationToken.address}),n({...t,id:"3:load-quote",paymentMethod:f})}}):t.id==="3:load-quote"?c.jsx(SP,{paymentLinkId:e.paymentLinkId,purchaseData:e.purchaseData,client:e.client,sender:void 0,mode:"fund_wallet",feePayer:void 0,amount:t.destinationAmount,destinationToken:t.destinationToken,onBack:()=>{n({...t,id:"2:methodSelection"})},onError:f=>{i(f,void 0)},onQuoteReceived:(f,m)=>{var y,p,g;xn({chainId:f.type==="transfer"||f.type==="onramp"?f.intent.chainId:f.intent.originChainId,client:e.client,event:"payment_details",fromToken:f.type==="transfer"||f.type==="onramp"?f.intent.tokenAddress:f.intent.originTokenAddress,toChainId:f.type==="transfer"||f.type==="onramp"?f.intent.chainId:f.intent.destinationChainId,toToken:f.type==="transfer"||f.type==="onramp"?f.intent.tokenAddress:f.intent.destinationTokenAddress,walletAddress:(p=(y=t.paymentMethod.payerWallet)==null?void 0:y.getAccount())==null?void 0:p.address,walletType:(g=t.paymentMethod.payerWallet)==null?void 0:g.id}),n({...t,id:"4:preview",preparedQuote:f,request:m})},paymentMethod:t.paymentMethod,receiver:t.receiverAddress}):t.id==="4:preview"?c.jsx(iO,{client:e.client,currency:e.currency,metadata:{title:e.title,description:e.description},confirmButtonLabel:void 0,onBack:()=>{n({...t,id:"2:methodSelection"})},onConfirm:()=>{n({...t,id:"5:execute"})},onError:f=>{i(f,t.preparedQuote)},paymentMethod:t.paymentMethod,preparedQuote:t.preparedQuote,modeInfo:{mode:"fund_wallet"}}):t.id==="5:execute"?c.jsx(kP,{client:e.client,title:void 0,preparedQuote:t.preparedQuote,autoStart:!0,onBack:()=>{n({...t,id:"4:preview"})},onCancel:()=>{r(t.preparedQuote)},onComplete:f=>{var m;(t.preparedQuote.type==="buy"||t.preparedQuote.type==="onramp")&&((m=e.onSuccess)==null||m.call(e,{quote:t.preparedQuote,statuses:f})),n({id:"6:success",preparedQuote:t.preparedQuote,completedStatuses:f})},request:t.request,wallet:t.paymentMethod.payerWallet,windowAdapter:pg}):t.id==="6:success"?c.jsx(vP,{type:"payment-success",client:e.client,hasPaymentId:!!e.paymentLinkId,completedStatuses:t.completedStatuses,onDone:()=>{n({id:"1:buy-ui"})},preparedQuote:t.preparedQuote,showContinueWithTx:!1,windowAdapter:pg}):t.id==="error"?c.jsx(OD,{client:e.client,error:t.error,onCancel:()=>{n({id:"1:buy-ui"}),r(t.preparedQuote)},onRetry:()=>{n({id:"1:buy-ui"})}}):null}function Az(e){return c.jsx(X1,{theme:e.theme||"dark",children:c.jsx(ND,{className:e.className,modalSize:"compact",style:e.style,children:c.jsx(Ex,{children:e.children})})})}const Rm=ke({backgroundColor:"#00d395",borderRadius:"50%",bottom:0,boxShadow:"0 0 0 2px var(--bg)",height:"28%",position:"absolute",right:0,width:"28%"}),Dz=e=>{const t=X();return c.jsx("div",{style:{alignItems:"center",border:`1px solid ${t.colors.borderColor}`,borderRadius:"100%",display:"flex",flexShrink:0,justifyItems:"center",overflow:"hidden",padding:e.padding??"6px",position:"relative",...e.style},children:e.children})};function tu({formatFn:e,...t}){const{address:n}=Nc(),i=e?e(n):n;return c.jsx("span",{...t,children:i})}function _o({chain:e,tokenAddress:t,loadingComponent:n,fallbackComponent:i,queryOptions:r,formatFn:s,showBalanceInFiat:o,...a}){const{address:l,client:u}=Nc(),d=_t(),f=e||d,m=xe({queryFn:async()=>ez({address:me(l),chain:f,client:u,showBalanceInFiat:o,tokenAddress:t?me(t):void 0}),queryKey:["internal_account_balance",(f==null?void 0:f.id)||-1,l,{tokenAddress:t},o],retry:!1,...r});return m.isLoading?n||null:m.data?s?c.jsx("span",{...a,children:s(m.data)}):o?c.jsx("span",{...a,children:Dm({...m.data,decimals:0})}):c.jsx("span",{...a,children:eu({...m.data,decimals:m.data.balance<1?3:2})}):i||null}const gb=w.createContext(void 0);function pb(e){return c.jsx(gb.Provider,{value:e,children:e.children})}function wb(){const e=w.useContext(gb);if(!e)throw new Error("ChainProviderContext not found. Make sure you are using ChainName, ChainIcon, etc. inside a <ChainProvider /> component");return e}function xb({iconResolver:e,loadingComponent:t,fallbackComponent:n,queryOptions:i,client:r,...s}){const{chain:o}=wb(),a=xe({queryFn:async()=>Oz({chain:o,client:r,iconResolver:e}),queryKey:Pz({chainId:o.id,iconResolver:e}),...i});return a.isLoading?t||null:a.data?c.jsx("img",{src:a.data,...s,alt:s.alt}):n||null}async function Oz(e){var s;const{chain:t,client:n,iconResolver:i}=e;if(typeof i=="string")return i;if(typeof i=="function")return i();if((s=t.icon)!=null&&s.url)return Fi({client:n,uri:t.icon.url});const r=await xt(t).then(o=>{var a;return(a=o.icon)==null?void 0:a.url}).catch(()=>{});if(!r)throw new Error("Failed to resolve icon for chain");return Fi({client:n,uri:r})}function Pz(e){const{chainId:t,iconResolver:n}=e;return["_internal_chain_icon_",t,{resolver:typeof n=="string"?n:typeof n=="function"?y3(n):void 0}]}function e0({nameResolver:e,formatFn:t,loadingComponent:n,fallbackComponent:i,queryOptions:r,...s}){const{chain:o}=wb(),a=xe({queryFn:async()=>kz({chain:o,nameResolver:e}),queryKey:zz({chainId:o.id,nameResolver:e}),...r});if(a.isLoading)return n||null;if(!a.data)return i||null;const l=t?t(a.data):a.data;return c.jsx("span",{...s,children:l})}async function kz(e){const{nameResolver:t,chain:n}=e;return typeof t=="string"?t:typeof t=="function"?t():n.name?n.name:xt(n).then(i=>i.name)}function zz(e){return typeof e.nameResolver=="function"?["_internal_chain_name_",e.chainId,{resolver:y3(e.nameResolver)}]:["_internal_chain_name_",e.chainId]}const Rz=({size:e})=>c.jsxs("svg",{fill:"none",height:e,role:"presentation",viewBox:"0 0 16 16",width:e,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M14.001 8.00048C14.001 9.18726 13.649 10.3474 12.9897 11.3342C12.3304 12.3209 11.3932 13.09 10.2968 13.5442C9.20032 13.9984 7.99382 14.1172 6.82984 13.8857C5.66587 13.6541 4.59668 13.0826 3.7575 12.2435C2.91832 11.4043 2.34683 10.3351 2.1153 9.17111C1.88377 8.00713 2.0026 6.80064 2.45676 5.70419C2.91092 4.60775 3.68002 3.6706 4.66679 3.01126C5.65357 2.35192 6.8137 2 8.00048 2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"}),c.jsx("path",{d:"M14.0005 2L8 8.00048",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"}),c.jsx("path",{d:"M10.3984 2H13.9987V5.60029",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"})]}),Rn=Xi(e=>{const t=X();return{all:"unset","&:hover":{backgroundColor:t.colors.tertiaryBg,svg:{color:t.colors.accentText}},"&[data-variant='danger']:hover svg":{color:`${t.colors.danger}!important`},"&[data-variant='primary']:hover svg":{color:`${t.colors.primaryText}!important`},"&[disabled]":{cursor:"not-allowed"},alignItems:"center",backgroundColor:"transparent",borderRadius:Z.md,boxSizing:"border-box",color:t.colors.secondaryText,cursor:"pointer",display:"flex",fontSize:ie.md,fontWeight:500,gap:z.sm,lineHeight:1.3,padding:`${z.sm} ${z.sm}`,svg:{color:t.colors.secondaryText,transition:"color 200ms ease"},transition:"background-color 200ms ease, transform 200ms ease",WebkitTapHighlightColor:"transparent",width:"100%"}}),Uz=Rn.withComponent("a");function Zi(e){return Array.isArray?Array.isArray(e):Mb(e)==="[object Array]"}function $z(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Bz(e){return e==null?"":$z(e)}function wi(e){return typeof e=="string"}function _b(e){return typeof e=="number"}function Vz(e){return e===!0||e===!1||Wz(e)&&Mb(e)=="[object Boolean]"}function bb(e){return typeof e=="object"}function Wz(e){return bb(e)&&e!==null}function yn(e){return e!=null}function wh(e){return!e.trim().length}function Mb(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Fz="Incorrect 'index' type",Yz=e=>`Invalid value for key ${e}`,Qz=e=>`Pattern length exceeds max of ${e}.`,Hz=e=>`Missing ${e} property in key`,Gz=e=>`Property 'weight' in key '${e}' must be a positive integer`,op=Object.prototype.hasOwnProperty;class Zz{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(i=>{let r=Ib(i);this._keys.push(r),this._keyMap[r.id]=r,n+=r.weight}),this._keys.forEach(i=>{i.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ib(e){let t=null,n=null,i=null,r=1,s=null;if(wi(e)||Zi(e))i=e,t=ap(e),n=t0(e);else{if(!op.call(e,"name"))throw new Error(Hz("name"));const o=e.name;if(i=o,op.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(Gz(o));t=ap(o),n=t0(o),s=e.getFn}return{path:t,id:n,weight:r,src:i,getFn:s}}function ap(e){return Zi(e)?e:e.split(".")}function t0(e){return Zi(e)?e.join("."):e}function qz(e,t){let n=[],i=!1;const r=(s,o,a)=>{if(yn(s))if(!o[a])n.push(s);else{let l=o[a];const u=s[l];if(!yn(u))return;if(a===o.length-1&&(wi(u)||_b(u)||Vz(u)))n.push(Bz(u));else if(Zi(u)){i=!0;for(let d=0,f=u.length;d<f;d+=1)r(u[d],o,a+1)}else o.length&&r(u,o,a+1)}};return r(e,wi(t)?t.split("."):t,0),i?n:n[0]}const Kz={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Jz={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Xz={location:0,threshold:.6,distance:100},eR={useExtendedSearch:!1,getFn:qz,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var pe={...Jz,...Kz,...Xz,...eR};const tR=/[^ ]+/g;function nR(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(r){const s=r.match(tR).length;if(n.has(s))return n.get(s);const o=1/Math.pow(s,.5*e),a=parseFloat(Math.round(o*i)/i);return n.set(s,a),a},clear(){n.clear()}}}class Um{constructor({getFn:t=pe.getFn,fieldNormWeight:n=pe.fieldNormWeight}={}){this.norm=nR(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,i)=>{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,wi(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();wi(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,i=this.size();n<i;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!yn(t)||wh(t))return;let i={v:t,i:n,n:this.norm.get(t)};this.records.push(i)}_addObject(t,n){let i={i:n,$:{}};this.keys.forEach((r,s)=>{let o=r.getFn?r.getFn(t):this.getFn(t,r.path);if(yn(o)){if(Zi(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:u,value:d}=l.pop();if(yn(d))if(wi(d)&&!wh(d)){let f={v:d,i:u,n:this.norm.get(d)};a.push(f)}else Zi(d)&&d.forEach((f,m)=>{l.push({nestedArrIndex:m,value:f})})}i.$[s]=a}else if(wi(o)&&!wh(o)){let a={v:o,n:this.norm.get(o)};i.$[s]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Eb(e,t,{getFn:n=pe.getFn,fieldNormWeight:i=pe.fieldNormWeight}={}){const r=new Um({getFn:n,fieldNormWeight:i});return r.setKeys(e.map(Ib)),r.setSources(t),r.create(),r}function iR(e,{getFn:t=pe.getFn,fieldNormWeight:n=pe.fieldNormWeight}={}){const{keys:i,records:r}=e,s=new Um({getFn:t,fieldNormWeight:n});return s.setKeys(i),s.setIndexRecords(r),s}function hl(e,{errors:t=0,currentLocation:n=0,expectedLocation:i=0,distance:r=pe.distance,ignoreLocation:s=pe.ignoreLocation}={}){const o=t/e.length;if(s)return o;const a=Math.abs(i-n);return r?o+a/r:a?1:o}function rR(e=[],t=pe.minMatchCharLength){let n=[],i=-1,r=-1,s=0;for(let o=e.length;s<o;s+=1){let a=e[s];a&&i===-1?i=s:!a&&i!==-1&&(r=s-1,r-i+1>=t&&n.push([i,r]),i=-1)}return e[s-1]&&s-i>=t&&n.push([i,s-1]),n}const ds=32;function sR(e,t,n,{location:i=pe.location,distance:r=pe.distance,threshold:s=pe.threshold,findAllMatches:o=pe.findAllMatches,minMatchCharLength:a=pe.minMatchCharLength,includeMatches:l=pe.includeMatches,ignoreLocation:u=pe.ignoreLocation}={}){if(t.length>ds)throw new Error(Qz(ds));const d=t.length,f=e.length,m=Math.max(0,Math.min(i,f));let y=s,p=m;const g=a>1||l,x=g?Array(f):[];let _;for(;(_=e.indexOf(t,p))>-1;){let j=hl(t,{currentLocation:_,expectedLocation:m,distance:r,ignoreLocation:u});if(y=Math.min(j,y),p=_+d,g){let O=0;for(;O<d;)x[_+O]=1,O+=1}}p=-1;let b=[],I=1,E=d+f;const C=1<<d-1;for(let j=0;j<d;j+=1){let O=0,L=E;for(;O<L;)hl(t,{errors:j,currentLocation:m+L,expectedLocation:m,distance:r,ignoreLocation:u})<=y?O=L:E=L,L=Math.floor((E-O)/2+O);E=L;let N=Math.max(1,m-L+1),v=o?f:Math.min(m+L,f)+d,D=Array(v+2);D[v+1]=(1<<j)-1;for(let U=v;U>=N;U-=1){let R=U-1,B=n[e.charAt(R)];if(g&&(x[R]=+!!B),D[U]=(D[U+1]<<1|1)&B,j&&(D[U]|=(b[U+1]|b[U])<<1|1|b[U+1]),D[U]&C&&(I=hl(t,{errors:j,currentLocation:R,expectedLocation:m,distance:r,ignoreLocation:u}),I<=y)){if(y=I,p=R,p<=m)break;N=Math.max(1,2*m-p)}}if(hl(t,{errors:j+1,currentLocation:m,expectedLocation:m,distance:r,ignoreLocation:u})>y)break;b=D}const T={isMatch:p>=0,score:Math.max(.001,I)};if(g){const j=rR(x,a);j.length?l&&(T.indices=j):T.isMatch=!1}return T}function oR(e){let t={};for(let n=0,i=e.length;n<i;n+=1){const r=e.charAt(n);t[r]=(t[r]||0)|1<<i-n-1}return t}const nu=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class Cb{constructor(t,{location:n=pe.location,threshold:i=pe.threshold,distance:r=pe.distance,includeMatches:s=pe.includeMatches,findAllMatches:o=pe.findAllMatches,minMatchCharLength:a=pe.minMatchCharLength,isCaseSensitive:l=pe.isCaseSensitive,ignoreDiacritics:u=pe.ignoreDiacritics,ignoreLocation:d=pe.ignoreLocation}={}){if(this.options={location:n,threshold:i,distance:r,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreDiacritics:u,ignoreLocation:d},t=l?t:t.toLowerCase(),t=u?nu(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const f=(y,p)=>{this.chunks.push({pattern:y,alphabet:oR(y),startIndex:p})},m=this.pattern.length;if(m>ds){let y=0;const p=m%ds,g=m-p;for(;y<g;)f(this.pattern.substr(y,ds),y),y+=ds;if(p){const x=m-ds;f(this.pattern.substr(x),x)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:i,includeMatches:r}=this.options;if(t=n?t:t.toLowerCase(),t=i?nu(t):t,this.pattern===t){let g={isMatch:!0,score:0};return r&&(g.indices=[[0,t.length-1]]),g}const{location:s,distance:o,threshold:a,findAllMatches:l,minMatchCharLength:u,ignoreLocation:d}=this.options;let f=[],m=0,y=!1;this.chunks.forEach(({pattern:g,alphabet:x,startIndex:_})=>{const{isMatch:b,score:I,indices:E}=sR(t,g,x,{location:s+_,distance:o,threshold:a,findAllMatches:l,minMatchCharLength:u,includeMatches:r,ignoreLocation:d});b&&(y=!0),m+=I,b&&E&&(f=[...f,...E])});let p={isMatch:y,score:y?m/this.chunks.length:1};return y&&r&&(p.indices=f),p}}class ss{constructor(t){this.pattern=t}static isMultiMatch(t){return cp(t,this.multiRegex)}static isSingleMatch(t){return cp(t,this.singleRegex)}search(){}}function cp(e,t){const n=e.match(t);return n?n[1]:null}class aR extends ss{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class cR extends ss{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const i=t.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class lR extends ss{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class uR extends ss{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class dR extends ss{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class hR extends ss{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Lb extends ss{constructor(t,{location:n=pe.location,threshold:i=pe.threshold,distance:r=pe.distance,includeMatches:s=pe.includeMatches,findAllMatches:o=pe.findAllMatches,minMatchCharLength:a=pe.minMatchCharLength,isCaseSensitive:l=pe.isCaseSensitive,ignoreDiacritics:u=pe.ignoreDiacritics,ignoreLocation:d=pe.ignoreLocation}={}){super(t),this._bitapSearch=new Cb(t,{location:n,threshold:i,distance:r,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreDiacritics:u,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Tb extends ss{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,i;const r=[],s=this.pattern.length;for(;(i=t.indexOf(this.pattern,n))>-1;)n=i+s,r.push([i,n-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const n0=[aR,Tb,lR,uR,hR,dR,cR,Lb],lp=n0.length,fR=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,mR="|";function yR(e,t={}){return e.split(mR).map(n=>{let i=n.trim().split(fR).filter(s=>s&&!!s.trim()),r=[];for(let s=0,o=i.length;s<o;s+=1){const a=i[s];let l=!1,u=-1;for(;!l&&++u<lp;){const d=n0[u];let f=d.isMultiMatch(a);f&&(r.push(new d(f,t)),l=!0)}if(!l)for(u=-1;++u<lp;){const d=n0[u];let f=d.isSingleMatch(a);if(f){r.push(new d(f,t));break}}}return r})}const gR=new Set([Lb.type,Tb.type]);class pR{constructor(t,{isCaseSensitive:n=pe.isCaseSensitive,ignoreDiacritics:i=pe.ignoreDiacritics,includeMatches:r=pe.includeMatches,minMatchCharLength:s=pe.minMatchCharLength,ignoreLocation:o=pe.ignoreLocation,findAllMatches:a=pe.findAllMatches,location:l=pe.location,threshold:u=pe.threshold,distance:d=pe.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:i,includeMatches:r,minMatchCharLength:s,findAllMatches:a,ignoreLocation:o,location:l,threshold:u,distance:d},t=n?t:t.toLowerCase(),t=i?nu(t):t,this.pattern=t,this.query=yR(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:r,ignoreDiacritics:s}=this.options;t=r?t:t.toLowerCase(),t=s?nu(t):t;let o=0,a=[],l=0;for(let u=0,d=n.length;u<d;u+=1){const f=n[u];a.length=0,o=0;for(let m=0,y=f.length;m<y;m+=1){const p=f[m],{isMatch:g,indices:x,score:_}=p.search(t);if(g){if(o+=1,l+=_,i){const b=p.constructor.type;gR.has(b)?a=[...a,...x]:a.push(x)}}else{l=0,o=0,a.length=0;break}}if(o){let m={isMatch:!0,score:l/o};return i&&(m.indices=a),m}}return{isMatch:!1,score:1}}}const i0=[];function wR(...e){i0.push(...e)}function r0(e,t){for(let n=0,i=i0.length;n<i;n+=1){let r=i0[n];if(r.condition(e,t))return new r(e,t)}return new Cb(e,t)}const iu={AND:"$and",OR:"$or"},s0={PATH:"$path",PATTERN:"$val"},o0=e=>!!(e[iu.AND]||e[iu.OR]),xR=e=>!!e[s0.PATH],_R=e=>!Zi(e)&&bb(e)&&!o0(e),up=e=>({[iu.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function jb(e,t,{auto:n=!0}={}){const i=r=>{let s=Object.keys(r);const o=xR(r);if(!o&&s.length>1&&!o0(r))return i(up(r));if(_R(r)){const l=o?r[s0.PATH]:s[0],u=o?r[s0.PATTERN]:r[l];if(!wi(u))throw new Error(Yz(l));const d={keyId:t0(l),pattern:u};return n&&(d.searcher=r0(u,t)),d}let a={children:[],operator:s[0]};return s.forEach(l=>{const u=r[l];Zi(u)&&u.forEach(d=>{a.children.push(i(d))})}),a};return o0(e)||(e=up(e)),i(e)}function bR(e,{ignoreFieldNorm:t=pe.ignoreFieldNorm}){e.forEach(n=>{let i=1;n.matches.forEach(({key:r,norm:s,score:o})=>{const a=r?r.weight:null;i*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(t?1:s))}),n.score=i})}function MR(e,t){const n=e.matches;t.matches=[],yn(n)&&n.forEach(i=>{if(!yn(i.indices)||!i.indices.length)return;const{indices:r,value:s}=i;let o={indices:r,value:s};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),t.matches.push(o)})}function IR(e,t){t.score=e.score}function ER(e,t,{includeMatches:n=pe.includeMatches,includeScore:i=pe.includeScore}={}){const r=[];return n&&r.push(MR),i&&r.push(IR),e.map(s=>{const{idx:o}=s,a={item:t[o],refIndex:o};return r.length&&r.forEach(l=>{l(s,a)}),a})}class Ks{constructor(t,n={},i){this.options={...pe,...n},this.options.useExtendedSearch,this._keyStore=new Zz(this.options.keys),this.setCollection(t,i)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Um))throw new Error(Fz);this._myIndex=n||Eb(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){yn(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let i=0,r=this._docs.length;i<r;i+=1){const s=this._docs[i];t(s,i)&&(this.removeAt(i),i-=1,r-=1,n.push(s))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:i,includeScore:r,shouldSort:s,sortFn:o,ignoreFieldNorm:a}=this.options;let l=wi(t)?wi(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return bR(l,{ignoreFieldNorm:a}),s&&l.sort(o),_b(n)&&n>-1&&(l=l.slice(0,n)),ER(l,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t){const n=r0(t,this.options),{records:i}=this._myIndex,r=[];return i.forEach(({v:s,i:o,n:a})=>{if(!yn(s))return;const{isMatch:l,score:u,indices:d}=n.searchIn(s);l&&r.push({item:s,idx:o,matches:[{score:u,value:s,norm:a,indices:d}]})}),r}_searchLogical(t){const n=jb(t,this.options),i=(a,l,u)=>{if(!a.children){const{keyId:f,searcher:m}=a,y=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(l,f),searcher:m});return y&&y.length?[{idx:u,item:l,matches:y}]:[]}const d=[];for(let f=0,m=a.children.length;f<m;f+=1){const y=a.children[f],p=i(y,l,u);if(p.length)d.push(...p);else if(a.operator===iu.AND)return[]}return d},r=this._myIndex.records,s={},o=[];return r.forEach(({$:a,i:l})=>{if(yn(a)){let u=i(n,a,l);u.length&&(s[l]||(s[l]={idx:l,item:a,matches:[]},o.push(s[l])),u.forEach(({matches:d})=>{s[l].matches.push(...d)}))}}),o}_searchObjectList(t){const n=r0(t,this.options),{keys:i,records:r}=this._myIndex,s=[];return r.forEach(({$:o,i:a})=>{if(!yn(o))return;let l=[];i.forEach((u,d)=>{l.push(...this._findMatches({key:u,value:o[d],searcher:n}))}),l.length&&s.push({idx:a,item:o,matches:l})}),s}_findMatches({key:t,value:n,searcher:i}){if(!yn(n))return[];let r=[];if(Zi(n))n.forEach(({v:s,i:o,n:a})=>{if(!yn(s))return;const{isMatch:l,score:u,indices:d}=i.searchIn(s);l&&r.push({score:u,key:t,value:s,idx:o,norm:a,indices:d})});else{const{v:s,n:o}=n,{isMatch:a,score:l,indices:u}=i.searchIn(s);a&&r.push({score:l,key:t,value:s,norm:o,indices:u})}return r}}Ks.version="7.1.0";Ks.createIndex=Eb;Ks.parseIndex=iR;Ks.config=pe;Ks.parseQuery=jb;wR(pR);function vb(e,t){const[n,i]=w.useState(e),r=w.useCallback(s=>{if(!s)return;new IntersectionObserver(a=>{var l;(l=a[0])!=null&&l.isIntersecting&&i(u=>u+t)},{threshold:1}).observe(s)},[t]);return{itemsToShow:n,lastItemRef:r}}function Nb(e){var j,O,L,N;const t=e.connectLocale.networkSelector,[n,i]=w.useState(""),[r,s]=w.useState("all"),o=ad(n,300),{onSwitch:a,onCustomClick:l}=e.networkSelector||{},u=t.categoryLabel.others,d=t.categoryLabel.popular,f=t.categoryLabel.recentlyUsed,{chainSections:m,allChains:y,allChainsToSectionMap:p}=w.useMemo(()=>{var B,F,W,V;const v=[],D=[],k=new Map;function U(Y,Q){k.set(Y.id,Q),D.push(Y)}if((B=e.networkSelector)!=null&&B.sections)for(const Y of e.networkSelector.sections){const Q=Y.chains.filter(G=>!k.has(G.id));if(Q.length>0){v.push({chains:Q,label:Y.label});for(const G of Q)U(G,Y.label)}}else{const Y=new Map(e.chains.map(Q=>[Q.id,Q]));if((F=e.networkSelector)!=null&&F.recentChainIds&&((W=e.networkSelector)==null?void 0:W.recentChainIds.length)>0){const Q=e.networkSelector.recentChainIds.map(G=>Y.get(G)).filter(G=>G!==void 0);v.push({chains:Q,label:f});for(const G of Q)U(G,f)}if((V=e.networkSelector)!=null&&V.popularChainIds&&e.networkSelector.popularChainIds.length>0){const G=e.networkSelector.popularChainIds.map(ne=>Y.get(ne)).filter(ne=>ne!==void 0).filter(ne=>!k.has(ne.id));if(G.length>0){v.push({chains:G,label:d});for(const ne of G)U(ne,d)}}}const R=e.chains.filter(Y=>!k.has(Y.id));if(R.length>0){v.push({chains:R,label:u});for(const Y of R)U(Y,u)}return{allChains:D,allChainsToSectionMap:k,chainSections:v}},[(j=e.networkSelector)==null?void 0:j.sections,(O=e.networkSelector)==null?void 0:O.recentChainIds,(L=e.networkSelector)==null?void 0:L.popularChainIds,e.chains,f,d,u]),g=y.every(v=>!!v.name),x=w3(g?[]:y,10),_=g?!1:x.some(v=>v.isLoading),b=g?y:_?[]:x.filter(v=>!!v.data).map(v=>Cc(v.data)),I=w.useMemo(()=>new Ks(b,{keys:[{name:"name",weight:1},{name:"chainId",weight:1}],threshold:.4}),[b]),E=w.useMemo(()=>{if(o==="")return;const v=[],D=I.search(o).map(k=>k.item);for(const k of D){const U=p.get(k.id);if(!U)return;const R=v.find(B=>B.label===U);R?R.chains.push(k):v.push({chains:[k],label:U})}return v},[o,I,p])||m,C=w.useMemo(()=>r==="all"?E:E.map(v=>({chains:v.chains.filter(D=>r==="mainnet"&&!D.testnet||r==="testnet"&&D.testnet),label:v.label})),[E,r]),T=w.useCallback(v=>{a&&a(v),e.closeModal()},[a,e]);return c.jsxs(M,{className:e.className,children:[c.jsx(M,{p:"lg",children:e.onBack?c.jsx(be,{onBack:e.onBack,title:t.title}):c.jsx(Ju,{children:t.title})}),e.showTabs!==!1&&c.jsxs(c.Fragment,{children:[c.jsx(M,{px:"lg",children:c.jsxs(M,{flex:"row",gap:"xxs",children:[c.jsx(xh,{"data-active":r==="all",onClick:()=>s("all"),children:t.allNetworks}),c.jsx(xh,{"data-active":r==="mainnet",onClick:()=>s("mainnet"),children:t.mainnets}),c.jsx(xh,{"data-active":r==="testnet",onClick:()=>s("testnet"),children:t.testnets})]})}),c.jsx($,{y:"lg"})]}),e.showTabs===!1&&c.jsx($,{y:"xxs"}),c.jsx(M,{px:"lg",children:c.jsxs("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:[c.jsx(NR,{height:A.md,width:A.md}),c.jsx(Kr,{disabled:_,onChange:v=>{i(v.target.value)},placeholder:_?"Loading chains...":t.inputPlaceholder,style:{padding:`${z.sm} ${z.md} ${z.sm} ${z.xxl}`},tabIndex:-1,value:n,variant:"outline"}),(o!==n||_)&&c.jsx("div",{style:{position:"absolute",right:z.md},children:c.jsx($e,{color:"accentText",size:"md"})})]})}),c.jsx($,{y:"lg"}),c.jsx(M,{px:"md",children:c.jsx(CR,{chainSections:C,client:e.client,close:e.closeModal,connectLocale:e.connectLocale,onSwitch:T,renderChain:(N=e.networkSelector)==null?void 0:N.renderChain})}),l&&c.jsxs(c.Fragment,{children:[c.jsx(We,{}),c.jsx(M,{p:"lg",children:c.jsx(ae,{fullWidth:!0,onClick:()=>{l(),e.closeModal()},style:{boxShadow:"none",display:"flex",fontSize:ie.sm},variant:"link",children:t.addCustomNetwork})})]})]})}const CR=e=>{const{chainSections:t}=e,n=t.every(i=>i.chains.length===0);return c.jsx(M,{animate:"fadein",scrollY:!0,style:{height:"330px",paddingBottom:z.lg},children:n?c.jsxs(M,{center:"both",color:"secondaryText",flex:"column",gap:"md",children:[c.jsx($,{y:"xl"}),c.jsx(is,{height:A.xl,width:A.xl}),c.jsx(P,{children:" No Results "})]}):t.map((i,r)=>i.chains.length===0?null:c.jsxs(w.Fragment,{children:[r!==0&&c.jsx($,{y:"lg"}),c.jsx(TR,{children:i.label}),c.jsx($,{y:"xs"}),c.jsx(LR,{chains:i.chains,client:e.client,close:e.close,connectLocale:e.connectLocale,onSwitch:e.onSwitch,renderChain:e.renderChain})]},i.label))})},LR=w.memo(function(t){const{itemsToShow:n,lastItemRef:i}=vb(10,10),r=I3(),s=_t(),[o,a]=w.useState(-1),[l,u]=w.useState(-1),d=t.close;w.useEffect(()=>{o!==-1&&(s==null?void 0:s.id)===o&&d&&d()},[o,d,s==null?void 0:s.id]);const f=async p=>{u(-1),a(p.id);try{await r(p),t.onSwitch(p)}catch(g){u(p.id),console.error(g)}finally{a(-1)}},m=t.renderChain,y=t.chains.slice(0,n);return c.jsx(jR,{children:y.map((p,g)=>{if(!p)return null;const x=o===p.id,_=l===p.id,b=g===y.length-1;return c.jsx("li",{ref:b?i:void 0,children:m?c.jsx(m,{chain:p,close:t.close,switchChain:()=>{f(p)},switchFailed:l===p.id,switching:o===p.id}):c.jsx(Sb,{chain:p,client:t.client,confirming:x,connectLocale:t.connectLocale,onClick:()=>f(p),switchingFailed:_})},p.id)})})}),Sb=w.memo(function(t){const n=t.connectLocale,{chain:i,confirming:r,switchingFailed:s}=t,o=_t();return c.jsx(pb,{chain:i,children:c.jsxs(vR,{"data-active":(o==null?void 0:o.id)===i.id,onClick:t.onClick,children:[c.jsxs(M,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[c.jsx(xb,{client:t.client,fallbackComponent:c.jsx("img",{alt:"",src:Jr,style:{height:`${A.lg}px`,width:`${A.lg}px`}}),loading:"lazy",loadingComponent:c.jsx(ge,{height:`${A.lg}px`,width:`${A.lg}px`}),style:{height:`${A.lg}px`,width:`${A.lg}px`}}),(o==null?void 0:o.id)===i.id&&c.jsx(Rm,{className:"tw-chain-active-dot-button-network-selector"})]}),r||s?c.jsxs(M,{flex:"column",gap:"3xs",style:{alignItems:"flex-start",width:"100%"},children:[c.jsx(e0,{loadingComponent:c.jsx(ge,{height:"20px",width:"150px"})}),c.jsxs(M,{animate:"fadein",center:"y",flex:"row",gap:"xxs",children:[r&&c.jsxs(c.Fragment,{children:[c.jsx(P,{color:"accentText",size:"xs",children:n.switchingNetwork}),c.jsx($e,{color:"accentText",size:"xs"})]}),s&&c.jsx(M,{animate:"fadein",children:c.jsx(P,{color:"danger",size:"xs",children:n.networkSelector.failedToSwitch})})]})]}):c.jsx(e0,{className:"tw-chain-icon-none-confirming",loadingComponent:c.jsx(ge,{height:"20px",width:"150px"})})]})})}),xh=Be.button(e=>{const t=X();return{all:"unset","&[data-active='true']":{background:t.colors.secondaryButtonBg,color:t.colors.primaryText},borderRadius:Z.lg,color:t.colors.secondaryText,cursor:"pointer",fontSize:ie.sm,fontWeight:500,padding:`${z.sm} ${z.sm}`,transition:"background 0.2s ease, color 0.2s ease",WebkitTapHighlightColor:"transparent"}}),TR=aN(()=>({color:X().colors.secondaryText,display:"block",fontSize:ie.sm,margin:0,padding:`0 ${z.xs}`})),jR=O3({boxSizing:"border-box",display:"flex",flexDirection:"column",gap:z.xs,listStyle:"none",margin:0,padding:0}),vR=Xi(e=>{const t=X();return{"&:hover":{background:t.colors.secondaryButtonBg},all:"unset",alignItems:"center",borderRadius:Z.md,boxSizing:"border-box",color:t.colors.primaryText,cursor:"pointer",display:"flex",fontSize:ie.md,fontWeight:500,gap:z.md,padding:`${z.xs} ${z.sm}`,transition:"background 0.2s ease",width:"100%",[k1.mobile]:{fontSize:ie.sm}}}),NR=Be(em)(e=>({color:X().colors.secondaryText,left:z.sm,position:"absolute"}));function SR(e){var o;const[t,n]=w.useState("wallets"),i=Hs(),r=M3(),s=!e.showAllWallets&&((o=e.wallets)==null?void 0:o.every(a=>i.includes(a)));return t==="connect"?c.jsx(l_,{...e,isEmbed:!1,onSelect:a=>{r(a),e.onBack()}}):c.jsxs(M,{children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:"Wallets"})}),c.jsx(We,{}),c.jsx($,{y:"md"}),c.jsx(M,{px:"md",style:{minHeight:"150px"},children:c.jsx(M,{flex:"column",gap:"xs",children:i.filter(a=>{var l;return!((l=e.hiddenWallets)!=null&&l.includes(a.id))}).map(a=>c.jsx(AR,{chain:e.activeChain,client:e.client,onClick:()=>{r(a),e.onBack()},wallet:a},a.id))})}),c.jsx($,{y:"xxl"}),c.jsx(M,{p:"lg",children:!s&&c.jsxs(ae,{fullWidth:!0,gap:"xs",onClick:()=>{n("connect")},variant:"accent",children:[c.jsx(Ku,{height:A.sm,width:A.sm}),"Connect Wallet"]})})]})}function AR(e){var a;const t=X(),n=bt(),{disconnect:i}=Gu(),r=e.wallet.id,s=(a=e.wallet.getAccount())==null?void 0:a.address,o=Qu({address:s,chain:e.chain,client:e.client});return c.jsxs("div",{style:{position:"relative"},children:[c.jsx(xm,{onClick:e.onClick,style:{justifyContent:"space-between"},children:c.jsxs(M,{center:"y",flex:"row",gap:"md",children:[c.jsx(si,{client:e.client,id:r,size:A.lg}),c.jsxs(M,{flex:"column",gap:"4xs",children:[c.jsx(P,{color:"primaryText",children:_n(s||"")}),o.data?c.jsx(P,{color:"secondaryText",size:"xs",weight:400,children:rc(o.data)}):c.jsx(ge,{height:ie.sm,width:"100px"})]})]})}),c.jsx("div",{style:{position:"absolute",right:z.xxs,top:"50%",transform:"translateY(-50%)",zIndex:1},children:(n==null?void 0:n.id)===e.wallet.id?c.jsx(Jl,{tip:"Active Wallet",children:c.jsx(Yi,{children:c.jsx(aa,{height:A.md,width:A.md})})}):c.jsx(Jl,{tip:"Disconnect",children:c.jsx(Yi,{onClick:()=>{i(e.wallet)},children:c.jsx(DN,{height:A.md,style:{color:t.colors.secondaryText},width:A.md})})})})]})}function DR(){const e=Hs(),t=Ji();return tc({mutationFn:async({client:n,profileToUnlink:i,allowAccountDeletion:r=!1})=>{var a;const s=e.find(l=>Oe(l)),o=s?{id:s.id,partnerId:(a=s.getConfig())==null?void 0:a.partnerId}:void 0;await Yx({allowAccountDeletion:r,client:n,ecosystem:o,profileToUnlink:i})},onSuccess:()=>{t.invalidateQueries({queryKey:["profiles"]})}})}const OR=e=>c.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M12 15.5H7.5C6.10444 15.5 5.40665 15.5 4.83886 15.6722C3.56045 16.06 2.56004 17.0605 2.17224 18.3389C2 18.9067 2 19.6044 2 21M19 21V15M16 18H22M14.5 7.5C14.5 9.98528 12.4853 12 10 12C7.51472 12 5.5 9.98528 5.5 7.5C5.5 5.01472 7.51472 3 10 3C12.4853 3 14.5 5.01472 14.5 7.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})});function PR(e){switch(!0){case(e.type==="email"&&e.details.email!==void 0):return e.details.email;case(e.type==="google"&&e.details.email!==void 0):return e.details.email;case(e.type==="phone"&&e.details.phone!==void 0):return e.details.phone;case e.details.address!==void 0:return _n(e.details.address,6);case(e.type==="cognito"&&e.details.email!==void 0):return e.details.email;case e.type.toLowerCase()==="custom_auth_endpoint":return"Custom Profile";default:return e.type.slice(0,1).toUpperCase()+e.type.slice(1)}}function kR(e){const{data:t,isLoading:n}=o_({client:e.client});return n?c.jsx(wt,{}):c.jsxs(M,{style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.locale.manageWallet.linkedProfiles})}),c.jsx(We,{}),c.jsxs(M,{scrollY:!0,style:{height:"300px"},children:[c.jsx($,{y:"md"}),c.jsxs(M,{px:"sm",children:[c.jsxs(Rn,{onClick:()=>{e.setScreen("link-profile")},style:{fontSize:ie.sm},children:[c.jsx(OR,{size:A.lg}),c.jsx(P,{color:"primaryText",children:e.locale.manageWallet.linkProfile})]}),c.jsx($,{y:"xs"}),t==null?void 0:t.filter(i=>i.type.toLowerCase()!=="guest"&&i.type.toLowerCase()!=="custom_jwt"&&i.type.toLowerCase()!=="custom_auth_endpoint").map(i=>c.jsx(zR,{client:e.client,enableUnlinking:t.length>1,profile:i},`${JSON.stringify(i)}`))]}),c.jsx($,{y:"md"})]})]})}function zR({profile:e,enableUnlinking:t,client:n}){var o,a,l;const{data:i}=xv({address:e.details.address,client:n}),{mutate:r,isPending:s}=DR();return c.jsxs(Rn,{as:"div",disabled:!0,style:{cursor:"default",fontSize:ie.sm},children:[i!=null&&i.some(u=>u.avatar)?c.jsx(Xe,{client:n,height:A.lg,loading:"eager",src:(o=i==null?void 0:i.find(u=>u.avatar))==null?void 0:o.avatar,style:{borderRadius:"100%"},width:A.lg}):e.details.address!==void 0?c.jsx(M,{style:{borderRadius:"100%",height:"32px",overflow:"hidden",width:"32px"},children:c.jsx(ub,{address:e.details.address,size:32})}):e.type==="passkey"?c.jsx(qs,{size:A.lg}):e.type==="email"?c.jsx(td,{size:A.lg}):e.type==="phone"?c.jsx(nd,{size:A.lg}):c.jsx(Xe,{client:n,height:A.lg,loading:"eager",src:Vx(e.type),width:A.lg}),c.jsxs("div",{style:{alignItems:"center",display:"flex",flexDirection:"row",flexGrow:1,justifyContent:"space-between"},children:[c.jsx(P,{color:"primaryText",children:((a=i==null?void 0:i.find(u=>u.avatar))==null?void 0:a.name)||PR(e)}),c.jsxs("div",{style:{alignItems:"center",display:"flex",flexDirection:"row",gap:"8px"},children:[((l=i==null?void 0:i.find(u=>u.avatar))==null?void 0:l.name)&&e.details.address&&c.jsx(P,{color:"secondaryText",size:"sm",children:_n(e.details.address,4)}),t&&c.jsx(Yi,{"aria-label":"Unlink",autoFocus:!0,disabled:s,onClick:()=>r({client:n,profileToUnlink:e}),style:{pointerEvents:"auto"},type:"button",children:c.jsx(z3,{height:A.md,style:{color:"inherit"},width:A.md})})]})]})]})}const RR=[{id:"io.1inch.wallet",name:"1inch Wallet",hasMobileSupport:!0},{id:"com.binance.wallet",name:"Binance Wallet",hasMobileSupport:!0},{id:"com.ledger",name:"Ledger Live",hasMobileSupport:!0},{id:"com.bitpay",name:"BitPay Wallet",hasMobileSupport:!0},{id:"com.bestwallet",name:"Best Wallet",hasMobileSupport:!0},{id:"io.metamask",name:"MetaMask",hasMobileSupport:!0},{id:"com.trustwallet.app",name:"Trust Wallet",hasMobileSupport:!0},{id:"com.fireblocks",name:"Fireblocks",hasMobileSupport:!0},{id:"com.bitget.web3",name:"Bitget Wallet",hasMobileSupport:!0},{id:"pro.tokenpocket",name:"TokenPocket",hasMobileSupport:!0},{id:"com.safepal",name:"SafePal",hasMobileSupport:!0},{id:"org.uniswap",name:"Uniswap Wallet",hasMobileSupport:!0},{id:"io.zerion.wallet",name:"Zerion",hasMobileSupport:!0},{id:"com.elrond.maiar.wallet",name:"xPortal",hasMobileSupport:!0},{id:"com.crypto.wallet",name:"Crypto.com Onchain",hasMobileSupport:!0},{id:"com.bitcoin",name:"Bitcoin.com Wallet",hasMobileSupport:!0},{id:"com.bifrostwallet",name:"Bifrost Wallet",hasMobileSupport:!0},{id:"jp.co.rakuten-wallet",name:"Rakuten Wallet",hasMobileSupport:!0},{id:"com.bybit",name:"Bybit Wallet",hasMobileSupport:!0},{id:"com.blockchain.login",name:"Blockchain.com",hasMobileSupport:!0},{id:"io.trezor",name:"Trezor Suite",hasMobileSupport:!0},{id:"im.token",name:"imToken",hasMobileSupport:!0},{id:"global.safe",name:"Safe",hasMobileSupport:!0},{id:"xyz.ctrl",name:"Ctrl Wallet",hasMobileSupport:!0},{id:"co.arculus",name:"Arculus Wallet",hasMobileSupport:!0},{id:"com.roninchain.wallet",name:"Ronin Wallet",hasMobileSupport:!0},{id:"com.okex.wallet",name:"OKX Wallet",hasMobileSupport:!0},{id:"com.wemixplay",name:"WEMIX Play",hasMobileSupport:!0},{id:"com.tangem",name:"Tangem Wallet",hasMobileSupport:!0},{id:"com.exodus",name:"Exodus",hasMobileSupport:!0},{id:"com.hashpack.wallet",name:"HashPack",hasMobileSupport:!0},{id:"id.co.pintu",name:"Pintu",hasMobileSupport:!0},{id:"network.blackfort",name:"BlackFort Wallet",hasMobileSupport:!0},{id:"com.wigwam.wallet",name:"Wigwam",hasMobileSupport:!0},{id:"app.backpack",name:"Backpack",hasMobileSupport:!0},{id:"app.subwallet",name:"SubWallet",hasMobileSupport:!0},{id:"cc.avacus",name:"Avacus",hasMobileSupport:!0},{id:"me.rainbow",name:"Rainbow",hasMobileSupport:!0},{id:"so.onekey.app.wallet",name:"OneKey",hasMobileSupport:!0},{id:"me.haha",name:"HaHa",hasMobileSupport:!0},{id:"com.bee",name:"BeeWallet",hasMobileSupport:!0},{id:"ag.jup",name:"Jupiter",hasMobileSupport:!0},{id:"app.keplr",name:"Keplr",hasMobileSupport:!0},{id:"org.hot-labs",name:"HOT Wallet",hasMobileSupport:!0},{id:"com.dcentwallet",name:"D'CENT Wallet",hasMobileSupport:!0},{id:"com.kraken",name:"Kraken Wallet ",hasMobileSupport:!0},{id:"com.kucoin",name:"KuCoin Web3 Wallet",hasMobileSupport:!0},{id:"io.magiceden.wallet",name:"Magic Eden",hasMobileSupport:!0},{id:"com.tomi",name:"tomi Wallet",hasMobileSupport:!0},{id:"io.ibvm",name:"IBVM Wallet",hasMobileSupport:!0},{id:"com.mewwallet",name:"MEW wallet",hasMobileSupport:!0},{id:"com.socios.app",name:"Socios.com - Wallet & Tokens",hasMobileSupport:!0},{id:"xyz.argent",name:"Argent",hasMobileSupport:!0},{id:"org.thorwallet",name:"THORWallet",hasMobileSupport:!0},{id:"io.internetmoney",name:"Internet Money",hasMobileSupport:!0},{id:"org.mathwallet",name:"MathWallet",hasMobileSupport:!0},{id:"io.cypherhq",name:"Cypher Wallet",hasMobileSupport:!0},{id:"io.novawallet",name:"Nova Wallet",hasMobileSupport:!0},{id:"io.yowallet",name:"YoWallet",hasMobileSupport:!0},{id:"com.flowfoundation.wallet",name:"Flow Wallet",hasMobileSupport:!0},{id:"app.kabila",name:"Kabila Wallet",hasMobileSupport:!0},{id:"com.opera",name:"Opera Crypto Browser",hasMobileSupport:!0},{id:"com.valoraapp",name:"Valora",hasMobileSupport:!0},{id:"com.robinhood.wallet",name:"Robinhood Wallet",hasMobileSupport:!0},{id:"com.chain",name:"Chain",hasMobileSupport:!0},{id:"io.huddln",name:"Huddln",hasMobileSupport:!0},{id:"app.core.extension",name:"Core",hasMobileSupport:!0},{id:"world.freedom",name:"Freedom World",hasMobileSupport:!0},{id:"money.unstoppable",name:"Unstoppable Wallet",hasMobileSupport:!0},{id:"pk.modular",name:"Modular Wallet Prod",hasMobileSupport:!0},{id:"app.wombat",name:"Wombat",hasMobileSupport:!0},{id:"com.klipwallet",name:"klip",hasMobileSupport:!0},{id:"com.gemwallet",name:"Gem Wallet",hasMobileSupport:!0},{id:"com.sabay.wallet",name:"Sabay Wallet App",hasMobileSupport:!0},{id:"com.zengo",name:"Zengo Wallet",hasMobileSupport:!0},{id:"xyz.joeywallet",name:"Joey Wallet",hasMobileSupport:!0},{id:"io.tokoin",name:"Tokoin | My-T Wallet",hasMobileSupport:!0},{id:"io.alpha-u.wallet.web",name:"αU wallet",hasMobileSupport:!0},{id:"network.cvl",name:"CVL Wallet",hasMobileSupport:!0},{id:"io.leapwallet",name:"Leap",hasMobileSupport:!0},{id:"io.xenea",name:"XENEA Wallet",hasMobileSupport:!0},{id:"com.oasys-wallet",name:"Oasys Passport",hasMobileSupport:!0},{id:"com.bitso",name:"Bitso Web3 Wallet",hasMobileSupport:!0},{id:"io.enjin",name:"Enjin Wallet",hasMobileSupport:!0},{id:"com.coldwallet",name:"Cold Wallet",hasMobileSupport:!0},{id:"org.creditcoin.app",name:"Credit Wallet",hasMobileSupport:!0},{id:"app.everspace",name:"Everspace",hasMobileSupport:!0},{id:"app.zeal",name:"Zeal",hasMobileSupport:!0},{id:"app.whitewallet",name:"Whitewallet",hasMobileSupport:!0},{id:"ai.purewallet",name:"PureWallet app",hasMobileSupport:!0},{id:"com.fastex.wallet",name:"Yo Wallet",hasMobileSupport:!0},{id:"io.kriptomat",name:"Kriptomat",hasMobileSupport:!0},{id:"com.ullapay",name:"WOW EARN",hasMobileSupport:!0},{id:"io.atomicwallet",name:"Atomic Wallet",hasMobileSupport:!0},{id:"com.pionewallet",name:"PioneWallet",hasMobileSupport:!0},{id:"io.oxalus",name:"Oxalus Wallet",hasMobileSupport:!0},{id:"xyz.uniultra.wallet",name:"U2U Wallet",hasMobileSupport:!0},{id:"xyz.frontier.wallet",name:"Frontier",hasMobileSupport:!0},{id:"com.coolbitx.cwsapp",name:"CoolWallet",hasMobileSupport:!0},{id:"org.gooddollar",name:"GoodDollar",hasMobileSupport:!0},{id:"com.cakewallet",name:"Cake Wallet",hasMobileSupport:!0},{id:"com.ellipal",name:"ELLIPAL",hasMobileSupport:!0},{id:"app.krystal",name:"Krystal",hasMobileSupport:!0},{id:"com.monarchwallet",name:"Monarch Wallet",hasMobileSupport:!0},{id:"com.burritowallet",name:"Burrito",hasMobileSupport:!0},{id:"co.family.wallet",name:"Family",hasMobileSupport:!0},{id:"com.mtpelerin",name:"Bridge Wallet",hasMobileSupport:!0},{id:"app.keyring",name:"KEYRING PRO",hasMobileSupport:!0},{id:"cc.localtrade.lab",name:"LocalTrade Wallet",hasMobileSupport:!0},{id:"tech.okto",name:"Okto",hasMobileSupport:!0},{id:"com.xcapit",name:"Xcapit",hasMobileSupport:!0},{id:"com.gayawallet",name:"Gaya Wallet",hasMobileSupport:!0},{id:"app.nightly",name:"Nightly",hasMobileSupport:!0},{id:"com.coin98",name:"Coin98 Super Wallet",hasMobileSupport:!0},{id:"xyz.coca",name:"COCA Wallet",hasMobileSupport:!0},{id:"app.linen",name:"Linen",hasMobileSupport:!0},{id:"dev.auroracloud",name:"Aurora Pass",hasMobileSupport:!0},{id:"com.coinomi",name:"Coinomi",hasMobileSupport:!0},{id:"my.mone",name:"mOne superapp",hasMobileSupport:!0},{id:"org.alephium",name:"Alephium Wallet",hasMobileSupport:!0},{id:"com.alicebob",name:"Alicebob Wallet",hasMobileSupport:!0},{id:"io.koalawallet",name:"Koala Wallet",hasMobileSupport:!0},{id:"com.veworld",name:"VeWorld Mobile",hasMobileSupport:!0},{id:"com.withpaper",name:"Paper",hasMobileSupport:!0},{id:"io.noone",name:"Noone Wallet",hasMobileSupport:!0},{id:"network.haqq",name:"HAQQ Wallet",hasMobileSupport:!0},{id:"io.ricewallet",name:"RiceWallet",hasMobileSupport:!0},{id:"me.iopay",name:"ioPay",hasMobileSupport:!0},{id:"app.walletnow",name:"NOW Wallet",hasMobileSupport:!0},{id:"io.okse",name:"Okse Wallet",hasMobileSupport:!0},{id:"network.over",name:"OverFlex",hasMobileSupport:!0},{id:"com.aktionariat",name:"Aktionariat",hasMobileSupport:!0},{id:"com.paybolt",name:"PayBolt",hasMobileSupport:!0},{id:"com.plasma-wallet",name:"Plasma Wallet",hasMobileSupport:!0},{id:"org.bytebank",name:"ByteBank",hasMobileSupport:!0},{id:"io.ethermail",name:"EtherMail",hasMobileSupport:!0},{id:"com.optowallet",name:"Opto Wallet",hasMobileSupport:!0},{id:"finance.openwallet",name:"Open Wallet",hasMobileSupport:!0},{id:"xyz.sequence",name:"Sequence Wallet",hasMobileSupport:!0},{id:"com.foxwallet",name:"FoxWallet",hasMobileSupport:!0},{id:"app.hbwallet",name:"HB WALLET",hasMobileSupport:!0},{id:"it.airgap",name:"AirGap Wallet",hasMobileSupport:!0},{id:"com.holdstation",name:"Holdstation Wallet",hasMobileSupport:!0},{id:"io.universaleverything",name:"UniversalProfiles",hasMobileSupport:!0},{id:"com.abra",name:"Abra Wallet",hasMobileSupport:!0},{id:"org.thepulsewallet",name:"The Pulse Wallet",hasMobileSupport:!0},{id:"com.premanft",name:"PREMA Wallet",hasMobileSupport:!0},{id:"xyz.timelesswallet",name:"Timeless Wallet",hasMobileSupport:!0},{id:"org.bitizen",name:"Bitizen",hasMobileSupport:!0},{id:"app.ultimate",name:"Ultimate",hasMobileSupport:!0},{id:"io.compasswallet",name:"Compass Wallet",hasMobileSupport:!0},{id:"app.fizzwallet",name:"Fizz",hasMobileSupport:!0},{id:"com.xovawallet",name:"Xova",hasMobileSupport:!0},{id:"app.nicegram",name:"Nicegram Wallet",hasMobileSupport:!0},{id:"io.zelcore",name:"Zelcore",hasMobileSupport:!0},{id:"app.freighter",name:"Freighter",hasMobileSupport:!0},{id:"app.stickey",name:"Stickey Wallet",hasMobileSupport:!0},{id:"app.coinstats",name:"CoinStats",hasMobileSupport:!0},{id:"io.harti",name:"HARTi Wallet",hasMobileSupport:!0},{id:"io.dttd",name:"DTTD",hasMobileSupport:!0},{id:"com.tellaw",name:"Tellaw Wallet",hasMobileSupport:!0},{id:"io.klever",name:"Klever Wallet",hasMobileSupport:!0},{id:"com.unstoppabledomains",name:"Unstoppable Domains",hasMobileSupport:!0},{id:"is.callback",name:"Callback",hasMobileSupport:!0},{id:"ai.pundi",name:"Pundi Wallet",hasMobileSupport:!0},{id:"io.summonersarena",name:"SA ASSISTANT",hasMobileSupport:!0},{id:"io.fizen",name:"Fizen Wallet",hasMobileSupport:!0},{id:"fi.pillar",name:"Pillar",hasMobileSupport:!0},{id:"world.ixo",name:"Impact Wallet",hasMobileSupport:!0},{id:"org.thetatoken",name:"Theta Wallet",hasMobileSupport:!0},{id:"net.gateweb3",name:"GateWallet",hasMobileSupport:!0},{id:"app.ammer",name:"Ammer Wallet",hasMobileSupport:!0},{id:"us.binance",name:"Binance.US",hasMobileSupport:!0},{id:"io.yusetoken",name:"Yuse Wallet",hasMobileSupport:!0},{id:"co.muza",name:"MUZA",hasMobileSupport:!0},{id:"io.hyperpay",name:"HyperPay",hasMobileSupport:!0},{id:"io.cosmostation",name:"Cosmostation",hasMobileSupport:!0},{id:"app.ryipay",name:"RYIPAY",hasMobileSupport:!0},{id:"io.wallet3",name:"Wallet 3",hasMobileSupport:!0},{id:"org.dota168",name:"MetaWallet",hasMobileSupport:!0},{id:"com.bitpie",name:"Bitpie",hasMobileSupport:!0},{id:"com.coininn",name:"Coininn Wallet",hasMobileSupport:!0},{id:"me.easy",name:"EASY",hasMobileSupport:!0},{id:"io.shido",name:"Shido App",hasMobileSupport:!0},{id:"com.neonwallet",name:"Neon Wallet",hasMobileSupport:!0},{id:"com.secuxtech",name:"SecuX",hasMobileSupport:!0},{id:"com.unitywallet",name:"Unity Wallet",hasMobileSupport:!0},{id:"io.miraiapp",name:"Mirai App",hasMobileSupport:!0},{id:"com.beexo",name:"Beexo",hasMobileSupport:!0},{id:"social.halo",name:"Halo Wallet",hasMobileSupport:!0},{id:"com.gemspocket",name:"Gems Pocket",hasMobileSupport:!0},{id:"app.status",name:"Status",hasMobileSupport:!0},{id:"com.midoin",name:"midoin",hasMobileSupport:!0},{id:"id.competence",name:"Competence.id",hasMobileSupport:!0},{id:"com.safemoon",name:"SafeMoon",hasMobileSupport:!0},{id:"llc.besc",name:"BeanBag",hasMobileSupport:!0},{id:"baby.smart",name:"Smart.Baby",hasMobileSupport:!0},{id:"app.onto",name:"ONTO",hasMobileSupport:!0},{id:"com.ivirse",name:"IApp",hasMobileSupport:!0},{id:"one.mixin.messenger",name:"Mixin Messenger",hasMobileSupport:!0},{id:"cash.abpay",name:"AB Pay",hasMobileSupport:!0},{id:"ch.dssecurity",name:"DS Security SA",hasMobileSupport:!0},{id:"com.concordium.wallet",name:"Concordium",hasMobileSupport:!0},{id:"io.zkape",name:"Ape Wallet",hasMobileSupport:!0},{id:"com.paliwallet",name:"Pali Wallet",hasMobileSupport:!0},{id:"io.pitaka",name:"Pitaka",hasMobileSupport:!0},{id:"com.saitamatoken",name:"SaitaPro",hasMobileSupport:!0},{id:"org.mugambo",name:"rss wallet",hasMobileSupport:!0},{id:"fi.stablez",name:"Stablez",hasMobileSupport:!0},{id:"io.legacynetwork",name:"Legacy Wallet",hasMobileSupport:!0},{id:"com.meld.app",name:"MELDapp",hasMobileSupport:!0},{id:"io.bladewallet",name:"Blade Wallet",hasMobileSupport:!0},{id:"com.authentrend",name:"AT.Wallet",hasMobileSupport:!0},{id:"com.webauth",name:"WebAuth",hasMobileSupport:!0},{id:"xyz.tucop",name:"TuCOP Wallet",hasMobileSupport:!0},{id:"pro.fintoken",name:"FINTOKEN",hasMobileSupport:!0},{id:"io.nash",name:"Nash",hasMobileSupport:!0},{id:"vc.uincubator.api",name:"UIIC",hasMobileSupport:!0},{id:"io.unagi.unawallet",name:"una Wallet",hasMobileSupport:!0},{id:"io.nonbank",name:"NonBank",hasMobileSupport:!0},{id:"io.armana.portal",name:"Armana Portal",hasMobileSupport:!0},{id:"com.x9wallet",name:"X9Wallet",hasMobileSupport:!0},{id:"io.kigo",name:"Kigo",hasMobileSupport:!0},{id:"com.alphawallet",name:"AlphaWallet",hasMobileSupport:!0},{id:"com.getcogni",name:"Cogni ",hasMobileSupport:!0},{id:"app.sinum",name:"Sinum",hasMobileSupport:!0},{id:"finance.soulswap.app",name:"SoulSwap",hasMobileSupport:!0},{id:"io.loopring.wallet",name:"Loopring",hasMobileSupport:!0},{id:"com.shapeshift",name:"ShapeShift",hasMobileSupport:!0},{id:"io.trinity-tech",name:"Essentials",hasMobileSupport:!0},{id:"money.keychain",name:"Keychain",hasMobileSupport:!0},{id:"com.superhero.cordova",name:"Superhero Wallet",hasMobileSupport:!0},{id:"com.bettatrade",name:"Bettatrade",hasMobileSupport:!0},{id:"online.puzzle",name:"Puzzle Wallet",hasMobileSupport:!0},{id:"gg.indi",name:"IndiGG",hasMobileSupport:!0},{id:"io.tradestrike",name:"StrikeX Wallet",hasMobileSupport:!0},{id:"xyz.echooo",name:"Echooo Wallet",hasMobileSupport:!0},{id:"com.kryptogo",name:"KryptoGO Wallet",hasMobileSupport:!0},{id:"io.trustasset",name:"Trust Asset Wallet",hasMobileSupport:!0},{id:"app.utorg",name:"UTORG",hasMobileSupport:!0},{id:"app.dfinnwallet",name:"Dfinn Wallet",hasMobileSupport:!0},{id:"org.rezor",name:"Rezor",hasMobileSupport:!0},{id:"io.legionnetwork",name:"LegionNetwork",hasMobileSupport:!0},{id:"cc.maxwallet",name:"MaxWallet",hasMobileSupport:!0},{id:"com.ripio",name:"Ripio Portal",hasMobileSupport:!0},{id:"com.fxwallet",name:"FxWallet",hasMobileSupport:!0},{id:"inc.tomo",name:"Tomo Wallet",hasMobileSupport:!0},{id:"me.komet.app",name:"Komet",hasMobileSupport:!0},{id:"io.guardiianwallet",name:"GUARDIIAN Wallet",hasMobileSupport:!0},{id:"io.hacken.hai",name:"hAI by Hacken",hasMobileSupport:!0},{id:"com.zypto",name:"Zypto",hasMobileSupport:!0},{id:"io.nabox",name:"Nabox",hasMobileSupport:!0},{id:"com.tastycrypto",name:"tastycrypto",hasMobileSupport:!0},{id:"com.ballet",name:"Ballet Crypto",hasMobileSupport:!0},{id:"io.talken",name:"Talken Wallet",hasMobileSupport:!0},{id:"io.wallacy",name:"Wallacy",hasMobileSupport:!0},{id:"network.mrhb",name:"Sahal Wallet",hasMobileSupport:!0},{id:"io.pockie",name:"pockie",hasMobileSupport:!0},{id:"me.astrox",name:"Me Wallet",hasMobileSupport:!0},{id:"com.thirdweb",name:"thirdweb",hasMobileSupport:!0},{id:"com.poolsmobility.wallet",name:"poolswallet",hasMobileSupport:!0},{id:"xyz.roam.wallet",name:"Roam",hasMobileSupport:!0},{id:"app.gamic",name:"Gamic",hasMobileSupport:!0},{id:"app.m1nty",name:"M1NTY",hasMobileSupport:!0},{id:"network.trustkeys",name:"TrustKeys Web3 SocialFi",hasMobileSupport:!0},{id:"com.caesiumlab",name:"Caesium",hasMobileSupport:!0},{id:"app.catecoin",name:"Catecoin Wallet",hasMobileSupport:!0},{id:"com.hootark",name:"HootArk",hasMobileSupport:!0},{id:"com.crossmint",name:"Crossmint",hasMobileSupport:!0},{id:"com.coincircle",name:"CoinCircle",hasMobileSupport:!0},{id:"io.bharatbox",name:"BharatBox App",hasMobileSupport:!0},{id:"nl.greenhood.wallet",name:"Greenhood",hasMobileSupport:!0},{id:"co.swopme",name:"SWOP",hasMobileSupport:!0},{id:"com.kresus",name:"Kresus SuperApp",hasMobileSupport:!0},{id:"com.dolletwallet",name:"Dollet",hasMobileSupport:!0},{id:"net.shinobi-wallet",name:"Shinobi-Wallet",hasMobileSupport:!0},{id:"com.azcoiner",name:"AZCoiner",hasMobileSupport:!0},{id:"com.passwallet.app",name:"Pass App",hasMobileSupport:!0},{id:"app.qubic.wallet",name:"Qubic Wallet",hasMobileSupport:!0},{id:"com.coinex.wallet",name:"CoinEx Wallet",hasMobileSupport:!0},{id:"app.xverse",name:"Xverse Wallet",hasMobileSupport:!0},{id:"com.flash-wallet",name:"Flash Wallet",hasMobileSupport:!0},{id:"com.vgxfoundation",name:"VGX Wallet",hasMobileSupport:!0},{id:"org.arianee",name:"Arianee Wallet",hasMobileSupport:!0},{id:"io.myabcwallet",name:"ABC Wallet",hasMobileSupport:!0},{id:"io.owallet",name:"OWallet",hasMobileSupport:!0},{id:"io.zelus",name:"Zelus Wallet",hasMobileSupport:!0},{id:"net.myrenegade",name:"Renegade",hasMobileSupport:!0},{id:"io.clingon",name:"Cling Wallet",hasMobileSupport:!0},{id:"com.icewal",name:"icewal",hasMobileSupport:!0},{id:"io.streakk",name:"Streakk Wallet",hasMobileSupport:!0},{id:"com.dokwallet",name:"Dokwallet",hasMobileSupport:!0},{id:"finance.porta",name:"PortaWallet",hasMobileSupport:!0},{id:"io.prettygood.x",name:"PrettyGood Keyboard",hasMobileSupport:!0},{id:"io.earthwallet",name:"Earth Wallet",hasMobileSupport:!0},{id:"net.spatium.wallet",name:"Spatium",hasMobileSupport:!0},{id:"live.superex",name:"SuperWallet",hasMobileSupport:!0},{id:"com.adftechnology",name:"ADF Wallet",hasMobileSupport:!0},{id:"com.bscecowallet",name:"BSC Wallet",hasMobileSupport:!0},{id:"io.wallypto",name:"Wallypto",hasMobileSupport:!0},{id:"com.reown",name:"React Native Sample Wallet",hasMobileSupport:!0},{id:"finance.voltage",name:"Volt Wallet",hasMobileSupport:!0},{id:"com.walletconnect",name:"Swift Sample Wallet",hasMobileSupport:!0},{id:"io.passpay",name:"PassPay Wallet",hasMobileSupport:!0},{id:"technology.obvious",name:"Obvious",hasMobileSupport:!0},{id:"io.plutope",name:"Plutope",hasMobileSupport:!0},{id:"io.buzz-up",name:"BUZZUP",hasMobileSupport:!0},{id:"co.xellar",name:"Xellar",hasMobileSupport:!0},{id:"com.kaxaa",name:"KAXAA Wallet",hasMobileSupport:!0},{id:"org.shefi",name:"SheFi",hasMobileSupport:!0},{id:"xyz.orion",name:"Orion",hasMobileSupport:!0},{id:"world.dosi.vault",name:"DOSI Vault",hasMobileSupport:!0},{id:"network.gridlock",name:"Gridlock Wallet",hasMobileSupport:!0},{id:"finance.plena",name:"Plena-App",hasMobileSupport:!0},{id:"cc.dropp",name:"Dropp",hasMobileSupport:!0},{id:"io.scramberry",name:"ScramberryWallet",hasMobileSupport:!0},{id:"xyz.bonuz",name:"Bonuz Social Smart Wallet",hasMobileSupport:!0},{id:"com.bmawallet",name:"BMA Wallet",hasMobileSupport:!0},{id:"co.lifedefi",name:"Life DeFi",hasMobileSupport:!0},{id:"com.get-verso",name:"Verso",hasMobileSupport:!0},{id:"io.blocto",name:"Blocto",hasMobileSupport:!0},{id:"com.pandoshi",name:"Pandoshi Wallet",hasMobileSupport:!0},{id:"io.getclave",name:"Clave",hasMobileSupport:!0},{id:"technology.jambo",name:"Jambo",hasMobileSupport:!0},{id:"app.edge",name:"Edge",hasMobileSupport:!0},{id:"io.banksocial",name:"BankSocial ",hasMobileSupport:!0},{id:"io.konio",name:"Konio",hasMobileSupport:!0},{id:"com.qubetics",name:"QubeticsWallet",hasMobileSupport:!0},{id:"app.imem",name:"iMe Messenger & Crypto Wallet ",hasMobileSupport:!0},{id:"com.purechain",name:"PureWallet",hasMobileSupport:!0},{id:"io.ethos",name:"Ethos Self-Custody Vault",hasMobileSupport:!0},{id:"io.didwallet",name:"DIDWallet",hasMobileSupport:!0},{id:"com.dextrade",name:"DexTrade",hasMobileSupport:!0},{id:"org.kelp",name:"Kelp",hasMobileSupport:!0},{id:"xyz.nestwallet",name:"Nest Wallet",hasMobileSupport:!0},{id:"com.cryptnox",name:"Cryptnox Wallet",hasMobileSupport:!0},{id:"land.liker",name:"LikerLand App",hasMobileSupport:!0},{id:"io.hippowallet",name:"Hippo Wallet",hasMobileSupport:!0},{id:"io.certhis",name:"Certhis",hasMobileSupport:!0},{id:"io.safecryptowallet",name:"SafeWallet",hasMobileSupport:!0},{id:"com.saify",name:"Saify",hasMobileSupport:!0},{id:"com.tiduswallet",name:"Tidus Wallet ",hasMobileSupport:!0},{id:"io.uptn.dapp-web",name:"UPTN",hasMobileSupport:!0},{id:"com.it.onewallet",name:"onewallet",hasMobileSupport:!0},{id:"com.rktechworks",name:"ID Pocket",hasMobileSupport:!0},{id:"com.revelator.wallet",name:"Revelator Wallet",hasMobileSupport:!0},{id:"com.sinohope",name:"Sinohope",hasMobileSupport:!0},{id:"network.dgg",name:"DGG Wallet",hasMobileSupport:!0},{id:"io.up",name:"UP.io",hasMobileSupport:!0},{id:"com.lif3",name:"Lif3 Wallet",hasMobileSupport:!0},{id:"io.bimwallet",name:"BIM Wallet",hasMobileSupport:!0},{id:"pub.dg",name:"DGPub App",hasMobileSupport:!0},{id:"com.wemix",name:"WemixWallet",hasMobileSupport:!0},{id:"com.pierwallet",name:"pier",hasMobileSupport:!0},{id:"net.stasis",name:"Stasis Wallet",hasMobileSupport:!0},{id:"com.peakdefi",name:"PEAKDEFI",hasMobileSupport:!0},{id:"com.3swallet",name:"3S Wallet",hasMobileSupport:!0},{id:"com.example.subdomain",name:"Key3",hasMobileSupport:!0},{id:"com.reown.appkit-lab",name:"Flutter Sample Wallet",hasMobileSupport:!0},{id:"com.opz",name:"OPZ Wallet",hasMobileSupport:!0},{id:"ai.spotonchain.platform",name:"Spot On Chain App",hasMobileSupport:!0},{id:"org.dailychain.wallet",name:"Daily Wallet",hasMobileSupport:!0},{id:"app.omni",name:"Omni",hasMobileSupport:!0},{id:"id.plumaa",name:"Plumaa ID",hasMobileSupport:!0},{id:"io.ttmwallet",name:"MDAO Wallet",hasMobileSupport:!0},{id:"io.kgen",name:"KGeN Wallet",hasMobileSupport:!0},{id:"com.nufinetes",name:"Nufinetes",hasMobileSupport:!0},{id:"com.squirrelwallet",name:"Squirrel Wallet",hasMobileSupport:!0},{id:"eu.trusteeglobal",name:"Trustee Wallet",hasMobileSupport:!0},{id:"com.daffione",name:"DaffiOne",hasMobileSupport:!0},{id:"com.saakuru.app",name:"Saakuru All-in-One crypto App",hasMobileSupport:!0},{id:"io.r0ar",name:"R0AR Mobile Wallet",hasMobileSupport:!0},{id:"com.nodle",name:"Nodle",hasMobileSupport:!0},{id:"app.tofee",name:"Tofee Wallet Official",hasMobileSupport:!0},{id:"io.pltwallet",name:"PLTwallet",hasMobileSupport:!0},{id:"org.talkapp",name:"T+ Wallet ",hasMobileSupport:!0},{id:"io.ready",name:"Ready",hasMobileSupport:!0},{id:"app.w3wallet",name:"W3 Wallet",hasMobileSupport:!0},{id:"pro.ds.app",name:"Digital Shield",hasMobileSupport:!0},{id:"com.reown.docs",name:"Kotlin Sample Wallet",hasMobileSupport:!0},{id:"com.apollox",name:"ApolloX",hasMobileSupport:!0},{id:"com.ipmb",name:"IPMB Wallet",hasMobileSupport:!0},{id:"com.payperless",name:"Payperless",hasMobileSupport:!0},{id:"com.obliowallet",name:"Oblio Wallet",hasMobileSupport:!0},{id:"app.keeper-wallet",name:"Keeper",hasMobileSupport:!0},{id:"io.paraswap",name:"ParaSwap Wallet",hasMobileSupport:!0},{id:"org.ecoinwallet",name:"ECOIN Wallet",hasMobileSupport:!0},{id:"fi.dropmate",name:"Dropmate",hasMobileSupport:!0},{id:"com.cryptokara",name:"Cryptokara",hasMobileSupport:!0},{id:"co.cyber.wallet",name:"CyberWallet",hasMobileSupport:!0},{id:"com.kriptonio",name:"Kriptonio",hasMobileSupport:!0},{id:"digital.minerva",name:"Minerva Wallet",hasMobileSupport:!0},{id:"com.mpcvault.broswerplugin",name:"MPCVault | Team crypto wallet",hasMobileSupport:!0},{id:"com.liberawallet",name:"Libera",hasMobileSupport:!0},{id:"io.helixid",name:"helix id",hasMobileSupport:!0},{id:"com.broearn",name:"Broearn Wallet",hasMobileSupport:!0},{id:"io.altme",name:"Altme",hasMobileSupport:!0},{id:"app.herewallet",name:"HERE Wallet",hasMobileSupport:!0},{id:"com.coinsdo",name:"CoinWallet",hasMobileSupport:!0},{id:"trade.flooz.wallet",name:"Flooz",hasMobileSupport:!0},{id:"com.tapwallet",name:"TAP WALLET",hasMobileSupport:!0},{id:"fun.tobi",name:"Tobi",hasMobileSupport:!0},{id:"com.bitnovo",name:"Bitnovo Wallet",hasMobileSupport:!0},{id:"io.xucre",name:"Xucre",hasMobileSupport:!0},{id:"app.girin",name:"Girin Wallet",hasMobileSupport:!0},{id:"finance.panaroma",name:"Panaroma Wallet",hasMobileSupport:!0},{id:"app.clot",name:"Clot",hasMobileSupport:!0},{id:"io.transi",name:"Transi",hasMobileSupport:!0},{id:"world.qoin",name:"Qoin Wallet",hasMobileSupport:!0},{id:"com.greengloryglobal",name:"Blockaura",hasMobileSupport:!0},{id:"com.amazewallet",name:"AmazeWallet",hasMobileSupport:!0},{id:"zone.bitverse",name:"Bitverse",hasMobileSupport:!0},{id:"social.gm2",name:"GM² Social",hasMobileSupport:!0},{id:"io.ozonewallet",name:"OzoneWallet",hasMobileSupport:!0},{id:"io.ukiss",name:"UKISS Hub",hasMobileSupport:!0},{id:"finance.islamicoin",name:"ISLAMIwallet",hasMobileSupport:!0},{id:"io.copiosa",name:"Copiosa",hasMobileSupport:!0},{id:"world.fncy",name:"Fncy Mobile Wallet",hasMobileSupport:!0},{id:"io.moonstake",name:"MOONSTAKE",hasMobileSupport:!0},{id:"com.trusteeglobal",name:"Trustee Wallet",hasMobileSupport:!0},{id:"net.spatium",name:"Spatium",hasMobileSupport:!0},{id:"co.filwallet",name:"FILWallet",hasMobileSupport:!0},{id:"money.snowball",name:"Snowball",hasMobileSupport:!0},{id:"com.ennowallet",name:"Enno Wallet",hasMobileSupport:!0},{id:"io.safematrix",name:"Safematrix",hasMobileSupport:!0},{id:"pro.assure",name:"Assure",hasMobileSupport:!0},{id:"com.neftipedia",name:"NeftiWallet",hasMobileSupport:!0},{id:"io.goldbit",name:"GoldBit",hasMobileSupport:!0},{id:"com.coingrig",name:"Coingrig",hasMobileSupport:!0},{id:"io.xfun",name:"XFUN Wallet",hasMobileSupport:!0},{id:"com.antiersolutions",name:"Ancrypto Wallet",hasMobileSupport:!0},{id:"com.itoken",name:"iToken Wallet",hasMobileSupport:!0},{id:"com.cardstack",name:"Card Wallet",hasMobileSupport:!0},{id:"io.slavi",name:"Slavi Wallet",hasMobileSupport:!0},{id:"tech.defiantapp",name:"Defiant",hasMobileSupport:!0},{id:"com.dexari",name:"Dexari",hasMobileSupport:!0},{id:"io.cfcx",name:"CFCX",hasMobileSupport:!0},{id:"com.socjsc",name:"SOC Wallet",hasMobileSupport:!0},{id:"com.tokenb",name:"TokenB",hasMobileSupport:!0},{id:"org.onyx",name:"Onyx Wallet",hasMobileSupport:!0},{id:"io.gk8",name:"GK8",hasMobileSupport:!0},{id:"com.anchorage",name:"Anchorage Digital ",hasMobileSupport:!0},{id:"com.hashport.wallet",name:"HashPort Wallet",hasMobileSupport:!0},{id:"io.billionwallet",name:"Billion Wallet",hasMobileSupport:!0},{id:"com.dlicom",name:"DLICOM",hasMobileSupport:!0},{id:"com.tychiwallet",name:"Tychi Wallet",hasMobileSupport:!0},{id:"at.swe",name:"Sweat Wallet",hasMobileSupport:!0},{id:"network.wali",name:"Wali Wallet",hasMobileSupport:!0},{id:"io.diamante",name:"DIAM Wallet",hasMobileSupport:!0},{id:"ai.interlinklabs",name:"ITLX Wallet",hasMobileSupport:!0},{id:"com.walllet",name:"walllet.com",hasMobileSupport:!0},{id:"org.lunascape",name:"Lunascape Browser",hasMobileSupport:!0},{id:"com.nvxowallet",name:"NVXO Wallet",hasMobileSupport:!0},{id:"today.paywithcrypto.wallet",name:"PWC Super App",hasMobileSupport:!0},{id:"ai.iluminary",name:"iLuminaryAi Wallet",hasMobileSupport:!0},{id:"io.reactwallet",name:"React Wallet",hasMobileSupport:!0},{id:"com.rewardywallet",name:"Rewardy Wallet",hasMobileSupport:!0},{id:"io.walletv",name:"Wallet V",hasMobileSupport:!0},{id:"app.outlawgames",name:"Outlaw Wallet",hasMobileSupport:!0},{id:"io.ironwallet",name:"IronWallet",hasMobileSupport:!0},{id:"com.mecowallet",name:"MeCo Wallet",hasMobileSupport:!0},{id:"com.onlybulls",name:"OnlyBulls Wallet",hasMobileSupport:!0},{id:"me.qiewallet",name:"QIE Wallet",hasMobileSupport:!0},{id:"fund.lflabs",name:"LF Wallet App",hasMobileSupport:!0},{id:"io.walletverse",name:"Walletverse",hasMobileSupport:!0},{id:"com.berasig",name:"BeraSig",hasMobileSupport:!0},{id:"app.phantom",name:"Phantom",hasMobileSupport:!1},{id:"com.coinbase.wallet",name:"Base (formerly Coinbase Wallet)",hasMobileSupport:!1},{id:"io.rabby",name:"Rabby",hasMobileSupport:!1},{id:"com.brave.wallet",name:"Brave Wallet",hasMobileSupport:!1},{id:"fi.nu",name:"NUFI",hasMobileSupport:!1},{id:"pro.hinkal.walletconnect",name:"Hinkal Wallet",hasMobileSupport:!1},{id:"com.moongate.one",name:"MG",hasMobileSupport:!1},{id:"tech.levain",name:"Levain",hasMobileSupport:!1},{id:"com.enkrypt",name:"Enkrypt",hasMobileSupport:!1},{id:"com.scramble",name:"Scramble",hasMobileSupport:!1},{id:"io.finoa",name:"FinoaConnect",hasMobileSupport:!1},{id:"com.blazpay.wallet",name:"Blazpay",hasMobileSupport:!1},{id:"io.getjoin.prd",name:"JOIN MOBILE APP",hasMobileSupport:!1},{id:"xyz.talisman",name:"Talisman Wallet",hasMobileSupport:!1},{id:"eu.flashsoft.clear-wallet",name:"clear-wallet",hasMobileSupport:!1},{id:"app.berasig",name:"BeraSig",hasMobileSupport:!1},{id:"com.wallet.reown",name:"Leather",hasMobileSupport:!1},{id:"io.runonflux.sspwallet",name:"SSP",hasMobileSupport:!1},{id:"com.blanqlabs.wallet",name:"Blanq",hasMobileSupport:!1},{id:"io.hero.wallet",name:"Hero Wallet",hasMobileSupport:!1},{id:"network.verified.custody",name:"Verified Wallet",hasMobileSupport:!1},{id:"console.utila.io",name:"Utila",hasMobileSupport:!1},{id:"com.micet.wallet",name:"Micet",hasMobileSupport:!1},{id:"world.dolphinode.chain",name:"NodeVault",hasMobileSupport:!1},{id:"com.lootrush",name:"LootRush",hasMobileSupport:!1},{id:"xyz.dawnwallet",name:"Dawn Wallet",hasMobileSupport:!1},{id:"xyz.abs",name:"Abstract Global Wallet",hasMobileSupport:!1},{id:"sh.frame",name:"Frame Wallet",hasMobileSupport:!1},{id:"io.useglyph",name:"Glyph Wallet",hasMobileSupport:!1},{id:"org.base.account",name:"Base Account",hasMobileSupport:!1},{id:"smart",name:"Smart Wallet",hasMobileSupport:!0},{id:"inApp",name:"In-App Wallet",hasMobileSupport:!0},{id:"embedded",name:"In-App Wallet",hasMobileSupport:!0},{id:"walletConnect",name:"WalletConnect",hasMobileSupport:!1}];function Ab(e){const{itemsToShow:t,lastItemRef:n}=vb(10,10),i=Zs(),r=w.useMemo(()=>RR.filter(m=>!XN.includes(m.id)).filter(m=>{var y;return!((y=e.walletIdsToHide)!=null&&y.includes(m.id))}),[e.walletIdsToHide]),s=w.useMemo(()=>new Ks(r,{keys:[{name:"name",weight:1}],threshold:.4}),[r]),o=w.useRef(null),[a,l]=w.useState(""),u=ad(a,300),d=u?s.search(u).map(m=>m.item):r,f=w.useMemo(()=>hm(d.slice(0,t)),[d,t]);return c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-all-wallets-screen",children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:"Select Wallet"})}),c.jsx($,{y:"xs"}),c.jsx(M,{px:"lg",children:c.jsxs("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:[c.jsx(UR,{height:A.md,width:A.md}),c.jsx(Kr,{onChange:m=>{var y,p;(p=(y=o.current)==null?void 0:y.parentElement)==null||p.scroll({top:0}),l(m.target.value)},placeholder:"Search Wallet",style:{padding:`${z.sm} ${z.sm} ${z.sm} ${z.xxl}`},tabIndex:-1,value:a,variant:"outline"}),u!==a&&c.jsx("div",{style:{position:"absolute",right:z.md},children:c.jsx($e,{color:"accentText",size:"md"})})]})}),f.length>0&&c.jsxs(c.Fragment,{children:[c.jsx($,{y:"md"}),c.jsxs(M,{animate:"fadein",expand:!0,scrollY:!0,children:[c.jsx("div",{ref:o,style:{maxHeight:e.size==="compact"?"400px":void 0,paddingInline:z.md},children:f.map((m,y)=>{const p=y===f.length-1,g=Rt(m.id);return c.jsx("li",{ref:p?n:void 0,style:{listStyle:"none"},children:c.jsx(wm,{className:"tw-select-wallet-button",badge:void 0,client:e.client,connectLocale:e.connectLocale,isActive:!1,recommendedWallets:e.recommendedWallets,selectWallet:()=>{e.onSelect(g),e.disableSelectionDataReset||i({})},wallet:g})},m.id)})}),c.jsx($,{y:"xl"})]})]}),f.length===0&&c.jsxs(M,{animate:"fadein",center:"both",color:"secondaryText",expand:!0,flex:"column",gap:"md",style:{minHeight:"250px"},children:[c.jsx(is,{height:A.xl,width:A.xl}),c.jsx(P,{children:" No Results "})]})]})}const UR=Be(em)(e=>({color:X().colors.secondaryText,left:z.sm,position:"absolute"})),$R=Object.freeze(Object.defineProperty({__proto__:null,default:Ab},Symbol.toStringTag,{value:"Module"}));function $m(e){return c.jsxs(M,{animate:"fadein",children:[c.jsx($,{y:"xxl"}),c.jsx(M,{center:"x",flex:"row",children:c.jsx(tm,{size:A["3xl"]})}),c.jsx($,{y:"lg"}),c.jsx(P,{center:!0,color:"primaryText",size:"md",children:e.title}),c.jsx($,{y:"xl"}),c.jsx($,{y:"xxl"}),c.jsx(ae,{fullWidth:!0,onClick:e.onTryAgain,variant:"accent",children:"Try Again"})]})}function Bm(e){return c.jsxs(M,{animate:"fadein",children:[c.jsx($,{y:"xxl"}),c.jsxs(M,{center:"x",flex:"row",style:{position:"relative"},children:[c.jsx($e,{color:"accentText",size:"4xl"}),c.jsx(M,{color:"accentText",style:{left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"},children:e.icon})]}),c.jsx($,{y:"xl"}),c.jsx(P,{center:!0,color:"primaryText",size:"lg",children:e.title}),c.jsx($,{y:"md"}),c.jsx(P,{center:!0,multiline:!0,children:e.subtitle}),c.jsx($,{y:"xxl"}),c.jsx($,{y:"xxl"})]})}function BR(e){var p;const{wallet:t,done:n}=e,i=dv(),r=w.useRef(void 0),[s,o]=w.useState("selecting"),[a,l]=w.useState(),[u,d]=w.useState(!1),f=Oe(t)?{id:t.id,partnerId:(p=t.getConfig())==null?void 0:p.partnerId}:void 0,m=()=>{o("selecting"),r.current=void 0,e.onBack()};async function y(g){o("loading"),l(void 0),r.current=g;try{e.isLinking?await qr({chain:e.chain||t.getChain()||Qe(1),client:e.client,ecosystem:f,strategy:"wallet",wallet:g}):await t.connect({chain:e.chain||g.getChain()||Qe(1),client:e.client,strategy:"wallet",wallet:g}),i(g),n()}catch(x){l(x instanceof Error?x.message:"Unknown error"),o("error")}}return r.current?c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:m,title:e.isLinking?e.inAppLocale.linkWallet:e.inAppLocale.signInWithWallet})}),c.jsx(M,{center:"y",expand:!0,flex:"column",px:e.size==="wide"?"xxl":"lg",children:c.jsx("div",{children:s==="error"?c.jsxs(c.Fragment,{children:[c.jsx($m,{onTryAgain:()=>{if(!r.current)throw new Error("Failed to connect to unknown wallet");y(r.current)},title:a||"Failed to Login"}),c.jsx($,{y:"lg"})]}):c.jsx(Bm,{icon:c.jsx(si,{client:e.client,id:r.current.id??"",size:A.xl}),subtitle:"A pop-up prompt will appear to sign-in and verify your wallet",title:"Sign in with your wallet"})})})]}):u?c.jsx(w.Suspense,{fallback:c.jsx(wt,{}),children:c.jsx(Ab,{client:e.client,connectLocale:e.locale,disableSelectionDataReset:!0,onBack:()=>d(!1),onSelect:async g=>{y(g),d(!1)},recommendedWallets:void 0,size:e.size})}):c.jsx(n_,{chain:t.getChain(),chains:[],client:e.client,connectLocale:e.locale,disableSelectionDataReset:!0,done:()=>{},goBack:m,hideHeader:!1,meta:e.meta||{},modalHeader:{onBack:m,title:e.isLinking?e.inAppLocale.linkWallet:e.inAppLocale.signInWithWallet},onShowAll:()=>{d(!0)},recommendedWallets:void 0,selectWallet:async g=>{y(g)},setModalVisibility:()=>{},showAllWallets:!0,size:e.size,title:e.locale.connectAWallet,walletConnect:e.walletConnect,walletIdsToHide:["inApp"],wallets:Xu()})}function VR(e){var m;const t=e.locale,n=t.socialLoginScreen,[i,r]=w.useState(void 0),{done:s,wallet:o}=e,[a,l]=w.useState("connecting"),u=async()=>{var p,g;const y={client:e.client,ecosystem:Oe(o)?{id:o.id,partnerId:(p=o.getConfig())==null?void 0:p.partnerId}:void 0,strategy:"guest"};try{await o.connect(y),await Gi("guest",Ut),l("connected"),s()}catch(x){l("error"),x instanceof Error&&((g=x==null?void 0:x.message)!=null&&g.includes("PAYMENT_METHOD_REQUIRED"))&&r(t.maxAccountsExceeded),console.error("Error generating guest account",x)}},d=(m=e.state)==null?void 0:m.guestLogin,f=w.useRef(!1);return w.useEffect(()=>{f.current||d&&(f.current=!0,l("connecting"),d.connectionPromise.then(()=>{s(),l("connected")}).catch(y=>{r(y.message),l("error")}))},[s,d]),c.jsx(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-guest-login-screen",children:c.jsxs(M,{expand:!0,flex:"column",p:"lg",style:{paddingBottom:0},children:[e.goBack&&c.jsx(be,{onBack:e.goBack,title:n.title}),e.size==="compact"?c.jsx($,{y:"xl"}):null,c.jsxs(M,{center:"both",expand:!0,flex:"column",style:{minHeight:"250px",textAlign:"center"},children:[a!=="error"&&c.jsxs(M,{animate:"fadein",children:[c.jsx(P,{center:!0,color:"primaryText",multiline:!0,style:{maxWidth:"250px"},children:"Generating your guest account"}),c.jsx($,{y:"xl"}),c.jsx(M,{center:"x",flex:"row",children:c.jsx($e,{color:"accentText",size:"lg"})}),c.jsx($,{y:"xxl"})]}),a==="error"&&c.jsxs(M,{animate:"fadein",children:[i?c.jsx(P,{center:!0,color:"danger",children:i}):c.jsx(P,{color:"danger",children:n.failed}),c.jsx($,{y:"lg"}),c.jsx(ae,{onClick:u,variant:"primary",children:n.retry}),c.jsx($,{y:"xxl"})]})]})]})})}const _h=ke({animation:`${Gs} 0.15s ease-in`});var WR=Object.defineProperty,FR=Object.defineProperties,YR=Object.getOwnPropertyDescriptors,ru=Object.getOwnPropertySymbols,Db=Object.prototype.hasOwnProperty,Ob=Object.prototype.propertyIsEnumerable,dp=(e,t,n)=>t in e?WR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QR=(e,t)=>{for(var n in t||(t={}))Db.call(t,n)&&dp(e,n,t[n]);if(ru)for(var n of ru(t))Ob.call(t,n)&&dp(e,n,t[n]);return e},HR=(e,t)=>FR(e,YR(t)),GR=(e,t)=>{var n={};for(var i in e)Db.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&ru)for(var i of ru(e))t.indexOf(i)<0&&Ob.call(e,i)&&(n[i]=e[i]);return n};function ZR(e){let t=setTimeout(e,0),n=setTimeout(e,10),i=setTimeout(e,50);return[t,n,i]}function qR(e){let t=w.useRef();return w.useEffect(()=>{t.current=e}),t.current}var KR=18,Pb=40,JR=`${Pb}px`,XR=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function eU({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:i}){let[r,s]=w.useState(!1),[o,a]=w.useState(!1),[l,u]=w.useState(!1),d=w.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&r&&o,[r,o,n]),f=w.useCallback(()=>{let m=e.current,y=t.current;if(!m||!y||l||n==="none")return;let p=m,g=p.getBoundingClientRect().left+p.offsetWidth,x=p.getBoundingClientRect().top+p.offsetHeight/2,_=g-KR,b=x;document.querySelectorAll(XR).length===0&&document.elementFromPoint(_,b)===m||(s(!0),u(!0))},[e,t,l,n]);return w.useEffect(()=>{let m=e.current;if(!m||n==="none")return;function y(){let g=window.innerWidth-m.getBoundingClientRect().right;a(g>=Pb)}y();let p=setInterval(y,1e3);return()=>{clearInterval(p)}},[e,n]),w.useEffect(()=>{let m=i||document.activeElement===t.current;if(n==="none"||!m)return;let y=setTimeout(f,0),p=setTimeout(f,2e3),g=setTimeout(f,5e3),x=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(y),clearTimeout(p),clearTimeout(g),clearTimeout(x)}},[t,i,n,f]),{hasPWMBadge:r,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:JR}}var tU=w.createContext({}),kb=w.forwardRef((e,t)=>{var n=e,{value:i,onChange:r,maxLength:s,textAlign:o="left",pattern:a,placeholder:l,inputMode:u="numeric",onComplete:d,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:m,containerClassName:y,noScriptCSSFallback:p=nU,render:g,children:x}=n,_=GR(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),b,I,E,C,T;let[j,O]=w.useState(typeof _.defaultValue=="string"?_.defaultValue:""),L=i??j,N=qR(L),v=w.useCallback(ue=>{r==null||r(ue),O(ue)},[r]),D=w.useMemo(()=>a?typeof a=="string"?new RegExp(a):a:null,[a]),k=w.useRef(null),U=w.useRef(null),R=w.useRef({value:L,onChange:v,isIOS:typeof window<"u"&&((I=(b=window==null?void 0:window.CSS)==null?void 0:b.supports)==null?void 0:I.call(b,"-webkit-touch-callout","none"))}),B=w.useRef({prev:[(E=k.current)==null?void 0:E.selectionStart,(C=k.current)==null?void 0:C.selectionEnd,(T=k.current)==null?void 0:T.selectionDirection]});w.useImperativeHandle(t,()=>k.current,[]),w.useEffect(()=>{let ue=k.current,fe=U.current;if(!ue||!fe)return;R.current.value!==ue.value&&R.current.onChange(ue.value),B.current.prev=[ue.selectionStart,ue.selectionEnd,ue.selectionDirection];function Ye(){if(document.activeElement!==ue){G(null),ce(null);return}let de=ue.selectionStart,yt=ue.selectionEnd,vt=ue.selectionDirection,Ze=ue.maxLength,er=ue.value,En=B.current.prev,Fn=-1,Nt=-1,Cn;if(er.length!==0&&de!==null&&yt!==null){let AI=de===yt,DI=de===er.length&&er.length<Ze;if(AI&&!DI){let as=de;if(as===0)Fn=0,Nt=1,Cn="forward";else if(as===Ze)Fn=as-1,Nt=as,Cn="backward";else if(Ze>1&&er.length>1){let Ld=0;if(En[0]!==null&&En[1]!==null){Cn=as<En[1]?"backward":"forward";let OI=En[0]===En[1]&&En[0]<Ze;Cn==="backward"&&!OI&&(Ld=-1)}Fn=Ld+as,Nt=Ld+as+1}}Fn!==-1&&Nt!==-1&&Fn!==Nt&&k.current.setSelectionRange(Fn,Nt,Cn)}let tr=Fn!==-1?Fn:de,Qc=Nt!==-1?Nt:yt,SI=Cn??vt;G(tr),ce(Qc),B.current.prev=[tr,Qc,SI]}if(document.addEventListener("selectionchange",Ye,{capture:!0}),Ye(),document.activeElement===ue&&Y(!0),!document.getElementById("input-otp-style")){let de=document.createElement("style");if(de.id="input-otp-style",document.head.appendChild(de),de.sheet){let yt="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";ba(de.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ba(de.sheet,`[data-input-otp]:autofill { ${yt} }`),ba(de.sheet,`[data-input-otp]:-webkit-autofill { ${yt} }`),ba(de.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),ba(de.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let st=()=>{fe&&fe.style.setProperty("--root-height",`${ue.clientHeight}px`)};st();let ot=new ResizeObserver(st);return ot.observe(ue),()=>{document.removeEventListener("selectionchange",Ye,{capture:!0}),ot.disconnect()}},[]);let[F,W]=w.useState(!1),[V,Y]=w.useState(!1),[Q,G]=w.useState(null),[ne,ce]=w.useState(null);w.useEffect(()=>{ZR(()=>{var ue,fe,Ye,st;(ue=k.current)==null||ue.dispatchEvent(new Event("input"));let ot=(fe=k.current)==null?void 0:fe.selectionStart,de=(Ye=k.current)==null?void 0:Ye.selectionEnd,yt=(st=k.current)==null?void 0:st.selectionDirection;ot!==null&&de!==null&&(G(ot),ce(de),B.current.prev=[ot,de,yt])})},[L,V]),w.useEffect(()=>{N!==void 0&&L!==N&&N.length<s&&L.length===s&&(d==null||d(L))},[s,d,N,L]);let q=eU({containerRef:U,inputRef:k,pushPasswordManagerStrategy:f,isFocused:V}),he=w.useCallback(ue=>{let fe=ue.currentTarget.value.slice(0,s);if(fe.length>0&&D&&!D.test(fe)){ue.preventDefault();return}typeof N=="string"&&fe.length<N.length&&document.dispatchEvent(new Event("selectionchange")),v(fe)},[s,v,N,D]),re=w.useCallback(()=>{var ue;if(k.current){let fe=Math.min(k.current.value.length,s-1),Ye=k.current.value.length;(ue=k.current)==null||ue.setSelectionRange(fe,Ye),G(fe),ce(Ye)}Y(!0)},[s]),se=w.useCallback(ue=>{var fe,Ye;let st=k.current;if(!m&&(!R.current.isIOS||!ue.clipboardData||!st))return;let ot=ue.clipboardData.getData("text/plain"),de=m?m(ot):ot;ue.preventDefault();let yt=(fe=k.current)==null?void 0:fe.selectionStart,vt=(Ye=k.current)==null?void 0:Ye.selectionEnd,Ze=(yt!==vt?L.slice(0,yt)+de+L.slice(vt):L.slice(0,yt)+de+L.slice(yt)).slice(0,s);if(Ze.length>0&&D&&!D.test(Ze))return;st.value=Ze,v(Ze);let er=Math.min(Ze.length,s-1),En=Ze.length;st.setSelectionRange(er,En),G(er),ce(En)},[s,v,D,L]),le=w.useMemo(()=>({position:"relative",cursor:_.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[_.disabled]),Le=w.useMemo(()=>({position:"absolute",inset:0,width:q.willPushPWMBadge?`calc(100% + ${q.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:q.willPushPWMBadge?`inset(0 ${q.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:o,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[q.PWM_BADGE_SPACE_WIDTH,q.willPushPWMBadge,o]),Fe=w.useMemo(()=>w.createElement("input",HR(QR({autoComplete:_.autoComplete||"one-time-code"},_),{"data-input-otp":!0,"data-input-otp-placeholder-shown":L.length===0||void 0,"data-input-otp-mss":Q,"data-input-otp-mse":ne,inputMode:u,pattern:D==null?void 0:D.source,"aria-placeholder":l,style:Le,maxLength:s,value:L,ref:k,onPaste:ue=>{var fe;se(ue),(fe=_.onPaste)==null||fe.call(_,ue)},onChange:he,onMouseOver:ue=>{var fe;W(!0),(fe=_.onMouseOver)==null||fe.call(_,ue)},onMouseLeave:ue=>{var fe;W(!1),(fe=_.onMouseLeave)==null||fe.call(_,ue)},onFocus:ue=>{var fe;re(),(fe=_.onFocus)==null||fe.call(_,ue)},onBlur:ue=>{var fe;Y(!1),(fe=_.onBlur)==null||fe.call(_,ue)}})),[he,re,se,u,Le,s,ne,Q,_,D==null?void 0:D.source,L]),rt=w.useMemo(()=>({slots:Array.from({length:s}).map((ue,fe)=>{var Ye;let st=V&&Q!==null&&ne!==null&&(Q===ne&&fe===Q||fe>=Q&&fe<ne),ot=L[fe]!==void 0?L[fe]:null,de=L[0]!==void 0?null:(Ye=l==null?void 0:l[fe])!=null?Ye:null;return{char:ot,placeholderChar:de,isActive:st,hasFakeCaret:st&&ot===null}}),isFocused:V,isHovering:!_.disabled&&F}),[V,F,s,ne,Q,_.disabled,L]),mt=w.useMemo(()=>g?g(rt):w.createElement(tU.Provider,{value:rt},x),[x,rt,g]);return w.createElement(w.Fragment,null,p!==null&&w.createElement("noscript",null,w.createElement("style",null,p)),w.createElement("div",{ref:U,"data-input-otp-container":!0,style:le,className:y},mt,w.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Fe)))});kb.displayName="Input";function ba(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var nU=`
291
+ [data-input-otp] {
292
+ --nojs-bg: white !important;
293
+ --nojs-fg: black !important;
294
+
295
+ background-color: var(--nojs-bg) !important;
296
+ color: var(--nojs-fg) !important;
297
+ caret-color: var(--nojs-fg) !important;
298
+ letter-spacing: .25em !important;
299
+ text-align: center !important;
300
+ border: 1px solid var(--nojs-fg) !important;
301
+ border-radius: 4px !important;
302
+ width: 100% !important;
303
+ }
304
+ @media (prefers-color-scheme: dark) {
305
+ [data-input-otp] {
306
+ --nojs-bg: black !important;
307
+ --nojs-fg: white !important;
308
+ }
309
+ }`;function iU(e){return c.jsx(rU,{className:"tw-otp-input-container",children:c.jsx(kb,{maxLength:6,onChange:t=>{e.setValue(t)},onComplete:()=>{e.onEnter()},render:({slots:t})=>c.jsx(M,{center:"both",flex:"row",gap:"xs",children:t.map((n,i)=>c.jsx(sU,{...n,isInvalid:e.isInvalid},i))}),value:e.value})})}const rU=ke({"& input":{maxWidth:"100%"}});function sU(e){return c.jsxs(cU,{"data-active":e.isActive,"data-error":e.isInvalid,children:[e.char!==null&&c.jsx("div",{children:e.char}),e.hasFakeCaret&&c.jsx(aU,{})]})}const oU=$t`
310
+ 0%, 100% {
311
+ opacity: 0;
312
+ },
313
+ 50% {
314
+ opacity: 1;
315
+ }
316
+ `,aU=ke(e=>({"&::before":{backgroundColor:X().colors.primaryText,content:"''",display:"block",height:"1em",width:"1.5px"},alignItems:"center",animation:`${oU} 1s infinite`,display:"flex",inset:0,justifyContent:"center",pointerEvents:"none",position:"absolute"})),cU=ke(e=>{const t=X();return{"&[data-active='true']":{borderColor:t.colors.accentText},"&[data-error='true']":{borderColor:t.colors.danger},alignItems:"center",border:`2px solid ${t.colors.borderColor}`,borderRadius:Z.lg,boxSizing:"border-box",color:t.colors.primaryText,display:"flex",fontSize:ie.md,height:"40px",justifyContent:"center",padding:z.xs,position:"relative",textAlign:"center",transition:"color 200ms ease",width:"40px"}});function lU(e){var O;const{wallet:t,done:n,goBack:i,userInfo:r}=e,s=e.size==="wide",o=e.locale,[a,l]=w.useState(""),[u,d]=w.useState("idle"),[f,m]=w.useState(),[y,p]=w.useState({type:"sending"}),[g,x]=w.useState(0),_=Oe(t)?{id:t.id,partnerId:(O=t.getConfig())==null?void 0:O.partnerId}:void 0,[b]=w.useState("base"),I=w.useCallback(async()=>{l(""),d("idle"),p({type:"sending"});try{if("email"in r)await Vf({client:e.client,ecosystem:_,email:r.email,strategy:"email"}),p({type:"sent"}),x(60);else if("phone"in r)await Vf({client:e.client,ecosystem:_,phoneNumber:r.phone,strategy:"phone"}),p({type:"sent"}),x(60);else throw new Error("Invalid userInfo")}catch(L){console.error(L),d("idle"),p({type:"error",message:L instanceof Error?L.message:void 0})}},[e.client,r,_]);async function E(L){if("email"in r)await t.connect({chain:e.chain,client:e.client,email:r.email,strategy:"email",verificationCode:L}),await Gi("email",Ut);else if("phone"in r)await t.connect({chain:e.chain,client:e.client,phoneNumber:r.phone,strategy:"phone",verificationCode:L}),await Gi("phone",Ut);else throw new Error("Invalid userInfo")}async function C(L){"email"in r?await qr({client:e.client,ecosystem:_,email:r.email,strategy:"email",verificationCode:L}):"phone"in r&&await qr({client:e.client,ecosystem:_,phoneNumber:r.phone,strategy:"phone",verificationCode:L})}const T=async L=>{var N;if(L.length===6){d("verifying");try{e.isLinking?await C(L):await E(L),n(),d("valid")}catch(v){v instanceof Error&&((N=v==null?void 0:v.message)!=null&&N.includes("PAYMENT_METHOD_REQUIRED"))?d("payment_required"):v instanceof Error&&(v.message.toLowerCase().includes("link")||v.message.toLowerCase().includes("profile"))?(d("linking_error"),m(v.message)):d("invalid"),console.error("Authentication Error",v)}}},j=w.useRef(!1);return w.useEffect(()=>{j.current||(j.current=!0,I())},[I]),w.useEffect(()=>{if(g<=0)return;const L=setInterval(()=>{x(N=>N<=1?(clearInterval(L),0):N-1)},1e3);return()=>clearInterval(L)},[g]),b==="base"?c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-otp-login-screen",children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:i,title:o.signIn})}),c.jsx(M,{center:"y",expand:!0,flex:"column",children:c.jsxs("form",{onSubmit:L=>{L.preventDefault()},children:[c.jsxs(M,{center:"x",flex:"column",px:"lg",children:[!s&&c.jsx($,{y:"xl"}),c.jsx(P,{className:"tw-screen-title",children:o.emailLoginScreen.enterCodeSendTo}),c.jsx($,{y:"sm"}),c.jsx(P,{color:"primaryText",children:"email"in r?r.email:r.phone}),c.jsx($,{y:"xl"})]}),c.jsx(iU,{digits:6,isInvalid:u==="invalid",onEnter:()=>{T(a)},setValue:L=>{l(L),d("idle")},value:a}),u==="invalid"&&c.jsxs(_h,{children:[c.jsx($,{y:"md"}),c.jsx(P,{center:!0,color:"danger",size:"sm",className:"tw-invalid-code-text",children:o.emailLoginScreen.invalidCode})]}),u==="linking_error"&&c.jsxs(_h,{children:[c.jsx($,{y:"md"}),c.jsx(P,{center:!0,color:"danger",size:"sm",className:"tw-screen-error",children:f||"Failed to verify code"})]}),u==="payment_required"&&c.jsxs(_h,{children:[c.jsx($,{y:"md"}),c.jsx(P,{center:!0,color:"danger",size:"sm",className:"tw-screen-error",children:o.maxAccountsExceeded})]}),c.jsx($,{y:"xl"}),c.jsx(M,{px:s?"xxl":"lg",children:u==="verifying"?c.jsx(M,{animate:"fadein",center:"x",flex:"row",children:c.jsx($e,{color:"accentText",size:"lg"})}):c.jsx(M,{animate:"fadein",children:c.jsx(ae,{onClick:()=>T(a),style:{width:"100%"},type:"submit",variant:"accent",className:"tw-verify-button",children:o.emailLoginScreen.verify})},"btn-container")}),c.jsx($,{y:"xl"}),!s&&c.jsx(We,{}),c.jsxs(M,{gap:"sm",p:s?void 0:"lg",flex:"column",children:[y.type==="error"&&c.jsx(P,{center:!0,color:"danger",size:"sm",className:"tw-screen-error",children:y.message||o.emailLoginScreen.failedToSendCode}),y.type==="sending"&&c.jsxs(M,{center:"both",flex:"row",gap:"xs",style:{textAlign:"center"},children:[c.jsx(P,{size:"sm",children:o.emailLoginScreen.sendingCode}),c.jsx($e,{color:"secondaryText",size:"xs"})]}),y.type!=="sending"&&c.jsx(uU,{onClick:g===0?I:void 0,style:{cursor:g>0?"default":"pointer",opacity:g>0?.5:1},className:"tw-resend-button",type:"button",children:g>0?`Resend code in ${g} seconds`:o.emailLoginScreen.resendCode})]})]})})]}):null}const uU=Xi(e=>{const t=X();return{all:"unset","&:hover":{color:t.colors.primaryText},color:t.colors.accentText,cursor:"pointer",fontSize:ie.sm,fontWeight:500,textAlign:"center",width:"100%"}});let bh;function dU(){return bh||(bh=new TextDecoder),bh}const hU="[object Uint8Array]";function fU(e){if(!mU(e))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof e}\``)}function mU(e){return e?e.constructor===Uint8Array?!0:Object.prototype.toString.call(e)===hU:!1}function yU(e){return fU(e),dU().decode(e)}function zb(e){if(typeof e!="string")throw new TypeError(`Expected \`string\`, got \`${typeof e}\``)}function a0(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");const n=t.length%4;return n!==0&&(t+="=".repeat(4-n)),t}function gU(e){return zb(e),Uint8Array.from(globalThis.atob(a0(e)),t=>t.codePointAt(0))}function hp(e){return zb(e),yU(gU(e))}class pU{isAvailable(){return jd.isAvailable()}async register(t){const{name:n,challenge:i,rp:r}=t,s=await jd.register({attestation:!0,challenge:i,domain:r.id,user:n,userVerification:"required"}),o=a0(s.response.clientDataJSON),a=JSON.parse(hp(o));return{authenticatorData:s.response.authenticatorData,clientData:s.response.clientDataJSON,credential:{algorithm:ZI.getAlgoName(s.response.publicKeyAlgorithm),publicKey:s.response.publicKey},credentialId:s.id,origin:a.origin}}async authenticate(t){const{credentialId:n,challenge:i,rp:r}=t,s=await jd.authenticate({allowCredentials:n?[n]:[],challenge:i,domain:r.id,userVerification:"required"}),o=a0(s.response.clientDataJSON),a=JSON.parse(hp(o));return{authenticatorData:s.response.authenticatorData,clientData:s.response.clientDataJSON,credentialId:s.id,origin:a.origin,signature:s.response.signature}}}async function Rb(e,t,n){return!!await new kc({clientId:e.clientId,ecosystem:t?{id:t}:void 0,storage:Ut}).getPasskeyCredentialId()}const oX=Object.freeze(Object.defineProperty({__proto__:null,PasskeyWebClient:pU,hasStoredPasskey:Rb},Symbol.toStringTag,{value:"Module"}));function wU(e){const{wallet:t,done:n,client:i,chain:r,size:s,locale:o}=e,[a,l]=w.useState("loading"),u=w.useRef(!1);return w.useEffect(()=>{u.current||(u.current=!0,Rb(i,Oe(t.id)?t.id:void 0).then(d=>{l(d?"login":"select")}).catch(()=>{l("select")}))},[i,t.id]),c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.isLinking?o.passkeys.linkPasskey:o.passkeys.title})}),c.jsx(M,{center:"y",expand:!0,flex:"column",px:s==="wide"?"xxl":"lg",children:c.jsxs("div",{children:[a==="loading"&&c.jsxs(c.Fragment,{children:[c.jsx(wt,{}),c.jsx($,{y:"xxl"})]}),a==="select"&&c.jsx(bU,{onSignin:()=>{l("login")},onSignup:()=>{l("signup")}}),a==="login"&&c.jsx(xU,{chain:r,client:i,done:n,isLinking:e.isLinking,onCreate:()=>{l("signup")},wallet:t}),a==="signup"&&c.jsx(_U,{chain:r,client:i,done:n,isLinking:e.isLinking,wallet:t})]})})]})}function xU(e){const{wallet:t,done:n,client:i,chain:r}=e,[s,o]=w.useState("loading"),[a,l]=w.useState();async function u(){o("loading");try{e.isLinking?await qr({client:i,strategy:"passkey",type:"sign-in"}).catch(f=>{throw l(f.message),f}):(await t.connect({chain:r,client:i,strategy:"passkey",type:"sign-in"}),await Gi("passkey",Ut)),n()}catch(f){console.error("Failed to login with passkey",f),o("error")}}const d=w.useRef(!1);return w.useEffect(()=>{d.current||(d.current=!0,u())}),s==="loading"?c.jsx(Bm,{icon:c.jsx(qs,{size:A.xxl}),subtitle:"A pop-up prompt will appear to sign-in and verify your passkey",title:"Requesting Passkey"}):s==="error"?c.jsxs(c.Fragment,{children:[c.jsx($m,{onTryAgain:u,title:a||"Failed to Login"}),c.jsx($,{y:"sm"}),c.jsx(ae,{fullWidth:!0,onClick:e.onCreate,variant:"outline",children:"Create a new Passkey"}),c.jsx($,{y:"lg"})]}):null}function _U(e){var m;const{wallet:t,done:n,client:i,chain:r}=e,[s,o]=w.useState(),[a,l]=w.useState("loading"),u=Oe(t)?{id:t.id,partnerId:(m=t.getConfig())==null?void 0:m.partnerId}:void 0;async function d(){l("loading");try{e.isLinking?await qr({client:i,ecosystem:u,strategy:"passkey",type:"sign-up"}):(await t.connect({chain:r,client:i,strategy:"passkey",type:"sign-up"}),await Gi("passkey",Ut)),n()}catch(y){console.error(y),y instanceof Error&&o(`Error creating passkey: ${y.message}`),l("error")}}const f=w.useRef(!1);return w.useEffect(()=>{f.current||(f.current=!0,d())}),a==="loading"?c.jsx(Bm,{icon:c.jsx(qs,{size:A.xxl}),subtitle:"A pop-up prompt will appear to sign-in and verify your passkey",title:"Creating Passkey"}):a==="error"?c.jsxs(c.Fragment,{children:[c.jsx($m,{onTryAgain:d,title:s||"Failed to create passkey"}),c.jsx($,{y:"lg"})]}):null}function bU(e){return c.jsxs(M,{children:[c.jsx($,{y:"xxl"}),c.jsx(M,{center:"x",color:"accentText",flex:"row",children:c.jsx(qs,{size:A["4xl"]})}),c.jsx($,{y:"xl"}),c.jsx($,{y:"xxl"}),c.jsx(ae,{fullWidth:!0,onClick:e.onSignup,variant:"accent",children:"Create a Passkey"}),c.jsx($,{y:"sm"}),c.jsx(ae,{fullWidth:!0,onClick:e.onSignin,variant:"outline",children:"I have a Passkey"}),c.jsx($,{y:"lg"})]})}function MU(e){var p,g;const t=e.locale,n=t.socialLoginScreen,i=X(),r=Oe(e.wallet)?{id:e.wallet.id,partnerId:(p=e.wallet.getConfig())==null?void 0:p.partnerId}:void 0,[s,o]=w.useState(void 0),{done:a,wallet:l}=e,[u,d]=w.useState("connecting"),f=async()=>{var b,I,E,C;const x=l.getConfig(),_=x&&"auth"in x?((b=x==null?void 0:x.auth)==null?void 0:b.mode)??"popup":"popup";if(x&&"auth"in x&&_!=="popup"&&!e.isLinking)return Gx({authOption:e.socialAuth,client:e.client,ecosystem:r,mode:(I=x==null?void 0:x.auth)==null?void 0:I.mode,redirectUrl:(E=x==null?void 0:x.auth)==null?void 0:E.redirectUrl});try{const T=qx({authOption:e.socialAuth,client:e.client,ecosystem:r,themeObj:i});if(!T)throw new Error(`Failed to open ${e.socialAuth} login window`);d("connecting"),e.isLinking?await qr({client:e.client,closeOpenedWindow:j=>{j.close()},ecosystem:r,openedWindow:T,strategy:e.socialAuth}).catch(j=>{throw o(j.message),j}):await l.connect({chain:e.chain,client:e.client,closeOpenedWindow:j=>{j.close()},openedWindow:T,strategy:e.socialAuth}),await Gi(e.socialAuth,Ut),d("connected"),a()}catch(T){d("error"),T instanceof Error&&((C=T==null?void 0:T.message)!=null&&C.includes("PAYMENT_METHOD_REQUIRED"))&&o(t.maxAccountsExceeded),console.error(`Error signing in with ${e.socialAuth}`,T)}},m=(g=e.state)==null?void 0:g.socialLogin,y=w.useRef(!1);return w.useEffect(()=>{y.current||m&&(y.current=!0,d("connecting"),m.connectionPromise.then(()=>{a(),d("connected")}).catch(x=>{o(x.message),d("error")}))},[a,m]),c.jsx(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-social-login-screen",children:c.jsxs(M,{expand:!0,flex:"column",p:"lg",style:{paddingBottom:0},children:[e.goBack&&c.jsx(be,{onBack:e.goBack,title:e.isLinking?e.connectLocale.manageWallet.linkProfile:n.title}),e.size==="compact"?c.jsx($,{y:"xl"}):null,c.jsxs(M,{center:"both",expand:!0,flex:"column",style:{minHeight:"250px",textAlign:"center"},children:[u!=="error"&&c.jsxs(M,{animate:"fadein",children:[c.jsx(P,{center:!0,color:"primaryText",multiline:!0,style:{maxWidth:"250px"},children:n.instruction}),c.jsx($,{y:"xl"}),c.jsx(M,{center:"x",flex:"row",children:c.jsx($e,{color:"accentText",size:"lg"})}),c.jsx($,{y:"xxl"})]}),u==="error"&&c.jsxs(M,{animate:"fadein",children:[s?c.jsx(P,{center:!0,color:"danger",children:s}):c.jsx(P,{color:"danger",children:n.failed}),c.jsx($,{y:"lg"}),c.jsx(ae,{onClick:f,variant:"primary",children:n.retry}),c.jsx($,{y:"xxl"})]})]})]})})}function IU(e){var n,i,r;const t=oa(e.wallet.id);return c.jsx(be,{leftAligned:!0,onBack:e.onBack,title:t.isLoading?c.jsx(ge,{height:"24px",width:"200px"}):c.jsxs(c.Fragment,{children:[(n=t.data)!=null&&n.image_id?c.jsx(Xe,{client:e.client,height:A.md,src:(i=t.data)==null?void 0:i.image_id,style:{borderRadius:Z.sm},width:A.md}):null,c.jsx(Ju,{children:(r=t.data)==null?void 0:r.name})]})})}function EU(e){const t=e.size==="compact",{initialScreen:n,screen:i}=ym(),[r,s]=w.useState(!1),o=i===e.wallet&&n===e.wallet?void 0:e.goBack;return c.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,p:"lg",style:{minHeight:"250px"},children:[e.isLinking?c.jsx(be,{onBack:o,title:e.connectLocale.manageWallet.linkProfile}):c.jsx(IU,{client:e.client,onBack:t?o:void 0,wallet:e.wallet}),c.jsx($,{y:"lg"}),c.jsx(M,{center:"y",expand:!0,flex:"column",p:t?void 0:"lg",children:c.jsx(Kx,{disabled:e.meta.requireApproval&&!r,...e})}),t&&(e.meta.showThirdwebBranding!==!1||e.meta.termsOfServiceUrl||e.meta.privacyPolicyUrl)&&c.jsx($,{y:"xl"}),c.jsxs(M,{flex:"column",gap:"lg",children:[c.jsx(id,{isApproved:r,locale:e.connectLocale.agreement,onApprove:()=>{s(!r)},privacyPolicyUrl:e.meta.privacyPolicyUrl,requireApproval:e.meta.requireApproval,termsOfServiceUrl:e.meta.termsOfServiceUrl}),e.meta.showThirdwebBranding!==!1&&c.jsx(sd,{})]})]})}function Ub(e){const t=ES(),n=Zs(),i=t,r=e.connectLocale.id,s=Jx(r);if(!s)return c.jsx(wt,{});const o=()=>{var u;e.size==="compact"&&((u=e.goBack)==null||u.call(e)),n({})},a=()=>{e.done(),n({})},l=i!=null&&i.emailLogin?{email:i.emailLogin}:i!=null&&i.phoneLogin?{phone:i.phoneLogin}:void 0;return l?c.jsx(lU,{chain:e.chain,client:e.client,done:a,goBack:o,isLinking:e.isLinking,locale:s,size:e.size,userInfo:l,wallet:e.wallet}):i!=null&&i.passkeyLogin?c.jsx(wU,{chain:e.chain,client:e.client,done:a,isLinking:e.isLinking,locale:e.connectLocale,onBack:o,size:e.size,wallet:e.wallet}):i!=null&&i.socialLogin?c.jsx(MU,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,done:a,goBack:o,isLinking:e.isLinking,locale:s,size:e.size,socialAuth:i.socialLogin.type,state:i,wallet:e.wallet}):i!=null&&i.walletLogin?c.jsx(BR,{chain:e.chain,client:e.client,done:a,inAppLocale:s,isLinking:i.walletLogin.linking,locale:e.connectLocale,meta:e.meta,onBack:o||(()=>n({})),size:e.size,wallet:e.wallet,walletConnect:e.walletConnect}):i!=null&&i.guestLogin?c.jsx(VR,{client:e.client,connectLocale:e.connectLocale,done:a,goBack:o,locale:s,size:e.size,state:i,wallet:e.wallet}):c.jsx(EU,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,done:a,goBack:e.goBack,isLinking:e.isLinking,locale:s,meta:e.meta,select:()=>{},size:e.size,wallet:e.wallet})}const CU=Object.freeze(Object.defineProperty({__proto__:null,default:Ub},Symbol.toStringTag,{value:"Module"})),LU=w.lazy(()=>h(()=>import("./InAppWalletConnectUI-DUi7oMdq.js"),__vite__mapDeps([42,1,2,3,4,5])));function TU(e){const t=Hu(),n=bt(),i=_t(),r=Ji(),s=t||n;return s?s.id==="inApp"?c.jsx(w.Suspense,{fallback:c.jsx(wt,{}),children:c.jsx(LU,{chain:i,client:e.client,connectLocale:e.locale,done:()=>{setTimeout(()=>{r.invalidateQueries({queryKey:["profiles"]})},500),e.onBack()},goBack:e.onBack,isLinking:!0,meta:{showThirdwebBranding:!1,title:e.locale.manageWallet.linkProfile},size:"compact",wallet:s,walletConnect:e.walletConnect})}):Oe(s)?c.jsx(w.Suspense,{fallback:c.jsx(wt,{}),children:c.jsx(Ub,{chain:i,client:e.client,connectLocale:e.locale,done:()=>{setTimeout(()=>{r.invalidateQueries({queryKey:["profiles"]})},500),e.onBack()},goBack:e.onBack,isLinking:!0,meta:{showThirdwebBranding:!1,title:e.locale.manageWallet.linkProfile},size:"compact",wallet:s,walletConnect:e.walletConnect})}):c.jsxs(M,{style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.locale.manageWallet.linkProfile})}),c.jsx(We,{}),c.jsxs(M,{center:"both",color:"secondaryText",flex:"column",gap:"md",px:"xl",style:{flex:"1",minHeight:"250px"},children:[c.jsx(is,{height:A.xl,width:A.xl}),c.jsx(P,{center:!0,children:"This wallet does not support account linking"})]})]}):c.jsx(wt,{})}const jU=e=>c.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("path",{d:"M2 5.99999L2 2.99999C2 2.39999 2.4 1.99999 3 1.99999H7L7 4.99999H10V7.99999H12L13.4 9.39999C14.7898 8.91585 16.3028 8.9177 17.6915 9.40524C19.0801 9.89278 20.2622 10.8372 21.0444 12.0839C21.8265 13.3306 22.1624 14.8058 21.9971 16.2683C21.8318 17.7307 21.1751 19.0937 20.1344 20.1344C19.0937 21.1751 17.7307 21.8318 16.2683 21.9971C14.8058 22.1624 13.3306 21.8265 12.0839 21.0444C10.8372 20.2622 9.89279 19.0801 9.40525 17.6915C8.91771 16.3028 8.91585 14.7898 9.4 13.4L2 5.99999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),c.jsx("path",{d:"M15.5 15C15.7761 15 16 15.2239 16 15.5C16 15.7761 15.7761 16 15.5 16C15.2239 16 15 15.7761 15 15.5C15 15.2239 15.2239 15 15.5 15Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]}),vU=e=>c.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M22 21V19C22 17.1362 20.7252 15.5701 19 15.126M15.5 3.29076C16.9659 3.88415 18 5.32131 18 7C18 8.67869 16.9659 10.1159 15.5 10.7092M17 21C17 19.1362 17 18.2044 16.6955 17.4693C16.2895 16.4892 15.5108 15.7105 14.5307 15.3045C13.7956 15 12.8638 15 11 15H8C6.13623 15 5.20435 15 4.46927 15.3045C3.48915 15.7105 2.71046 16.4892 2.30448 17.4693C2 18.2044 2 19.1362 2 21M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})}),NU=e=>c.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M4.91334 7.73539C8.82714 4.0882 15.1729 4.0882 19.0867 7.73539L19.5577 8.17432C19.7534 8.35664 19.7534 8.65232 19.5577 8.83464L17.9464 10.3362C17.8485 10.4274 17.6899 10.4274 17.5921 10.3362L16.9439 9.73217C14.2134 7.18782 9.7866 7.18782 7.05614 9.73217L6.36193 10.379C6.26407 10.4702 6.10547 10.4702 6.0076 10.379L4.39629 8.87747C4.20056 8.69515 4.20056 8.39947 4.39629 8.21715L4.91334 7.73539ZM22.4191 10.8407L23.8532 12.1771C24.0489 12.3594 24.0489 12.6551 23.8532 12.8374L17.3867 18.8632C17.1911 19.0456 16.8738 19.0456 16.6781 18.8632L12.0886 14.5865C12.0397 14.5409 11.9604 14.5409 11.9115 14.5865L7.32202 18.8632C7.12638 19.0456 6.8091 19.0456 6.61337 18.8632L0.146771 12.8373C-0.0489237 12.655 -0.0489237 12.3593 0.146771 12.177L1.58087 10.8406C1.77657 10.6582 2.09384 10.6582 2.28954 10.8406L6.87907 15.1173C6.928 15.163 7.0073 15.163 7.05623 15.1173L11.6456 10.8406C11.8412 10.6582 12.1585 10.6582 12.3542 10.8406L16.9438 15.1173C16.9927 15.163 17.072 15.163 17.1209 15.1173L21.7105 10.8407C21.9061 10.6583 22.2234 10.6583 22.4191 10.8407Z",fill:"currentColor"})});function SU(e){var r,s;const t=Hu(),n=bt(),i=t||n;return c.jsxs(M,{style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.locale.manageWallet.title})}),c.jsx(We,{}),c.jsxs(M,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[c.jsx($,{y:"md"}),c.jsxs(M,{style:{height:"250px",position:"relative"},children:[c.jsx(AU,{closeModal:e.closeModal,connectLocale:e.locale}),typeof i<"u"&&((r=e.manageWallet)==null?void 0:r.allowLinkingProfiles)!==!1&&c.jsxs(Rn,{onClick:()=>{e.setScreen("linked-profiles")},style:{fontSize:ie.sm},children:[c.jsx(vU,{size:A.md}),c.jsx(P,{color:"primaryText",children:e.locale.manageWallet.linkedProfiles})]}),c.jsxs(Rn,{onClick:()=>{e.setScreen("wallet-connect-receiver")},style:{fontSize:ie.sm},children:[c.jsx(NU,{size:A.md}),c.jsx(P,{color:"primaryText",children:e.locale.manageWallet.connectAnApp})]}),i&&cm(i)&&!((s=i.getConfig())!=null&&s.hidePrivateKeyExport)&&c.jsxs(Rn,{onClick:()=>{e.setScreen("private-key")},style:{fontSize:ie.sm},children:[c.jsx(jU,{size:A.md}),c.jsx(P,{color:"primaryText",children:e.locale.manageWallet.exportPrivateKey})]})]}),c.jsx($,{y:"lg"})]})]})}function AU(e){const t=bt(),n=e.connectLocale;if((t==null?void 0:t.id)!=="io.metamask")return null;const i=om("io.metamask");return i?c.jsxs(Rn,{onClick:async()=>{await i.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),e.closeModal()},type:"button",children:[c.jsx(WN,{height:A.md,width:A.md}),c.jsx(P,{color:"primaryText",children:n.switchAccount})]}):null}function DU(e){var s;const[t,n]=w.useState(!0),i=it("inAppWallet");if(w.useEffect(()=>{const o=async a=>{var l,u;if(typeof a.data=="object"&&"eventType"in a.data&&a.origin===i&&a.data.eventType==="exportPrivateKeyIframeLoaded"){const d=document.getElementById(`export-wallet-${(l=e.wallet)==null?void 0:l.id}`);if(!(d instanceof HTMLIFrameElement)||!e.wallet)return;const f=new kc({clientId:e.client.clientId,ecosystem:Oe(e.wallet)?{id:e.wallet.id,partnerId:(u=e.wallet.getConfig())==null?void 0:u.partnerId}:void 0,storage:Ut});d!=null&&d.contentWindow&&d.contentWindow.postMessage({authToken:await f.getAuthCookie(),eventType:"initExportPrivateKey"},a.origin)}};return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}},[e.wallet,e.client.clientId,i]),!e.wallet)throw new Error("[PrivateKey] No wallet found");const r=Oe(e.wallet)?{id:e.wallet.id,partnerId:(s=e.wallet.getConfig())==null?void 0:s.partnerId}:void 0;return c.jsxs(M,{style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.connectLocale.manageWallet.exportPrivateKey})}),c.jsx(We,{}),c.jsxs(M,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[c.jsx($,{y:"md"}),c.jsxs(M,{style:{height:"250px",position:"relative"},children:[t?c.jsx(M,{center:"both",flex:"column",style:{height:"100%",position:"absolute",width:"100%"},children:c.jsx($e,{color:"primaryButtonBg",size:"lg"})}):null,c.jsx(M,{style:{height:"100%",position:"absolute",width:"100%",zIndex:11},children:c.jsx("iframe",{allow:"clipboard-read; clipboard-write",id:`export-wallet-${e.wallet.id}`,onLoad:()=>{n(!1)},src:`${i}/sdk/2022-08-12/embedded-wallet/export-private-key?clientId=${e.client.clientId}&theme=${typeof e.theme=="string"?e.theme:e.theme.type}${r?`&ecosystemId=${r.id}`:""}${r!=null&&r.partnerId?`&partnerId=${r.partnerId}`:""}`,style:{height:"250px",visibility:t?"hidden":"unset",width:"100%"},title:"Export In-App Wallet"})})]}),c.jsx($,{y:"lg"})]})]})}function OU(e,t=!0){return`${e.substring(0,t?4:6)}...${e.substring(e.length-(t?3:4))}`}function PU(e){const t=Tt(),n=t==null?void 0:t.address,{hasCopied:i,onCopy:r}=u_(n||""),{connectLocale:s,client:o}=e,a=s.receiveFundsScreen;return c.jsxs(M,{p:"lg",className:"tw-receive-funds-screen",children:[c.jsx(be,{onBack:e.onBack,title:a.title}),c.jsx($,{y:"xl"}),c.jsx(M,{center:"x",flex:"row",children:c.jsx(_m,{QRIcon:e.walletId&&c.jsx(si,{client:o,id:e.walletId,size:A.xxl}),qrCodeUri:n,size:350})}),c.jsx($,{y:"xl"}),c.jsxs(kU,{onClick:r,className:"tw-copy-address-button",children:[c.jsx(P,{color:"primaryText",size:"md",children:OU(n||"",!1)}),c.jsx(Yo,{hasCopied:i,text:n||"",tip:"Copy address"})]}),c.jsx($,{y:"lg"}),c.jsx(P,{balance:!0,center:!0,size:"sm",className:"receive_fund_screen_instruction",multiline:!0,children:a.instruction})]})}const kU=Xi(e=>{const t=X();return{all:"unset","&:hover":{borderColor:t.colors.accentText},border:`1px solid ${t.colors.borderColor}`,borderRadius:Z.md,boxSizing:"border-box",cursor:"pointer",display:"flex",justifyContent:"space-between",padding:z.md,transition:"border-color 200ms ease",width:"100%"}}),zU="0x3b3b57de",RU=[{name:"name",type:"bytes32"}];function UU(e){return $u(RU,[e.name])}function $U(e){return zU+UU(e).slice(2)}async function BU(e){const{client:t,name:n,resolverAddress:i,resolverChain:r}=e;return ni(n)?me(n):Vn(async()=>{const s=qt({address:i||K1,chain:r||sa,client:t}),o=$U({name:L3(n)}),a=await T3({contract:s,data:o,name:Lu(q1(n))});return me(`0x${a[0].slice(-40)}`)},{cacheKey:`ens:addr:${(r==null?void 0:r.id)||1}:${n}`,cacheTime:60*1e3})}const VU="0xa9059cbb",WU=[{name:"to",type:"address"},{name:"value",type:"uint256"}],FU=[{type:"bool"}];function YU(e){const t=gx(async()=>"asyncParams"in e?await e.asyncParams():e);return F5({accessList:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.accessList},authorizationList:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.authorizationList},contract:e.contract,erc20Value:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.erc20Value},extraGas:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.extraGas},gas:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.gas},gasPrice:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.gasPrice},maxFeePerGas:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.maxFeePerGas},maxPriorityFeePerGas:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.maxPriorityFeePerGas},method:[VU,WU,FU],nonce:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.nonce},params:async()=>{const n=await t();return[n.to,n.value]},value:async()=>{var n;return(n=(await t()).overrides)==null?void 0:n.value}})}function QU(e){return YU({asyncParams:async()=>{let t;if("amount"in e){const{decimals:n}=await h(async()=>{const{decimals:r}=await Promise.resolve().then(()=>xj);return{decimals:r}},void 0),i=await n(e).catch(()=>18);t=Jn(e.amount.toString(),i)}else t=e.amountWei;return{overrides:{erc20Value:{amountWei:t,tokenAddress:e.contract.address},...e.overrides},to:e.to,value:t}},contract:e.contract})}function HU(e){const t=e.split("."),n=t[t.length-1];return t.length<2||!n||/\s/.test(n)||/^\d+$/.test(n)?!1:t.every(i=>!(i.length<1||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(i)||/[\uff01-\uff5e]/.test(i)))}function GU(e){const t=bt(),n=Ji();return tc({async mutationFn(i){const{tokenAddress:r,receiverAddress:s,amount:o}=i,a=t==null?void 0:t.getChain(),l=t==null?void 0:t.getAccount();if(!a)throw new Error("No active chain");if(!l)throw new Error("No active account");if(!s||!HU(s)&&!ni(s))throw new Error("Invalid receiver address");if(!o||Number.isNaN(Number(o))||Number(o)<0)throw new Error("Invalid amount");let u=s;try{u=await BU({client:e,name:s})}catch{throw new Error("Failed to resolve address")}if(r){const d=qt({address:r,chain:a,client:e}),f=QU({amount:o,contract:d,to:u});return await mf({account:l,transaction:f})}else{const d=O1({chain:a,client:e,to:u,value:rf(o)}),f=await ku({account:l,transaction:d}),m=await Y1({address:l.address,chain:a,client:e});if(rf(o)+f>m.value)throw new Error("Insufficient balance for transfer amount and gas");return await mf({account:l,transaction:d})}},onSettled:async(i,r)=>{r||(i!=null&&i.transactionHash&&await Vu({chain:i.chain,client:e,maxBlocksWaitTime:1e4,transactionHash:i.transactionHash}),x3(n))}})}function Vm(e){var i;const t=Yu(e.chain).data,n=w.useMemo(()=>{var r;return Br(e.token)||e.token.address===Yt?(t==null?void 0:t.nativeCurrency.symbol)==="ETH"?"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png":(r=t==null?void 0:t.icon)==null?void 0:r.url:e.token.icon},[e.token,(i=t==null?void 0:t.icon)==null?void 0:i.url,t==null?void 0:t.nativeCurrency.symbol]);return n?c.jsx(Xe,{client:e.client,fallbackImage:$x,height:A[e.size],src:n,width:A[e.size]}):c.jsx(M,{center:"both",color:"secondaryText",style:{height:A[e.size],width:A[e.size]},children:c.jsx(fd,{size:A[e.size]})})}function $b(e){const{chain:t,tokenAddress:n,client:i}=e;return xe({enabled:!!t&&!!i,queryFn:async()=>{if(n){const{getCurrencyMetadata:f}=await h(async()=>{const{getCurrencyMetadata:y}=await import("./getCurrencyMetadata-xziMh2zt.js");return{getCurrencyMetadata:y}},__vite__mapDeps([24,1,2,3,4,5]));return await f({contract:qt({address:n,chain:t,client:i})})}const{getChainDecimals:r,getChainNativeCurrencyName:s,getChainSymbol:o}=await h(async()=>{const{getChainDecimals:f,getChainNativeCurrencyName:m,getChainSymbol:y}=await Promise.resolve().then(()=>t1);return{getChainDecimals:f,getChainNativeCurrencyName:m,getChainSymbol:y}},void 0),[a,l,u]=await Promise.all([o(t),r(t),s(t)]);return{decimals:l,name:u,symbol:a}},queryKey:["tokenInfo",(t==null?void 0:t.id)||-1,{tokenAddress:n}]})}const Bb=e=>c.jsxs(M,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[c.jsx(Xe,{client:e.client,fallbackImage:Jr,height:e.size,src:ZU(e),width:e.size}),e.active&&c.jsx(Rm,{className:"tw-chain-active-dot-legacy-chain-icon"})]}),ZU=e=>{const t=e.chainIconUrl;if(!t)return Jr;try{return Fi({client:e.client,uri:t})}catch{return Jr}};function qU(e){const[t,n]=w.useState("base"),[i,r]=w.useState(""),s=e.chain,o=g3(s),a=F1(s),l=$b({chain:s,client:e.client,tokenAddress:i}),u=e.connectLocale.sendFundsScreen;let d=e.tokenList;l.data&&i&&(d=[{...l.data,address:i},...d]);const f=i?d.filter(y=>{const p=i.toLowerCase();return y.name.toLowerCase().includes(p)||y.symbol.toLowerCase().includes(p)||y.address.includes(i)}):d,{chainSelection:m}=e;return t==="select-chain"&&m?c.jsx(Nb,{className:"tw-send-funds-screen tw-send-funds-screen__select-chain",chains:m.chains,client:e.client,closeModal:()=>n("base"),connectLocale:e.connectLocale,networkSelector:{renderChain(y){return c.jsx(Sb,{chain:y.chain,client:e.client,confirming:!1,connectLocale:e.connectLocale,onClick:()=>{m.select(y.chain),n("base")},switchingFailed:!1})}},onBack:()=>n("base"),showTabs:!1}):c.jsxs(M,{className:"tw-send-funds-screen tw-send-funds-screen__select-token",animate:"fadein",style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.modalTitle||u.selectTokenTitle})}),c.jsx(We,{}),c.jsxs(M,{scrollY:!0,style:{maxHeight:"450px"},children:[c.jsx($,{y:"md"}),e.chainSelection&&c.jsxs(M,{px:"lg",children:[c.jsx(P,{size:"sm",children:"Select Network"}),c.jsx($,{y:"xxs"}),c.jsxs(Vb,{fullWidth:!0,onClick:()=>{n("select-chain")},variant:"secondary",children:[c.jsx(Bb,{chainIconUrl:a.url,client:e.client,size:A.lg}),o.name?c.jsx(P,{color:"primaryText",size:"sm",children:o.name}):c.jsx(ge,{height:ie.md}),c.jsx(qu,{height:A.sm,style:{marginLeft:"auto"},width:A.sm})]}),c.jsx($,{y:"xl"}),c.jsx(P,{size:"sm",children:"Select Token"})]}),c.jsxs(M,{px:"lg",children:[c.jsx($,{y:"xs"}),c.jsx(Kr,{onChange:y=>{r(y.target.value)},placeholder:u.searchToken,value:i,variant:"outline"})]}),c.jsx($,{y:"md"}),(f.length>0||!i)&&c.jsxs(M,{flex:"column",gap:"xs",px:"lg",scrollY:!0,style:{paddingBottom:z.lg,paddingTop:0},children:[!i&&c.jsx(fp,{chain:e.chain,client:e.client,onClick:()=>{e.onTokenSelect(Kl)},token:Kl}),f.map(y=>c.jsx(fp,{chain:e.chain,client:e.client,onClick:()=>e.onTokenSelect(y),token:y},y.address))]}),f.length===0&&l.isLoading&&i&&c.jsx(M,{animate:"fadein",center:"both",color:"secondaryText",flex:"column",gap:"md",p:"lg",style:{minHeight:"200px",paddingTop:0},children:c.jsx($e,{color:"accentText",size:"lg"})}),f.length===0&&!l.isLoading&&i&&c.jsxs(M,{animate:"fadein",center:"both",color:"secondaryText",flex:"column",gap:"md",p:"lg",style:{minHeight:"200px",paddingTop:0},children:[c.jsx(is,{height:A.lg,width:A.lg}),u.noTokensFound]}),c.jsx($,{y:"md"})]})]})}function fp(e){var r;const t=Tt(),n=$b({chain:e.chain,client:e.client,tokenAddress:Br(e.token)?void 0:e.token.address}),i=Br(e.token)?(r=n.data)==null?void 0:r.name:e.token.name;return c.jsxs(Vb,{fullWidth:!0,onClick:e.onClick,variant:"secondary",children:[c.jsx(Vm,{chain:e.chain,client:e.client,size:"lg",token:e.token}),c.jsxs(M,{flex:"column",gap:"4xs",children:[i?c.jsx(P,{color:"primaryText",size:"sm",children:i}):c.jsx(ge,{height:ie.md,width:"150px"}),t&&c.jsx(KU,{account:t,chain:e.chain,client:e.client,tokenAddress:Br(e.token)?void 0:e.token.address})]})]})}function KU(e){const t=xe({queryFn:async()=>Yv({account:e.account,chain:e.chain,client:e.client,tokenAddress:e.tokenAddress}),queryKey:["tokenBalance",e]});return t.data?c.jsxs(P,{size:"xs",children:[" ",rc(t.data)]}):c.jsx(ge,{height:ie.xs,width:"100px"})}const Vb=Be(ae)(()=>{const e=X();return{"&:hover":{background:e.colors.secondaryButtonBg,transform:"scale(1.01)"},background:e.colors.tertiaryBg,gap:z.sm,justifyContent:"flex-start",padding:z.sm,transition:"background 200ms ease, transform 150ms ease"}});function JU(e){const[t,n]=w.useState("base"),i=_t(),r=i==null?void 0:i.id,{connectLocale:s,client:o}=e;let a=Kl;const l=e.supportedTokens||nc;if(r&&l[r]&&l[r]!==nc[r]){const _=l[r],b=_==null?void 0:_[0];b&&(a=b)}const[u,d]=w.useState(a),[f,m]=w.useState(""),[y,p]=w.useState("0"),g=_t(),x=(g!=null&&g.id?l[g.id]:void 0)||[];return t==="tokenSelector"&&g?c.jsx(qU,{chain:g,client:o,connectLocale:s,onBack:()=>{n("base")},onTokenSelect:_=>{d(_),n("base")},tokenList:x}):c.jsx(XU,{amount:y,client:o,connectLocale:s,onBack:e.onBack,onTokenSelect:()=>{n("tokenSelector")},receiverAddress:f,setAmount:p,setReceiverAddress:m,token:u})}function XU(e){var b,I;const t=e.connectLocale.sendFundsScreen,n=e.token&&"address"in e.token?e.token.address:void 0,i=_t(),r=Tt(),s=_t(),o=Qu({address:r==null?void 0:r.address,chain:i,client:e.client,tokenAddress:n}),{receiverAddress:a,setReceiverAddress:l,amount:u,setAmount:d}=e,f=GU(e.client);function m(E){var T;const C=((T=E==null?void 0:E.data)==null?void 0:T.message)||(E==null?void 0:E.message);return C?C.includes("user rejected")||C.includes("user closed modal")||C.includes("user denied")?t.transactionRejected:C.includes("insufficient funds")?t.insufficientFunds:C:t.transactionFailed}const y=w.useId(),p=w.useId(),g=w.useId();if(!s)return null;if(f.isError)return c.jsxs(M,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__error",children:[c.jsx(be,{onBack:()=>{f.reset()},title:t.title}),c.jsx($,{y:"xl"}),c.jsxs(M,{animate:"fadein",center:"both",color:"danger",flex:"column",gap:"lg",style:{minHeight:"200px"},children:[c.jsx(is,{height:A.xl,width:A.xl}),c.jsx(P,{center:!0,color:"danger",multiline:!0,children:m(f.error)})]})]});if(f.isSuccess)return c.jsxs(M,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__success",children:[c.jsx(be,{onBack:()=>{f.reset()},title:t.title}),c.jsxs(M,{animate:"fadein",center:"both",color:"success",flex:"column",gap:"lg",style:{minHeight:"250px"},children:[c.jsx(gN,{height:A.xl,width:A.xl}),c.jsxs(P,{color:"success",children:[" ",t.successMessage," "]})]})]});const x=(e.token&&"name"in e.token?e.token.name:void 0)||((b=o==null?void 0:o.data)==null?void 0:b.name),_=(e.token&&"symbol"in e.token?e.token.symbol:void 0)||((I=o==null?void 0:o.data)==null?void 0:I.symbol);return c.jsxs(M,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__form",children:[c.jsx(be,{onBack:e.onBack,title:t.title}),c.jsx($,{y:"xl"}),c.jsxs("form",{onSubmit:E=>{E.preventDefault()},children:[c.jsx(ih,{color:"secondaryText",htmlFor:y,children:t.token}),c.jsx($,{y:"sm"}),c.jsxs(ae,{className:"tw-select-token-button",fullWidth:!0,id:y,onClick:e.onTokenSelect,style:{gap:z.sm,justifyContent:"flex-start",padding:z.sm},variant:"outline",children:[c.jsx(Vm,{chain:s,client:e.client,size:"lg",token:e.token}),c.jsxs(M,{flex:"column",gap:"xs",children:[x?c.jsx(P,{color:"primaryText",size:"sm",children:x}):c.jsx(ge,{height:ie.xs,width:"150px"}),o.data?c.jsx(P,{size:"xs",children:rc(o.data)}):c.jsx(ge,{height:ie.xs,width:"100px"})]})]}),c.jsx($,{y:"lg"}),c.jsx(ih,{color:"secondaryText",htmlFor:p,children:t.sendTo}),c.jsx($,{y:"sm"}),c.jsx(Kr,{className:"tw-address-input",id:p,onChange:E=>{l(E.target.value)},placeholder:"0x... or ENS name",required:!0,value:a,variant:"outline"}),c.jsx($,{y:"lg"}),c.jsx(ih,{color:"secondaryText",htmlFor:g,children:t.amount}),c.jsx($,{y:"sm"}),c.jsxs(M,{relative:!0,children:[c.jsx(Kr,{className:"tw-amount-input",id:g,onChange:E=>{d(E.target.value)},required:!0,type:"number",value:u,variant:"outline"}),c.jsx(e$,{children:c.jsxs(P,{size:"xs",children:[" ",_," "]})})]}),c.jsx($,{y:"xxl"}),c.jsxs(ae,{className:"tw-send-funds-button",fullWidth:!0,onClick:async()=>{!a||!u||await f.mutateAsync({amount:u,receiverAddress:a,tokenAddress:n})},style:{alignItems:"center",gap:z.sm,padding:z.md},type:"submit",variant:"accent",children:[f.isPending&&c.jsx($e,{color:"accentButtonText",size:"sm"}),f.isPending?t.sending:t.submitButton]})]})]})}const e$=ke({position:"absolute",right:z.sm,top:"50%",transform:"translateY(-50%)"});function t$({selected:e,onSelect:t,options:n,children:i}){const r=X();return c.jsxs("div",{children:[c.jsx(M,{bg:"secondaryButtonBg",center:"y",flex:"row",p:"xxs",style:{borderRadius:Z.lg,width:"100%"},children:n.map(s=>c.jsx(ae,{onClick:()=>t(s.value),style:{alignItems:"center",backgroundColor:s.value===e?r.colors.modalBg:"transparent",borderRadius:Z.md,display:"flex",flex:1,justifyContent:"center",paddingBlock:z.sm,position:"relative"},type:"button",variant:"accent",children:c.jsx(P,{color:s.value===e?"primaryText":"secondaryText",size:"sm",style:{textAlign:"center"},children:s.label})},s.value))}),c.jsx($,{y:"sm"}),i]})}const n$=e=>c.jsxs("svg",{fill:"none",height:e.size,role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("rect",{height:"18",rx:"2",ry:"2",width:"18",x:"3",y:"3"}),c.jsx("circle",{cx:"9",cy:"9",r:"2"}),c.jsx("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]}),i$=e=>c.jsxs("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:[c.jsx("circle",{cx:"9",cy:"28.5",fill:"currentColor",r:"1.5"}),c.jsx("path",{d:"M10 25H8v-4h2a2 2 0 0 0 0-4H8a2.002 2.002 0 0 0-2 2v.5H4V19a4.005 4.005 0 0 1 4-4h2a4 4 0 0 1 0 8Z",fill:"currentColor"}),c.jsx("path",{d:"m27.7 9.3l-7-7A.908.908 0 0 0 20 2H10a2.006 2.006 0 0 0-2 2v8h2V4h8v6a2.006 2.006 0 0 0 2 2h6v16H14v2h12a2.006 2.006 0 0 0 2-2V10a.91.91 0 0 0-.3-.7ZM20 10V4.4l5.6 5.6Z",fill:"currentColor"})]}),r$=e=>c.jsxs("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:[c.jsx("path",{d:"M29 31a.999.999 0 0 1-.625-.22L23.65 27H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1h3.65l4.726-3.78A1 1 0 0 1 30 17v13a1 1 0 0 1-1 1Zm-8-6h3a1 1 0 0 1 .625.22L28 27.92v-8.84l-3.376 2.7A1 1 0 0 1 24 22h-3Z",fill:"currentColor"}),c.jsx("path",{d:"M16 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6v3h2v-5a.91.91 0 0 0-.3-.7l-7-7A.909.909 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h8Zm2-23.6l5.6 5.6H18Z",fill:"currentColor"})]}),s$=e=>c.jsx("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:c.jsx("path",{d:"M12 6h-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm10 0h-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z",fill:"currentColor"})}),o$=e=>c.jsx("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:c.jsx("path",{d:"M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28Z",fill:"currentColor"})}),a$="https://arweave.net/{fileId}";function Wb(e){if(e.uri.startsWith("ar://")){const t=e.uri.replace("ar://","");if(e.gatewayUrl){const n=e.gatewayUrl.endsWith("/")?"":"/";return`${e.gatewayUrl}${n}${t}`}return a$.replace("{fileId}",t)}if(e.uri.startsWith("http"))return e.uri;throw new Error('Invalid URI scheme, expected "ar://" or "http(s)://"')}const c$=Object.freeze(Object.defineProperty({__proto__:null,resolveArweaveScheme:Wb},Symbol.toStringTag,{value:"Module"})),ro="audio/mpeg",fl="audio/midi",ml="audio/ogg",Mh="image/jpeg",l$={"*3gpp":"audio/3gpp","*jpm":"video/jpm","*mp3":"audio/mp3","*wav":"audio/wave","*x3db":"model/x3d+binary","*x3dv":"model/x3d+vrml","3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf",adp:"audio/adpcm",amr:"audio/amr",apng:"image/apng",au:"audio/basic",avif:"image/avif",bmp:"image/bmp",cgm:"image/cgm",drle:"image/dicom-rle",emf:"image/emf",exr:"image/aces",fits:"image/fits",g3:"image/g3fax",gif:"image/gif",glb:"model/gltf-binary",gltf:"model/gltf+json",h261:"video/h261",h263:"video/h263",h264:"video/h264",heic:"image/heic",heics:"image/heic-sequence",heif:"image/heif",heifs:"image/heif-sequence",hej2:"image/hej2k",hsj2:"image/hsj2",htm:"text/html",html:"text/html",ief:"image/ief",iges:"model/iges",igs:"model/iges",jhc:"image/jphc",jls:"image/jls",jp2:"image/jp2",jpe:Mh,jpeg:Mh,jpf:"image/jpx",jpg:Mh,jpg2:"image/jp2",jpgm:"video/jpm",jpgv:"video/jpeg",jph:"image/jph",jpm:"image/jpm",jpx:"image/jpx",jxr:"image/jxr",jxra:"image/jxra",jxrs:"image/jxrs",jxs:"image/jxs",jxsc:"image/jxsc",jxsi:"image/jxsi",jxss:"image/jxss",kar:fl,ktx:"image/ktx",ktx2:"image/ktx2",m1v:"video/mpeg",m2a:ro,m2v:"video/mpeg",m3a:ro,m4a:"audio/mp4",m4s:"video/iso.segment",mesh:"model/mesh",mid:fl,midi:fl,mj2:"video/mj2",mjp2:"video/mj2",mkv:"video/x-matroska",mov:"video/quicktime",mp2:ro,mp2a:ro,mp3:ro,mp4:"video/mp4",mp4a:"audio/mp4",mp4v:"video/mp4",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"video/mpeg",mpg4:"video/mp4",mpga:ro,msh:"model/mesh",mtl:"model/mtl",mxmf:"audio/mobile-xmf",obj:"model/obj",oga:ml,ogg:ml,ogv:"video/ogg",opus:ml,png:"image/png",qt:"video/quicktime",rmi:fl,s3m:"audio/s3m",sgi:"image/sgi",shtml:"text/html",sil:"audio/silk",silo:"model/mesh",snd:"audio/basic",spx:ml,stl:"model/stl",svg:"image/svg+xml",svgz:"image/svg+xml",t38:"image/t38",tfx:"image/tiff-fx",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",vrml:"model/vrml",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",wmf:"image/wmf",wrl:"model/vrml",x3d:"model/x3d+xml",x3db:"model/x3d+fastinfoset",x3dbz:"model/x3d+binary",x3dv:"model/x3d-vrml",x3dvz:"model/x3d+vrml",x3dz:"model/x3d+xml",xm:"audio/xm"};function u$(e){const t=e.replace(/^.*[/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),i=t.length<e.length;return(n.length<t.length-1||!i)&&l$[n]||null}async function d$(e){if(!e)return;const t=u$(e);if(t)return t;const n=e.startsWith("blob:")?await fetch(e):await fetch(e,{method:"HEAD"});if(n.ok&&n.headers.has("content-type"))return n.headers.get("content-type")||void 0}function mp(e,t,n,i){const r=w.useMemo(()=>{if(!t)return"";if(t.startsWith("ar://"))return Wb({gatewayUrl:i,uri:t});if(i)return t.replace("ipfs://",i);try{return Fi({client:e,uri:t})}catch{return t.replace("ipfs://","https://ipfs.io/ipfs/")}},[t,i,e]),s=xe({enabled:!!r&&!n,initialData:n,queryFn:()=>d$(r),queryKey:["mime-type",r]});return{isFetched:s.isFetched||!!n,mediaInfo:{mimeType:s.data||"image/",url:r}}}const h$=w.forwardRef(function({src:t,poster:n,alt:i,gatewayUrl:r,requireInteraction:s=!1,width:o="300px",height:a="300px",style:l,mimeType:u,client:d,controls:f,className:m},y){var b,I;const p={objectFit:"contain",...l},{mediaInfo:g,isFetched:x}=mp(d,t??void 0,u,r),{mediaInfo:_}=mp(d,n??void 0,void 0,r);if(!x||!t)return c.jsx("div",{className:m,style:l});{if(g.mimeType.startsWith("text/html"))return c.jsx(y$,{alt:i,className:m,poster:_.url,ref:y,requireInteraction:s,src:g.url,style:p});if(g.mimeType.startsWith("model")&&(console.error("Encountered an unsupported media type. 3D model support was removed in v5.92.0. To add a 3D model to your app, use @google/model-viewer and use the ModelViewer component."),(b=_.mimeType)!=null&&b.startsWith("image/")))return c.jsx(yp,{alt:i,className:m,height:a,ref:y,src:_.url,style:p,width:o});if(g.mimeType.startsWith("video"))return c.jsx(f$,{className:m,controls:f,poster:(I=_.mimeType)!=null&&I.startsWith("image/")?_.url:void 0,ref:y,requireInteraction:s,src:g.url,style:p});if(g.mimeType.startsWith("audio"))return c.jsx(m$,{alt:i,className:m,controls:f,height:a,poster:_.url,ref:y,src:g.url,style:p,width:o});if(g.mimeType.startsWith("image/"))return c.jsx(yp,{alt:i,className:m,height:a,ref:y,src:g.url,style:p,width:o})}return c.jsx(md,{alt:i,className:m,ref:y,src:g.url,style:p})}),Wm=({onClick:e,isPlaying:t})=>{const[n,i]=w.useState(!1),r=()=>i(!0),s=()=>i(!1),o=()=>i(!1),a=()=>i(!0);return c.jsx("button",{onClick:e,onMouseDown:o,onMouseEnter:r,onMouseLeave:s,onMouseUp:a,style:{backgroundColor:"#fff",border:"1px solid rgb(229, 232, 235)",borderRadius:"50%",bottom:0,color:"rgb(138, 147, 155)",cursor:"pointer",display:"grid",height:"32px",padding:0,placeItems:"center",position:"absolute",right:0,transform:"translate(-25%, -25%)",width:"32px",zIndex:3,...n?{boxShadow:"rgb(4 17 29 / 25%) 0px 0px 8px 0px",color:"rgb(53, 56, 64)"}:{}},type:"button",children:t?c.jsx(s$,{}):c.jsx(o$,{})})},yp=w.forwardRef(function(t,n){const{style:i,src:r,alt:s,className:o,height:a,width:l}=t,[u,d]=w.useState(!1);return u?c.jsx(md,{alt:s,className:o,ref:n,src:r,style:i}):c.jsx("img",{alt:s,className:o,height:a,onError:()=>{d(!0)},ref:n,src:r??void 0,style:i,width:l})}),f$=w.forwardRef(function({src:t,alt:n,poster:i,requireInteraction:r,style:s,width:o,height:a,controls:l,className:u},d){const f=w.useRef(null),[m,y]=w.useState(!r),[p,g]=w.useState(!0),[x,_]=w.useState(!1);return w.useEffect(()=>{if(f.current)if(m)try{f.current.play()}catch(b){console.error("Error playing video",b)}else try{f.current.pause(),f.current.currentTime=0}catch(b){console.error("Error pausing video",b)}},[m]),x?c.jsx(md,{alt:n,className:u,ref:d,src:t,style:s}):c.jsxs("div",{className:u,style:{position:"relative",...s},children:[c.jsx("video",{controls:l,controlsList:"nodownload",height:a,loop:!0,muted:p,onCanPlay:()=>{var b;m&&((b=f.current)==null||b.play())},onError:()=>{_(!0)},playsInline:!0,poster:i??void 0,preload:i?"metadata":"auto",ref:Fb([f,d]),src:t??void 0,style:{height:"100%",objectFit:"contain",opacity:i?m?1:0:1,transition:"opacity .5s",width:"100%",zIndex:1},width:o}),i&&c.jsx("img",{alt:n,src:i,style:{bottom:0,height:"100%",left:0,objectFit:"contain",opacity:m?0:1,pointerEvents:"none",position:"absolute",right:0,top:0,transition:"opacity .5s",width:"100%",zIndex:2}}),c.jsx(Wm,{isPlaying:m,onClick:()=>{y(b=>!b),g(!1)}})]})}),m$=w.forwardRef(function({src:t,alt:n,poster:i,style:r,height:s,width:o,className:a,controls:l},u){const d=w.useRef(null),[f,m]=w.useState(!1),[y,p]=w.useState(!0),[g,x]=w.useState(!1);return w.useEffect(()=>{d.current&&(f?d.current.play():(d.current.pause(),d.current.currentTime=0))},[f]),g?c.jsx(md,{alt:n,className:a,ref:u,src:t,style:r}):c.jsxs("div",{className:a,style:{position:"relative",...r},children:[i?c.jsx("img",{alt:n,height:s,src:i,style:{height:"100%",objectFit:"contain",pointerEvents:"none",width:"100%"},width:o}):c.jsx("div",{style:{backgroundColor:"#fff",color:"rgb(138, 147, 155)",display:"grid",height:"100%",placeItems:"center",pointerEvents:"none",width:"100%"},children:c.jsx(r$,{style:{height:"64px",width:"64px"}})}),c.jsx(Wm,{isPlaying:f,onClick:()=>{m(_=>!_),p(!1)}}),c.jsx("audio",{controls:l,controlsList:"nodownload",loop:!0,muted:y,onError:()=>{x(!0)},playsInline:!0,preload:"none",ref:Fb([d,u]),src:t??void 0,style:{opacity:0,pointerEvents:"none",position:"absolute",visibility:"hidden",zIndex:-1}})]})}),y$=w.forwardRef(function({src:t,alt:n,poster:i,requireInteraction:r,style:s,...o},a){const[l,u]=w.useState(!r);return c.jsxs("div",{style:{position:"relative",...s},...o,children:[c.jsx("iframe",{allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",ref:a,sandbox:"allow-scripts",src:l?t??void 0:void 0,style:{border:"none",height:"100%",objectFit:"contain",opacity:i?l?1:0:1,transition:"opacity .5s",width:"100%",zIndex:1},title:n||"thirdweb iframe player"}),i&&c.jsx("img",{alt:n,src:i,style:{bottom:0,height:"100%",left:0,objectFit:"contain",opacity:l?0:1,pointerEvents:"none",position:"absolute",right:0,top:0,transition:"opacity .5s",width:"100%",zIndex:2}}),c.jsx(Wm,{isPlaying:l,onClick:()=>{u(d=>!d)}})]})}),md=w.forwardRef(function({src:t,alt:n,style:i,className:r},s){return c.jsx("div",{className:r,style:{position:"relative",...i},children:c.jsx("div",{style:{backgroundColor:"#fff",color:"rgb(138, 147, 155)",display:"grid",height:"100%",placeItems:"center",width:"100%"},children:c.jsxs("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",flexWrap:"nowrap",gap:"8px"},children:[c.jsx(i$,{style:{aspectRatio:"1",maxWidth:"128px",minWidth:"48px",width:"50%"}}),c.jsx("a",{href:t??void 0,ref:s,rel:"noopener noreferrer",style:{color:"rgb(138, 147, 155)",textDecoration:"underline"},target:"_blank",children:n||"File"})]})})})});function Fb(e){return t=>{for(const n of e)typeof n=="function"?n(t):n!=null&&(n.current=t)}}function g$(e){return c.jsxs(M,{style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.connectLocale.viewFunds.viewNFTs})}),c.jsx(We,{}),c.jsxs(M,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[c.jsx($,{y:"md"}),c.jsx(Yb,{...e})]})]})}function Yb(e){var s;const t=Tt(),n=_t(),i=xe({enabled:!!n&&!!t,queryFn:async()=>{var a,l;if(!t)throw new Error("No active account");if(!n)throw new Error("No active chain");return(await k7({chains:[n],client:e.client,ownerAddress:t.address,contractAddresses:(l=(a=e.supportedNFTs)==null?void 0:a[n.id])==null?void 0:l.map(u=>u.toLowerCase())})).filter(u=>!!u.metadata.name&&!!u.metadata.image).map(u=>({address:u.tokenAddress,chain:Pe(u.chainId),...u}))},queryKey:["nfts",n==null?void 0:n.id,t==null?void 0:t.address,e.supportedNFTs]});if(!(n!=null&&n.id)||!(t!=null&&t.address))return null;const r=i.data;return c.jsxs(c.Fragment,{children:[i.error?c.jsx(M,{center:"both",py:"lg",children:c.jsx(P,{center:!0,color:"secondaryText",size:"sm",children:"Error loading NFTs"})}):((s=i.data)==null?void 0:s.length)===0&&!i.isLoading?c.jsx(M,{center:"both",py:"lg",children:c.jsx(P,{center:!0,color:"secondaryText",size:"sm",children:"No NFTs found on this chain"})}):c.jsx(M,{style:{display:"grid",gap:"12px",gridTemplateColumns:"1fr 1fr"},children:i.isLoading||!r?c.jsxs(c.Fragment,{children:[c.jsx(ge,{height:"150px",width:"150px"}),c.jsx(ge,{height:"150px",width:"150px"}),c.jsx(ge,{height:"150px",width:"150px"})]}):r.map(o=>c.jsx(p$,{...o,chain:o.chain,client:e.client,theme:e.theme},`${o.chain.id}:${o.address}:${o.id}`))}),c.jsx($,{y:"lg"})]})}function p$(e){var r;const t=typeof e.theme=="string"?e.theme:e.theme.type,n=typeof e.theme=="string"?void 0:e.theme,i=c.jsxs("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",gap:"4px",width:"150px"},children:[c.jsxs("div",{style:{alignItems:"center",background:t==="light"?"rgba(0, 0, 0, 0.10)":"rgba(0, 0, 0, 0.20)",borderRadius:"8px",display:"flex",flexShrink:0,height:"150px",overflow:"hidden",position:"relative",width:"150px"},children:[e.metadata.image&&c.jsx(h$,{client:e.client,src:e.metadata.image,style:{height:"100%",width:"100%"}}),e.quantityOwned>1&&c.jsx("div",{style:{alignItems:"center",background:((r=n==null?void 0:n.colors)==null?void 0:r.modalBg)??(t==="light"?"white":"black"),borderRadius:"100%",bottom:"4px",display:"flex",fontSize:"10px",height:"20px",justifyContent:"center",padding:"4px 4px",position:"absolute",right:"4px",width:"20px"},children:e.quantityOwned.toString()}),e.chain.icon&&c.jsx("img",{alt:e.chain.name,src:e.chain.icon.url,style:{bottom:"4px",height:"20px",left:"4px",position:"absolute",width:"20px"}})]}),c.jsx(P,{color:"primaryText",size:"xs",style:{fontWeight:600,maxLines:2,textAlign:"center"},children:e.metadata.name})]});return e.chain.name?c.jsx("a",{href:`https://thirdweb.com/${e.chain.id}/${e.address}/nfts/${e.id}`,rel:"noreferrer",target:"_blank",children:i}):i}function w$(e){return c.jsxs(M,{style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.connectLocale.viewFunds.viewTokens})}),c.jsx(We,{}),c.jsxs(M,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[c.jsx($,{y:"md"}),c.jsx(Qb,{...e}),c.jsx($,{y:"lg"})]})]})}function Qb(e){var o;const t=Tt(),n=_t(),i=e.supportedTokens||nc,r=(n!=null&&n.id?i[n.id]:void 0)||[],s=xe({enabled:!!n&&!!t&&(!e.supportedTokens||!e.supportedTokens[n.id]),queryFn:async()=>{if(!n)throw new Error("No active chain");if(!t)throw new Error("No account");return(await z7({chains:[n],client:e.client,ownerAddress:t.address})).filter(l=>{var u;return!((u=nc[n.id])!=null&&u.some(d=>d.address.toLowerCase()===l.tokenAddress.toLowerCase()))})},queryKey:["tokens",n==null?void 0:n.id,t==null?void 0:t.address]});return!n||!t?null:c.jsxs(c.Fragment,{children:[c.jsx(Ih,{chain:n,client:e.client,token:Kl}),r.map(a=>c.jsx(Ih,{chain:n,client:e.client,token:a},a.address)),s.isLoading&&c.jsxs(M,{flex:"column",gap:"sm",p:"sm",children:[c.jsx(ge,{height:ie.md,width:"100%"}),c.jsx(ge,{height:ie.md,width:"100%"})]}),(o=s.data)==null?void 0:o.map(a=>c.jsx(Ih,{balanceData:a,chain:n,client:e.client,token:{address:a.tokenAddress,name:a.name??"",symbol:a.symbol??""}},a.tokenAddress))]})}function Ih(e){var r;const t=Tt(),n=Qu({address:t==null?void 0:t.address,chain:e.chain,client:e.client,tokenAddress:Br(e.token)?void 0:e.token.address},{enabled:e.balanceData===void 0}),i=Br(e.token)?(r=n.data)==null?void 0:r.name:e.token.name;return c.jsxs(M,{flex:"row",gap:"sm",p:"sm",children:[c.jsx(Vm,{chain:e.chain,client:e.client,size:"lg",token:e.token}),c.jsxs(M,{flex:"column",gap:"xxs",children:[i?c.jsx(P,{color:"primaryText",size:"sm",children:i}):c.jsx(ge,{height:ie.md,width:"150px"}),e.balanceData?c.jsxs(P,{size:"xs",children:[" ",rc(e.balanceData)]}):n.data?c.jsxs(P,{size:"xs",children:[" ",rc(n.data)]}):c.jsx(ge,{height:ie.xs,width:"100px"})]})]})}const gp={label:c.jsxs("span",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[c.jsx(fd,{size:A.sm})," Tokens"]}),value:"Tokens"},pp={label:c.jsxs("span",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[c.jsx(n$,{size:A.sm})," NFTs"]}),value:"NFTs"};function x$(e){var s;const{connectLocale:t}=e,n=w.useMemo(()=>{if(!e.assetTabs)return[gp,pp];if(!e.assetTabs.length)return[];const o=[];for(const a of e.assetTabs)a==="token"?o.push(gp):a==="nft"&&o.push(pp);return o},[e.assetTabs]),[i,r]=w.useState(((s=n[0])==null?void 0:s.value)||"Tokens");return c.jsxs(M,{animate:"fadein",style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:t.viewFunds.viewAssets})}),c.jsx(We,{}),c.jsxs(M,{px:"lg",scrollY:!0,style:{minHeight:"330px"},children:[c.jsx($,{y:"md"}),c.jsx(t$,{onSelect:r,options:n,selected:i,children:c.jsxs(M,{scrollY:!0,style:{maxHeight:"300px"},children:[i==="Tokens"&&c.jsx(Qb,{client:e.client,connectLocale:t,supportedTokens:e.supportedTokens}),i==="NFTs"&&c.jsx(Yb,{client:e.client,connectLocale:t,supportedNFTs:e.supportedNFTs,theme:e.theme})]})}),c.jsx($,{y:"lg"})]})]})}const wp=qI;var yo=Mi;const ac=v$().console||{},_$={mapHttpRequest:yl,mapHttpResponse:yl,wrapRequestSerializer:Eh,wrapResponseSerializer:Eh,wrapErrorSerializer:Eh,req:yl,res:yl,err:C$};function b$(e,t){return Array.isArray(e)?e.filter(function(i){return i!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function Mi(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 n=e.browser.write||ac;e.browser.write&&(e.browser.asObject=!0);const i=e.serializers||{},r=b$(e.browser.serialize,i);let s=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(s=!1);const o=["error","fatal","warn","info","debug","trace"];typeof n=="function"&&(n.error=n.fatal=n.warn=n.info=n.debug=n.trace=n),e.enabled===!1&&(e.level="silent");const a=e.level||"info",l=Object.create(n);l.log||(l.log=cc),Object.defineProperty(l,"levelVal",{get:d}),Object.defineProperty(l,"level",{get:f,set:m});const u={transmit:t,serialize:r,asObject:e.browser.asObject,levels:o,timestamp:L$(e)};l.levels=Mi.levels,l.level=a,l.setMaxListeners=l.getMaxListeners=l.emit=l.addListener=l.on=l.prependListener=l.once=l.prependOnceListener=l.removeListener=l.removeAllListeners=l.listeners=l.listenerCount=l.eventNames=l.write=l.flush=cc,l.serializers=i,l._serialize=r,l._stdErrSerialize=s,l.child=y,t&&(l._logEvent=c0());function d(){return this.level==="silent"?1/0:this.levels.values[this.level]}function f(){return this._level}function m(p){if(p!=="silent"&&!this.levels.values[p])throw Error("unknown level "+p);this._level=p,so(u,l,"error","log"),so(u,l,"fatal","error"),so(u,l,"warn","error"),so(u,l,"info","log"),so(u,l,"debug","log"),so(u,l,"trace","log")}function y(p,g){if(!p)throw new Error("missing bindings for child Pino");g=g||{},r&&p.serializers&&(g.serializers=p.serializers);const x=g.serializers;if(r&&x){var _=Object.assign({},i,x),b=e.browser.serialize===!0?Object.keys(_):r;delete p.serializers,yd([p],b,_,this._stdErrSerialize)}function I(E){this._childLevel=(E._childLevel|0)+1,this.error=oo(E,p,"error"),this.fatal=oo(E,p,"fatal"),this.warn=oo(E,p,"warn"),this.info=oo(E,p,"info"),this.debug=oo(E,p,"debug"),this.trace=oo(E,p,"trace"),_&&(this.serializers=_,this._serialize=b),t&&(this._logEvent=c0([].concat(E._logEvent.bindings,p)))}return I.prototype=this,new I(this)}return l}Mi.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"}};Mi.stdSerializers=_$;Mi.stdTimeFunctions=Object.assign({},{nullTime:Hb,epochTime:Gb,unixTime:T$,isoTime:j$});function so(e,t,n,i){const r=Object.getPrototypeOf(t);t[n]=t.levelVal>t.levels.values[n]?cc:r[n]?r[n]:ac[n]||ac[i]||cc,M$(e,t,n)}function M$(e,t,n){!e.transmit&&t[n]===cc||(t[n]=function(i){return function(){const s=e.timestamp(),o=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===ac?ac:this;for(var l=0;l<o.length;l++)o[l]=arguments[l];if(e.serialize&&!e.asObject&&yd(o,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?i.call(a,I$(this,n,o,s)):i.apply(a,o),e.transmit){const u=e.transmit.level||t.level,d=Mi.levels.values[u],f=Mi.levels.values[n];if(f<d)return;E$(this,{ts:s,methodLevel:n,methodValue:f,transmitValue:Mi.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},o)}}}(t[n]))}function I$(e,t,n,i){e._serialize&&yd(n,e._serialize,e.serializers,e._stdErrSerialize);const r=n.slice();let s=r[0];const o={};i&&(o.time=i),o.level=Mi.levels.values[t];let a=(e._childLevel|0)+1;if(a<1&&(a=1),s!==null&&typeof s=="object"){for(;a--&&typeof r[0]=="object";)Object.assign(o,r.shift());s=r.length?wp(r.shift(),r):void 0}else typeof s=="string"&&(s=wp(r.shift(),r));return s!==void 0&&(o.msg=s),o}function yd(e,t,n,i){for(const r in e)if(i&&e[r]instanceof Error)e[r]=Mi.stdSerializers.err(e[r]);else if(typeof e[r]=="object"&&!Array.isArray(e[r]))for(const s in e[r])t&&t.indexOf(s)>-1&&s in n&&(e[r][s]=n[s](e[r][s]))}function oo(e,t,n){return function(){const i=new Array(1+arguments.length);i[0]=t;for(var r=1;r<i.length;r++)i[r]=arguments[r-1];return e[n].apply(this,i)}}function E$(e,t,n){const i=t.send,r=t.ts,s=t.methodLevel,o=t.methodValue,a=t.val,l=e._logEvent.bindings;yd(n,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=r,e._logEvent.messages=n.filter(function(u){return l.indexOf(u)===-1}),e._logEvent.level.label=s,e._logEvent.level.value=o,i(s,e._logEvent,a),e._logEvent=c0(l)}function c0(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function C$(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const n in e)t[n]===void 0&&(t[n]=e[n]);return t}function L$(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Hb:Gb}function yl(){return{}}function Eh(e){return e}function cc(){}function Hb(){return!1}function Gb(){return Date.now()}function T$(){return Math.round(Date.now()/1e3)}function j$(){return new Date(Date.now()).toISOString()}function v$(){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 gd=QI(yo),N$={level:"info"},$c="custom_context",Fm=1e3*1024;let S$=class{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}},xp=class{constructor(t){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=t,this.sizeInBytes=0}append(t){const n=new S$(t);if(n.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${t} with size ${n.size}`);for(;this.size+n.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=n),this.tail=n):(this.head=n,this.tail=n),this.lengthInNodes++,this.sizeInBytes+=n.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 n=this.head;for(;n!==null;)t.push(n.value),n=n.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 n=t.value;return t=t.next,{done:!1,value:n}}}}};class Zb{constructor(t,n=Fm){this.level=t??"error",this.levelValue=yo.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=n,this.logs=new xp(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(t,n){n===yo.levels.values.error?console.error(t):n===yo.levels.values.warn?console.warn(t):n===yo.levels.values.debug?console.debug(t):n===yo.levels.values.trace?console.trace(t):console.log(t)}appendToLogs(t){this.logs.append(Wh({timestamp:new Date().toISOString(),log:t}));const n=typeof t=="string"?JSON.parse(t).level:t.level;n>=this.levelValue&&this.forwardToConsole(t,n)}getLogs(){return this.logs}clearLogs(){this.logs=new xp(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(t){const n=this.getLogArray();return n.push(Wh({extraMetadata:t})),new Blob(n,{type:"application/json"})}}let A$=class{constructor(t,n=Fm){this.baseChunkLogger=new Zb(t,n)}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 n=URL.createObjectURL(this.logsToBlob(t)),i=document.createElement("a");i.href=n,i.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)}},D$=class{constructor(t,n=Fm){this.baseChunkLogger=new Zb(t,n)}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 O$=Object.defineProperty,P$=Object.defineProperties,k$=Object.getOwnPropertyDescriptors,_p=Object.getOwnPropertySymbols,z$=Object.prototype.hasOwnProperty,R$=Object.prototype.propertyIsEnumerable,bp=(e,t,n)=>t in e?O$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,su=(e,t)=>{for(var n in t||(t={}))z$.call(t,n)&&bp(e,n,t[n]);if(_p)for(var n of _p(t))R$.call(t,n)&&bp(e,n,t[n]);return e},ou=(e,t)=>P$(e,k$(t));function Ym(e){return ou(su({},e),{level:(e==null?void 0:e.level)||N$.level})}function U$(e,t=$c){return e[t]||""}function $$(e,t,n=$c){return e[n]=t,e}function dn(e,t=$c){let n="";return typeof e.bindings>"u"?n=U$(e,t):n=e.bindings().context||"",n}function B$(e,t,n=$c){const i=dn(e,n);return i.trim()?`${i}/${t}`:t}function Kt(e,t,n=$c){const i=B$(e,t,n),r=e.child({context:i});return $$(r,i,n)}function V$(e){var t,n;const i=new A$((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:gd(ou(su({},e.opts),{level:"trace",browser:ou(su({},(n=e.opts)==null?void 0:n.browser),{write:r=>i.write(r)})})),chunkLoggerController:i}}function W$(e){var t;const n=new D$((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:gd(ou(su({},e.opts),{level:"trace"}),n),chunkLoggerController:n}}function F$(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?V$(e):W$(e)}var Y$=Object.defineProperty,Q$=(e,t,n)=>t in e?Y$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mp=(e,t,n)=>Q$(e,typeof t!="symbol"?t+"":t,n);class H$ extends Zo{constructor(t){super(),this.opts=t,Mp(this,"protocol","wc"),Mp(this,"version",2)}}var G$=Object.defineProperty,Z$=(e,t,n)=>t in e?G$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q$=(e,t,n)=>Z$(e,t+"",n);class K$ extends Zo{constructor(t,n){super(),this.core=t,this.logger=n,q$(this,"records",new Map)}}class J${constructor(t,n){this.logger=t,this.core=n}}class X$ extends Zo{constructor(t,n){super(),this.relayer=t,this.logger=n}}let eB=class extends Zo{constructor(t){super()}},tB=class{constructor(t,n,i,r){this.core=t,this.logger=n,this.name=i}},nB=class extends Zo{constructor(t,n){super(),this.relayer=t,this.logger=n}};class iB extends Zo{constructor(t,n){super(),this.core=t,this.logger=n}}let rB=class{constructor(t,n,i){this.core=t,this.logger=n,this.store=i}},sB=class{constructor(t,n){this.projectId=t,this.logger=n}},oB=class{constructor(t,n,i){this.core=t,this.logger=n,this.telemetryEnabled=i}};var aB=Object.defineProperty,cB=(e,t,n)=>t in e?aB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ip=(e,t,n)=>cB(e,typeof t!="symbol"?t+"":t,n);let lB=class{constructor(t){this.opts=t,Ip(this,"protocol","wc"),Ip(this,"version",2)}},uB=class{constructor(t){this.client=t}};function lc(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function l0(e){return lc(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const qb="2.31.0";let Ma={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${qb}`};class $s extends Error{constructor(t,n={}){var a;const i=(()=>{var l;return n.cause instanceof $s?n.cause.details:(l=n.cause)!=null&&l.message?n.cause.message:n.details})(),r=n.cause instanceof $s&&n.cause.docsPath||n.docsPath,s=(a=Ma.getDocsUrl)==null?void 0:a.call(Ma,{...n,docsPath:r}),o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...i?[`Details: ${i}`]:[],...Ma.version?[`Version: ${Ma.version}`]:[]].join(`
317
+ `);super(o,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=i,this.docsPath=r,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=qb}walk(t){return Kb(this,t)}}function Kb(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Kb(e.cause,t):t?null:e}class Jb extends $s{constructor({size:t,targetSize:n,type:i}){super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}function la(e,{dir:t,size:n=32}={}){return typeof e=="string"?dB(e,{dir:t,size:n}):hB(e,{dir:t,size:n})}function dB(e,{dir:t,size:n=32}={}){if(n===null)return e;const i=e.replace("0x","");if(i.length>n*2)throw new Jb({size:Math.ceil(i.length/2),targetSize:n,type:"hex"});return`0x${i[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function hB(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Jb({size:e.length,targetSize:n,type:"bytes"});const i=new Uint8Array(n);for(let r=0;r<n;r++){const s=t==="right";i[s?r:n-r-1]=e[s?r:e.length-r-1]}return i}class fB extends $s{constructor({max:t,min:n,signed:i,size:r,value:s}){super(`Number "${s}" is not in safe ${r?`${r*8}-bit ${i?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class mB extends $s{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function ua(e,{size:t}){if(l0(e)>t)throw new mB({givenSize:l0(e),maxSize:t})}function u0(e,t={}){const{signed:n}=t;t.size&&ua(e,{size:t.size});const i=BigInt(e);if(!n)return i;const r=(e.length-2)/2,s=(1n<<BigInt(r)*8n-1n)-1n;return i<=s?i:i-BigInt(`0x${"f".padStart(r*2,"f")}`)-1n}function yB(e,t={}){return Number(u0(e,t))}const gB=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d0(e,t={}){return typeof e=="number"||typeof e=="bigint"?eM(e,t):typeof e=="string"?xB(e,t):typeof e=="boolean"?pB(e,t):Xb(e,t)}function pB(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ua(n,{size:t.size}),la(n,{size:t.size})):n}function Xb(e,t={}){let n="";for(let r=0;r<e.length;r++)n+=gB[e[r]];const i=`0x${n}`;return typeof t.size=="number"?(ua(i,{size:t.size}),la(i,{dir:"right",size:t.size})):i}function eM(e,t={}){const{signed:n,size:i}=t,r=BigInt(e);let s;i?n?s=(1n<<BigInt(i)*8n-1n)-1n:s=2n**(BigInt(i)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&n?-s-1n:0;if(s&&r>s||r<o){const l=typeof e=="bigint"?"n":"";throw new fB({max:s?`${s}${l}`:void 0,min:`${o}${l}`,signed:n,size:i,value:`${e}${l}`})}const a=`0x${(n&&r<0?(1n<<BigInt(i*8))+BigInt(r):r).toString(16)}`;return i?la(a,{size:i}):a}const wB=new TextEncoder;function xB(e,t={}){const n=wB.encode(e);return Xb(n,t)}const _B=new TextEncoder;function bB(e,t={}){return typeof e=="number"||typeof e=="bigint"?IB(e,t):typeof e=="boolean"?MB(e,t):lc(e)?tM(e,t):nM(e,t)}function MB(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(ua(n,{size:t.size}),la(n,{size:t.size})):n}const Ni={zero:48,nine:57,A:65,F:70,a:97,f:102};function Ep(e){if(e>=Ni.zero&&e<=Ni.nine)return e-Ni.zero;if(e>=Ni.A&&e<=Ni.F)return e-(Ni.A-10);if(e>=Ni.a&&e<=Ni.f)return e-(Ni.a-10)}function tM(e,t={}){let n=e;t.size&&(ua(n,{size:t.size}),n=la(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);const r=i.length/2,s=new Uint8Array(r);for(let o=0,a=0;o<r;o++){const l=Ep(i.charCodeAt(a++)),u=Ep(i.charCodeAt(a++));if(l===void 0||u===void 0)throw new $s(`Invalid byte sequence ("${i[a-2]}${i[a-1]}" in "${i}").`);s[o]=l*16+u}return s}function IB(e,t){const n=eM(e,t);return tM(n)}function nM(e,t={}){const n=_B.encode(e);return typeof t.size=="number"?(ua(n,{size:t.size}),la(n,{dir:"right",size:t.size})):n}const gl=BigInt(2**32-1),Cp=BigInt(32);function EB(e,t=!1){return t?{h:Number(e&gl),l:Number(e>>Cp&gl)}:{h:Number(e>>Cp&gl)|0,l:Number(e&gl)|0}}function CB(e,t=!1){const n=e.length;let i=new Uint32Array(n),r=new Uint32Array(n);for(let s=0;s<n;s++){const{h:o,l:a}=EB(e[s],t);[i[s],r[s]]=[o,a]}return[i,r]}const LB=(e,t,n)=>e<<n|t>>>32-n,TB=(e,t,n)=>t<<n|e>>>32-n,jB=(e,t,n)=>t<<n-32|e>>>64-n,vB=(e,t,n)=>e<<n-32|t>>>64-n,ao=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function NB(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function au(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function uc(e,...t){if(!NB(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 xX(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");au(e.outputLen),au(e.blockLen)}function Lp(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 SB(e,t){uc(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function AB(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function iM(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function _X(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function bX(e,t){return e<<32-t|e>>>t}const DB=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function OB(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function PB(e){for(let t=0;t<e.length;t++)e[t]=OB(e[t]);return e}const Tp=DB?e=>e:PB;function kB(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function rM(e){return typeof e=="string"&&(e=kB(e)),uc(e),e}function MX(...e){let t=0;for(let i=0;i<e.length;i++){const r=e[i];uc(r),t+=r.length}const n=new Uint8Array(t);for(let i=0,r=0;i<e.length;i++){const s=e[i];n.set(s,r),r+=s.length}return n}class zB{}function RB(e){const t=i=>e().update(rM(i)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function IX(e=32){if(ao&&typeof ao.getRandomValues=="function")return ao.getRandomValues(new Uint8Array(e));if(ao&&typeof ao.randomBytes=="function")return Uint8Array.from(ao.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const UB=BigInt(0),Ia=BigInt(1),$B=BigInt(2),BB=BigInt(7),VB=BigInt(256),WB=BigInt(113),sM=[],oM=[],aM=[];for(let e=0,t=Ia,n=1,i=0;e<24;e++){[n,i]=[i,(2*n+3*i)%5],sM.push(2*(5*i+n)),oM.push((e+1)*(e+2)/2%64);let r=UB;for(let s=0;s<7;s++)t=(t<<Ia^(t>>BB)*WB)%VB,t&$B&&(r^=Ia<<(Ia<<BigInt(s))-Ia);aM.push(r)}const cM=CB(aM,!0),FB=cM[0],YB=cM[1],jp=(e,t,n)=>n>32?jB(e,t,n):LB(e,t,n),vp=(e,t,n)=>n>32?vB(e,t,n):TB(e,t,n);function QB(e,t=24){const n=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,u=n[l],d=n[l+1],f=jp(u,d,1)^n[a],m=vp(u,d,1)^n[a+1];for(let y=0;y<50;y+=10)e[o+y]^=f,e[o+y+1]^=m}let r=e[2],s=e[3];for(let o=0;o<24;o++){const a=oM[o],l=jp(r,s,a),u=vp(r,s,a),d=sM[o];r=e[d],s=e[d+1],e[d]=l,e[d+1]=u}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=FB[i],e[1]^=YB[i]}iM(n)}class Qm extends zB{constructor(t,n,i,r=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=i,this.enableXOF=r,this.rounds=s,au(i),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=AB(this.state)}clone(){return this._cloneInto()}keccak(){Tp(this.state32),QB(this.state32,this.rounds),Tp(this.state32),this.posOut=0,this.pos=0}update(t){Lp(this),t=rM(t),uc(t);const{blockLen:n,state:i}=this,r=t.length;for(let s=0;s<r;){const o=Math.min(n-this.pos,r-s);for(let a=0;a<o;a++)i[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:i,blockLen:r}=this;t[i]^=n,n&128&&i===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){Lp(this,!1),uc(t),this.finish();const n=this.state,{blockLen:i}=this;for(let r=0,s=t.length;r<s;){this.posOut>=i&&this.keccak();const o=Math.min(i-this.posOut,s-r);t.set(n.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return au(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(SB(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,iM(this.state)}_cloneInto(t){const{blockLen:n,suffix:i,outputLen:r,rounds:s,enableXOF:o}=this;return t||(t=new Qm(n,i,r,o,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=i,t.outputLen=r,t.enableXOF=o,t.destroyed=this.destroyed,t}}const HB=(e,t,n)=>RB(()=>new Qm(t,e,n)),GB=HB(1,136,256/8);function lM(e,t){const n=t||"hex",i=GB(lc(e,{strict:!1})?bB(e):e);return n==="bytes"?i:d0(i)}class ZB extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const i=this.keys().next().value;i&&this.delete(i)}return this}}const Ch=new ZB(8192);function qB(e,t){if(Ch.has(`${e}.${t}`))return Ch.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),i=lM(nM(n),"bytes"),r=n.split("");for(let o=0;o<40;o+=2)i[o>>1]>>4>=8&&r[o]&&(r[o]=r[o].toUpperCase()),(i[o>>1]&15)>=8&&r[o+1]&&(r[o+1]=r[o+1].toUpperCase());const s=`0x${r.join("")}`;return Ch.set(`${e}.${t}`,s),s}function KB(e){const t=lM(`0x${e.substring(4)}`).substring(26);return qB(`0x${t}`)}async function JB({hash:e,signature:t}){const n=lc(e)?e:d0(e),{secp256k1:i}=await h(async()=>{const{secp256k1:o}=await import("./secp256k1-MOORasZn.js");return{secp256k1:o}},__vite__mapDeps([43,1,2,3,4,5]));return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:u,s:d,v:f,yParity:m}=t,y=Number(m??f),p=Np(y);return new i.Signature(u0(u),u0(d)).addRecoveryBit(p)}const o=lc(t)?t:d0(t);if(l0(o)!==65)throw new Error("invalid signature length");const a=yB(`0x${o.slice(130)}`),l=Np(a);return i.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(l)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Np(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function XB({hash:e,signature:t}){return KB(await JB({hash:e,signature:t}))}var eV={};const tV=":";function vl(e){const[t,n]=e.split(tV);return{namespace:t,reference:n}}function uM(e,t){return e.includes(":")?[e]:t.chains||[]}var nV=Object.defineProperty,iV=Object.defineProperties,rV=Object.getOwnPropertyDescriptors,Sp=Object.getOwnPropertySymbols,sV=Object.prototype.hasOwnProperty,oV=Object.prototype.propertyIsEnumerable,h0=(e,t,n)=>t in e?nV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ap=(e,t)=>{for(var n in t||(t={}))sV.call(t,n)&&h0(e,n,t[n]);if(Sp)for(var n of Sp(t))oV.call(t,n)&&h0(e,n,t[n]);return e},aV=(e,t)=>iV(e,rV(t)),Dp=(e,t,n)=>h0(e,typeof t!="symbol"?t+"":t,n);const cV="ReactNative",pn={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},lV="js";function cu(){return typeof Ui<"u"&&typeof Ui.versions<"u"&&typeof Ui.versions.node<"u"}function os(){return!ko()&&!!m4()&&navigator.product===cV}function uV(){return os()&&typeof _e<"u"&&typeof(_e==null?void 0:_e.Platform)<"u"&&(_e==null?void 0:_e.Platform.OS)==="android"}function dV(){return os()&&typeof _e<"u"&&typeof(_e==null?void 0:_e.Platform)<"u"&&(_e==null?void 0:_e.Platform.OS)==="ios"}function da(){return!cu()&&!!m4()&&!!ko()}function Bc(){return os()?pn.reactNative:cu()?pn.node:da()?pn.browser:pn.unknown}function Op(){var e;try{return os()&&typeof _e<"u"&&typeof(_e==null?void 0:_e.Application)<"u"?(e=_e.Application)==null?void 0:e.applicationId:void 0}catch{return}}function hV(e,t){const n=new URLSearchParams(e);for(const i of Object.keys(t).sort())if(t.hasOwnProperty(i)){const r=t[i];r!==void 0&&n.set(i,r)}return n.toString()}function fV(e){var t,n;const i=dM();try{return e!=null&&e.url&&i.url&&new URL(e.url).host!==new URL(i.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${e.url} differs from the actual page url:${i.url}. This is probably unintended and can lead to issues.`),e.url=i.url),(t=e==null?void 0:e.icons)!=null&&t.length&&e.icons.length>0&&(e.icons=e.icons.filter(r=>r!=="")),aV(Ap(Ap({},i),e),{url:(e==null?void 0:e.url)||i.url,name:(e==null?void 0:e.name)||i.name,description:(e==null?void 0:e.description)||i.description,icons:(n=e==null?void 0:e.icons)!=null&&n.length&&e.icons.length>0?e.icons:i.icons})}catch(r){return console.warn("Error populating app metadata",r),e||i}}function dM(){return KI()||{name:"",description:"",url:"",icons:[""]}}function mV(){if(Bc()===pn.reactNative&&typeof _e<"u"&&typeof(_e==null?void 0:_e.Platform)<"u"){const{OS:n,Version:i}=_e.Platform;return[n,i].join("-")}const e=XI();if(e===null)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function yV(){var e;const t=Bc();return t===pn.browser?[t,((e=e6())==null?void 0:e.host)||"unknown"].join(":"):t}function hM(e,t,n){const i=mV(),r=yV();return[[e,t].join("-"),[lV,n].join("-"),i,r].join("/")}function gV({protocol:e,version:t,relayUrl:n,sdkVersion:i,auth:r,projectId:s,useOnCloseEvent:o,bundleId:a,packageName:l}){const u=n.split("?"),d=hM(e,t,i),f={auth:r,ua:d,projectId:s,useOnCloseEvent:o,packageName:l||void 0,bundleId:a||void 0},m=hV(u[1]||"",f);return u[0]+"?"+m}function ys(e,t){return e.filter(n=>t.includes(n)).length===e.length}function f0(e){return Object.fromEntries(e.entries())}function m0(e){return new Map(Object.entries(e))}function us(e=ee.FIVE_MINUTES,t){const n=ee.toMiliseconds(e||ee.FIVE_MINUTES);let i,r,s,o;return{resolve:a=>{s&&i&&(clearTimeout(s),i(a),o=Promise.resolve(a))},reject:a=>{s&&r&&(clearTimeout(s),r(a))},done:()=>new Promise((a,l)=>{if(o)return a(o);s=setTimeout(()=>{const u=new Error(t);o=Promise.reject(u),l(u)},n),i=a,r=l})}}function xi(e,t,n){return new Promise(async(i,r)=>{const s=setTimeout(()=>r(new Error(n)),t);try{const o=await e;i(o)}catch(o){r(o)}clearTimeout(s)})}function fM(e,t){if(typeof t=="string"&&t.startsWith(`${e}:`))return t;if(e.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(e.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function pV(e){return fM("topic",e)}function wV(e){return fM("id",e)}function mM(e){const[t,n]=e.split(":"),i={id:void 0,topic:void 0};if(t==="topic"&&typeof n=="string")i.topic=n;else if(t==="id"&&Number.isInteger(Number(n)))i.id=Number(n);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);return i}function ut(e,t){return ee.fromMiliseconds(Date.now()+ee.toMiliseconds(e))}function wr(e){return Date.now()>=ee.toMiliseconds(e)}function Ne(e,t){return`${e}${t?`:${t}`:""}`}function As(e=[],t=[]){return[...new Set([...e,...t])]}async function xV({id:e,topic:t,wcDeepLink:n}){var i;try{if(!n)return;const r=typeof n=="string"?JSON.parse(n):n,s=r==null?void 0:r.href;if(typeof s!="string")return;const o=_V(s,e,t),a=Bc();if(a===pn.browser){if(!((i=ko())!=null&&i.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}bV(o)}else a===pn.reactNative&&typeof(_e==null?void 0:_e.Linking)<"u"&&await _e.Linking.openURL(o)}catch(r){console.error(r)}}function _V(e,t,n){const i=`requestId=${t}&sessionTopic=${n}`;e.endsWith("/")&&(e=e.slice(0,-1));let r=`${e}`;if(e.startsWith("https://t.me")){const s=e.includes("?")?"&startapp=":"?startapp=";r=`${r}${s}${CV(i,!0)}`}else r=`${r}/wc?${i}`;return r}function bV(e){let t="_self";EV()?t="_top":(IV()||e.startsWith("https://")||e.startsWith("http://"))&&(t="_blank"),window.open(e,t,"noreferrer noopener")}async function MV(e,t){let n="";try{if(da()&&(n=localStorage.getItem(t),n))return n;n=await e.getItem(t)}catch(i){console.error(i)}return n}function Pp(e,t){if(!e.includes(t))return null;const n=e.split(/([&,?,=])/),i=n.indexOf(t);return n[i+2]}function kp(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Hm(){return typeof Ui<"u"&&eV.IS_VITEST==="true"}function IV(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function EV(){try{return window.self!==window.top}catch{return!1}}function CV(e,t=!1){const n=De.from(e).toString("base64");return t?n.replace(/[=]/g,""):n}function yM(e){return De.from(e,"base64").toString("utf-8")}function LV(e){return new Promise(t=>setTimeout(t,e))}let TV=class{constructor({limit:t}){Dp(this,"limit"),Dp(this,"set"),this.limit=t,this.set=new Set}add(t){if(!this.set.has(t)){if(this.set.size>=this.limit){const n=this.set.values().next().value;n&&this.set.delete(n)}this.set.add(t)}}has(t){return this.set.has(t)}};const pl=BigInt(2**32-1),zp=BigInt(32);function gM(e,t=!1){return t?{h:Number(e&pl),l:Number(e>>zp&pl)}:{h:Number(e>>zp&pl)|0,l:Number(e&pl)|0}}function pM(e,t=!1){const n=e.length;let i=new Uint32Array(n),r=new Uint32Array(n);for(let s=0;s<n;s++){const{h:o,l:a}=gM(e[s],t);[i[s],r[s]]=[o,a]}return[i,r]}const Rp=(e,t,n)=>e>>>n,Up=(e,t,n)=>e<<32-n|t>>>n,xr=(e,t,n)=>e>>>n|t<<32-n,_r=(e,t,n)=>e<<32-n|t>>>n,Pa=(e,t,n)=>e<<64-n|t>>>n-32,ka=(e,t,n)=>e>>>n-32|t<<64-n,jV=(e,t)=>t,vV=(e,t)=>e,NV=(e,t,n)=>e<<n|t>>>32-n,SV=(e,t,n)=>t<<n|e>>>32-n,AV=(e,t,n)=>t<<n-32|e>>>64-n,DV=(e,t,n)=>e<<n-32|t>>>64-n;function Hn(e,t,n,i){const r=(t>>>0)+(i>>>0);return{h:e+n+(r/2**32|0)|0,l:r|0}}const Gm=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Zm=(e,t,n,i)=>t+n+i+(e/2**32|0)|0,OV=(e,t,n,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(i>>>0),PV=(e,t,n,i,r)=>t+n+i+r+(e/2**32|0)|0,kV=(e,t,n,i,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(i>>>0)+(r>>>0),zV=(e,t,n,i,r,s)=>t+n+i+r+s+(e/2**32|0)|0,co=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function qm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function qi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function $n(e,...t){if(!qm(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 Km(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");qi(e.outputLen),qi(e.blockLen)}function es(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 Jm(e,t){$n(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function dc(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Bn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Lh(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function li(e,t){return e<<32-t|e>>>t}const wM=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function xM(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Oi=wM?e=>e:e=>xM(e);function RV(e){for(let t=0;t<e.length;t++)e[t]=xM(e[t]);return e}const br=wM?e=>e:RV,_M=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",UV=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function hc(e){if($n(e),_M)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=UV[e[n]];return t}const Si={_0:48,_9:57,A:65,F:70,a:97,f:102};function $p(e){if(e>=Si._0&&e<=Si._9)return e-Si._0;if(e>=Si.A&&e<=Si.F)return e-(Si.A-10);if(e>=Si.a&&e<=Si.f)return e-(Si.a-10)}function Xm(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(_M)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(n);for(let r=0,s=0;r<n;r++,s+=2){const o=$p(e.charCodeAt(s)),a=$p(e.charCodeAt(s+1));if(o===void 0||a===void 0){const l=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+s)}i[r]=o*16+a}return i}function $V(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Xn(e){return typeof e=="string"&&(e=$V(e)),$n(e),e}function gs(...e){let t=0;for(let i=0;i<e.length;i++){const r=e[i];$n(r),t+=r.length}const n=new Uint8Array(t);for(let i=0,r=0;i<e.length;i++){const s=e[i];n.set(s,r),r+=s.length}return n}class pd{}function Vc(e){const t=i=>e().update(Xn(i)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function BV(e){const t=(i,r)=>e(r).update(Xn(i)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=i=>e(i),t}function ha(e=32){if(co&&typeof co.getRandomValues=="function")return co.getRandomValues(new Uint8Array(e));if(co&&typeof co.randomBytes=="function")return Uint8Array.from(co.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const VV=BigInt(0),Ea=BigInt(1),WV=BigInt(2),FV=BigInt(7),YV=BigInt(256),QV=BigInt(113),bM=[],MM=[],IM=[];for(let e=0,t=Ea,n=1,i=0;e<24;e++){[n,i]=[i,(2*n+3*i)%5],bM.push(2*(5*i+n)),MM.push((e+1)*(e+2)/2%64);let r=VV;for(let s=0;s<7;s++)t=(t<<Ea^(t>>FV)*QV)%YV,t&WV&&(r^=Ea<<(Ea<<BigInt(s))-Ea);IM.push(r)}const EM=pM(IM,!0),HV=EM[0],GV=EM[1],Bp=(e,t,n)=>n>32?AV(e,t,n):NV(e,t,n),Vp=(e,t,n)=>n>32?DV(e,t,n):SV(e,t,n);function ZV(e,t=24){const n=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,l=(o+2)%10,u=n[l],d=n[l+1],f=Bp(u,d,1)^n[a],m=Vp(u,d,1)^n[a+1];for(let y=0;y<50;y+=10)e[o+y]^=f,e[o+y+1]^=m}let r=e[2],s=e[3];for(let o=0;o<24;o++){const a=MM[o],l=Bp(r,s,a),u=Vp(r,s,a),d=bM[o];r=e[d],s=e[d+1],e[d]=l,e[d+1]=u}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=HV[i],e[1]^=GV[i]}Bn(n)}let qV=class CM extends pd{constructor(t,n,i,r=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=i,this.enableXOF=r,this.rounds=s,qi(i),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=dc(this.state)}clone(){return this._cloneInto()}keccak(){br(this.state32),ZV(this.state32,this.rounds),br(this.state32),this.posOut=0,this.pos=0}update(t){es(this),t=Xn(t),$n(t);const{blockLen:n,state:i}=this,r=t.length;for(let s=0;s<r;){const o=Math.min(n-this.pos,r-s);for(let a=0;a<o;a++)i[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:i,blockLen:r}=this;t[i]^=n,n&128&&i===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){es(this,!1),$n(t),this.finish();const n=this.state,{blockLen:i}=this;for(let r=0,s=t.length;r<s;){this.posOut>=i&&this.keccak();const o=Math.min(i-this.posOut,s-r);t.set(n.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return qi(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Jm(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Bn(this.state)}_cloneInto(t){const{blockLen:n,suffix:i,outputLen:r,rounds:s,enableXOF:o}=this;return t||(t=new CM(n,i,r,o,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=i,t.outputLen=r,t.enableXOF=o,t.destroyed=this.destroyed,t}};const KV=(e,t,n)=>Vc(()=>new qV(t,e,n)),JV=KV(1,136,256/8);function XV(e,t,n,i){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,i);const r=BigInt(32),s=BigInt(4294967295),o=Number(n>>r&s),a=Number(n&s),l=i?4:0,u=i?0:4;e.setUint32(t+l,o,i),e.setUint32(t+u,a,i)}function eW(e,t,n){return e&t^~e&n}function tW(e,t,n){return e&t^e&n^t&n}let LM=class extends pd{constructor(t,n,i,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=i,this.isLE=r,this.buffer=new Uint8Array(t),this.view=Lh(this.buffer)}update(t){es(this),t=Xn(t),$n(t);const{view:n,buffer:i,blockLen:r}=this,s=t.length;for(let o=0;o<s;){const a=Math.min(r-this.pos,s-o);if(a===r){const l=Lh(t);for(;r<=s-o;o+=r)this.process(l,o);continue}i.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===r&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){es(this),Jm(t,this),this.finished=!0;const{buffer:n,view:i,blockLen:r,isLE:s}=this;let{pos:o}=this;n[o++]=128,Bn(this.buffer.subarray(o)),this.padOffset>r-o&&(this.process(i,0),o=0);for(let f=o;f<r;f++)n[f]=0;XV(i,r-8,BigInt(this.length*8),s),this.process(i,0);const a=Lh(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<u;f++)a.setUint32(4*f,d[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const i=t.slice(0,n);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:i,length:r,finished:s,destroyed:o,pos:a}=this;return t.destroyed=o,t.finished=s,t.length=r,t.pos=a,r%n&&t.buffer.set(i),t}clone(){return this._cloneInto()}};const or=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),St=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),At=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),nW=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ar=new Uint32Array(64);let iW=class extends LM{constructor(t=32){super(64,t,8,!1),this.A=or[0]|0,this.B=or[1]|0,this.C=or[2]|0,this.D=or[3]|0,this.E=or[4]|0,this.F=or[5]|0,this.G=or[6]|0,this.H=or[7]|0}get(){const{A:t,B:n,C:i,D:r,E:s,F:o,G:a,H:l}=this;return[t,n,i,r,s,o,a,l]}set(t,n,i,r,s,o,a,l){this.A=t|0,this.B=n|0,this.C=i|0,this.D=r|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=l|0}process(t,n){for(let f=0;f<16;f++,n+=4)ar[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const m=ar[f-15],y=ar[f-2],p=li(m,7)^li(m,18)^m>>>3,g=li(y,17)^li(y,19)^y>>>10;ar[f]=g+ar[f-7]+p+ar[f-16]|0}let{A:i,B:r,C:s,D:o,E:a,F:l,G:u,H:d}=this;for(let f=0;f<64;f++){const m=li(a,6)^li(a,11)^li(a,25),y=d+m+eW(a,l,u)+nW[f]+ar[f]|0,p=(li(i,2)^li(i,13)^li(i,22))+tW(i,r,s)|0;d=u,u=l,l=a,a=o+y|0,o=s,s=r,r=i,i=y+p|0}i=i+this.A|0,r=r+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(i,r,s,o,a,l,u,d)}roundClean(){Bn(ar)}destroy(){this.set(0,0,0,0,0,0,0,0),Bn(this.buffer)}};const TM=pM(["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))),rW=TM[0],sW=TM[1],cr=new Uint32Array(80),lr=new Uint32Array(80);let ey=class extends LM{constructor(t=64){super(128,t,16,!1),this.Ah=At[0]|0,this.Al=At[1]|0,this.Bh=At[2]|0,this.Bl=At[3]|0,this.Ch=At[4]|0,this.Cl=At[5]|0,this.Dh=At[6]|0,this.Dl=At[7]|0,this.Eh=At[8]|0,this.El=At[9]|0,this.Fh=At[10]|0,this.Fl=At[11]|0,this.Gh=At[12]|0,this.Gl=At[13]|0,this.Hh=At[14]|0,this.Hl=At[15]|0}get(){const{Ah:t,Al:n,Bh:i,Bl:r,Ch:s,Cl:o,Dh:a,Dl:l,Eh:u,El:d,Fh:f,Fl:m,Gh:y,Gl:p,Hh:g,Hl:x}=this;return[t,n,i,r,s,o,a,l,u,d,f,m,y,p,g,x]}set(t,n,i,r,s,o,a,l,u,d,f,m,y,p,g,x){this.Ah=t|0,this.Al=n|0,this.Bh=i|0,this.Bl=r|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=l|0,this.Eh=u|0,this.El=d|0,this.Fh=f|0,this.Fl=m|0,this.Gh=y|0,this.Gl=p|0,this.Hh=g|0,this.Hl=x|0}process(t,n){for(let I=0;I<16;I++,n+=4)cr[I]=t.getUint32(n),lr[I]=t.getUint32(n+=4);for(let I=16;I<80;I++){const E=cr[I-15]|0,C=lr[I-15]|0,T=xr(E,C,1)^xr(E,C,8)^Rp(E,C,7),j=_r(E,C,1)^_r(E,C,8)^Up(E,C,7),O=cr[I-2]|0,L=lr[I-2]|0,N=xr(O,L,19)^Pa(O,L,61)^Rp(O,L,6),v=_r(O,L,19)^ka(O,L,61)^Up(O,L,6),D=OV(j,v,lr[I-7],lr[I-16]),k=PV(D,T,N,cr[I-7],cr[I-16]);cr[I]=k|0,lr[I]=D|0}let{Ah:i,Al:r,Bh:s,Bl:o,Ch:a,Cl:l,Dh:u,Dl:d,Eh:f,El:m,Fh:y,Fl:p,Gh:g,Gl:x,Hh:_,Hl:b}=this;for(let I=0;I<80;I++){const E=xr(f,m,14)^xr(f,m,18)^Pa(f,m,41),C=_r(f,m,14)^_r(f,m,18)^ka(f,m,41),T=f&y^~f&g,j=m&p^~m&x,O=kV(b,C,j,sW[I],lr[I]),L=zV(O,_,E,T,rW[I],cr[I]),N=O|0,v=xr(i,r,28)^Pa(i,r,34)^Pa(i,r,39),D=_r(i,r,28)^ka(i,r,34)^ka(i,r,39),k=i&s^i&a^s&a,U=r&o^r&l^o&l;_=g|0,b=x|0,g=y|0,x=p|0,y=f|0,p=m|0,{h:f,l:m}=Hn(u|0,d|0,L|0,N|0),u=a|0,d=l|0,a=s|0,l=o|0,s=i|0,o=r|0;const R=Gm(N,D,U);i=Zm(R,L,v,k),r=R|0}({h:i,l:r}=Hn(this.Ah|0,this.Al|0,i|0,r|0)),{h:s,l:o}=Hn(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l}=Hn(this.Ch|0,this.Cl|0,a|0,l|0),{h:u,l:d}=Hn(this.Dh|0,this.Dl|0,u|0,d|0),{h:f,l:m}=Hn(this.Eh|0,this.El|0,f|0,m|0),{h:y,l:p}=Hn(this.Fh|0,this.Fl|0,y|0,p|0),{h:g,l:x}=Hn(this.Gh|0,this.Gl|0,g|0,x|0),{h:_,l:b}=Hn(this.Hh|0,this.Hl|0,_|0,b|0),this.set(i,r,s,o,a,l,u,d,f,m,y,p,g,x,_,b)}roundClean(){Bn(cr,lr)}destroy(){Bn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},oW=class extends ey{constructor(){super(48),this.Ah=St[0]|0,this.Al=St[1]|0,this.Bh=St[2]|0,this.Bl=St[3]|0,this.Ch=St[4]|0,this.Cl=St[5]|0,this.Dh=St[6]|0,this.Dl=St[7]|0,this.Eh=St[8]|0,this.El=St[9]|0,this.Fh=St[10]|0,this.Fl=St[11]|0,this.Gh=St[12]|0,this.Gl=St[13]|0,this.Hh=St[14]|0,this.Hl=St[15]|0}};const Dt=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class aW extends ey{constructor(){super(32),this.Ah=Dt[0]|0,this.Al=Dt[1]|0,this.Bh=Dt[2]|0,this.Bl=Dt[3]|0,this.Ch=Dt[4]|0,this.Cl=Dt[5]|0,this.Dh=Dt[6]|0,this.Dl=Dt[7]|0,this.Eh=Dt[8]|0,this.El=Dt[9]|0,this.Fh=Dt[10]|0,this.Fl=Dt[11]|0,this.Gh=Dt[12]|0,this.Gl=Dt[13]|0,this.Hh=Dt[14]|0,this.Hl=Dt[15]|0}}const wd=Vc(()=>new iW),cW=Vc(()=>new ey),lW=Vc(()=>new oW),uW=Vc(()=>new aW),dW=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),lt=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),te=new Uint32Array(32);function ur(e,t,n,i,r,s){const o=r[s],a=r[s+1];let l=te[2*e],u=te[2*e+1],d=te[2*t],f=te[2*t+1],m=te[2*n],y=te[2*n+1],p=te[2*i],g=te[2*i+1],x=Gm(l,d,o);u=Zm(x,u,f,a),l=x|0,{Dh:g,Dl:p}={Dh:g^u,Dl:p^l},{Dh:g,Dl:p}={Dh:jV(g,p),Dl:vV(g)},{h:y,l:m}=Hn(y,m,g,p),{Bh:f,Bl:d}={Bh:f^y,Bl:d^m},{Bh:f,Bl:d}={Bh:xr(f,d,24),Bl:_r(f,d,24)},te[2*e]=l,te[2*e+1]=u,te[2*t]=d,te[2*t+1]=f,te[2*n]=m,te[2*n+1]=y,te[2*i]=p,te[2*i+1]=g}function dr(e,t,n,i,r,s){const o=r[s],a=r[s+1];let l=te[2*e],u=te[2*e+1],d=te[2*t],f=te[2*t+1],m=te[2*n],y=te[2*n+1],p=te[2*i],g=te[2*i+1],x=Gm(l,d,o);u=Zm(x,u,f,a),l=x|0,{Dh:g,Dl:p}={Dh:g^u,Dl:p^l},{Dh:g,Dl:p}={Dh:xr(g,p,16),Dl:_r(g,p,16)},{h:y,l:m}=Hn(y,m,g,p),{Bh:f,Bl:d}={Bh:f^y,Bl:d^m},{Bh:f,Bl:d}={Bh:Pa(f,d,63),Bl:ka(f,d,63)},te[2*e]=l,te[2*e+1]=u,te[2*t]=d,te[2*t+1]=f,te[2*n]=m,te[2*n+1]=y,te[2*i]=p,te[2*i+1]=g}function hW(e,t={},n,i,r){if(qi(n),e<0||e>n)throw new Error("outputLen bigger than keyLen");const{key:s,salt:o,personalization:a}=t;if(s!==void 0&&(s.length<1||s.length>n))throw new Error("key length must be undefined or 1.."+n);if(o!==void 0&&o.length!==i)throw new Error("salt must be undefined or "+i);if(a!==void 0&&a.length!==r)throw new Error("personalization must be undefined or "+r)}class fW extends pd{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,qi(t),qi(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=dc(this.buffer)}update(t){es(this),t=Xn(t),$n(t);const{blockLen:n,buffer:i,buffer32:r}=this,s=t.length,o=t.byteOffset,a=t.buffer;for(let l=0;l<s;){this.pos===n&&(br(r),this.compress(r,0,!1),br(r),this.pos=0);const u=Math.min(n-this.pos,s-l),d=o+l;if(u===n&&!(d%4)&&l+u<s){const f=new Uint32Array(a,d,Math.floor((s-l)/4));br(f);for(let m=0;l+n<s;m+=r.length,l+=n)this.length+=n,this.compress(f,m,!1);br(f);continue}i.set(t.subarray(l,l+u),this.pos),this.pos+=u,this.length+=u,l+=u}return this}digestInto(t){es(this),Jm(t,this);const{pos:n,buffer32:i}=this;this.finished=!0,Bn(this.buffer.subarray(n)),br(i),this.compress(i,0,!0),br(i);const r=dc(t);this.get().forEach((s,o)=>r[o]=Oi(s))}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const i=t.slice(0,n);return this.destroy(),i}_cloneInto(t){const{buffer:n,length:i,finished:r,destroyed:s,outputLen:o,pos:a}=this;return t||(t=new this.constructor({dkLen:o})),t.set(...this.get()),t.buffer.set(n),t.destroyed=s,t.finished=r,t.length=i,t.pos=a,t.outputLen=o,t}clone(){return this._cloneInto()}}class mW extends fW{constructor(t={}){const n=t.dkLen===void 0?64:t.dkLen;super(128,n),this.v0l=lt[0]|0,this.v0h=lt[1]|0,this.v1l=lt[2]|0,this.v1h=lt[3]|0,this.v2l=lt[4]|0,this.v2h=lt[5]|0,this.v3l=lt[6]|0,this.v3h=lt[7]|0,this.v4l=lt[8]|0,this.v4h=lt[9]|0,this.v5l=lt[10]|0,this.v5h=lt[11]|0,this.v6l=lt[12]|0,this.v6h=lt[13]|0,this.v7l=lt[14]|0,this.v7h=lt[15]|0,hW(n,t,64,16,16);let{key:i,personalization:r,salt:s}=t,o=0;if(i!==void 0&&(i=Xn(i),o=i.length),this.v0l^=this.outputLen|o<<8|65536|1<<24,s!==void 0){s=Xn(s);const a=dc(s);this.v4l^=Oi(a[0]),this.v4h^=Oi(a[1]),this.v5l^=Oi(a[2]),this.v5h^=Oi(a[3])}if(r!==void 0){r=Xn(r);const a=dc(r);this.v6l^=Oi(a[0]),this.v6h^=Oi(a[1]),this.v7l^=Oi(a[2]),this.v7h^=Oi(a[3])}if(i!==void 0){const a=new Uint8Array(this.blockLen);a.set(i),this.update(a)}}get(){let{v0l:t,v0h:n,v1l:i,v1h:r,v2l:s,v2h:o,v3l:a,v3h:l,v4l:u,v4h:d,v5l:f,v5h:m,v6l:y,v6h:p,v7l:g,v7h:x}=this;return[t,n,i,r,s,o,a,l,u,d,f,m,y,p,g,x]}set(t,n,i,r,s,o,a,l,u,d,f,m,y,p,g,x){this.v0l=t|0,this.v0h=n|0,this.v1l=i|0,this.v1h=r|0,this.v2l=s|0,this.v2h=o|0,this.v3l=a|0,this.v3h=l|0,this.v4l=u|0,this.v4h=d|0,this.v5l=f|0,this.v5h=m|0,this.v6l=y|0,this.v6h=p|0,this.v7l=g|0,this.v7h=x|0}compress(t,n,i){this.get().forEach((l,u)=>te[u]=l),te.set(lt,16);let{h:r,l:s}=gM(BigInt(this.length));te[24]=lt[8]^s,te[25]=lt[9]^r,i&&(te[28]=~te[28],te[29]=~te[29]);let o=0;const a=dW;for(let l=0;l<12;l++)ur(0,4,8,12,t,n+2*a[o++]),dr(0,4,8,12,t,n+2*a[o++]),ur(1,5,9,13,t,n+2*a[o++]),dr(1,5,9,13,t,n+2*a[o++]),ur(2,6,10,14,t,n+2*a[o++]),dr(2,6,10,14,t,n+2*a[o++]),ur(3,7,11,15,t,n+2*a[o++]),dr(3,7,11,15,t,n+2*a[o++]),ur(0,5,10,15,t,n+2*a[o++]),dr(0,5,10,15,t,n+2*a[o++]),ur(1,6,11,12,t,n+2*a[o++]),dr(1,6,11,12,t,n+2*a[o++]),ur(2,7,8,13,t,n+2*a[o++]),dr(2,7,8,13,t,n+2*a[o++]),ur(3,4,9,14,t,n+2*a[o++]),dr(3,4,9,14,t,n+2*a[o++]);this.v0l^=te[0]^te[16],this.v0h^=te[1]^te[17],this.v1l^=te[2]^te[18],this.v1h^=te[3]^te[19],this.v2l^=te[4]^te[20],this.v2h^=te[5]^te[21],this.v3l^=te[6]^te[22],this.v3h^=te[7]^te[23],this.v4l^=te[8]^te[24],this.v4h^=te[9]^te[25],this.v5l^=te[10]^te[26],this.v5h^=te[11]^te[27],this.v6l^=te[12]^te[28],this.v6h^=te[13]^te[29],this.v7l^=te[14]^te[30],this.v7h^=te[15]^te[31],Bn(te)}destroy(){this.destroyed=!0,Bn(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const yW=BV(e=>new mW(e)),gW="https://rpc.walletconnect.org/v1";function jM(e){const t=`Ethereum Signed Message:
318
+ ${e.length}`,n=new TextEncoder().encode(t+e);return"0x"+De.from(JV(n)).toString("hex")}async function pW(e,t,n,i,r,s){switch(n.t){case"eip191":return await wW(e,t,n.s);case"eip1271":return await xW(e,t,n.s,i,r,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${n.t}`)}}async function wW(e,t,n){return(await XB({hash:jM(t),signature:n})).toLowerCase()===e.toLowerCase()}async function xW(e,t,n,i,r,s){const o=vl(i);if(!o.namespace||!o.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${i}`);try{const a="0x1626ba7e",l="0000000000000000000000000000000000000000000000000000000000000040",u=n.substring(2),d=(u.length/2).toString(16).padStart(64,"0"),f=(t.startsWith("0x")?t:jM(t)).substring(2),m=a+f+l+d+u,y=await fetch(`${s||gW}/?chainId=${i}&projectId=${r}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:_W(),jsonrpc:"2.0",method:"eth_call",params:[{to:e,data:m},"latest"]})}),{result:p}=await y.json();return p?p.slice(0,a.length).toLowerCase()===a.toLowerCase():!1}catch(a){return console.error("isValidEip1271Signature: ",a),!1}}function _W(){return Date.now()+Math.floor(Math.random()*1e3)}function bW(e){const t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);const i=n[0];if(i===0)throw new Error("No signatures found");const r=1+i*64;if(n.length<r)throw new Error("Transaction data too short for claimed signature count");if(n.length<100)throw new Error("Transaction too short");const s=De.from(e,"base64").slice(1,65);return Ic.encode(s)}function MW(e){const t=new Uint8Array(De.from(e,"base64")),n=Array.from("TransactionData::").map(s=>s.charCodeAt(0)),i=new Uint8Array(n.length+t.length);i.set(n),i.set(t,n.length);const r=yW(i,{dkLen:32});return Ic.encode(r)}function Wp(e){const t=new Uint8Array(wd(IW(e)));return Ic.encode(t)}function IW(e){if(e instanceof Uint8Array)return e;if(Array.isArray(e))return new Uint8Array(e);if(typeof e=="object"&&e!=null&&e.data)return new Uint8Array(Object.values(e.data));if(typeof e=="object"&&e)return new Uint8Array(Object.values(e));throw new Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}function Fp(e){const t=De.from(e,"base64"),n=t6(t).txn;if(!n)throw new Error("Invalid signed transaction: missing 'txn' field");const i=n6(n),r=De.from("TX"),s=De.concat([r,De.from(i)]),o=uW(s);return i6.encode(o).replace(/=+$/,"")}function Th(e){const t=[];let n=BigInt(e);for(;n>=BigInt(128);)t.push(Number(n&BigInt(127)|BigInt(128))),n>>=BigInt(7);return t.push(Number(n)),De.from(t)}function EW(e){const t=De.from(e.signed.bodyBytes,"base64"),n=De.from(e.signed.authInfoBytes,"base64"),i=De.from(e.signature.signature,"base64"),r=[];r.push(De.from([10])),r.push(Th(t.length)),r.push(t),r.push(De.from([18])),r.push(Th(n.length)),r.push(n),r.push(De.from([26])),r.push(Th(i.length)),r.push(i);const s=De.concat(r),o=wd(s);return De.from(o).toString("hex").toUpperCase()}var CW=Object.defineProperty,LW=Object.defineProperties,TW=Object.getOwnPropertyDescriptors,Yp=Object.getOwnPropertySymbols,jW=Object.prototype.hasOwnProperty,vW=Object.prototype.propertyIsEnumerable,Qp=(e,t,n)=>t in e?CW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NW=(e,t)=>{for(var n in t||(t={}))jW.call(t,n)&&Qp(e,n,t[n]);if(Yp)for(var n of Yp(t))vW.call(t,n)&&Qp(e,n,t[n]);return e},SW=(e,t)=>LW(e,TW(t));const AW="did:pkh:",ty=e=>e==null?void 0:e.split(":"),DW=e=>{const t=e&&ty(e);if(t)return e.includes(AW)?t[3]:t[1]},y0=e=>{const t=e&&ty(e);if(t)return t[2]+":"+t[3]},lu=e=>{const t=e&&ty(e);if(t)return t.pop()};async function Hp(e){const{cacao:t,projectId:n}=e,{s:i,p:r}=t,s=vM(r,r.iss),o=lu(r.iss);return await pW(o,s,i,y0(r.iss),n)}const vM=(e,t)=>{const n=`${e.domain} wants you to sign in with your Ethereum account:`,i=lu(t);if(!e.aud&&!e.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let r=e.statement||void 0;const s=`URI: ${e.aud||e.uri}`,o=`Version: ${e.version}`,a=`Chain ID: ${DW(t)}`,l=`Nonce: ${e.nonce}`,u=`Issued At: ${e.iat}`,d=e.exp?`Expiration Time: ${e.exp}`:void 0,f=e.nbf?`Not Before: ${e.nbf}`:void 0,m=e.requestId?`Request ID: ${e.requestId}`:void 0,y=e.resources?`Resources:${e.resources.map(g=>`
319
+ - ${g}`).join("")}`:void 0,p=Nl(e.resources);if(p){const g=fc(p);r=VW(r,g)}return[n,i,"",r,"",s,o,a,l,u,d,f,m,y].filter(g=>g!=null).join(`
320
+ `)};function OW(e){return De.from(JSON.stringify(e)).toString("base64")}function PW(e){return JSON.parse(De.from(e,"base64").toString("utf-8"))}function Bs(e){if(!e)throw new Error("No recap provided, value is undefined");if(!e.att)throw new Error("No `att` property found");const t=Object.keys(e.att);if(!(t!=null&&t.length))throw new Error("No resources found in `att` property");t.forEach(n=>{const i=e.att[n];if(Array.isArray(i))throw new Error(`Resource must be an object: ${n}`);if(typeof i!="object")throw new Error(`Resource must be an object: ${n}`);if(!Object.keys(i).length)throw new Error(`Resource object is empty: ${n}`);Object.keys(i).forEach(r=>{const s=i[r];if(!Array.isArray(s))throw new Error(`Ability limits ${r} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${r} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!="object")throw new Error(`Ability limits (${r}) must be an array of objects, found: ${o}`)})})})}function kW(e,t,n,i={}){return n==null||n.sort((r,s)=>r.localeCompare(s)),{att:{[e]:zW(t,n,i)}}}function zW(e,t,n={}){t=t==null?void 0:t.sort((r,s)=>r.localeCompare(s));const i=t.map(r=>({[`${e}/${r}`]:[n]}));return Object.assign({},...i)}function NM(e){return Bs(e),`urn:recap:${OW(e).replace(/=/g,"")}`}function fc(e){const t=PW(e.replace("urn:recap:",""));return Bs(t),t}function RW(e,t,n){const i=kW(e,t,n);return NM(i)}function UW(e){return e&&e.includes("urn:recap:")}function $W(e,t){const n=fc(e),i=fc(t),r=BW(n,i);return NM(r)}function BW(e,t){Bs(e),Bs(t);const n=Object.keys(e.att).concat(Object.keys(t.att)).sort((r,s)=>r.localeCompare(s)),i={att:{}};return n.forEach(r=>{var s,o;Object.keys(((s=e.att)==null?void 0:s[r])||{}).concat(Object.keys(((o=t.att)==null?void 0:o[r])||{})).sort((a,l)=>a.localeCompare(l)).forEach(a=>{var l,u;i.att[r]=SW(NW({},i.att[r]),{[a]:((l=e.att[r])==null?void 0:l[a])||((u=t.att[r])==null?void 0:u[a])})})}),i}function VW(e="",t){Bs(t);const n="I further authorize the stated URI to perform the following actions on my behalf: ";if(e.includes(n))return e;const i=[];let r=0;Object.keys(t.att).forEach(a=>{const l=Object.keys(t.att[a]).map(f=>({ability:f.split("/")[0],action:f.split("/")[1]}));l.sort((f,m)=>f.action.localeCompare(m.action));const u={};l.forEach(f=>{u[f.ability]||(u[f.ability]=[]),u[f.ability].push(f.action)});const d=Object.keys(u).map(f=>(r++,`(${r}) '${f}': '${u[f].join("', '")}' for '${a}'.`));i.push(d.join(", ").replace(".,","."))});const s=i.join(" "),o=`${n}${s}`;return`${e?e+" ":""}${o}`}function Gp(e){var t;const n=fc(e);Bs(n);const i=(t=n.att)==null?void 0:t.eip155;return i?Object.keys(i).map(r=>r.split("/")[1]):[]}function Zp(e){const t=fc(e);Bs(t);const n=[];return Object.values(t.att).forEach(i=>{Object.values(i).forEach(r=>{var s;(s=r==null?void 0:r[0])!=null&&s.chains&&n.push(r[0].chains)})}),[...new Set(n.flat())]}function Nl(e){if(!e)return;const t=e==null?void 0:e[e.length-1];return UW(t)?t:void 0}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function SM(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function g0(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function jh(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function rn(e,...t){if(!SM(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 qp(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 WW(e,t){rn(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Vr(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Qo(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function FW(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const YW=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function QW(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function p0(e){if(typeof e=="string")e=QW(e);else if(SM(e))e=w0(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function HW(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function GW(e,t){if(e.length!==t.length)return!1;let n=0;for(let i=0;i<e.length;i++)n|=e[i]^t[i];return n===0}const ZW=(e,t)=>{function n(i,...r){if(rn(i),!YW)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const u=r[0];if(!u)throw new Error("nonce / iv required");e.varSizeNonce?rn(u):rn(u,e.nonceLength)}const s=e.tagLength;s&&r[1]!==void 0&&rn(r[1]);const o=t(i,...r),a=(u,d)=>{if(d!==void 0){if(u!==2)throw new Error("cipher output not supported");rn(d)}};let l=!1;return{encrypt(u,d){if(l)throw new Error("cannot encrypt() twice with same key + nonce");return l=!0,rn(u),a(o.encrypt.length,d),o.encrypt(u,d)},decrypt(u,d){if(rn(u),s&&u.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return a(o.decrypt.length,d),o.decrypt(u,d)}}}return Object.assign(n,e),n};function Kp(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!KW(t))throw new Error("invalid output, must be aligned");return t}function Jp(e,t,n,i){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,i);const r=BigInt(32),s=BigInt(4294967295),o=Number(n>>r&s),a=Number(n&s);e.setUint32(t+4,o,i),e.setUint32(t+0,a,i)}function qW(e,t,n){g0(n);const i=new Uint8Array(16),r=FW(i);return Jp(r,0,BigInt(t),n),Jp(r,8,BigInt(e),n),i}function KW(e){return e.byteOffset%4===0}function w0(e){return Uint8Array.from(e)}const AM=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),JW=AM("expand 16-byte k"),XW=AM("expand 32-byte k"),eF=Vr(JW),tF=Vr(XW);function Te(e,t){return e<<t|e>>>32-t}function x0(e){return e.byteOffset%4===0}const wl=64,nF=16,DM=2**32-1,Xp=new Uint32Array;function iF(e,t,n,i,r,s,o,a){const l=r.length,u=new Uint8Array(wl),d=Vr(u),f=x0(r)&&x0(s),m=f?Vr(r):Xp,y=f?Vr(s):Xp;for(let p=0;p<l;o++){if(e(t,n,i,d,o,a),o>=DM)throw new Error("arx: counter overflow");const g=Math.min(wl,l-p);if(f&&g===wl){const x=p/4;if(p%4!==0)throw new Error("arx: invalid block position");for(let _=0,b;_<nF;_++)b=x+_,y[b]=m[b]^d[_];p+=wl;continue}for(let x=0,_;x<g;x++)_=p+x,s[_]=r[_]^u[x];p+=g}}function rF(e,t){const{allowShortKeys:n,extendNonceFn:i,counterLength:r,counterRight:s,rounds:o}=HW({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return jh(r),jh(o),g0(s),g0(n),(a,l,u,d,f=0)=>{rn(a),rn(l),rn(u);const m=u.length;if(d===void 0&&(d=new Uint8Array(m)),rn(d),jh(f),f<0||f>=DM)throw new Error("arx: counter overflow");if(d.length<m)throw new Error(`arx: output (${d.length}) is shorter than data (${m})`);const y=[];let p=a.length,g,x;if(p===32)y.push(g=w0(a)),x=tF;else if(p===16&&n)g=new Uint8Array(32),g.set(a),g.set(a,16),x=eF,y.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${p}`);x0(l)||y.push(l=w0(l));const _=Vr(g);if(i){if(l.length!==24)throw new Error("arx: extended nonce must be 24 bytes");i(x,_,Vr(l.subarray(0,16)),_),l=l.subarray(16)}const b=16-r;if(b!==l.length)throw new Error(`arx: nonce must be ${b} or 16 bytes`);if(b!==12){const E=new Uint8Array(12);E.set(l,s?0:12-l.length),l=E,y.push(l)}const I=Vr(l);return iF(e,x,_,I,u,d,f,o),Qo(...y),d}}const Mt=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class sF{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=p0(t),rn(t,32);const n=Mt(t,0),i=Mt(t,2),r=Mt(t,4),s=Mt(t,6),o=Mt(t,8),a=Mt(t,10),l=Mt(t,12),u=Mt(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|i<<3)&8191,this.r[2]=(i>>>10|r<<6)&7939,this.r[3]=(r>>>7|s<<9)&8191,this.r[4]=(s>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|a<<2)&8191,this.r[7]=(a>>>11|l<<5)&8065,this.r[8]=(l>>>8|u<<8)&8191,this.r[9]=u>>>5&127;for(let d=0;d<8;d++)this.pad[d]=Mt(t,16+2*d)}process(t,n,i=!1){const r=i?0:2048,{h:s,r:o}=this,a=o[0],l=o[1],u=o[2],d=o[3],f=o[4],m=o[5],y=o[6],p=o[7],g=o[8],x=o[9],_=Mt(t,n+0),b=Mt(t,n+2),I=Mt(t,n+4),E=Mt(t,n+6),C=Mt(t,n+8),T=Mt(t,n+10),j=Mt(t,n+12),O=Mt(t,n+14);let L=s[0]+(_&8191),N=s[1]+((_>>>13|b<<3)&8191),v=s[2]+((b>>>10|I<<6)&8191),D=s[3]+((I>>>7|E<<9)&8191),k=s[4]+((E>>>4|C<<12)&8191),U=s[5]+(C>>>1&8191),R=s[6]+((C>>>14|T<<2)&8191),B=s[7]+((T>>>11|j<<5)&8191),F=s[8]+((j>>>8|O<<8)&8191),W=s[9]+(O>>>5|r),V=0,Y=V+L*a+N*(5*x)+v*(5*g)+D*(5*p)+k*(5*y);V=Y>>>13,Y&=8191,Y+=U*(5*m)+R*(5*f)+B*(5*d)+F*(5*u)+W*(5*l),V+=Y>>>13,Y&=8191;let Q=V+L*l+N*a+v*(5*x)+D*(5*g)+k*(5*p);V=Q>>>13,Q&=8191,Q+=U*(5*y)+R*(5*m)+B*(5*f)+F*(5*d)+W*(5*u),V+=Q>>>13,Q&=8191;let G=V+L*u+N*l+v*a+D*(5*x)+k*(5*g);V=G>>>13,G&=8191,G+=U*(5*p)+R*(5*y)+B*(5*m)+F*(5*f)+W*(5*d),V+=G>>>13,G&=8191;let ne=V+L*d+N*u+v*l+D*a+k*(5*x);V=ne>>>13,ne&=8191,ne+=U*(5*g)+R*(5*p)+B*(5*y)+F*(5*m)+W*(5*f),V+=ne>>>13,ne&=8191;let ce=V+L*f+N*d+v*u+D*l+k*a;V=ce>>>13,ce&=8191,ce+=U*(5*x)+R*(5*g)+B*(5*p)+F*(5*y)+W*(5*m),V+=ce>>>13,ce&=8191;let q=V+L*m+N*f+v*d+D*u+k*l;V=q>>>13,q&=8191,q+=U*a+R*(5*x)+B*(5*g)+F*(5*p)+W*(5*y),V+=q>>>13,q&=8191;let he=V+L*y+N*m+v*f+D*d+k*u;V=he>>>13,he&=8191,he+=U*l+R*a+B*(5*x)+F*(5*g)+W*(5*p),V+=he>>>13,he&=8191;let re=V+L*p+N*y+v*m+D*f+k*d;V=re>>>13,re&=8191,re+=U*u+R*l+B*a+F*(5*x)+W*(5*g),V+=re>>>13,re&=8191;let se=V+L*g+N*p+v*y+D*m+k*f;V=se>>>13,se&=8191,se+=U*d+R*u+B*l+F*a+W*(5*x),V+=se>>>13,se&=8191;let le=V+L*x+N*g+v*p+D*y+k*m;V=le>>>13,le&=8191,le+=U*f+R*d+B*u+F*l+W*a,V+=le>>>13,le&=8191,V=(V<<2)+V|0,V=V+Y|0,Y=V&8191,V=V>>>13,Q+=V,s[0]=Y,s[1]=Q,s[2]=G,s[3]=ne,s[4]=ce,s[5]=q,s[6]=he,s[7]=re,s[8]=se,s[9]=le}finalize(){const{h:t,pad:n}=this,i=new Uint16Array(10);let r=t[1]>>>13;t[1]&=8191;for(let a=2;a<10;a++)t[a]+=r,r=t[a]>>>13,t[a]&=8191;t[0]+=r*5,r=t[0]>>>13,t[0]&=8191,t[1]+=r,r=t[1]>>>13,t[1]&=8191,t[2]+=r,i[0]=t[0]+5,r=i[0]>>>13,i[0]&=8191;for(let a=1;a<10;a++)i[a]=t[a]+r,r=i[a]>>>13,i[a]&=8191;i[9]-=8192;let s=(r^1)-1;for(let a=0;a<10;a++)i[a]&=s;s=~s;for(let a=0;a<10;a++)t[a]=t[a]&s|i[a];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let o=t[0]+n[0];t[0]=o&65535;for(let a=1;a<8;a++)o=(t[a]+n[a]|0)+(o>>>16)|0,t[a]=o&65535;Qo(i)}update(t){qp(this),t=p0(t),rn(t);const{buffer:n,blockLen:i}=this,r=t.length;for(let s=0;s<r;){const o=Math.min(i-this.pos,r-s);if(o===i){for(;i<=r-s;s+=i)this.process(t,s);continue}n.set(t.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===i&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){Qo(this.h,this.r,this.buffer,this.pad)}digestInto(t){qp(this),WW(t,this),this.finished=!0;const{buffer:n,h:i}=this;let{pos:r}=this;if(r){for(n[r++]=1;r<16;r++)n[r]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let o=0;o<8;o++)t[s++]=i[o]>>>0,t[s++]=i[o]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const i=t.slice(0,n);return this.destroy(),i}}function oF(e){const t=(i,r)=>e(r).update(p0(i)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=i=>e(i),t}const aF=oF(e=>new sF(e));function cF(e,t,n,i,r,s=20){let o=e[0],a=e[1],l=e[2],u=e[3],d=t[0],f=t[1],m=t[2],y=t[3],p=t[4],g=t[5],x=t[6],_=t[7],b=r,I=n[0],E=n[1],C=n[2],T=o,j=a,O=l,L=u,N=d,v=f,D=m,k=y,U=p,R=g,B=x,F=_,W=b,V=I,Y=E,Q=C;for(let ne=0;ne<s;ne+=2)T=T+N|0,W=Te(W^T,16),U=U+W|0,N=Te(N^U,12),T=T+N|0,W=Te(W^T,8),U=U+W|0,N=Te(N^U,7),j=j+v|0,V=Te(V^j,16),R=R+V|0,v=Te(v^R,12),j=j+v|0,V=Te(V^j,8),R=R+V|0,v=Te(v^R,7),O=O+D|0,Y=Te(Y^O,16),B=B+Y|0,D=Te(D^B,12),O=O+D|0,Y=Te(Y^O,8),B=B+Y|0,D=Te(D^B,7),L=L+k|0,Q=Te(Q^L,16),F=F+Q|0,k=Te(k^F,12),L=L+k|0,Q=Te(Q^L,8),F=F+Q|0,k=Te(k^F,7),T=T+v|0,Q=Te(Q^T,16),B=B+Q|0,v=Te(v^B,12),T=T+v|0,Q=Te(Q^T,8),B=B+Q|0,v=Te(v^B,7),j=j+D|0,W=Te(W^j,16),F=F+W|0,D=Te(D^F,12),j=j+D|0,W=Te(W^j,8),F=F+W|0,D=Te(D^F,7),O=O+k|0,V=Te(V^O,16),U=U+V|0,k=Te(k^U,12),O=O+k|0,V=Te(V^O,8),U=U+V|0,k=Te(k^U,7),L=L+N|0,Y=Te(Y^L,16),R=R+Y|0,N=Te(N^R,12),L=L+N|0,Y=Te(Y^L,8),R=R+Y|0,N=Te(N^R,7);let G=0;i[G++]=o+T|0,i[G++]=a+j|0,i[G++]=l+O|0,i[G++]=u+L|0,i[G++]=d+N|0,i[G++]=f+v|0,i[G++]=m+D|0,i[G++]=y+k|0,i[G++]=p+U|0,i[G++]=g+R|0,i[G++]=x+B|0,i[G++]=_+F|0,i[G++]=b+W|0,i[G++]=I+V|0,i[G++]=E+Y|0,i[G++]=C+Q|0}const lF=rF(cF,{counterRight:!1,counterLength:4,allowShortKeys:!1}),uF=new Uint8Array(16),e2=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(uF.subarray(n))},dF=new Uint8Array(32);function t2(e,t,n,i,r){const s=e(t,n,dF),o=aF.create(s);r&&e2(o,r),e2(o,i);const a=qW(i.length,r?r.length:0,!0);o.update(a);const l=o.digest();return Qo(s,a),l}const hF=e=>(t,n,i)=>({encrypt(r,s){const o=r.length;s=Kp(o+16,s,!1),s.set(r);const a=s.subarray(0,-16);e(t,n,a,a,1);const l=t2(e,t,n,a,i);return s.set(l,o),Qo(l),s},decrypt(r,s){s=Kp(r.length-16,s,!1);const o=r.subarray(0,-16),a=r.subarray(-16),l=t2(e,t,n,o,i);if(!GW(a,l))throw new Error("invalid tag");return s.set(r.subarray(0,-16)),e(t,n,s,s,1),Qo(l),s}}),OM=ZW({blockSize:64,nonceLength:12,tagLength:16},hF(lF));let PM=class extends pd{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Km(t);const i=Xn(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,s=new Uint8Array(r);s.set(i.length>r?t.create().update(i).digest():i);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=t.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),Bn(s)}update(t){return es(this),this.iHash.update(t),this}digestInto(t){es(this),$n(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:i,finished:r,destroyed:s,blockLen:o,outputLen:a}=this;return t=t,t.finished=r,t.destroyed=s,t.blockLen=o,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=i._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const xd=(e,t,n)=>new PM(e,t).update(n).digest();xd.create=(e,t)=>new PM(e,t);function fF(e,t,n){return Km(e),n===void 0&&(n=new Uint8Array(e.outputLen)),xd(e,Xn(n),Xn(t))}const vh=Uint8Array.from([0]),n2=Uint8Array.of();function mF(e,t,n,i=32){Km(e),qi(i);const r=e.outputLen;if(i>255*r)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(i/r);n===void 0&&(n=n2);const o=new Uint8Array(s*r),a=xd.create(e,t),l=a._cloneInto(),u=new Uint8Array(a.outputLen);for(let d=0;d<s;d++)vh[0]=d+1,l.update(d===0?n2:u).update(n).update(vh).digestInto(u),o.set(u,r*d),a._cloneInto(l);return a.destroy(),l.destroy(),Bn(u,vh),o.slice(0,i)}const yF=(e,t,n,i,r)=>mF(e,fF(e,t,n),i,r),_d=wd,ny=BigInt(0),_0=BigInt(1);function uu(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function xl(e){const t=e.toString(16);return t.length&1?"0"+t:t}function kM(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?ny:BigInt("0x"+e)}function bd(e){return kM(hc(e))}function du(e){return $n(e),kM(hc(Uint8Array.from(e).reverse()))}function iy(e,t){return Xm(e.toString(16).padStart(t*2,"0"))}function ry(e,t){return iy(e,t).reverse()}function nn(e,t,n){let i;if(typeof t=="string")try{i=Xm(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(qm(t))i=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const r=i.length;if(typeof n=="number"&&r!==n)throw new Error(e+" of length "+n+" expected, got "+r);return i}const Nh=e=>typeof e=="bigint"&&ny<=e;function gF(e,t,n){return Nh(e)&&Nh(t)&&Nh(n)&&t<=e&&e<n}function b0(e,t,n,i){if(!gF(t,n,i))throw new Error("expected valid "+e+": "+n+" <= n < "+i+", got "+t)}function pF(e){let t;for(t=0;e>ny;e>>=_0,t+=1);return t}const Md=e=>(_0<<BigInt(e))-_0;function wF(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");const i=m=>new Uint8Array(m),r=m=>Uint8Array.of(m);let s=i(e),o=i(e),a=0;const l=()=>{s.fill(1),o.fill(0),a=0},u=(...m)=>n(o,s,...m),d=(m=i(0))=>{o=u(r(0),m),s=u(),m.length!==0&&(o=u(r(1),m),s=u())},f=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let m=0;const y=[];for(;m<t;){s=u();const p=s.slice();y.push(p),m+=s.length}return gs(...y)};return(m,y)=>{l(),d(m);let p;for(;!(p=y(f()));)d();return l(),p}}function Id(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function i(r,s,o){const a=e[r];if(o&&a===void 0)return;const l=typeof a;if(l!==s||a===null)throw new Error(`param "${r}" is invalid: expected ${s}, got ${l}`)}Object.entries(t).forEach(([r,s])=>i(r,s,!1)),Object.entries(n).forEach(([r,s])=>i(r,s,!0))}function i2(e){const t=new WeakMap;return(n,...i)=>{const r=t.get(n);if(r!==void 0)return r;const s=e(n,...i);return t.set(n,s),s}}const cn=BigInt(0),Qt=BigInt(1),ps=BigInt(2),xF=BigInt(3),zM=BigInt(4),RM=BigInt(5),UM=BigInt(8);function On(e,t){const n=e%t;return n>=cn?n:t+n}function Qn(e,t,n){let i=e;for(;t-- >cn;)i*=i,i%=n;return i}function r2(e,t){if(e===cn)throw new Error("invert: expected non-zero number");if(t<=cn)throw new Error("invert: expected positive modulus, got "+t);let n=On(e,t),i=t,r=cn,s=Qt;for(;n!==cn;){const o=i/n,a=i%n,l=r-s*o;i=n,n=a,r=s,s=l}if(i!==Qt)throw new Error("invert: does not exist");return On(r,t)}function $M(e,t){const n=(e.ORDER+Qt)/zM,i=e.pow(t,n);if(!e.eql(e.sqr(i),t))throw new Error("Cannot find square root");return i}function _F(e,t){const n=(e.ORDER-RM)/UM,i=e.mul(t,ps),r=e.pow(i,n),s=e.mul(t,r),o=e.mul(e.mul(s,ps),r),a=e.mul(s,e.sub(o,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function bF(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-Qt,n=0;for(;t%ps===cn;)t/=ps,n++;let i=ps;const r=fa(e);for(;s2(r,i)===1;)if(i++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return $M;let s=r.pow(i,t);const o=(t+Qt)/ps;return function(a,l){if(a.is0(l))return l;if(s2(a,l)!==1)throw new Error("Cannot find square root");let u=n,d=a.mul(a.ONE,s),f=a.pow(l,t),m=a.pow(l,o);for(;!a.eql(f,a.ONE);){if(a.is0(f))return a.ZERO;let y=1,p=a.sqr(f);for(;!a.eql(p,a.ONE);)if(y++,p=a.sqr(p),y===u)throw new Error("Cannot find square root");const g=Qt<<BigInt(u-y-1),x=a.pow(d,g);u=y,d=a.sqr(x),f=a.mul(f,d),m=a.mul(m,x)}return m}}function MF(e){return e%zM===xF?$M:e%UM===RM?_F:bF(e)}const IF=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function EF(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},n=IF.reduce((i,r)=>(i[r]="function",i),t);return Id(e,n),e}function CF(e,t,n){if(n<cn)throw new Error("invalid exponent, negatives unsupported");if(n===cn)return e.ONE;if(n===Qt)return t;let i=e.ONE,r=t;for(;n>cn;)n&Qt&&(i=e.mul(i,r)),r=e.sqr(r),n>>=Qt;return i}function BM(e,t,n=!1){const i=new Array(t.length).fill(n?e.ZERO:void 0),r=t.reduce((o,a,l)=>e.is0(a)?o:(i[l]=o,e.mul(o,a)),e.ONE),s=e.inv(r);return t.reduceRight((o,a,l)=>e.is0(a)?o:(i[l]=e.mul(o,i[l]),e.mul(o,a)),s),i}function s2(e,t){const n=(e.ORDER-Qt)/ps,i=e.pow(t,n),r=e.eql(i,e.ONE),s=e.eql(i,e.ZERO),o=e.eql(i,e.neg(e.ONE));if(!r&&!s&&!o)throw new Error("invalid Legendre symbol result");return r?1:s?0:-1}function LF(e,t){t!==void 0&&qi(t);const n=t!==void 0?t:e.toString(2).length,i=Math.ceil(n/8);return{nBitLength:n,nByteLength:i}}function fa(e,t,n=!1,i={}){if(e<=cn)throw new Error("invalid field: expected ORDER > 0, got "+e);let r,s;if(typeof t=="object"&&t!=null){if(i.sqrt||n)throw new Error("cannot specify opts in two arguments");const d=t;d.BITS&&(r=d.BITS),d.sqrt&&(s=d.sqrt),typeof d.isLE=="boolean"&&(n=d.isLE)}else typeof t=="number"&&(r=t),i.sqrt&&(s=i.sqrt);const{nBitLength:o,nByteLength:a}=LF(e,r);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const u=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:a,MASK:Md(o),ZERO:cn,ONE:Qt,create:d=>On(d,e),isValid:d=>{if(typeof d!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof d);return cn<=d&&d<e},is0:d=>d===cn,isValidNot0:d=>!u.is0(d)&&u.isValid(d),isOdd:d=>(d&Qt)===Qt,neg:d=>On(-d,e),eql:(d,f)=>d===f,sqr:d=>On(d*d,e),add:(d,f)=>On(d+f,e),sub:(d,f)=>On(d-f,e),mul:(d,f)=>On(d*f,e),pow:(d,f)=>CF(u,d,f),div:(d,f)=>On(d*r2(f,e),e),sqrN:d=>d*d,addN:(d,f)=>d+f,subN:(d,f)=>d-f,mulN:(d,f)=>d*f,inv:d=>r2(d,e),sqrt:s||(d=>(l||(l=MF(e)),l(u,d))),toBytes:d=>n?ry(d,a):iy(d,a),fromBytes:d=>{if(d.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+d.length);return n?du(d):bd(d)},invertBatch:d=>BM(u,d),cmov:(d,f,m)=>m?f:d});return Object.freeze(u)}function VM(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function WM(e){const t=VM(e);return t+Math.ceil(t/2)}function TF(e,t,n=!1){const i=e.length,r=VM(t),s=WM(t);if(i<16||i<s||i>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+i);const o=n?du(e):bd(e),a=On(o,t-Qt)+Qt;return n?ry(a,r):iy(a,r)}const Ho=BigInt(0),ws=BigInt(1);function $a(e,t){const n=t.negate();return e?n:t}function jF(e,t,n){const i=s=>s.pz,r=BM(e.Fp,n.map(i));return n.map((s,o)=>s.toAffine(r[o])).map(e.fromAffine)}function FM(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Sh(e,t){FM(e,t);const n=Math.ceil(t/e)+1,i=2**(e-1),r=2**e,s=Md(e),o=BigInt(e);return{windows:n,windowSize:i,mask:s,maxNumber:r,shiftBy:o}}function o2(e,t,n){const{windowSize:i,mask:r,maxNumber:s,shiftBy:o}=n;let a=Number(e&r),l=e>>o;a>i&&(a-=s,l+=ws);const u=t*i,d=u+Math.abs(a)-1,f=a===0,m=a<0,y=t%2!==0;return{nextN:l,offset:d,isZero:f,isNeg:m,isNegF:y,offsetF:u}}function vF(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,i)=>{if(!(n instanceof t))throw new Error("invalid point at index "+i)})}function NF(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,i)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+i)})}const Ah=new WeakMap,YM=new WeakMap;function Dh(e){return YM.get(e)||1}function a2(e){if(e!==Ho)throw new Error("invalid wNAF")}function SF(e,t){return{constTimeNegate:$a,hasPrecomputes(n){return Dh(n)!==1},unsafeLadder(n,i,r=e.ZERO){let s=n;for(;i>Ho;)i&ws&&(r=r.add(s)),s=s.double(),i>>=ws;return r},precomputeWindow(n,i){const{windows:r,windowSize:s}=Sh(i,t),o=[];let a=n,l=a;for(let u=0;u<r;u++){l=a,o.push(l);for(let d=1;d<s;d++)l=l.add(a),o.push(l);a=l.double()}return o},wNAF(n,i,r){let s=e.ZERO,o=e.BASE;const a=Sh(n,t);for(let l=0;l<a.windows;l++){const{nextN:u,offset:d,isZero:f,isNeg:m,isNegF:y,offsetF:p}=o2(r,l,a);r=u,f?o=o.add($a(y,i[p])):s=s.add($a(m,i[d]))}return a2(r),{p:s,f:o}},wNAFUnsafe(n,i,r,s=e.ZERO){const o=Sh(n,t);for(let a=0;a<o.windows&&r!==Ho;a++){const{nextN:l,offset:u,isZero:d,isNeg:f}=o2(r,a,o);if(r=l,!d){const m=i[u];s=s.add(f?m.negate():m)}}return a2(r),s},getPrecomputes(n,i,r){let s=Ah.get(i);return s||(s=this.precomputeWindow(i,n),n!==1&&(typeof r=="function"&&(s=r(s)),Ah.set(i,s))),s},wNAFCached(n,i,r){const s=Dh(n);return this.wNAF(s,this.getPrecomputes(s,n,r),i)},wNAFCachedUnsafe(n,i,r,s){const o=Dh(n);return o===1?this.unsafeLadder(n,i,s):this.wNAFUnsafe(o,this.getPrecomputes(o,n,r),i,s)},setWindowSize(n,i){FM(i,t),YM.set(n,i),Ah.delete(n)}}}function AF(e,t,n,i){let r=t,s=e.ZERO,o=e.ZERO;for(;n>Ho||i>Ho;)n&ws&&(s=s.add(r)),i&ws&&(o=o.add(r)),r=r.double(),n>>=ws,i>>=ws;return{p1:s,p2:o}}function DF(e,t,n,i){vF(n,e),NF(i,t);const r=n.length,s=i.length;if(r!==s)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,a=pF(BigInt(r));let l=1;a>12?l=a-3:a>4?l=a-2:a>0&&(l=2);const u=Md(l),d=new Array(Number(u)+1).fill(o),f=Math.floor((t.BITS-1)/l)*l;let m=o;for(let y=f;y>=0;y-=l){d.fill(o);for(let g=0;g<s;g++){const x=i[g],_=Number(x>>BigInt(y)&u);d[_]=d[_].add(n[g])}let p=o;for(let g=d.length-1,x=o;g>0;g--)x=x.add(d[g]),p=p.add(x);if(m=m.add(p),y!==0)for(let g=0;g<l;g++)m=m.double()}return m}function c2(e,t){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return EF(t),t}else return fa(e)}function OF(e,t,n={}){if(!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(const o of["p","n","h"]){const a=t[o];if(!(typeof a=="bigint"&&a>Ho))throw new Error(`CURVE.${o} must be positive bigint`)}const i=c2(t.p,n.Fp),r=c2(t.n,n.Fn),s=["Gx","Gy","a","b"];for(const o of s)if(!i.isValid(t[o]))throw new Error(`CURVE.${o} must be valid field element of CURVE.Fp`);return{Fp:i,Fn:r}}BigInt(0),BigInt(1),BigInt(2),BigInt(8);const Ca=BigInt(0),lo=BigInt(1),_l=BigInt(2);function PF(e){return Id(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function kF(e){const t=PF(e),{P:n,type:i,adjustScalarBytes:r,powPminus2:s,randomBytes:o}=t,a=i==="x25519";if(!a&&i!=="x448")throw new Error("invalid type");const l=o||ha,u=a?255:448,d=a?32:56,f=BigInt(a?9:5),m=BigInt(a?121665:39081),y=a?_l**BigInt(254):_l**BigInt(447),p=a?BigInt(8)*_l**BigInt(251)-lo:BigInt(4)*_l**BigInt(445)-lo,g=y+p+lo,x=L=>On(L,n),_=b(f);function b(L){return ry(x(L),d)}function I(L){const N=nn("u coordinate",L,d);return a&&(N[31]&=127),x(du(N))}function E(L){return du(r(nn("scalar",L,d)))}function C(L,N){const v=O(I(N),E(L));if(v===Ca)throw new Error("invalid private or public key received");return b(v)}function T(L){return C(L,_)}function j(L,N,v){const D=x(L*(N-v));return N=x(N-D),v=x(v+D),{x_2:N,x_3:v}}function O(L,N){b0("u",L,Ca,n),b0("scalar",N,y,g);const v=N,D=L;let k=lo,U=Ca,R=L,B=lo,F=Ca;for(let V=BigInt(u-1);V>=Ca;V--){const Y=v>>V&lo;F^=Y,{x_2:k,x_3:R}=j(F,k,R),{x_2:U,x_3:B}=j(F,U,B),F=Y;const Q=k+U,G=x(Q*Q),ne=k-U,ce=x(ne*ne),q=G-ce,he=R+B,re=R-B,se=x(re*Q),le=x(he*ne),Le=se+le,Fe=se-le;R=x(Le*Le),B=x(D*x(Fe*Fe)),k=x(G*ce),U=x(q*(G+x(m*q)))}({x_2:k,x_3:R}=j(F,k,R)),{x_2:U,x_3:B}=j(F,U,B);const W=s(U);return x(k*W)}return{scalarMult:C,scalarMultBase:T,getSharedSecret:(L,N)=>C(L,N),getPublicKey:L=>T(L),utils:{randomPrivateKey:()=>l(d)},GuBytes:_.slice()}}BigInt(0);const zF=BigInt(1),l2=BigInt(2),RF=BigInt(3),UF=BigInt(5);BigInt(8);const QM={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function $F(e){const t=BigInt(10),n=BigInt(20),i=BigInt(40),r=BigInt(80),s=QM.p,o=e*e%s*e%s,a=Qn(o,l2,s)*o%s,l=Qn(a,zF,s)*e%s,u=Qn(l,UF,s)*l%s,d=Qn(u,t,s)*u%s,f=Qn(d,n,s)*d%s,m=Qn(f,i,s)*f%s,y=Qn(m,r,s)*m%s,p=Qn(y,r,s)*m%s,g=Qn(p,t,s)*u%s;return{pow_p_5_8:Qn(g,l2,s)*e%s,b2:o}}function BF(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const M0=(()=>{const e=QM.p;return kF({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:i}=$F(t);return On(Qn(n,RF,e)*i,e)},adjustScalarBytes:BF})})();function u2(e){e.lowS!==void 0&&uu("lowS",e.lowS),e.prehash!==void 0&&uu("prehash",e.prehash)}class VF extends Error{constructor(t=""){super(t)}}const ki={Err:VF,_tlv:{encode:(e,t)=>{const{Err:n}=ki;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const i=t.length/2,r=xl(i);if(r.length/2&128)throw new n("tlv.encode: long form length too big");const s=i>127?xl(r.length/2|128):"";return xl(e)+s+r+t},decode(e,t){const{Err:n}=ki;let i=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new n("tlv.decode: wrong tlv");const r=t[i++],s=!!(r&128);let o=0;if(!s)o=r;else{const l=r&127;if(!l)throw new n("tlv.decode(long): indefinite length not supported");if(l>4)throw new n("tlv.decode(long): byte length is too big");const u=t.subarray(i,i+l);if(u.length!==l)throw new n("tlv.decode: length bytes not complete");if(u[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const d of u)o=o<<8|d;if(i+=l,o<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(i,i+o);if(a.length!==o)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(i+o)}}},_int:{encode(e){const{Err:t}=ki;if(e<Ba)throw new t("integer: negative integers are not allowed");let n=xl(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=ki;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return bd(e)}},toSig(e){const{Err:t,_int:n,_tlv:i}=ki,r=nn("signature",e),{v:s,l:o}=i.decode(48,r);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l}=i.decode(2,s),{v:u,l:d}=i.decode(2,l);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(u)}},hexFromSig(e){const{_tlv:t,_int:n}=ki,i=t.encode(2,n.encode(e.r)),r=t.encode(2,n.encode(e.s)),s=i+r;return t.encode(48,s)}},Ba=BigInt(0),Va=BigInt(1),WF=BigInt(2),bl=BigInt(3),FF=BigInt(4);function YF(e,t,n){function i(r){const s=e.sqr(r),o=e.mul(s,r);return e.add(e.add(o,e.mul(r,t)),n)}return i}function HM(e,t,n){const{BYTES:i}=e;function r(s){let o;if(typeof s=="bigint")o=s;else{let a=nn("private key",s);if(t){if(!t.includes(a.length*2))throw new Error("invalid private key");const l=new Uint8Array(i);l.set(a,l.length-a.length),a=l}try{o=e.fromBytes(a)}catch{throw new Error(`invalid private key: expected ui8a of size ${i}, got ${typeof s}`)}}if(n&&(o=e.create(o)),!e.isValidNot0(o))throw new Error("invalid private key: out of range [1..N-1]");return o}return r}function QF(e,t={}){const{Fp:n,Fn:i}=OF("weierstrass",e,t),{h:r,n:s}=e;Id(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:o}=t;if(o&&(!n.is0(e.a)||typeof o.beta!="bigint"||typeof o.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function a(){if(!n.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function l(O,L,N){const{x:v,y:D}=L.toAffine(),k=n.toBytes(v);if(uu("isCompressed",N),N){a();const U=!n.isOdd(D);return gs(GM(U),k)}else return gs(Uint8Array.of(4),k,n.toBytes(D))}function u(O){$n(O);const L=n.BYTES,N=L+1,v=2*L+1,D=O.length,k=O[0],U=O.subarray(1);if(D===N&&(k===2||k===3)){const R=n.fromBytes(U);if(!n.isValid(R))throw new Error("bad point: is not on curve, wrong x");const B=m(R);let F;try{F=n.sqrt(B)}catch(V){const Y=V instanceof Error?": "+V.message:"";throw new Error("bad point: is not on curve, sqrt error"+Y)}a();const W=n.isOdd(F);return(k&1)===1!==W&&(F=n.neg(F)),{x:R,y:F}}else if(D===v&&k===4){const R=n.fromBytes(U.subarray(L*0,L*1)),B=n.fromBytes(U.subarray(L*1,L*2));if(!y(R,B))throw new Error("bad point: is not on curve");return{x:R,y:B}}else throw new Error(`bad point: got length ${D}, expected compressed=${N} or uncompressed=${v}`)}const d=t.toBytes||l,f=t.fromBytes||u,m=YF(n,e.a,e.b);function y(O,L){const N=n.sqr(L),v=m(O);return n.eql(N,v)}if(!y(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const p=n.mul(n.pow(e.a,bl),FF),g=n.mul(n.sqr(e.b),BigInt(27));if(n.is0(n.add(p,g)))throw new Error("bad curve params: a or b");function x(O,L,N=!1){if(!n.isValid(L)||N&&n.is0(L))throw new Error(`bad point coordinate ${O}`);return L}function _(O){if(!(O instanceof C))throw new Error("ProjectivePoint expected")}const b=i2((O,L)=>{const{px:N,py:v,pz:D}=O;if(n.eql(D,n.ONE))return{x:N,y:v};const k=O.is0();L==null&&(L=k?n.ONE:n.inv(D));const U=n.mul(N,L),R=n.mul(v,L),B=n.mul(D,L);if(k)return{x:n.ZERO,y:n.ZERO};if(!n.eql(B,n.ONE))throw new Error("invZ was invalid");return{x:U,y:R}}),I=i2(O=>{if(O.is0()){if(t.allowInfinityPoint&&!n.is0(O.py))return;throw new Error("bad point: ZERO")}const{x:L,y:N}=O.toAffine();if(!n.isValid(L)||!n.isValid(N))throw new Error("bad point: x or y not field elements");if(!y(L,N))throw new Error("bad point: equation left != right");if(!O.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function E(O,L,N,v,D){return N=new C(n.mul(N.px,O),N.py,N.pz),L=$a(v,L),N=$a(D,N),L.add(N)}class C{constructor(L,N,v){this.px=x("x",L),this.py=x("y",N,!0),this.pz=x("z",v),Object.freeze(this)}static fromAffine(L){const{x:N,y:v}=L||{};if(!L||!n.isValid(N)||!n.isValid(v))throw new Error("invalid affine point");if(L instanceof C)throw new Error("projective point not allowed");return n.is0(N)&&n.is0(v)?C.ZERO:new C(N,v,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(L){return jF(C,"pz",L)}static fromBytes(L){return $n(L),C.fromHex(L)}static fromHex(L){const N=C.fromAffine(f(nn("pointHex",L)));return N.assertValidity(),N}static fromPrivateKey(L){const N=HM(i,t.allowedPrivateKeyLengths,t.wrapPrivateKey);return C.BASE.multiply(N(L))}static msm(L,N){return DF(C,i,L,N)}precompute(L=8,N=!0){return j.setWindowSize(this,L),N||this.multiply(bl),this}_setWindowSize(L){this.precompute(L)}assertValidity(){I(this)}hasEvenY(){const{y:L}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(L)}equals(L){_(L);const{px:N,py:v,pz:D}=this,{px:k,py:U,pz:R}=L,B=n.eql(n.mul(N,R),n.mul(k,D)),F=n.eql(n.mul(v,R),n.mul(U,D));return B&&F}negate(){return new C(this.px,n.neg(this.py),this.pz)}double(){const{a:L,b:N}=e,v=n.mul(N,bl),{px:D,py:k,pz:U}=this;let R=n.ZERO,B=n.ZERO,F=n.ZERO,W=n.mul(D,D),V=n.mul(k,k),Y=n.mul(U,U),Q=n.mul(D,k);return Q=n.add(Q,Q),F=n.mul(D,U),F=n.add(F,F),R=n.mul(L,F),B=n.mul(v,Y),B=n.add(R,B),R=n.sub(V,B),B=n.add(V,B),B=n.mul(R,B),R=n.mul(Q,R),F=n.mul(v,F),Y=n.mul(L,Y),Q=n.sub(W,Y),Q=n.mul(L,Q),Q=n.add(Q,F),F=n.add(W,W),W=n.add(F,W),W=n.add(W,Y),W=n.mul(W,Q),B=n.add(B,W),Y=n.mul(k,U),Y=n.add(Y,Y),W=n.mul(Y,Q),R=n.sub(R,W),F=n.mul(Y,V),F=n.add(F,F),F=n.add(F,F),new C(R,B,F)}add(L){_(L);const{px:N,py:v,pz:D}=this,{px:k,py:U,pz:R}=L;let B=n.ZERO,F=n.ZERO,W=n.ZERO;const V=e.a,Y=n.mul(e.b,bl);let Q=n.mul(N,k),G=n.mul(v,U),ne=n.mul(D,R),ce=n.add(N,v),q=n.add(k,U);ce=n.mul(ce,q),q=n.add(Q,G),ce=n.sub(ce,q),q=n.add(N,D);let he=n.add(k,R);return q=n.mul(q,he),he=n.add(Q,ne),q=n.sub(q,he),he=n.add(v,D),B=n.add(U,R),he=n.mul(he,B),B=n.add(G,ne),he=n.sub(he,B),W=n.mul(V,q),B=n.mul(Y,ne),W=n.add(B,W),B=n.sub(G,W),W=n.add(G,W),F=n.mul(B,W),G=n.add(Q,Q),G=n.add(G,Q),ne=n.mul(V,ne),q=n.mul(Y,q),G=n.add(G,ne),ne=n.sub(Q,ne),ne=n.mul(V,ne),q=n.add(q,ne),Q=n.mul(G,q),F=n.add(F,Q),Q=n.mul(he,q),B=n.mul(ce,B),B=n.sub(B,Q),Q=n.mul(ce,G),W=n.mul(he,W),W=n.add(W,Q),new C(B,F,W)}subtract(L){return this.add(L.negate())}is0(){return this.equals(C.ZERO)}multiply(L){const{endo:N}=t;if(!i.isValidNot0(L))throw new Error("invalid scalar: out of range");let v,D;const k=U=>j.wNAFCached(this,U,C.normalizeZ);if(N){const{k1neg:U,k1:R,k2neg:B,k2:F}=N.splitScalar(L),{p:W,f:V}=k(R),{p:Y,f:Q}=k(F);D=V.add(Q),v=E(N.beta,W,Y,U,B)}else{const{p:U,f:R}=k(L);v=U,D=R}return C.normalizeZ([v,D])[0]}multiplyUnsafe(L){const{endo:N}=t,v=this;if(!i.isValid(L))throw new Error("invalid scalar: out of range");if(L===Ba||v.is0())return C.ZERO;if(L===Va)return v;if(j.hasPrecomputes(this))return this.multiply(L);if(N){const{k1neg:D,k1:k,k2neg:U,k2:R}=N.splitScalar(L),{p1:B,p2:F}=AF(C,v,k,R);return E(N.beta,B,F,D,U)}else return j.wNAFCachedUnsafe(v,L)}multiplyAndAddUnsafe(L,N,v){const D=this.multiplyUnsafe(N).add(L.multiplyUnsafe(v));return D.is0()?void 0:D}toAffine(L){return b(this,L)}isTorsionFree(){const{isTorsionFree:L}=t;return r===Va?!0:L?L(C,this):j.wNAFCachedUnsafe(this,s).is0()}clearCofactor(){const{clearCofactor:L}=t;return r===Va?this:L?L(C,this):this.multiplyUnsafe(r)}toBytes(L=!0){return uu("isCompressed",L),this.assertValidity(),d(C,this,L)}toRawBytes(L=!0){return this.toBytes(L)}toHex(L=!0){return hc(this.toBytes(L))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}C.BASE=new C(e.Gx,e.Gy,n.ONE),C.ZERO=new C(n.ZERO,n.ONE,n.ZERO),C.Fp=n,C.Fn=i;const T=i.BITS,j=SF(C,t.endo?Math.ceil(T/2):T);return C}function GM(e){return Uint8Array.of(e?2:3)}function HF(e,t,n={}){Id(t,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const i=t.randomBytes||ha,r=t.hmac||((v,...D)=>xd(t.hash,v,gs(...D))),{Fp:s,Fn:o}=e,{ORDER:a,BITS:l}=o;function u(v){const D=a>>Va;return v>D}function d(v){return u(v)?o.neg(v):v}function f(v,D){if(!o.isValidNot0(D))throw new Error(`invalid signature ${v}: out of range 1..CURVE.n`)}class m{constructor(D,k,U){f("r",D),f("s",k),this.r=D,this.s=k,U!=null&&(this.recovery=U),Object.freeze(this)}static fromCompact(D){const k=o.BYTES,U=nn("compactSignature",D,k*2);return new m(o.fromBytes(U.subarray(0,k)),o.fromBytes(U.subarray(k,k*2)))}static fromDER(D){const{r:k,s:U}=ki.toSig(nn("DER",D));return new m(k,U)}assertValidity(){}addRecoveryBit(D){return new m(this.r,this.s,D)}recoverPublicKey(D){const k=s.ORDER,{r:U,s:R,recovery:B}=this;if(B==null||![0,1,2,3].includes(B))throw new Error("recovery id invalid");if(a*WF<k&&B>1)throw new Error("recovery id is ambiguous for h>1 curve");const F=B===2||B===3?U+a:U;if(!s.isValid(F))throw new Error("recovery id 2 or 3 invalid");const W=s.toBytes(F),V=e.fromHex(gs(GM((B&1)===0),W)),Y=o.inv(F),Q=I(nn("msgHash",D)),G=o.create(-Q*Y),ne=o.create(R*Y),ce=e.BASE.multiplyUnsafe(G).add(V.multiplyUnsafe(ne));if(ce.is0())throw new Error("point at infinify");return ce.assertValidity(),ce}hasHighS(){return u(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,o.neg(this.s),this.recovery):this}toBytes(D){if(D==="compact")return gs(o.toBytes(this.r),o.toBytes(this.s));if(D==="der")return Xm(ki.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return hc(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return hc(this.toBytes("compact"))}}const y=HM(o,n.allowedPrivateKeyLengths,n.wrapPrivateKey),p={isValidPrivateKey(v){try{return y(v),!0}catch{return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const v=a;return TF(i(WM(v)),v)},precompute(v=8,D=e.BASE){return D.precompute(v,!1)}};function g(v,D=!0){return e.fromPrivateKey(v).toBytes(D)}function x(v){if(typeof v=="bigint")return!1;if(v instanceof e)return!0;const D=nn("key",v).length,k=s.BYTES,U=k+1,R=2*k+1;if(!(n.allowedPrivateKeyLengths||o.BYTES===U))return D===U||D===R}function _(v,D,k=!0){if(x(v)===!0)throw new Error("first arg must be private key");if(x(D)===!1)throw new Error("second arg must be public key");return e.fromHex(D).multiply(y(v)).toBytes(k)}const b=t.bits2int||function(v){if(v.length>8192)throw new Error("input is too large");const D=bd(v),k=v.length*8-l;return k>0?D>>BigInt(k):D},I=t.bits2int_modN||function(v){return o.create(b(v))},E=Md(l);function C(v){return b0("num < 2^"+l,v,Ba,E),o.toBytes(v)}function T(v,D,k=j){if(["recovered","canonical"].some(ce=>ce in k))throw new Error("sign() legacy options not supported");const{hash:U}=t;let{lowS:R,prehash:B,extraEntropy:F}=k;R==null&&(R=!0),v=nn("msgHash",v),u2(k),B&&(v=nn("prehashed msgHash",U(v)));const W=I(v),V=y(D),Y=[C(V),C(W)];if(F!=null&&F!==!1){const ce=F===!0?i(s.BYTES):F;Y.push(nn("extraEntropy",ce))}const Q=gs(...Y),G=W;function ne(ce){const q=b(ce);if(!o.isValidNot0(q))return;const he=o.inv(q),re=e.BASE.multiply(q).toAffine(),se=o.create(re.x);if(se===Ba)return;const le=o.create(he*o.create(G+se*V));if(le===Ba)return;let Le=(re.x===se?0:2)|Number(re.y&Va),Fe=le;return R&&u(le)&&(Fe=d(le),Le^=1),new m(se,Fe,Le)}return{seed:Q,k2sig:ne}}const j={lowS:t.lowS,prehash:!1},O={lowS:t.lowS,prehash:!1};function L(v,D,k=j){const{seed:U,k2sig:R}=T(v,D,k);return wF(t.hash.outputLen,o.BYTES,r)(U,R)}e.BASE.precompute(8);function N(v,D,k,U=O){const R=v;D=nn("msgHash",D),k=nn("publicKey",k),u2(U);const{lowS:B,prehash:F,format:W}=U;if("strict"in U)throw new Error("options.strict was renamed to lowS");if(W!==void 0&&!["compact","der","js"].includes(W))throw new Error('format must be "compact", "der" or "js"');const V=typeof R=="string"||qm(R),Y=!V&&!W&&typeof R=="object"&&R!==null&&typeof R.r=="bigint"&&typeof R.s=="bigint";if(!V&&!Y)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Q,G;try{if(Y)if(W===void 0||W==="js")Q=new m(R.r,R.s);else throw new Error("invalid format");if(V){try{W!=="compact"&&(Q=m.fromDER(R))}catch(Le){if(!(Le instanceof ki.Err))throw Le}!Q&&W!=="der"&&(Q=m.fromCompact(R))}G=e.fromHex(k)}catch{return!1}if(!Q||B&&Q.hasHighS())return!1;F&&(D=t.hash(D));const{r:ne,s:ce}=Q,q=I(D),he=o.inv(ce),re=o.create(q*he),se=o.create(ne*he),le=e.BASE.multiplyUnsafe(re).add(G.multiplyUnsafe(se));return le.is0()?!1:o.create(le.x)===ne}return Object.freeze({getPublicKey:g,getSharedSecret:_,sign:L,verify:N,utils:p,Point:e,Signature:m})}function GF(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp,i=fa(t.n,e.nBitLength),r={Fp:n,Fn:i,allowedPrivateKeyLengths:e.allowedPrivateKeyLengths,allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,wrapPrivateKey:e.wrapPrivateKey,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:r}}function ZF(e){const{CURVE:t,curveOpts:n}=GF(e),i={hash:e.hash,hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,ecdsaOpts:i}}function qF(e,t){return Object.assign({},t,{ProjectivePoint:t.Point,CURVE:e})}function KF(e){const{CURVE:t,curveOpts:n,ecdsaOpts:i}=ZF(e),r=QF(t,n),s=HF(r,i,n);return qF(e,s)}function I0(e,t){const n=i=>KF({...e,hash:i});return{...n(t),create:n}}const ZM={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},qM={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},KM={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},JF=fa(ZM.p),XF=fa(qM.p),eY=fa(KM.p),tY=I0({...ZM,Fp:JF,lowS:!1},wd);I0({...qM,Fp:XF,lowS:!1},lW),I0({...KM,Fp:eY,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},cW);const nY=tY,JM="base10",Ht="base16",sn="base64pad",Ir="base64url",Wc="utf8",XM=0,$i=1,Fc=2,iY=0,d2=1,Wa=12,sy=32;function rY(){const e=M0.utils.randomPrivateKey(),t=M0.getPublicKey(e);return{privateKey:ln(e,Ht),publicKey:ln(t,Ht)}}function E0(){const e=ha(sy);return ln(e,Ht)}function sY(e,t){const n=M0.getSharedSecret(Pn(e,Ht),Pn(t,Ht)),i=yF(_d,n,void 0,void 0,sy);return ln(i,Ht)}function Sl(e){const t=_d(Pn(e,Ht));return ln(t,Ht)}function Dn(e){const t=_d(Pn(e,Wc));return ln(t,Ht)}function eI(e){return Pn(`${e}`,JM)}function Vs(e){return Number(ln(e,JM))}function tI(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function nI(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4;return t+"=".repeat(n)}function oY(e){const t=eI(typeof e.type<"u"?e.type:XM);if(Vs(t)===$i&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof e.senderPublicKey<"u"?Pn(e.senderPublicKey,Ht):void 0,i=typeof e.iv<"u"?Pn(e.iv,Ht):ha(Wa),r=Pn(e.symKey,Ht),s=OM(r,i).encrypt(Pn(e.message,Wc)),o=iI({type:t,sealed:s,iv:i,senderPublicKey:n});return e.encoding===Ir?tI(o):o}function aY(e){const t=Pn(e.symKey,Ht),{sealed:n,iv:i}=mc({encoded:e.encoded,encoding:e.encoding}),r=OM(t,i).decrypt(n);if(r===null)throw new Error("Failed to decrypt");return ln(r,Wc)}function cY(e,t){const n=eI(Fc),i=ha(Wa),r=Pn(e,Wc),s=iI({type:n,sealed:r,iv:i});return t===Ir?tI(s):s}function lY(e,t){const{sealed:n}=mc({encoded:e,encoding:t});return ln(n,Wc)}function iI(e){if(Vs(e.type)===Fc)return ln(Ra([e.type,e.sealed]),sn);if(Vs(e.type)===$i){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return ln(Ra([e.type,e.senderPublicKey,e.iv,e.sealed]),sn)}return ln(Ra([e.type,e.iv,e.sealed]),sn)}function mc(e){const t=(e.encoding||sn)===Ir?nI(e.encoded):e.encoded,n=Pn(t,sn),i=n.slice(iY,d2),r=d2;if(Vs(i)===$i){const l=r+sy,u=l+Wa,d=n.slice(r,l),f=n.slice(l,u),m=n.slice(u);return{type:i,sealed:m,iv:f,senderPublicKey:d}}if(Vs(i)===Fc){const l=n.slice(r),u=ha(Wa);return{type:i,sealed:l,iv:u}}const s=r+Wa,o=n.slice(r,s),a=n.slice(s);return{type:i,sealed:a,iv:o}}function uY(e,t){const n=mc({encoded:e,encoding:t==null?void 0:t.encoding});return rI({type:Vs(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?ln(n.senderPublicKey,Ht):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function rI(e){const t=(e==null?void 0:e.type)||XM;if(t===$i){if(typeof(e==null?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(e==null?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e==null?void 0:e.senderPublicKey,receiverPublicKey:e==null?void 0:e.receiverPublicKey}}function h2(e){return e.type===$i&&typeof e.senderPublicKey=="string"&&typeof e.receiverPublicKey=="string"}function f2(e){return e.type===Fc}function dY(e){const t=De.from(e.x,"base64"),n=De.from(e.y,"base64");return Ra([new Uint8Array([4]),t,n])}function hY(e,t){const[n,i,r]=e.split("."),s=De.from(nI(r),"base64");if(s.length!==64)throw new Error("Invalid signature length");const o=s.slice(0,32),a=s.slice(32,64),l=`${n}.${i}`,u=_d(l),d=dY(t);if(!nY.verify(Ra([o,a]),u,d))throw new Error("Invalid signature");return Fh(e).payload}const fY="irn";function hu(e){return(e==null?void 0:e.relay)||{protocol:fY}}function go(e){const t=JI[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}function mY(e,t="-"){const n={},i="relay"+t;return Object.keys(e).forEach(r=>{if(r.startsWith(i)){const s=r.replace(i,""),o=e[r];n[s]=o}}),n}function m2(e){if(!e.includes("wc:")){const u=yM(e);u!=null&&u.includes("wc:")&&(e=u)}e=e.includes("wc://")?e.replace("wc://",""):e,e=e.includes("wc:")?e.replace("wc:",""):e;const t=e.indexOf(":"),n=e.indexOf("?")!==-1?e.indexOf("?"):void 0,i=e.substring(0,t),r=e.substring(t+1,n).split("@"),s=typeof n<"u"?e.substring(n):"",o=new URLSearchParams(s),a={};o.forEach((u,d)=>{a[d]=u});const l=typeof a.methods=="string"?a.methods.split(","):void 0;return{protocol:i,topic:yY(r[0]),version:parseInt(r[1],10),symKey:a.symKey,relay:mY(a),methods:l,expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function yY(e){return e.startsWith("//")?e.substring(2):e}function gY(e,t="-"){const n="relay",i={};return Object.keys(e).forEach(r=>{const s=r,o=n+t+s;e[s]&&(i[o]=e[s])}),i}function y2(e){const t=new URLSearchParams,n=gY(e.relay);Object.keys(n).sort().forEach(r=>{t.set(r,n[r])}),t.set("symKey",e.symKey),e.expiryTimestamp&&t.set("expiryTimestamp",e.expiryTimestamp.toString()),e.methods&&t.set("methods",e.methods.join(","));const i=t.toString();return`${e.protocol}:${e.topic}@${e.version}?${i}`}function Ml(e,t,n){return`${e}?wc_ev=${n}&topic=${t}`}var pY=Object.defineProperty,wY=Object.defineProperties,xY=Object.getOwnPropertyDescriptors,g2=Object.getOwnPropertySymbols,_Y=Object.prototype.hasOwnProperty,bY=Object.prototype.propertyIsEnumerable,p2=(e,t,n)=>t in e?pY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MY=(e,t)=>{for(var n in t||(t={}))_Y.call(t,n)&&p2(e,n,t[n]);if(g2)for(var n of g2(t))bY.call(t,n)&&p2(e,n,t[n]);return e},IY=(e,t)=>wY(e,xY(t));function ma(e){const t=[];return e.forEach(n=>{const[i,r]=n.split(":");t.push(`${i}:${r}`)}),t}function EY(e){const t=[];return Object.values(e).forEach(n=>{t.push(...ma(n.accounts))}),t}function CY(e,t){const n=[];return Object.values(e).forEach(i=>{ma(i.accounts).includes(t)&&n.push(...i.methods)}),n}function LY(e,t){const n=[];return Object.values(e).forEach(i=>{ma(i.accounts).includes(t)&&n.push(...i.events)}),n}function sI(e){return e.includes(":")}function TY(e){return sI(e)?e.split(":")[0]:e}function w2(e){var t,n,i;const r={};if(!yc(e))return r;for(const[s,o]of Object.entries(e)){const a=sI(s)?[s]:o.chains,l=o.methods||[],u=o.events||[],d=TY(s);r[d]=IY(MY({},r[d]),{chains:As(a,(t=r[d])==null?void 0:t.chains),methods:As(l,(n=r[d])==null?void 0:n.methods),events:As(u,(i=r[d])==null?void 0:i.events)})}return r}function jY(e){const t={};return e==null||e.forEach(n=>{var i;const[r,s]=n.split(":");t[r]||(t[r]={accounts:[],chains:[],events:[],methods:[]}),t[r].accounts.push(n),(i=t[r].chains)==null||i.push(`${r}:${s}`)}),t}function x2(e,t){t=t.map(i=>i.replace("did:pkh:",""));const n=jY(t);for(const[i,r]of Object.entries(n))r.methods?r.methods=As(r.methods,e):r.methods=e,r.events=["chainChanged","accountsChanged"];return n}function vY(e,t){var n,i,r,s,o,a;const l=w2(e),u=w2(t),d={},f=Object.keys(l).concat(Object.keys(u));for(const m of f)d[m]={chains:As((n=l[m])==null?void 0:n.chains,(i=u[m])==null?void 0:i.chains),methods:As((r=l[m])==null?void 0:r.methods,(s=u[m])==null?void 0:s.methods),events:As((o=l[m])==null?void 0:o.events,(a=u[m])==null?void 0:a.events)};return d}const NY={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},SY={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function J(e,t){const{message:n,code:i}=SY[e];return{message:t?`${n} ${t}`:n,code:i}}function Ke(e,t){const{message:n,code:i}=NY[e];return{message:t?`${n} ${t}`:n,code:i}}function Go(e,t){return!!Array.isArray(e)}function yc(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function dt(e){return typeof e>"u"}function ct(e,t){return t&&dt(e)?!0:typeof e=="string"&&!!e.trim().length}function oy(e,t){return t&&dt(e)?!0:typeof e=="number"&&!isNaN(e)}function AY(e,t){const{requiredNamespaces:n}=t,i=Object.keys(e.namespaces),r=Object.keys(n);let s=!0;return ys(r,i)?(i.forEach(o=>{const{accounts:a,methods:l,events:u}=e.namespaces[o],d=ma(a),f=n[o];(!ys(uM(o,f),d)||!ys(f.methods,l)||!ys(f.events,u))&&(s=!1)}),s):!1}function fu(e){return ct(e,!1)&&e.includes(":")?e.split(":").length===2:!1}function DY(e){if(ct(e,!1)&&e.includes(":")){const t=e.split(":");if(t.length===3){const n=t[0]+":"+t[1];return!!t[2]&&fu(n)}}return!1}function OY(e){function t(n){try{return typeof new URL(n)<"u"}catch{return!1}}try{if(ct(e,!1)){if(t(e))return!0;const n=yM(e);return t(n)}}catch{}return!1}function PY(e){var t;return(t=e==null?void 0:e.proposer)==null?void 0:t.publicKey}function kY(e){return e==null?void 0:e.topic}function zY(e,t){let n=null;return ct(e==null?void 0:e.publicKey,!1)||(n=J("MISSING_OR_INVALID",`${t} controller public key should be a string`)),n}function _2(e){let t=!0;return Go(e)?e.length&&(t=e.every(n=>ct(n,!1))):t=!1,t}function RY(e,t,n){let i=null;return Go(t)&&t.length?t.forEach(r=>{i||fu(r)||(i=Ke("UNSUPPORTED_CHAINS",`${n}, chain ${r} should be a string and conform to "namespace:chainId" format`))}):fu(e)||(i=Ke("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),i}function UY(e,t,n){let i=null;return Object.entries(e).forEach(([r,s])=>{if(i)return;const o=RY(r,uM(r,s),`${t} ${n}`);o&&(i=o)}),i}function $Y(e,t){let n=null;return Go(e)?e.forEach(i=>{n||DY(i)||(n=Ke("UNSUPPORTED_ACCOUNTS",`${t}, account ${i} should be a string and conform to "namespace:chainId:address" format`))}):n=Ke("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function BY(e,t){let n=null;return Object.values(e).forEach(i=>{if(n)return;const r=$Y(i==null?void 0:i.accounts,`${t} namespace`);r&&(n=r)}),n}function VY(e,t){let n=null;return _2(e==null?void 0:e.methods)?_2(e==null?void 0:e.events)||(n=Ke("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):n=Ke("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),n}function oI(e,t){let n=null;return Object.values(e).forEach(i=>{if(n)return;const r=VY(i,`${t}, namespace`);r&&(n=r)}),n}function WY(e,t,n){let i=null;if(e&&yc(e)){const r=oI(e,t);r&&(i=r);const s=UY(e,t,n);s&&(i=s)}else i=J("MISSING_OR_INVALID",`${t}, ${n} should be an object with data`);return i}function Oh(e,t){let n=null;if(e&&yc(e)){const i=oI(e,t);i&&(n=i);const r=BY(e,t);r&&(n=r)}else n=J("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return n}function aI(e){return ct(e.protocol,!0)}function FY(e,t){let n=!1;return e?e&&Go(e)&&e.length&&e.forEach(i=>{n=aI(i)}):n=!0,n}function YY(e){return typeof e=="number"}function Xt(e){return typeof e<"u"&&typeof e!==null}function QY(e){return!(!e||typeof e!="object"||!e.code||!oy(e.code,!1)||!e.message||!ct(e.message,!1))}function HY(e){return!(dt(e)||!ct(e.method,!1))}function GY(e){return!(dt(e)||dt(e.result)&&dt(e.error)||!oy(e.id,!1)||!ct(e.jsonrpc,!1))}function ZY(e){return!(dt(e)||!ct(e.name,!1))}function b2(e,t){return!(!fu(t)||!EY(e).includes(t))}function qY(e,t,n){return ct(n,!1)?CY(e,t).includes(n):!1}function KY(e,t,n){return ct(n,!1)?LY(e,t).includes(n):!1}function M2(e,t,n){let i=null;const r=JY(e),s=XY(t),o=Object.keys(r),a=Object.keys(s),l=I2(Object.keys(e)),u=I2(Object.keys(t)),d=l.filter(f=>!u.includes(f));return d.length&&(i=J("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.
321
+ Required: ${d.toString()}
322
+ Received: ${Object.keys(t).toString()}`)),ys(o,a)||(i=J("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.
323
+ Required: ${o.toString()}
324
+ Approved: ${a.toString()}`)),Object.keys(t).forEach(f=>{if(!f.includes(":")||i)return;const m=ma(t[f].accounts);m.includes(f)||(i=J("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${f}
325
+ Required: ${f}
326
+ Approved: ${m.toString()}`))}),o.forEach(f=>{i||(ys(r[f].methods,s[f].methods)?ys(r[f].events,s[f].events)||(i=J("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${f}`)):i=J("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${f}`))}),i}function JY(e){const t={};return Object.keys(e).forEach(n=>{var i;n.includes(":")?t[n]=e[n]:(i=e[n].chains)==null||i.forEach(r=>{t[r]={methods:e[n].methods,events:e[n].events}})}),t}function I2(e){return[...new Set(e.map(t=>t.includes(":")?t.split(":")[0]:t))]}function XY(e){const t={};return Object.keys(e).forEach(n=>{if(n.includes(":"))t[n]=e[n];else{const i=ma(e[n].accounts);i==null||i.forEach(r=>{t[r]={accounts:e[n].accounts.filter(s=>s.includes(`${r}:`)),methods:e[n].methods,events:e[n].events}})}}),t}function eQ(e,t){return oy(e,!1)&&e<=t.max&&e>=t.min}function E2(){const e=Bc();return new Promise(t=>{switch(e){case pn.browser:t(tQ());break;case pn.reactNative:t(nQ());break;case pn.node:t(iQ());break;default:t(!0)}})}function tQ(){return da()&&(navigator==null?void 0:navigator.onLine)}async function nQ(){if(os()&&typeof _e<"u"&&_e!=null&&_e.NetInfo){const e=await(_e==null?void 0:_e.NetInfo.fetch());return e==null?void 0:e.isConnected}return!0}function iQ(){return!0}function rQ(e){switch(Bc()){case pn.browser:sQ(e);break;case pn.reactNative:oQ(e);break}}function sQ(e){!os()&&da()&&(window.addEventListener("online",()=>e(!0)),window.addEventListener("offline",()=>e(!1)))}function oQ(e){var t;os()&&typeof _e<"u"&&_e!=null&&_e.NetInfo&&((t=_e)==null||t.NetInfo.addEventListener(n=>e(n==null?void 0:n.isConnected)))}function aQ(){var e;return da()&&ko()?((e=ko())==null?void 0:e.visibilityState)==="visible":!0}const Ph={};class La{static get(t){return Ph[t]}static set(t,n){Ph[t]=n}static delete(t){delete Ph[t]}}function cQ(e){const t=Ic.decode(e);if(t.length<33)throw new Error("Too short to contain a public key");return t.slice(1,33)}function lQ({publicKey:e,signature:t,payload:n}){var i;const r=C0(n.method),s=128|parseInt(((i=n.version)==null?void 0:i.toString())||"4"),o=hQ(n.address),a=n.era==="00"?new Uint8Array([0]):C0(n.era);if(a.length!==1&&a.length!==2)throw new Error("Invalid era length");const l=parseInt(n.nonce,16),u=new Uint8Array([l&255,l>>8&255]),d=BigInt(`0x${dQ(n.tip)}`),f=mQ(d),m=new Uint8Array([0,...e,o,...t,...a,...u,...f,...r]),y=fQ(m.length+1);return new Uint8Array([...y,s,...m])}function uQ(e){const t=C0(e),n=r6.blake2b(t,void 0,32);return"0x"+De.from(n).toString("hex")}function C0(e){return new Uint8Array(e.replace(/^0x/,"").match(/.{1,2}/g).map(t=>parseInt(t,16)))}function dQ(e){return e.startsWith("0x")?e.slice(2):e}function hQ(e){const t=Ic.decode(e)[0];return t===42?0:t===60?2:1}function fQ(e){if(e<64)return new Uint8Array([e<<2]);if(e<16384){const t=e<<2|1;return new Uint8Array([t&255,t>>8&255])}else if(e<1<<30){const t=e<<2|2;return new Uint8Array([t&255,t>>8&255,t>>16&255,t>>24&255])}else throw new Error("Compact encoding > 2^30 not supported")}function mQ(e){if(e<BigInt(1)<<BigInt(6))return new Uint8Array([Number(e<<BigInt(2))]);if(e<BigInt(1)<<BigInt(14)){const t=e<<BigInt(2)|BigInt(1);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255))])}else if(e<BigInt(1)<<BigInt(30)){const t=e<<BigInt(2)|BigInt(2);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255)),Number(t>>BigInt(16)&BigInt(255)),Number(t>>BigInt(24)&BigInt(255))])}else throw new Error("BigInt compact encoding not supported > 2^30")}function yQ(e){const t=Uint8Array.from(De.from(e.signature,"hex")),n=cQ(e.transaction.address),i=lQ({publicKey:n,signature:t,payload:e.transaction}),r=De.from(i).toString("hex");return uQ(r)}var gQ={};const cI="wc",lI=2,L0="core",Ci=`${cI}@2:${L0}:`,pQ={logger:"error"},wQ={database:":memory:"},xQ="crypto",C2="client_ed25519_seed",_Q=ee.ONE_DAY,bQ="keychain",MQ="0.3",IQ="messages",EQ="0.3",CQ=ee.SIX_HOURS,LQ="publisher",uI="irn",TQ="error",dI="wss://relay.walletconnect.org",jQ="relayer",et={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},vQ="_subscription",Tn={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},NQ=.1,T0="2.21.8",Ve={link_mode:"link_mode",relay:"relay"},Al={inbound:"inbound",outbound:"outbound"},SQ="0.3",AQ="WALLETCONNECT_CLIENT_ID",L2="WALLETCONNECT_LINK_MODE_APPS",fn={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},DQ="subscription",OQ="0.3",PQ="pairing",kQ="0.3",Ta={wc_pairingDelete:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:ee.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:ee.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:0},res:{ttl:ee.ONE_DAY,prompt:!1,tag:0}}},hs={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},Yn={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},zQ="history",RQ="0.3",UQ="expirer",vn={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},$Q="0.3",BQ="verify-api",VQ="https://verify.walletconnect.com",hI="https://verify.walletconnect.org",Fa=hI,WQ=`${Fa}/v3`,FQ=[VQ,hI],YQ="echo",QQ="https://echo.walletconnect.com",hi={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal",subscribing_to_pairing_topic:"subscribing_to_pairing_topic"},Pi={no_wss_connection:"no_wss_connection",no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_expired:"proposal_expired",proposal_listener_not_found:"proposal_listener_not_found"},hr={session_approve_started:"session_approve_started",proposal_not_expired:"proposal_not_expired",session_namespaces_validation_success:"session_namespaces_validation_success",create_session_topic:"create_session_topic",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success"},ja={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},cs={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"},va={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"},HQ=.1,GQ="event-client",ZQ=86400,qQ="https://pulse.walletconnect.org/batch";function KQ(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),i=0;i<n.length;i++)n[i]=255;for(var r=0;r<e.length;r++){var s=e.charAt(r),o=s.charCodeAt(0);if(n[o]!==255)throw new TypeError(s+" is ambiguous");n[o]=r}var a=e.length,l=e.charAt(0),u=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(p){if(p instanceof Uint8Array||(ArrayBuffer.isView(p)?p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength):Array.isArray(p)&&(p=Uint8Array.from(p))),!(p instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(p.length===0)return"";for(var g=0,x=0,_=0,b=p.length;_!==b&&p[_]===0;)_++,g++;for(var I=(b-_)*d+1>>>0,E=new Uint8Array(I);_!==b;){for(var C=p[_],T=0,j=I-1;(C!==0||T<x)&&j!==-1;j--,T++)C+=256*E[j]>>>0,E[j]=C%a>>>0,C=C/a>>>0;if(C!==0)throw new Error("Non-zero carry");x=T,_++}for(var O=I-x;O!==I&&E[O]===0;)O++;for(var L=l.repeat(g);O<I;++O)L+=e.charAt(E[O]);return L}function m(p){if(typeof p!="string")throw new TypeError("Expected String");if(p.length===0)return new Uint8Array;var g=0;if(p[g]!==" "){for(var x=0,_=0;p[g]===l;)x++,g++;for(var b=(p.length-g)*u+1>>>0,I=new Uint8Array(b);p[g];){var E=n[p.charCodeAt(g)];if(E===255)return;for(var C=0,T=b-1;(E!==0||C<_)&&T!==-1;T--,C++)E+=a*I[T]>>>0,I[T]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");_=C,g++}if(p[g]!==" "){for(var j=b-_;j!==b&&I[j]===0;)j++;for(var O=new Uint8Array(x+(b-j)),L=x;j!==b;)O[L++]=I[j++];return O}}}function y(p){var g=m(p);if(g)return g;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:m,decode:y}}var JQ=KQ,XQ=JQ;const fI=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")},eH=e=>new TextEncoder().encode(e),tH=e=>new TextDecoder().decode(e);class nH{constructor(t,n,i){this.name=t,this.prefix=n,this.baseEncode=i}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class iH{constructor(t,n,i){if(this.name=t,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=i}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 mI(this,t)}}class rH{constructor(t){this.decoders=t}or(t){return mI(this,t)}decode(t){const n=t[0],i=this.decoders[n];if(i)return i.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const mI=(e,t)=>new rH({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class sH{constructor(t,n,i,r){this.name=t,this.prefix=n,this.baseEncode=i,this.baseDecode=r,this.encoder=new nH(t,n,i),this.decoder=new iH(t,n,r)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const Ed=({name:e,prefix:t,encode:n,decode:i})=>new sH(e,t,n,i),Yc=({prefix:e,name:t,alphabet:n})=>{const{encode:i,decode:r}=XQ(n,t);return Ed({prefix:e,name:t,encode:i,decode:s=>fI(r(s))})},oH=(e,t,n,i)=>{const r={};for(let d=0;d<t.length;++d)r[t[d]]=d;let s=e.length;for(;e[s-1]==="=";)--s;const o=new Uint8Array(s*n/8|0);let a=0,l=0,u=0;for(let d=0;d<s;++d){const f=r[e[d]];if(f===void 0)throw new SyntaxError(`Non-${i} character`);l=l<<n|f,a+=n,a>=8&&(a-=8,o[u++]=255&l>>a)}if(a>=n||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return o},aH=(e,t,n)=>{const i=t[t.length-1]==="=",r=(1<<n)-1;let s="",o=0,a=0;for(let l=0;l<e.length;++l)for(a=a<<8|e[l],o+=8;o>n;)o-=n,s+=t[r&a>>o];if(o&&(s+=t[r&a<<n-o]),i)for(;s.length*n&7;)s+="=";return s},jt=({name:e,prefix:t,bitsPerChar:n,alphabet:i})=>Ed({prefix:t,name:e,encode(r){return aH(r,i,n)},decode(r){return oH(r,i,n,e)}}),cH=Ed({prefix:"\0",name:"identity",encode:e=>tH(e),decode:e=>eH(e)});var lH=Object.freeze({__proto__:null,identity:cH});const uH=jt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var dH=Object.freeze({__proto__:null,base2:uH});const hH=jt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var fH=Object.freeze({__proto__:null,base8:hH});const mH=Yc({prefix:"9",name:"base10",alphabet:"0123456789"});var yH=Object.freeze({__proto__:null,base10:mH});const gH=jt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),pH=jt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var wH=Object.freeze({__proto__:null,base16:gH,base16upper:pH});const xH=jt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),_H=jt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),bH=jt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),MH=jt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),IH=jt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),EH=jt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),CH=jt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),LH=jt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),TH=jt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var jH=Object.freeze({__proto__:null,base32:xH,base32upper:_H,base32pad:bH,base32padupper:MH,base32hex:IH,base32hexupper:EH,base32hexpad:CH,base32hexpadupper:LH,base32z:TH});const vH=Yc({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),NH=Yc({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var SH=Object.freeze({__proto__:null,base36:vH,base36upper:NH});const AH=Yc({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),DH=Yc({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var OH=Object.freeze({__proto__:null,base58btc:AH,base58flickr:DH});const PH=jt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),kH=jt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),zH=jt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),RH=jt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var UH=Object.freeze({__proto__:null,base64:PH,base64pad:kH,base64url:zH,base64urlpad:RH});const yI=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),$H=yI.reduce((e,t,n)=>(e[n]=t,e),[]),BH=yI.reduce((e,t,n)=>(e[t.codePointAt(0)]=n,e),[]);function VH(e){return e.reduce((t,n)=>(t+=$H[n],t),"")}function WH(e){const t=[];for(const n of e){const i=BH[n.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${n}`);t.push(i)}return new Uint8Array(t)}const FH=Ed({prefix:"🚀",name:"base256emoji",encode:VH,decode:WH});var YH=Object.freeze({__proto__:null,base256emoji:FH}),QH=gI,T2=128,HH=-128,GH=Math.pow(2,31);function gI(e,t,n){t=t||[],n=n||0;for(var i=n;e>=GH;)t[n++]=e&255|T2,e/=128;for(;e&HH;)t[n++]=e&255|T2,e>>>=7;return t[n]=e|0,gI.bytes=n-i+1,t}var ZH=j0,qH=128,j2=127;function j0(e,i){var n=0,i=i||0,r=0,s=i,o,a=e.length;do{if(s>=a)throw j0.bytes=0,new RangeError("Could not decode varint");o=e[s++],n+=r<28?(o&j2)<<r:(o&j2)*Math.pow(2,r),r+=7}while(o>=qH);return j0.bytes=s-i,n}var KH=Math.pow(2,7),JH=Math.pow(2,14),XH=Math.pow(2,21),eG=Math.pow(2,28),tG=Math.pow(2,35),nG=Math.pow(2,42),iG=Math.pow(2,49),rG=Math.pow(2,56),sG=Math.pow(2,63),oG=function(e){return e<KH?1:e<JH?2:e<XH?3:e<eG?4:e<tG?5:e<nG?6:e<iG?7:e<rG?8:e<sG?9:10},aG={encode:QH,decode:ZH,encodingLength:oG},pI=aG;const v2=(e,t,n=0)=>(pI.encode(e,t,n),t),N2=e=>pI.encodingLength(e),v0=(e,t)=>{const n=t.byteLength,i=N2(e),r=i+N2(n),s=new Uint8Array(r+n);return v2(e,s,0),v2(n,s,i),s.set(t,r),new cG(e,n,t,s)};class cG{constructor(t,n,i,r){this.code=t,this.size=n,this.digest=i,this.bytes=r}}const wI=({name:e,code:t,encode:n})=>new lG(e,t,n);class lG{constructor(t,n,i){this.name=t,this.code=n,this.encode=i}digest(t){if(t instanceof Uint8Array){const n=this.encode(t);return n instanceof Uint8Array?v0(this.code,n):n.then(i=>v0(this.code,i))}else throw Error("Unknown type, must be binary type")}}const xI=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),uG=wI({name:"sha2-256",code:18,encode:xI("SHA-256")}),dG=wI({name:"sha2-512",code:19,encode:xI("SHA-512")});var hG=Object.freeze({__proto__:null,sha256:uG,sha512:dG});const _I=0,fG="identity",bI=fI,mG=e=>v0(_I,bI(e)),yG={code:_I,name:fG,encode:bI,digest:mG};var gG=Object.freeze({__proto__:null,identity:yG});new TextEncoder,new TextDecoder;const S2={...lH,...dH,...fH,...yH,...wH,...jH,...SH,...OH,...UH,...YH};({...hG,...gG});function MI(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function pG(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?MI(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function II(e,t,n,i){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:i}}}const A2=II("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),kh=II("ascii","a",e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},e=>{e=e.substring(1);const t=pG(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}),wG={utf8:A2,"utf-8":A2,hex:S2.base16,latin1:kh,ascii:kh,binary:kh,...S2};function xG(e,t="utf8"){const n=wG[t];if(!n)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?MI(globalThis.Buffer.from(e,"utf-8")):n.decoder.decode(`${n.prefix}${e}`)}var _G=Object.defineProperty,bG=(e,t,n)=>t in e?_G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ui=(e,t,n)=>bG(e,typeof t!="symbol"?t+"":t,n);class MG{constructor(t,n){this.core=t,this.logger=n,ui(this,"keychain",new Map),ui(this,"name",bQ),ui(this,"version",MQ),ui(this,"initialized",!1),ui(this,"storagePrefix",Ci),ui(this,"init",async()=>{if(!this.initialized){const i=await this.getKeyChain();typeof i<"u"&&(this.keychain=i),this.initialized=!0}}),ui(this,"has",i=>(this.isInitialized(),this.keychain.has(i))),ui(this,"set",async(i,r)=>{this.isInitialized(),this.keychain.set(i,r),await this.persist()}),ui(this,"get",i=>{this.isInitialized();const r=this.keychain.get(i);if(typeof r>"u"){const{message:s}=J("NO_MATCHING_KEY",`${this.name}: ${i}`);throw new Error(s)}return r}),ui(this,"del",async i=>{this.isInitialized(),this.keychain.delete(i),await this.persist()}),this.core=t,this.logger=Kt(n,this.name)}get context(){return dn(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,f0(t))}async getKeyChain(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?m0(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}}var IG=Object.defineProperty,EG=(e,t,n)=>t in e?IG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,It=(e,t,n)=>EG(e,typeof t!="symbol"?t+"":t,n);class CG{constructor(t,n,i){this.core=t,this.logger=n,It(this,"name",xQ),It(this,"keychain"),It(this,"randomSessionIdentifier",E0()),It(this,"initialized",!1),It(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),It(this,"hasKeys",r=>(this.isInitialized(),this.keychain.has(r))),It(this,"getClientId",async()=>{this.isInitialized();const r=await this.getClientSeed(),s=dy(r);return l6(s.publicKey)}),It(this,"generateKeyPair",()=>{this.isInitialized();const r=rY();return this.setPrivateKey(r.publicKey,r.privateKey)}),It(this,"signJWT",async r=>{this.isInitialized();const s=await this.getClientSeed(),o=dy(s),a=this.randomSessionIdentifier;return await u6(a,r,_Q,o)}),It(this,"generateSharedKey",(r,s,o)=>{this.isInitialized();const a=this.getPrivateKey(r),l=sY(a,s);return this.setSymKey(l,o)}),It(this,"setSymKey",async(r,s)=>{this.isInitialized();const o=s||Sl(r);return await this.keychain.set(o,r),o}),It(this,"deleteKeyPair",async r=>{this.isInitialized(),await this.keychain.del(r)}),It(this,"deleteSymKey",async r=>{this.isInitialized(),await this.keychain.del(r)}),It(this,"encode",async(r,s,o)=>{this.isInitialized();const a=rI(o),l=Wh(s);if(f2(a))return cY(l,o==null?void 0:o.encoding);if(h2(a)){const m=a.senderPublicKey,y=a.receiverPublicKey;r=await this.generateSharedKey(m,y)}const u=this.getSymKey(r),{type:d,senderPublicKey:f}=a;return oY({type:d,symKey:u,message:l,senderPublicKey:f,encoding:o==null?void 0:o.encoding})}),It(this,"decode",async(r,s,o)=>{this.isInitialized();const a=uY(s,o);if(f2(a)){const l=lY(s,o==null?void 0:o.encoding);return hy(l)}if(h2(a)){const l=a.receiverPublicKey,u=a.senderPublicKey;r=await this.generateSharedKey(l,u)}try{const l=this.getSymKey(r),u=aY({symKey:l,encoded:s,encoding:o==null?void 0:o.encoding});return hy(u)}catch(l){this.logger.error(`Failed to decode message from topic: '${r}', clientId: '${await this.getClientId()}'`),this.logger.error(l)}}),It(this,"getPayloadType",(r,s=sn)=>{const o=mc({encoded:r,encoding:s});return Vs(o.type)}),It(this,"getPayloadSenderPublicKey",(r,s=sn)=>{const o=mc({encoded:r,encoding:s});return o.senderPublicKey?ln(o.senderPublicKey,Ht):void 0}),this.core=t,this.logger=Kt(n,this.name),this.keychain=i||new MG(this.core,this.logger)}get context(){return dn(this.logger)}async setPrivateKey(t,n){return await this.keychain.set(t,n),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get(C2)}catch{t=E0(),await this.keychain.set(C2,t)}return xG(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}}var LG=Object.defineProperty,TG=Object.defineProperties,jG=Object.getOwnPropertyDescriptors,D2=Object.getOwnPropertySymbols,vG=Object.prototype.hasOwnProperty,NG=Object.prototype.propertyIsEnumerable,N0=(e,t,n)=>t in e?LG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SG=(e,t)=>{for(var n in t||(t={}))vG.call(t,n)&&N0(e,n,t[n]);if(D2)for(var n of D2(t))NG.call(t,n)&&N0(e,n,t[n]);return e},AG=(e,t)=>TG(e,jG(t)),hn=(e,t,n)=>N0(e,typeof t!="symbol"?t+"":t,n);class DG extends J${constructor(t,n){super(t,n),this.logger=t,this.core=n,hn(this,"messages",new Map),hn(this,"messagesWithoutClientAck",new Map),hn(this,"name",IQ),hn(this,"version",EQ),hn(this,"initialized",!1),hn(this,"storagePrefix",Ci),hn(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const i=await this.getRelayerMessages();typeof i<"u"&&(this.messages=i);const r=await this.getRelayerMessagesWithoutClientAck();typeof r<"u"&&(this.messagesWithoutClientAck=r),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(i){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(i)}finally{this.initialized=!0}}}),hn(this,"set",async(i,r,s)=>{this.isInitialized();const o=Dn(r);let a=this.messages.get(i);if(typeof a>"u"&&(a={}),typeof a[o]<"u")return o;if(a[o]=r,this.messages.set(i,a),s===Al.inbound){const l=this.messagesWithoutClientAck.get(i)||{};this.messagesWithoutClientAck.set(i,AG(SG({},l),{[o]:r}))}return await this.persist(),o}),hn(this,"get",i=>{this.isInitialized();let r=this.messages.get(i);return typeof r>"u"&&(r={}),r}),hn(this,"getWithoutAck",i=>{this.isInitialized();const r={};for(const s of i){const o=this.messagesWithoutClientAck.get(s)||{};r[s]=Object.values(o)}return r}),hn(this,"has",(i,r)=>{this.isInitialized();const s=this.get(i),o=Dn(r);return typeof s[o]<"u"}),hn(this,"ack",async(i,r)=>{this.isInitialized();const s=this.messagesWithoutClientAck.get(i);if(typeof s>"u")return;const o=Dn(r);delete s[o],Object.keys(s).length===0?this.messagesWithoutClientAck.delete(i):this.messagesWithoutClientAck.set(i,s),await this.persist()}),hn(this,"del",async i=>{this.isInitialized(),this.messages.delete(i),this.messagesWithoutClientAck.delete(i),await this.persist()}),this.logger=Kt(t,this.name),this.core=n}get context(){return dn(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,f0(t))}async setRelayerMessagesWithoutClientAck(t){await this.core.storage.setItem(this.storageKeyWithoutClientAck,f0(t))}async getRelayerMessages(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?m0(t):void 0}async getRelayerMessagesWithoutClientAck(){const t=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof t<"u"?m0(t):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}}var OG=Object.defineProperty,PG=Object.defineProperties,kG=Object.getOwnPropertyDescriptors,O2=Object.getOwnPropertySymbols,zG=Object.prototype.hasOwnProperty,RG=Object.prototype.propertyIsEnumerable,S0=(e,t,n)=>t in e?OG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uo=(e,t)=>{for(var n in t||(t={}))zG.call(t,n)&&S0(e,n,t[n]);if(O2)for(var n of O2(t))RG.call(t,n)&&S0(e,n,t[n]);return e},P2=(e,t)=>PG(e,kG(t)),jn=(e,t,n)=>S0(e,typeof t!="symbol"?t+"":t,n);class UG extends X${constructor(t,n){super(t,n),this.relayer=t,this.logger=n,jn(this,"events",new Ws.EventEmitter),jn(this,"name",LQ),jn(this,"queue",new Map),jn(this,"publishTimeout",ee.toMiliseconds(ee.ONE_MINUTE)),jn(this,"initialPublishTimeout",ee.toMiliseconds(ee.ONE_SECOND*15)),jn(this,"needsTransportRestart",!1),jn(this,"publish",async(i,r,s)=>{var o,a,l,u,d;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:i,message:r,opts:s}});const f=(s==null?void 0:s.ttl)||CQ,m=(s==null?void 0:s.prompt)||!1,y=(s==null?void 0:s.tag)||0,p=(s==null?void 0:s.id)||fs().toString(),g=go(hu().protocol),x={id:p,method:(s==null?void 0:s.publishMethod)||g.publish,params:uo({topic:i,message:r,ttl:f,prompt:m,tag:y,attestation:s==null?void 0:s.attestation},(s==null?void 0:s.tvf)&&{tvf:s.tvf})},_=`Failed to publish payload, please try again. id:${p} tag:${y}`;try{dt((o=x.params)==null?void 0:o.prompt)&&((a=x.params)==null||delete a.prompt),dt((l=x.params)==null?void 0:l.tag)&&((u=x.params)==null||delete u.tag);const b=new Promise(async I=>{const E=({id:T})=>{var j;((j=x.id)==null?void 0:j.toString())===T.toString()&&(this.removeRequestFromQueue(T),this.relayer.events.removeListener(et.publish,E),I())};this.relayer.events.on(et.publish,E);const C=xi(new Promise((T,j)=>{this.rpcPublish(x,s).then(T).catch(O=>{this.logger.warn(O,O==null?void 0:O.message),j(O)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${p} tag:${y}`);try{await C,this.events.removeListener(et.publish,E)}catch(T){this.queue.set(p,{request:x,opts:s,attempt:1}),this.logger.warn(T,T==null?void 0:T.message)}});this.logger.trace({type:"method",method:"publish",params:{id:p,topic:i,message:r,opts:s}}),await xi(b,this.publishTimeout,_)}catch(b){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(b),(d=s==null?void 0:s.internal)!=null&&d.throwOnFailedPublish)throw b}finally{this.queue.delete(p)}}),jn(this,"publishCustom",async i=>{var r,s,o,a,l;this.logger.debug("Publishing custom payload"),this.logger.trace({type:"method",method:"publishCustom",params:i});const{payload:u,opts:d={}}=i,{attestation:f,tvf:m,publishMethod:y,prompt:p,tag:g,ttl:x=ee.FIVE_MINUTES}=d,_=d.id||fs().toString(),b=go(hu().protocol),I=y||b.publish,E={id:_,method:I,params:uo(P2(uo({},u),{ttl:x,prompt:p,tag:g,attestation:f}),m)},C=`Failed to publish custom payload, please try again. id:${_} tag:${g}`;try{dt((r=E.params)==null?void 0:r.prompt)&&((s=E.params)==null||delete s.prompt),dt((o=E.params)==null?void 0:o.tag)&&((a=E.params)==null||delete a.tag);const T=new Promise(async j=>{const O=({id:N})=>{var v;((v=E.id)==null?void 0:v.toString())===N.toString()&&(this.removeRequestFromQueue(N),this.relayer.events.removeListener(et.publish,O),j())};this.relayer.events.on(et.publish,O);const L=xi(new Promise((N,v)=>{this.rpcPublish(E,d).then(N).catch(D=>{this.logger.warn(D,D==null?void 0:D.message),v(D)})}),this.initialPublishTimeout,`Failed initial custom payload publish, retrying.... method:${I} id:${_} tag:${g}`);try{await L,this.events.removeListener(et.publish,O)}catch(N){this.queue.set(_,{request:E,opts:d,attempt:1}),this.logger.warn(N,N==null?void 0:N.message)}});this.logger.trace({type:"method",method:"publish",params:{id:_,payload:u,opts:d}}),await xi(T,this.publishTimeout,C)}catch(T){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(T),(l=d==null?void 0:d.internal)!=null&&l.throwOnFailedPublish)throw T}finally{this.queue.delete(_)}}),jn(this,"on",(i,r)=>{this.events.on(i,r)}),jn(this,"once",(i,r)=>{this.events.once(i,r)}),jn(this,"off",(i,r)=>{this.events.off(i,r)}),jn(this,"removeListener",(i,r)=>{this.events.removeListener(i,r)}),this.relayer=t,this.logger=Kt(n,this.name),this.registerEventListeners()}get context(){return dn(this.logger)}async rpcPublish(t,n){this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:t});const i=await this.relayer.request(t);return this.relayer.events.emit(et.publish,uo(uo({},t),n)),this.logger.debug("Successfully Published Payload"),i}removeRequestFromQueue(t){this.queue.delete(t)}checkQueue(){this.queue.forEach(async(t,n)=>{var i;const r=t.attempt+1;this.queue.set(n,P2(uo({},t),{attempt:r})),this.logger.warn({},`Publisher: queue->publishing: ${t.request.id}, tag: ${(i=t.request.params)==null?void 0:i.tag}, attempt: ${r}`),await this.rpcPublish(t.request,t.opts),this.logger.warn({},`Publisher: queue->published: ${t.request.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(qo.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(et.connection_stalled);return}this.checkQueue()}),this.relayer.on(et.message_ack,t=>{this.removeRequestFromQueue(t.id.toString())})}}var $G=Object.defineProperty,BG=(e,t,n)=>t in e?$G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ho=(e,t,n)=>BG(e,typeof t!="symbol"?t+"":t,n);class VG{constructor(){ho(this,"map",new Map),ho(this,"set",(t,n)=>{const i=this.get(t);this.exists(t,n)||this.map.set(t,[...i,n])}),ho(this,"get",t=>this.map.get(t)||[]),ho(this,"exists",(t,n)=>this.get(t).includes(n)),ho(this,"delete",(t,n)=>{if(typeof n>"u"){this.map.delete(t);return}if(!this.map.has(t))return;const i=this.get(t);if(!this.exists(t,n))return;const r=i.filter(s=>s!==n);if(!r.length){this.map.delete(t);return}this.map.set(t,r)}),ho(this,"clear",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}}var WG=Object.defineProperty,FG=Object.defineProperties,YG=Object.getOwnPropertyDescriptors,k2=Object.getOwnPropertySymbols,QG=Object.prototype.hasOwnProperty,HG=Object.prototype.propertyIsEnumerable,A0=(e,t,n)=>t in e?WG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Na=(e,t)=>{for(var n in t||(t={}))QG.call(t,n)&&A0(e,n,t[n]);if(k2)for(var n of k2(t))HG.call(t,n)&&A0(e,n,t[n]);return e},zh=(e,t)=>FG(e,YG(t)),ze=(e,t,n)=>A0(e,typeof t!="symbol"?t+"":t,n);class GG extends nB{constructor(t,n){super(t,n),this.relayer=t,this.logger=n,ze(this,"subscriptions",new Map),ze(this,"topicMap",new VG),ze(this,"events",new Ws.EventEmitter),ze(this,"name",DQ),ze(this,"version",OQ),ze(this,"pending",new Map),ze(this,"cached",[]),ze(this,"initialized",!1),ze(this,"storagePrefix",Ci),ze(this,"subscribeTimeout",ee.toMiliseconds(ee.ONE_MINUTE)),ze(this,"initialSubscribeTimeout",ee.toMiliseconds(ee.ONE_SECOND*15)),ze(this,"clientId"),ze(this,"batchSubscribeTopicsLimit",500),ze(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),ze(this,"subscribe",async(i,r)=>{var s;this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:i,opts:r}});try{const o=hu(r),a={topic:i,relay:o,transportType:r==null?void 0:r.transportType};(s=r==null?void 0:r.internal)!=null&&s.skipSubscribe||this.pending.set(i,a);const l=await this.rpcSubscribe(i,o,r);return typeof l=="string"&&(this.onSubscribe(l,a),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:i,opts:r}})),l}catch(o){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(o),o}}),ze(this,"unsubscribe",async(i,r)=>{this.isInitialized(),typeof(r==null?void 0:r.id)<"u"?await this.unsubscribeById(i,r.id,r):await this.unsubscribeByTopic(i,r)}),ze(this,"isSubscribed",i=>new Promise(r=>{r(this.topicMap.topics.includes(i))})),ze(this,"isKnownTopic",i=>new Promise(r=>{r(this.topicMap.topics.includes(i)||this.pending.has(i)||this.cached.some(s=>s.topic===i))})),ze(this,"on",(i,r)=>{this.events.on(i,r)}),ze(this,"once",(i,r)=>{this.events.once(i,r)}),ze(this,"off",(i,r)=>{this.events.off(i,r)}),ze(this,"removeListener",(i,r)=>{this.events.removeListener(i,r)}),ze(this,"start",async()=>{await this.onConnect()}),ze(this,"stop",async()=>{await this.onDisconnect()}),ze(this,"restart",async()=>{await this.restore(),await this.onRestart()}),ze(this,"checkPending",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;const i=[];this.pending.forEach(r=>{i.push(r)}),await this.batchSubscribe(i)}),ze(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(qo.pulse,async()=>{await this.checkPending()}),this.events.on(fn.created,async i=>{const r=fn.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:i}),await this.persist()}),this.events.on(fn.deleted,async i=>{const r=fn.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:i}),await this.persist()})}),this.relayer=t,this.logger=Kt(n,this.name),this.clientId=""}get context(){return dn(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(t,n){let i=!1;try{i=this.getSubscription(t).topic===n}catch{}return i}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(t,n){const i=this.topicMap.get(t);await Promise.all(i.map(async r=>await this.unsubscribeById(t,r,n)))}async unsubscribeById(t,n,i){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:n,opts:i}});try{const r=hu(i);await this.restartToComplete({topic:t,id:n,relay:r}),await this.rpcUnsubscribe(t,n,r);const s=Ke("USER_DISCONNECTED",`${this.name}, ${t}`);await this.onUnsubscribe(t,n,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:n,opts:i}})}catch(r){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(r),r}}async rpcSubscribe(t,n,i){var r,s;const o=await this.getSubscriptionId(t);if((r=i==null?void 0:i.internal)!=null&&r.skipSubscribe)return o;(!i||(i==null?void 0:i.transportType)===Ve.relay)&&await this.restartToComplete({topic:t,id:t,relay:n});const a={method:go(n.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:a});const l=(s=i==null?void 0:i.internal)==null?void 0:s.throwOnFailedPublish;try{if((i==null?void 0:i.transportType)===Ve.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(a).catch(f=>this.logger.warn(f))},ee.toMiliseconds(ee.ONE_SECOND)),o;const u=new Promise(async f=>{const m=y=>{y.topic===t&&(this.events.removeListener(fn.created,m),f(y.id))};this.events.on(fn.created,m);try{const y=await xi(new Promise((p,g)=>{this.relayer.request(a).catch(x=>{this.logger.warn(x,x==null?void 0:x.message),g(x)}).then(p)}),this.initialSubscribeTimeout,`Subscribing to ${t} failed, please try again`);this.events.removeListener(fn.created,m),f(y)}catch{}}),d=await xi(u,this.subscribeTimeout,`Subscribing to ${t} failed, please try again`);if(!d&&l)throw new Error(`Subscribing to ${t} failed, please try again`);return d?o:null}catch(u){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(et.connection_stalled),l)throw u}return null}async rpcBatchSubscribe(t){if(!t.length)return;const n=t[0].relay,i={method:go(n.protocol).batchSubscribe,params:{topics:t.map(r=>r.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i});try{await await xi(new Promise(r=>{this.relayer.request(i).catch(s=>this.logger.warn(s)).then(r)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch{this.relayer.events.emit(et.connection_stalled)}}async rpcBatchFetchMessages(t){if(!t.length)return;const n=t[0].relay,i={method:go(n.protocol).batchFetchMessages,params:{topics:t.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i});let r;try{r=await await xi(new Promise((s,o)=>{this.relayer.request(i).catch(a=>{this.logger.warn(a),o(a)}).then(s)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(et.connection_stalled)}return r}rpcUnsubscribe(t,n,i){const r={method:go(i.protocol).unsubscribe,params:{topic:t,id:n}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(t,n){this.setSubscription(t,zh(Na({},n),{id:t})),this.pending.delete(n.topic)}onBatchSubscribe(t){t.length&&t.forEach(n=>{this.setSubscription(n.id,Na({},n)),this.pending.delete(n.topic)})}async onUnsubscribe(t,n,i){this.events.removeAllListeners(n),this.hasSubscription(n,t)&&this.deleteSubscription(n,i),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,n){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:n}),this.addSubscription(t,n)}addSubscription(t,n){this.subscriptions.set(t,Na({},n)),this.topicMap.set(n.topic,t),this.events.emit(fn.created,n)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const n=this.subscriptions.get(t);if(!n){const{message:i}=J("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(i)}return n}deleteSubscription(t,n){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:n});const i=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(i.topic,t),this.events.emit(fn.deleted,zh(Na({},i),{reason:n}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(fn.sync)}async onRestart(){if(this.cached.length){const t=[...this.cached],n=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let i=0;i<n;i++){const r=t.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(r)}}this.events.emit(fn.resubscribed)}async restore(){try{const t=await this.getRelayerSubscriptions();if(typeof t>"u"||!t.length)return;if(this.subscriptions.size&&!t.every(n=>{var i;return n.topic===((i=this.subscriptions.get(n.id))==null?void 0:i.topic)})){const{message:n}=J("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(n)}this.cached=t,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(t)}}async batchSubscribe(t){t.length&&(await this.rpcBatchSubscribe(t),this.onBatchSubscribe(await Promise.all(t.map(async n=>zh(Na({},n),{id:await this.getSubscriptionId(n.topic)})))))}async batchFetchMessages(t){if(!t.length)return;this.logger.trace(`Fetching batch messages for ${t.length} subscriptions`);const n=await this.rpcBatchFetchMessages(t);n&&n.messages&&(await LV(ee.toMiliseconds(ee.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(n.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}async restartToComplete(t){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(t),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(t){return Dn(t+await this.getClientId())}}var ZG=Object.defineProperty,z2=Object.getOwnPropertySymbols,qG=Object.prototype.hasOwnProperty,KG=Object.prototype.propertyIsEnumerable,D0=(e,t,n)=>t in e?ZG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R2=(e,t)=>{for(var n in t||(t={}))qG.call(t,n)&&D0(e,n,t[n]);if(z2)for(var n of z2(t))KG.call(t,n)&&D0(e,n,t[n]);return e},je=(e,t,n)=>D0(e,typeof t!="symbol"?t+"":t,n);class JG extends eB{constructor(t){super(t),je(this,"protocol","wc"),je(this,"version",2),je(this,"core"),je(this,"logger"),je(this,"events",new Ws.EventEmitter),je(this,"provider"),je(this,"messages"),je(this,"subscriber"),je(this,"publisher"),je(this,"name",jQ),je(this,"transportExplicitlyClosed",!1),je(this,"initialized",!1),je(this,"connectionAttemptInProgress",!1),je(this,"relayUrl"),je(this,"projectId"),je(this,"packageName"),je(this,"bundleId"),je(this,"hasExperiencedNetworkDisruption",!1),je(this,"pingTimeout"),je(this,"heartBeatTimeout",ee.toMiliseconds(ee.THIRTY_SECONDS+ee.FIVE_SECONDS)),je(this,"reconnectTimeout"),je(this,"connectPromise"),je(this,"reconnectInProgress",!1),je(this,"requestsInFlight",[]),je(this,"connectTimeout",ee.toMiliseconds(ee.ONE_SECOND*15)),je(this,"request",async n=>{var i,r;this.logger.debug("Publishing Request Payload");const s=n.id||fs().toString();await this.toEstablishConnection();try{this.logger.trace({id:s,method:n.method,topic:(i=n.params)==null?void 0:i.topic},"relayer.request - publishing...");const o=`${s}:${((r=n.params)==null?void 0:r.tag)||""}`;this.requestsInFlight.push(o);const a=await this.provider.request(n);return this.requestsInFlight=this.requestsInFlight.filter(l=>l!==o),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}}),je(this,"resetPingTimeout",()=>{cu()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var n,i,r,s;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),(s=(r=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null?void 0:r.terminate)==null||s.call(r)}catch(o){this.logger.warn(o,o==null?void 0:o.message)}},this.heartBeatTimeout))}),je(this,"onPayloadHandler",n=>{this.onProviderPayload(n),this.resetPingTimeout()}),je(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected 🛜"),this.startPingTimeout(),this.events.emit(et.connect)}),je(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected 🛑"),this.requestsInFlight=[],this.onProviderDisconnect()}),je(this,"onProviderErrorHandler",n=>{this.logger.fatal(`Fatal socket error: ${n.message}`),this.events.emit(et.error,n),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),je(this,"registerProviderListeners",()=>{this.provider.on(Tn.payload,this.onPayloadHandler),this.provider.on(Tn.connect,this.onConnectHandler),this.provider.on(Tn.disconnect,this.onDisconnectHandler),this.provider.on(Tn.error,this.onProviderErrorHandler)}),this.core=t.core,this.logger=typeof t.logger<"u"&&typeof t.logger!="string"?Kt(t.logger,this.name):gd(Ym({level:t.logger||TQ})),this.messages=new DG(this.logger,t.core),this.subscriber=new GG(this,this.logger),this.publisher=new UG(this,this.logger),this.projectId=t==null?void 0:t.projectId,this.relayUrl=(t==null?void 0:t.relayUrl)||dI,uV()?this.packageName=Op():dV()&&(this.bundleId=Op()),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(t=>this.logger.warn(t,t==null?void 0:t.message))}get context(){return dn(this.logger)}get connected(){var t,n,i;return((i=(n=(t=this.provider)==null?void 0:t.connection)==null?void 0:n.socket)==null?void 0:i.readyState)===1||!1}get connecting(){var t,n,i;return((i=(n=(t=this.provider)==null?void 0:t.connection)==null?void 0:n.socket)==null?void 0:i.readyState)===0||this.connectPromise!==void 0||!1}async publish(t,n,i){this.isInitialized(),await this.publisher.publish(t,n,i),await this.recordMessageEvent({topic:t,message:n,publishedAt:Date.now(),transportType:Ve.relay},Al.outbound)}async publishCustom(t){this.isInitialized(),await this.publisher.publishCustom(t)}async subscribe(t,n){var i,r,s;this.isInitialized(),(!(n!=null&&n.transportType)||(n==null?void 0:n.transportType)==="relay")&&await this.toEstablishConnection();const o=typeof((i=n==null?void 0:n.internal)==null?void 0:i.throwOnFailedPublish)>"u"?!0:(r=n==null?void 0:n.internal)==null?void 0:r.throwOnFailedPublish;let a=((s=this.subscriber.topicMap.get(t))==null?void 0:s[0])||"",l;const u=d=>{d.topic===t&&(this.subscriber.off(fn.created,u),l())};return await Promise.all([new Promise(d=>{l=d,this.subscriber.on(fn.created,u)}),new Promise(async(d,f)=>{a=await this.subscriber.subscribe(t,R2({internal:{throwOnFailedPublish:o}},n)).catch(m=>{o&&f(m)})||a,d()})]),a}async unsubscribe(t,n){this.isInitialized(),await this.subscriber.unsubscribe(t,n)}on(t,n){this.events.on(t,n)}once(t,n){this.events.once(t,n)}off(t,n){this.events.off(t,n)}removeListener(t,n){this.events.removeListener(t,n)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await xi(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(t){if(!this.subscriber.hasAnyTopics){this.logger.info("Starting WS connection skipped because the client has no topics to work with.");return}if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(n,i)=>{await this.connect(t).then(n).catch(i).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(t){this.logger.debug({},"Restarting transport..."),!this.connectionAttemptInProgress&&(this.relayUrl=t||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await E2())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(t){if((t==null?void 0:t.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const n=t.sort((i,r)=>i.publishedAt-r.publishedAt);this.logger.debug(`Batch of ${n.length} message events sorted`);for(const i of n)try{await this.onMessageEvent(i)}catch(r){this.logger.warn(r,"Error while processing batch message event: "+(r==null?void 0:r.message))}this.logger.trace(`Batch of ${n.length} message events processed`)}async onLinkMessageEvent(t,n){const{topic:i}=t;if(!n.sessionExists){const r=ut(ee.FIVE_MINUTES),s={topic:i,expiry:r,relay:{protocol:"irn"},active:!1};await this.core.pairing.pairings.set(i,s)}this.events.emit(et.message,t),await this.recordMessageEvent(t,Al.inbound)}async connect(t){await this.confirmOnlineStateOrThrow(),t&&t!==this.relayUrl&&(this.relayUrl=t,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let n=1;for(;n<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${n}...`),await this.createProvider(),await new Promise(async(i,r)=>{const s=()=>{r(new Error("Connection interrupted while trying to connect"))};this.provider.once(Tn.disconnect,s),await xi(new Promise((o,a)=>{this.provider.connect().then(o).catch(a)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>{r(o)}).finally(()=>{this.provider.off(Tn.disconnect,s),clearTimeout(this.reconnectTimeout)}),await new Promise(async(o,a)=>{const l=()=>{r(new Error("Connection interrupted while trying to subscribe"))};this.provider.once(Tn.disconnect,l),await this.subscriber.start().then(o).catch(a).finally(()=>{this.provider.off(Tn.disconnect,l)})}),this.hasExperiencedNetworkDisruption=!1,i()})}catch(i){await this.subscriber.stop();const r=i;this.logger.warn({},r.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${n}`);break}await new Promise(i=>setTimeout(i,ee.toMiliseconds(n*1))),n++}}startPingTimeout(){var t,n,i,r,s;if(cu())try{(n=(t=this.provider)==null?void 0:t.connection)!=null&&n.socket&&((s=(r=(i=this.provider)==null?void 0:i.connection)==null?void 0:r.socket)==null||s.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o,o==null?void 0:o.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const t=await this.core.crypto.signJWT(this.relayUrl);this.provider=new a6(new c6(gV({sdkVersion:T0,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(t,n){const{topic:i,message:r}=t;await this.messages.set(i,r,n)}async shouldIgnoreMessageEvent(t){const{topic:n,message:i}=t;if(!i||i.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${i}`),!0;if(!await this.subscriber.isKnownTopic(n))return this.logger.warn(`Ignoring message for unknown topic ${n}`),!0;const r=this.messages.has(n,i);return r&&this.logger.warn(`Ignoring duplicate message: ${i}`),r}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),B0(t)){if(!t.method.endsWith(vQ))return;const n=t.params,{topic:i,message:r,publishedAt:s,attestation:o}=n.data,a={topic:i,message:r,publishedAt:s,transportType:Ve.relay,attestation:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(R2({type:"event",event:n.id},a)),this.events.emit(n.id,a),await this.acknowledgePayload(t),await this.onMessageEvent(a)}else V0(t)&&this.events.emit(et.message_ack,t)}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(await this.recordMessageEvent(t,Al.inbound),this.events.emit(et.message,t))}async acknowledgePayload(t){const n=Ol(t.id,!0);await this.provider.connection.send(n)}unregisterProviderListeners(){this.provider.off(Tn.payload,this.onPayloadHandler),this.provider.off(Tn.connect,this.onConnectHandler),this.provider.off(Tn.disconnect,this.onDisconnectHandler),this.provider.off(Tn.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let t=await E2();rQ(async n=>{t!==n&&(t=n,n?await this.transportOpen().catch(i=>this.logger.error(i,i==null?void 0:i.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(qo.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&aQ())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(n){this.logger.warn(n,n==null?void 0:n.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(et.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(t=>this.logger.error(t,t==null?void 0:t.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},ee.toMiliseconds(NQ)))))}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}}function XG(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function U2(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function $2(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const eZ="[object RegExp]",tZ="[object String]",nZ="[object Number]",iZ="[object Boolean]",B2="[object Arguments]",rZ="[object Symbol]",sZ="[object Date]",oZ="[object Map]",aZ="[object Set]",cZ="[object Array]",lZ="[object Function]",uZ="[object ArrayBuffer]",Rh="[object Object]",dZ="[object Error]",hZ="[object DataView]",fZ="[object Uint8Array]",mZ="[object Uint8ClampedArray]",yZ="[object Uint16Array]",gZ="[object Uint32Array]",pZ="[object BigUint64Array]",wZ="[object Int8Array]",xZ="[object Int16Array]",_Z="[object Int32Array]",bZ="[object BigInt64Array]",MZ="[object Float32Array]",IZ="[object Float64Array]";function EZ(){}function V2(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}function CZ(e,t,n){return za(e,t,void 0,void 0,void 0,void 0,n)}function za(e,t,n,i,r,s,o){const a=o(e,t,n,i,r,s);if(a!==void 0)return a;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return Ya(e,t,s,o)}return Ya(e,t,s,o)}function Ya(e,t,n,i){if(Object.is(e,t))return!0;let r=$2(e),s=$2(t);if(r===B2&&(r=Rh),s===B2&&(s=Rh),r!==s)return!1;switch(r){case tZ:return e.toString()===t.toString();case nZ:{const l=e.valueOf(),u=t.valueOf();return XG(l,u)}case iZ:case sZ:case rZ:return Object.is(e.valueOf(),t.valueOf());case eZ:return e.source===t.source&&e.flags===t.flags;case lZ:return e===t}n=n??new Map;const o=n.get(e),a=n.get(t);if(o!=null&&a!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(r){case oZ:{if(e.size!==t.size)return!1;for(const[l,u]of e.entries())if(!t.has(l)||!za(u,t.get(l),l,e,t,n,i))return!1;return!0}case aZ:{if(e.size!==t.size)return!1;const l=Array.from(e.values()),u=Array.from(t.values());for(let d=0;d<l.length;d++){const f=l[d],m=u.findIndex(y=>za(f,y,void 0,e,t,n,i));if(m===-1)return!1;u.splice(m,1)}return!0}case cZ:case fZ:case mZ:case yZ:case gZ:case pZ:case wZ:case xZ:case _Z:case bZ:case MZ:case IZ:{if(typeof De<"u"&&De.isBuffer(e)!==De.isBuffer(t)||e.length!==t.length)return!1;for(let l=0;l<e.length;l++)if(!za(e[l],t[l],l,e,t,n,i))return!1;return!0}case uZ:return e.byteLength!==t.byteLength?!1:Ya(new Uint8Array(e),new Uint8Array(t),n,i);case hZ:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:Ya(new Uint8Array(e),new Uint8Array(t),n,i);case dZ:return e.name===t.name&&e.message===t.message;case Rh:{if(!(Ya(e.constructor,t.constructor,n,i)||V2(e)&&V2(t)))return!1;const l=[...Object.keys(e),...U2(e)],u=[...Object.keys(t),...U2(t)];if(l.length!==u.length)return!1;for(let d=0;d<l.length;d++){const f=l[d],m=e[f];if(!Object.hasOwn(t,f))return!1;const y=t[f];if(!za(m,y,f,e,t,n,i))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function LZ(e,t){return CZ(e,t,EZ)}var TZ=Object.defineProperty,W2=Object.getOwnPropertySymbols,jZ=Object.prototype.hasOwnProperty,vZ=Object.prototype.propertyIsEnumerable,O0=(e,t,n)=>t in e?TZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F2=(e,t)=>{for(var n in t||(t={}))jZ.call(t,n)&&O0(e,n,t[n]);if(W2)for(var n of W2(t))vZ.call(t,n)&&O0(e,n,t[n]);return e},Jt=(e,t,n)=>O0(e,typeof t!="symbol"?t+"":t,n);class Js extends tB{constructor(t,n,i,r=Ci,s=void 0){super(t,n,i,r),this.core=t,this.logger=n,this.name=i,Jt(this,"map",new Map),Jt(this,"version",SQ),Jt(this,"cached",[]),Jt(this,"initialized",!1),Jt(this,"getKey"),Jt(this,"storagePrefix",Ci),Jt(this,"recentlyDeleted",[]),Jt(this,"recentlyDeletedLimit",200),Jt(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!dt(o)?this.map.set(this.getKey(o),o):PY(o)?this.map.set(o.id,o):kY(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)}),Jt(this,"set",async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:a}),this.map.set(o,a),await this.persist())}),Jt(this,"get",o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o))),Jt(this,"getAll",o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(l=>LZ(a[l],o[l]))):this.values)),Jt(this,"update",async(o,a)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:a});const l=F2(F2({},this.getData(o)),a);this.map.set(o,l),await this.persist()}),Jt(this,"delete",async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())}),this.logger=Kt(n,this.name),this.storagePrefix=r,this.getKey=s}get context(){return dn(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(t){this.recentlyDeleted.push(t),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){const n=this.map.get(t);if(!n){if(this.recentlyDeleted.includes(t)){const{message:r}=J("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${t}`);throw this.logger.error(r),new Error(r)}const{message:i}=J("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(i),new Error(i)}return n}async persist(){await this.setDataStore(this.values)}async restore(){try{const t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){const{message:n}=J("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}this.cached=t,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(t)}}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}}var NZ=Object.defineProperty,SZ=(e,t,n)=>t in e?NZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ie=(e,t,n)=>SZ(e,typeof t!="symbol"?t+"":t,n);class AZ{constructor(t,n){this.core=t,this.logger=n,Ie(this,"name",PQ),Ie(this,"version",kQ),Ie(this,"events",new f4),Ie(this,"pairings"),Ie(this,"initialized",!1),Ie(this,"storagePrefix",Ci),Ie(this,"ignoredPayloadTypes",[$i]),Ie(this,"registeredMethods",[]),Ie(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),Ie(this,"register",({methods:i})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...i])]}),Ie(this,"create",async i=>{this.isInitialized();const r=E0(),s=await this.core.crypto.setSymKey(r),o=ut(ee.FIVE_MINUTES),a={protocol:uI},l={topic:s,expiry:o,relay:a,active:!1,methods:i==null?void 0:i.methods},u=y2({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:r,relay:a,expiryTimestamp:o,methods:i==null?void 0:i.methods});return this.events.emit(hs.create,l),this.core.expirer.set(s,o),await this.pairings.set(s,l),await this.core.relayer.subscribe(s,{transportType:i==null?void 0:i.transportType,internal:i==null?void 0:i.internal}),{topic:s,uri:u}}),Ie(this,"pair",async i=>{this.isInitialized();const r=this.core.eventClient.createEvent({properties:{topic:i==null?void 0:i.uri,trace:[hi.pairing_started]}});this.isValidPair(i,r);const{topic:s,symKey:o,relay:a,expiryTimestamp:l,methods:u}=m2(i.uri);r.props.properties.topic=s,r.addTrace(hi.pairing_uri_validation_success),r.addTrace(hi.pairing_uri_not_expired);let d;if(this.pairings.keys.includes(s)){if(d=this.pairings.get(s),r.addTrace(hi.existing_pairing),d.active)throw r.setError(Pi.active_pairing_already_exists),new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);r.addTrace(hi.pairing_not_expired)}const f=l||ut(ee.FIVE_MINUTES),m={topic:s,relay:a,expiry:f,active:!1,methods:u};this.core.expirer.set(s,f),await this.pairings.set(s,m),r.addTrace(hi.store_new_pairing),i.activatePairing&&await this.activate({topic:s}),this.events.emit(hs.create,m),r.addTrace(hi.emit_inactive_pairing),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(o,s),r.addTrace(hi.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{r.setError(Pi.no_internet_connection)}try{await this.core.relayer.subscribe(s,{relay:a})}catch(y){throw r.setError(Pi.subscribe_pairing_topic_failure),y}return r.addTrace(hi.subscribe_pairing_topic_success),m}),Ie(this,"activate",async({topic:i})=>{this.isInitialized();const r=ut(ee.FIVE_MINUTES);this.core.expirer.set(i,r),await this.pairings.update(i,{active:!0,expiry:r})}),Ie(this,"ping",async i=>{this.isInitialized(),await this.isValidPing(i),this.logger.warn("ping() is deprecated and will be removed in the next major release.");const{topic:r}=i;if(this.pairings.keys.includes(r)){const s=await this.sendRequest(r,"wc_pairingPing",{}),{done:o,resolve:a,reject:l}=us();this.events.once(Ne("pairing_ping",s),({error:u})=>{u?l(u):a()}),await o()}}),Ie(this,"updateExpiry",async({topic:i,expiry:r})=>{this.isInitialized(),await this.pairings.update(i,{expiry:r})}),Ie(this,"updateMetadata",async({topic:i,metadata:r})=>{this.isInitialized(),await this.pairings.update(i,{peerMetadata:r})}),Ie(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),Ie(this,"disconnect",async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:r}=i;this.pairings.keys.includes(r)&&(await this.sendRequest(r,"wc_pairingDelete",Ke("USER_DISCONNECTED")),await this.deletePairing(r))}),Ie(this,"formatUriFromPairing",i=>{this.isInitialized();const{topic:r,relay:s,expiry:o,methods:a}=i,l=this.core.crypto.keychain.get(r);return y2({protocol:this.core.protocol,version:this.core.version,topic:r,symKey:l,relay:s,expiryTimestamp:o,methods:a})}),Ie(this,"sendRequest",async(i,r,s)=>{const o=pr(r,s),a=await this.core.crypto.encode(i,o),l=Ta[r].req;return this.core.history.set(i,o),this.core.relayer.publish(i,a,l),o.id}),Ie(this,"sendResult",async(i,r,s)=>{const o=Ol(i,s),a=await this.core.crypto.encode(r,o),l=(await this.core.history.get(r,i)).request.method,u=Ta[l].res;await this.core.relayer.publish(r,a,u),await this.core.history.resolve(o)}),Ie(this,"sendError",async(i,r,s)=>{const o=y4(i,s),a=await this.core.crypto.encode(r,o),l=(await this.core.history.get(r,i)).request.method,u=Ta[l]?Ta[l].res:Ta.unregistered_method.res;await this.core.relayer.publish(r,a,u),await this.core.history.resolve(o)}),Ie(this,"deletePairing",async(i,r)=>{await this.core.relayer.unsubscribe(i),await Promise.all([this.pairings.delete(i,Ke("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(i),r?Promise.resolve():this.core.expirer.del(i)])}),Ie(this,"cleanup",async()=>{const i=this.pairings.getAll().filter(r=>wr(r.expiry));await Promise.all(i.map(r=>this.deletePairing(r.topic)))}),Ie(this,"onRelayEventRequest",async i=>{const{topic:r,payload:s}=i;switch(s.method){case"wc_pairingPing":return await this.onPairingPingRequest(r,s);case"wc_pairingDelete":return await this.onPairingDeleteRequest(r,s);default:return await this.onUnknownRpcMethodRequest(r,s)}}),Ie(this,"onRelayEventResponse",async i=>{const{topic:r,payload:s}=i,o=(await this.core.history.get(r,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(r,s);default:return this.onUnknownRpcMethodResponse(o)}}),Ie(this,"onPairingPingRequest",async(i,r)=>{const{id:s}=r;try{this.isValidPing({topic:i}),await this.sendResult(s,i,!0),this.events.emit(hs.ping,{id:s,topic:i})}catch(o){await this.sendError(s,i,o),this.logger.error(o)}}),Ie(this,"onPairingPingResponse",(i,r)=>{const{id:s}=r;setTimeout(()=>{Ai(r)?this.events.emit(Ne("pairing_ping",s),{}):fi(r)&&this.events.emit(Ne("pairing_ping",s),{error:r.error})},500)}),Ie(this,"onPairingDeleteRequest",async(i,r)=>{const{id:s}=r;try{this.isValidDisconnect({topic:i}),await this.deletePairing(i),this.events.emit(hs.delete,{id:s,topic:i})}catch(o){await this.sendError(s,i,o),this.logger.error(o)}}),Ie(this,"onUnknownRpcMethodRequest",async(i,r)=>{const{id:s,method:o}=r;try{if(this.registeredMethods.includes(o))return;const a=Ke("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,i,a),this.logger.error(a)}catch(a){await this.sendError(s,i,a),this.logger.error(a)}}),Ie(this,"onUnknownRpcMethodResponse",i=>{this.registeredMethods.includes(i)||this.logger.error(Ke("WC_METHOD_UNSUPPORTED",i))}),Ie(this,"isValidPair",(i,r)=>{var s;if(!Xt(i)){const{message:a}=J("MISSING_OR_INVALID",`pair() params: ${i}`);throw r.setError(Pi.malformed_pairing_uri),new Error(a)}if(!OY(i.uri)){const{message:a}=J("MISSING_OR_INVALID",`pair() uri: ${i.uri}`);throw r.setError(Pi.malformed_pairing_uri),new Error(a)}const o=m2(i==null?void 0:i.uri);if(!((s=o==null?void 0:o.relay)!=null&&s.protocol)){const{message:a}=J("MISSING_OR_INVALID","pair() uri#relay-protocol");throw r.setError(Pi.malformed_pairing_uri),new Error(a)}if(!(o!=null&&o.symKey)){const{message:a}=J("MISSING_OR_INVALID","pair() uri#symKey");throw r.setError(Pi.malformed_pairing_uri),new Error(a)}if(o!=null&&o.expiryTimestamp&&ee.toMiliseconds(o==null?void 0:o.expiryTimestamp)<Date.now()){r.setError(Pi.pairing_expired);const{message:a}=J("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(a)}}),Ie(this,"isValidPing",async i=>{if(!Xt(i)){const{message:s}=J("MISSING_OR_INVALID",`ping() params: ${i}`);throw new Error(s)}const{topic:r}=i;await this.isValidPairingTopic(r)}),Ie(this,"isValidDisconnect",async i=>{if(!Xt(i)){const{message:s}=J("MISSING_OR_INVALID",`disconnect() params: ${i}`);throw new Error(s)}const{topic:r}=i;await this.isValidPairingTopic(r)}),Ie(this,"isValidPairingTopic",async i=>{if(!ct(i,!1)){const{message:r}=J("MISSING_OR_INVALID",`pairing topic should be a string: ${i}`);throw new Error(r)}if(!this.pairings.keys.includes(i)){const{message:r}=J("NO_MATCHING_KEY",`pairing topic doesn't exist: ${i}`);throw new Error(r)}if(wr(this.pairings.get(i).expiry)){await this.deletePairing(i);const{message:r}=J("EXPIRED",`pairing topic: ${i}`);throw new Error(r)}}),this.core=t,this.logger=Kt(n,this.name),this.pairings=new Js(this.core,this.logger,this.name,this.storagePrefix)}get context(){return dn(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(et.message,async t=>{const{topic:n,message:i,transportType:r}=t;if(this.pairings.keys.includes(n)&&r!==Ve.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(i)))try{const s=await this.core.crypto.decode(n,i);B0(s)?(this.core.history.set(n,s),await this.onRelayEventRequest({topic:n,payload:s})):V0(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:n,payload:s}),this.core.history.delete(n,s.id)),await this.core.relayer.messages.ack(n,i)}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(vn.expired,async t=>{const{topic:n}=mM(t.target);n&&this.pairings.keys.includes(n)&&(await this.deletePairing(n,!0),this.events.emit(hs.expire,{topic:n}))})}}var DZ=Object.defineProperty,OZ=(e,t,n)=>t in e?DZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Et=(e,t,n)=>OZ(e,typeof t!="symbol"?t+"":t,n);class PZ extends K${constructor(t,n){super(t,n),this.core=t,this.logger=n,Et(this,"records",new Map),Et(this,"events",new Ws.EventEmitter),Et(this,"name",zQ),Et(this,"version",RQ),Et(this,"cached",[]),Et(this,"initialized",!1),Et(this,"storagePrefix",Ci),Et(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(i=>this.records.set(i.id,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),Et(this,"set",(i,r,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:i,request:r,chainId:s}),this.records.has(r.id))return;const o={id:r.id,topic:i,request:{method:r.method,params:r.params||null},chainId:s,expiry:ut(ee.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(Yn.created,o)}),Et(this,"resolve",async i=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:i}),!this.records.has(i.id))return;const r=await this.getRecord(i.id);typeof r.response>"u"&&(r.response=fi(i)?{error:i.error}:{result:i.result},this.records.set(r.id,r),this.persist(),this.events.emit(Yn.updated,r))}),Et(this,"get",async(i,r)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:i,id:r}),await this.getRecord(r))),Et(this,"delete",(i,r)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:r}),this.values.forEach(s=>{if(s.topic===i){if(typeof r<"u"&&s.id!==r)return;this.records.delete(s.id),this.events.emit(Yn.deleted,s)}}),this.persist()}),Et(this,"exists",async(i,r)=>(this.isInitialized(),this.records.has(r)?(await this.getRecord(r)).topic===i:!1)),Et(this,"on",(i,r)=>{this.events.on(i,r)}),Et(this,"once",(i,r)=>{this.events.once(i,r)}),Et(this,"off",(i,r)=>{this.events.off(i,r)}),Et(this,"removeListener",(i,r)=>{this.events.removeListener(i,r)}),this.logger=Kt(n,this.name)}get context(){return dn(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const t=[];return this.values.forEach(n=>{if(typeof n.response<"u")return;const i={topic:n.topic,request:pr(n.request.method,n.request.params,n.id),chainId:n.chainId};return t.push(i)}),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();const n=this.records.get(t);if(!n){const{message:i}=J("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(i)}return n}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Yn.sync)}async restore(){try{const t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){const{message:n}=J("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}this.cached=t,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(t)}}registerEventListeners(){this.events.on(Yn.created,t=>{const n=Yn.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:t})}),this.events.on(Yn.updated,t=>{const n=Yn.updated;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:t})}),this.events.on(Yn.deleted,t=>{const n=Yn.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:t})}),this.core.heartbeat.on(qo.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let t=!1;this.records.forEach(n=>{ee.toMiliseconds(n.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${n.id}`),this.records.delete(n.id),this.events.emit(Yn.deleted,n,!1),t=!0)}),t&&this.persist()}catch(t){this.logger.warn(t)}}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}}var kZ=Object.defineProperty,zZ=(e,t,n)=>t in e?kZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ot=(e,t,n)=>zZ(e,typeof t!="symbol"?t+"":t,n);class RZ extends iB{constructor(t,n){super(t,n),this.core=t,this.logger=n,Ot(this,"expirations",new Map),Ot(this,"events",new Ws.EventEmitter),Ot(this,"name",UQ),Ot(this,"version",$Q),Ot(this,"cached",[]),Ot(this,"initialized",!1),Ot(this,"storagePrefix",Ci),Ot(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(i=>this.expirations.set(i.target,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),Ot(this,"has",i=>{try{const r=this.formatTarget(i);return typeof this.getExpiration(r)<"u"}catch{return!1}}),Ot(this,"set",(i,r)=>{this.isInitialized();const s=this.formatTarget(i),o={target:s,expiry:r};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(vn.created,{target:s,expiration:o})}),Ot(this,"get",i=>{this.isInitialized();const r=this.formatTarget(i);return this.getExpiration(r)}),Ot(this,"del",i=>{if(this.isInitialized(),this.has(i)){const r=this.formatTarget(i),s=this.getExpiration(r);this.expirations.delete(r),this.events.emit(vn.deleted,{target:r,expiration:s})}}),Ot(this,"on",(i,r)=>{this.events.on(i,r)}),Ot(this,"once",(i,r)=>{this.events.once(i,r)}),Ot(this,"off",(i,r)=>{this.events.off(i,r)}),Ot(this,"removeListener",(i,r)=>{this.events.removeListener(i,r)}),this.logger=Kt(n,this.name)}get context(){return dn(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(t){if(typeof t=="string")return pV(t);if(typeof t=="number")return wV(t);const{message:n}=J("UNKNOWN_TYPE",`Target type: ${typeof t}`);throw new Error(n)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(vn.sync)}async restore(){try{const t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){const{message:n}=J("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}this.cached=t,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(t)}}getExpiration(t){const n=this.expirations.get(t);if(!n){const{message:i}=J("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.warn(i),new Error(i)}return n}checkExpiry(t,n){const{expiry:i}=n;ee.toMiliseconds(i)-Date.now()<=0&&this.expire(t,n)}expire(t,n){this.expirations.delete(t),this.events.emit(vn.expired,{target:t,expiration:n})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((t,n)=>this.checkExpiry(n,t))}registerEventListeners(){this.core.heartbeat.on(qo.pulse,()=>this.checkExpirations()),this.events.on(vn.created,t=>{const n=vn.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:t}),this.persist()}),this.events.on(vn.expired,t=>{const n=vn.expired;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:t}),this.persist()}),this.events.on(vn.deleted,t=>{const n=vn.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}}var UZ=Object.defineProperty,$Z=(e,t,n)=>t in e?UZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,at=(e,t,n)=>$Z(e,typeof t!="symbol"?t+"":t,n);class BZ extends rB{constructor(t,n,i){super(t,n,i),this.core=t,this.logger=n,this.store=i,at(this,"name",BQ),at(this,"abortController"),at(this,"isDevEnv"),at(this,"verifyUrlV3",WQ),at(this,"storagePrefix",Ci),at(this,"version",lI),at(this,"publicKey"),at(this,"fetchPromise"),at(this,"init",async()=>{var r;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&ee.toMiliseconds((r=this.publicKey)==null?void 0:r.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),at(this,"register",async r=>{if(!da()||this.isDevEnv)return;const s=window.location.origin,{id:o,decryptedId:a}=r,l=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${s}&id=${o}&decryptedId=${a}`;try{const u=ko(),d=this.startAbortTimer(ee.ONE_SECOND*5),f=await new Promise((m,y)=>{const p=()=>{window.removeEventListener("message",x),u.body.removeChild(g),y("attestation aborted")};this.abortController.signal.addEventListener("abort",p);const g=u.createElement("iframe");g.src=l,g.style.display="none",g.addEventListener("error",p,{signal:this.abortController.signal});const x=_=>{if(_.data&&typeof _.data=="string")try{const b=JSON.parse(_.data);if(b.type==="verify_attestation"){if(Fh(b.attestation).payload.id!==o)return;clearInterval(d),u.body.removeChild(g),this.abortController.signal.removeEventListener("abort",p),window.removeEventListener("message",x),m(b.attestation===null?"":b.attestation)}}catch(b){this.logger.warn(b)}};u.body.appendChild(g),window.addEventListener("message",x,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",f),f}catch(u){this.logger.warn(u)}return""}),at(this,"resolve",async r=>{if(this.isDevEnv)return"";const{attestationId:s,hash:o,encryptedId:a}=r;if(s===""){this.logger.debug("resolve: attestationId is empty, skipping");return}if(s){if(Fh(s).payload.id!==a)return;const u=await this.isValidJwtAttestation(s);if(u){if(!u.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return u}}if(!o)return;const l=this.getVerifyUrl(r==null?void 0:r.verifyUrl);return this.fetchAttestation(o,l)}),at(this,"fetchAttestation",async(r,s)=>{this.logger.debug(`resolving attestation: ${r} from url: ${s}`);const o=this.startAbortTimer(ee.ONE_SECOND*5),a=await fetch(`${s}/attestation/${r}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(o),a.status===200?await a.json():void 0}),at(this,"getVerifyUrl",r=>{let s=r||Fa;return FQ.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${Fa}`),s=Fa),s}),at(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const r=this.startAbortTimer(ee.FIVE_SECONDS),s=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(r),await s.json()}catch(r){this.logger.warn(r)}}),at(this,"persistPublicKey",async r=>{this.logger.debug("persisting public key to local storage",r),await this.store.setItem(this.storeKey,r),this.publicKey=r}),at(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),at(this,"isValidJwtAttestation",async r=>{const s=await this.getPublicKey();try{if(s)return this.validateAttestation(r,s)}catch(a){this.logger.error(a),this.logger.warn("error validating attestation")}const o=await this.fetchAndPersistPublicKey();try{if(o)return this.validateAttestation(r,o)}catch(a){this.logger.error(a),this.logger.warn("error validating attestation")}}),at(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),at(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async s=>{const o=await this.fetchPublicKey();o&&(await this.persistPublicKey(o),s(o))});const r=await this.fetchPromise;return this.fetchPromise=void 0,r}),at(this,"validateAttestation",(r,s)=>{const o=hY(r,s.publicKey),a={hasExpired:ee.toMiliseconds(o.exp)<Date.now(),payload:o};if(a.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),new Error("JWT attestation expired");return{origin:a.payload.origin,isScam:a.payload.isScam,isVerified:a.payload.isVerified}}),this.logger=Kt(n,this.name),this.abortController=new AbortController,this.isDevEnv=Hm(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return dn(this.logger)}startAbortTimer(t){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),ee.toMiliseconds(t))}}var VZ=Object.defineProperty,WZ=(e,t,n)=>t in e?VZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y2=(e,t,n)=>WZ(e,typeof t!="symbol"?t+"":t,n);class FZ extends sB{constructor(t,n){super(t,n),this.projectId=t,this.logger=n,Y2(this,"context",YQ),Y2(this,"registerDeviceToken",async i=>{const{clientId:r,token:s,notificationType:o,enableEncrypted:a=!1}=i,l=`${QQ}/${this.projectId}/clients`;await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:r,type:o,token:s,always_raw:a})})}),this.logger=Kt(n,this.context)}}var YZ=Object.defineProperty,Q2=Object.getOwnPropertySymbols,QZ=Object.prototype.hasOwnProperty,HZ=Object.prototype.propertyIsEnumerable,P0=(e,t,n)=>t in e?YZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sa=(e,t)=>{for(var n in t||(t={}))QZ.call(t,n)&&P0(e,n,t[n]);if(Q2)for(var n of Q2(t))HZ.call(t,n)&&P0(e,n,t[n]);return e},gt=(e,t,n)=>P0(e,typeof t!="symbol"?t+"":t,n);class GZ extends oB{constructor(t,n,i=!0){super(t,n,i),this.core=t,this.logger=n,gt(this,"context",GQ),gt(this,"storagePrefix",Ci),gt(this,"storageVersion",HQ),gt(this,"events",new Map),gt(this,"shouldPersist",!1),gt(this,"init",async()=>{if(!Hm())try{const r={eventId:kp(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:hM(this.core.relayer.protocol,this.core.relayer.version,T0)}}};await this.sendEvent([r])}catch(r){this.logger.warn(r)}}),gt(this,"createEvent",r=>{const{event:s="ERROR",type:o="",properties:{topic:a,trace:l}}=r,u=kp(),d=this.core.projectId||"",f=Date.now(),m=Sa({eventId:u,timestamp:f,props:{event:s,type:o,properties:{topic:a,trace:l}},bundleId:d,domain:this.getAppDomain()},this.setMethods(u));return this.telemetryEnabled&&(this.events.set(u,m),this.shouldPersist=!0),m}),gt(this,"getEvent",r=>{const{eventId:s,topic:o}=r;if(s)return this.events.get(s);const a=Array.from(this.events.values()).find(l=>l.props.properties.topic===o);if(a)return Sa(Sa({},a),this.setMethods(a.eventId))}),gt(this,"deleteEvent",r=>{const{eventId:s}=r;this.events.delete(s),this.shouldPersist=!0}),gt(this,"setEventListeners",()=>{this.core.heartbeat.on(qo.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(r=>{ee.fromMiliseconds(Date.now())-ee.fromMiliseconds(r.timestamp)>ZQ&&(this.events.delete(r.eventId),this.shouldPersist=!0)})})}),gt(this,"setMethods",r=>({addTrace:s=>this.addTrace(r,s),setError:s=>this.setError(r,s)})),gt(this,"addTrace",(r,s)=>{const o=this.events.get(r);o&&(o.props.properties.trace.push(s),this.events.set(r,o),this.shouldPersist=!0)}),gt(this,"setError",(r,s)=>{const o=this.events.get(r);o&&(o.props.type=s,o.timestamp=Date.now(),this.events.set(r,o),this.shouldPersist=!0)}),gt(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),gt(this,"restore",async()=>{try{const r=await this.core.storage.getItem(this.storageKey)||[];if(!r.length)return;r.forEach(s=>{this.events.set(s.eventId,Sa(Sa({},s),this.setMethods(s.eventId)))})}catch(r){this.logger.warn(r)}}),gt(this,"submit",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const r=[];for(const[s,o]of this.events)o.props.type&&r.push(o);if(r.length!==0)try{if((await this.sendEvent(r)).ok)for(const s of r)this.events.delete(s.eventId),this.shouldPersist=!0}catch(s){this.logger.warn(s)}}),gt(this,"sendEvent",async r=>{const s=this.getAppDomain()?"":"&sp=desktop";return await fetch(`${qQ}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${T0}${s}`,{method:"POST",body:JSON.stringify(r)})}),gt(this,"getAppDomain",()=>dM().url),this.logger=Kt(n,this.context),this.telemetryEnabled=i,i?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var ZZ=Object.defineProperty,H2=Object.getOwnPropertySymbols,qZ=Object.prototype.hasOwnProperty,KZ=Object.prototype.propertyIsEnumerable,k0=(e,t,n)=>t in e?ZZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G2=(e,t)=>{for(var n in t||(t={}))qZ.call(t,n)&&k0(e,n,t[n]);if(H2)for(var n of H2(t))KZ.call(t,n)&&k0(e,n,t[n]);return e},Re=(e,t,n)=>k0(e,typeof t!="symbol"?t+"":t,n);class ay extends H${constructor(t){var n;super(t),Re(this,"protocol",cI),Re(this,"version",lI),Re(this,"name",L0),Re(this,"relayUrl"),Re(this,"projectId"),Re(this,"customStoragePrefix"),Re(this,"events",new Ws.EventEmitter),Re(this,"logger"),Re(this,"heartbeat"),Re(this,"relayer"),Re(this,"crypto"),Re(this,"storage"),Re(this,"history"),Re(this,"expirer"),Re(this,"pairing"),Re(this,"verify"),Re(this,"echoClient"),Re(this,"linkModeSupportedApps"),Re(this,"eventClient"),Re(this,"initialized",!1),Re(this,"logChunkController"),Re(this,"on",(a,l)=>this.events.on(a,l)),Re(this,"once",(a,l)=>this.events.once(a,l)),Re(this,"off",(a,l)=>this.events.off(a,l)),Re(this,"removeListener",(a,l)=>this.events.removeListener(a,l)),Re(this,"dispatchEnvelope",({topic:a,message:l,sessionExists:u})=>{if(!a||!l)return;const d={topic:a,message:l,publishedAt:Date.now(),transportType:Ve.link_mode};this.relayer.onLinkMessageEvent(d,{sessionExists:u})});const i=this.getGlobalCore(t==null?void 0:t.customStoragePrefix);if(i)try{return this.customStoragePrefix=i.customStoragePrefix,this.logger=i.logger,this.heartbeat=i.heartbeat,this.crypto=i.crypto,this.history=i.history,this.expirer=i.expirer,this.storage=i.storage,this.relayer=i.relayer,this.pairing=i.pairing,this.verify=i.verify,this.echoClient=i.echoClient,this.linkModeSupportedApps=i.linkModeSupportedApps,this.eventClient=i.eventClient,this.initialized=i.initialized,this.logChunkController=i.logChunkController,i}catch(a){console.warn("Failed to copy global core",a)}this.projectId=t==null?void 0:t.projectId,this.relayUrl=(t==null?void 0:t.relayUrl)||dI,this.customStoragePrefix=t!=null&&t.customStoragePrefix?`:${t.customStoragePrefix}`:"";const r=Ym({level:typeof(t==null?void 0:t.logger)=="string"&&t.logger?t.logger:pQ.logger,name:L0}),{logger:s,chunkLoggerController:o}=F$({opts:r,maxSizeInBytes:t==null?void 0:t.maxLogBlobSizeInBytes,loggerOverride:t==null?void 0:t.logger});this.logChunkController=o,(n=this.logChunkController)!=null&&n.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var a,l;(a=this.logChunkController)!=null&&a.downloadLogsBlobInBrowser&&((l=this.logChunkController)==null||l.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=Kt(s,this.name),this.heartbeat=new s6,this.crypto=new CG(this,this.logger,t==null?void 0:t.keychain),this.history=new PZ(this,this.logger),this.expirer=new RZ(this,this.logger),this.storage=t!=null&&t.storage?t.storage:new o6(G2(G2({},wQ),t==null?void 0:t.storageOptions)),this.relayer=new JG({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new AZ(this,this.logger),this.verify=new BZ(this,this.logger,this.storage),this.echoClient=new FZ(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new GZ(this,this.logger,t==null?void 0:t.telemetryEnabled),this.setGlobalCore(this)}static async init(t){const n=new ay(t);await n.initialize();const i=await n.crypto.getClientId();return await n.storage.setItem(AQ,i),n}get context(){return dn(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var t;return(t=this.logChunkController)==null?void 0:t.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(t){this.linkModeSupportedApps.includes(t)||(this.linkModeSupportedApps.push(t),await this.storage.setItem(L2,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(L2)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(t){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,t),this.logger.error(t.message),t}}getGlobalCore(t=""){try{if(this.isGlobalCoreDisabled())return;const n=`_walletConnectCore_${t}`,i=`${n}_count`;return globalThis[i]=(globalThis[i]||0)+1,globalThis[i]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[i]} times.`),globalThis[n]}catch(n){console.warn("Failed to get global WalletConnect core",n);return}}setGlobalCore(t){var n;try{if(this.isGlobalCoreDisabled())return;const i=`_walletConnectCore_${((n=t.opts)==null?void 0:n.customStoragePrefix)||""}`;globalThis[i]=t}catch(i){console.warn("Failed to set global WalletConnect core",i)}}isGlobalCoreDisabled(){try{return typeof Ui<"u"&&gQ.DISABLE_GLOBAL_CORE==="true"}catch{return!0}}}const JZ=ay,EI="wc",CI=2,LI="client",cy=`${EI}@${CI}:${LI}:`,Uh={name:LI,logger:"error"},Z2="WALLETCONNECT_DEEPLINK_CHOICE",XZ="proposal",q2="Proposal expired",eq="session",fo=ee.SEVEN_DAYS,tq="engine",Ct={wc_sessionPropose:{req:{ttl:ee.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ee.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ee.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1114},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:ee.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:ee.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1119}}},$h={min:ee.FIVE_MINUTES,max:ee.SEVEN_DAYS},di={idle:"IDLE",active:"ACTIVE"},nq={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""},cosmos_signDirect:{key:""}},iq="request",rq=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],sq="wc",oq="auth",aq="authKeys",cq="pairingTopics",lq="requests",Cd=`${sq}@${1.5}:${oq}:`,Dl=`${Cd}:PUB_KEY`;var uq=Object.defineProperty,dq=Object.defineProperties,hq=Object.getOwnPropertyDescriptors,K2=Object.getOwnPropertySymbols,fq=Object.prototype.hasOwnProperty,mq=Object.prototype.propertyIsEnumerable,z0=(e,t,n)=>t in e?uq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ae=(e,t)=>{for(var n in t||(t={}))fq.call(t,n)&&z0(e,n,t[n]);if(K2)for(var n of K2(t))mq.call(t,n)&&z0(e,n,t[n]);return e},Pt=(e,t)=>dq(e,hq(t)),H=(e,t,n)=>z0(e,typeof t!="symbol"?t+"":t,n);class yq extends uB{constructor(t){super(t),H(this,"name",tq),H(this,"events",new f4),H(this,"initialized",!1),H(this,"requestQueue",{state:di.idle,queue:[]}),H(this,"sessionRequestQueue",{state:di.idle,queue:[]}),H(this,"emittedSessionRequests",new TV({limit:500})),H(this,"requestQueueDelay",ee.ONE_SECOND),H(this,"expectedPairingMethodMap",new Map),H(this,"recentlyDeletedMap",new Map),H(this,"recentlyDeletedLimit",200),H(this,"relayMessageCache",[]),H(this,"pendingSessions",new Map),H(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(Ct)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},ee.toMiliseconds(this.requestQueueDelay)))}),H(this,"connect",async n=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const i=Pt(Ae({},n),{requiredNamespaces:n.requiredNamespaces||{},optionalNamespaces:n.optionalNamespaces||{}});await this.isValidConnect(i),i.optionalNamespaces=vY(i.requiredNamespaces,i.optionalNamespaces),i.requiredNamespaces={};const{pairingTopic:r,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,scopedProperties:l,relays:u}=i;let d=r,f,m=!1;try{if(d){const T=this.client.core.pairing.pairings.get(d);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),m=T.active}}catch(T){throw this.client.logger.error(`connect() -> pairing.get(${d}) failed`),T}if(!d||!m){const{topic:T,uri:j}=await this.client.core.pairing.create({internal:{skipSubscribe:!0}});d=T,f=j}if(!d){const{message:T}=J("NO_MATCHING_KEY",`connect() pairing topic: ${d}`);throw new Error(T)}const y=await this.client.core.crypto.generateKeyPair(),p=Ct.wc_sessionPropose.req.ttl||ee.FIVE_MINUTES,g=ut(p),x=Pt(Ae(Ae({requiredNamespaces:s,optionalNamespaces:o,relays:u??[{protocol:uI}],proposer:{publicKey:y,metadata:this.client.metadata},expiryTimestamp:g,pairingTopic:d},a&&{sessionProperties:a}),l&&{scopedProperties:l}),{id:nr()}),_=Ne("session_connect",x.id),{reject:b,resolve:I,done:E}=us(p,q2),C=({id:T})=>{T===x.id&&(this.client.events.off("proposal_expire",C),this.pendingSessions.delete(x.id),this.events.emit(_,{error:{message:q2,code:0}}))};return this.client.events.on("proposal_expire",C),this.events.once(_,({error:T,session:j})=>{this.client.events.off("proposal_expire",C),T?b(T):j&&I(j)}),await this.sendProposeSession({proposal:x,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:x.id}}}),await this.setProposal(x.id,x),{uri:f,approval:E}}),H(this,"pair",async n=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(n)}catch(i){throw this.client.logger.error("pair() failed"),i}}),H(this,"approve",async n=>{var i,r,s;const o=this.client.core.eventClient.createEvent({properties:{topic:(i=n==null?void 0:n.id)==null?void 0:i.toString(),trace:[hr.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(L){throw o.setError(ja.no_internet_connection),L}try{await this.isValidProposalId(n==null?void 0:n.id)}catch(L){throw this.client.logger.error(`approve() -> proposal.get(${n==null?void 0:n.id}) failed`),o.setError(ja.proposal_not_found),L}try{await this.isValidApprove(n)}catch(L){throw this.client.logger.error("approve() -> isValidApprove() failed"),o.setError(ja.session_approve_namespace_validation_failure),L}const{id:a,relayProtocol:l,namespaces:u,sessionProperties:d,scopedProperties:f,sessionConfig:m}=n,y=this.client.proposal.get(a);this.client.core.eventClient.deleteEvent({eventId:o.eventId});const{pairingTopic:p,proposer:g,requiredNamespaces:x,optionalNamespaces:_}=y;let b=(r=this.client.core.eventClient)==null?void 0:r.getEvent({topic:p});b||(b=(s=this.client.core.eventClient)==null?void 0:s.createEvent({type:hr.session_approve_started,properties:{topic:p,trace:[hr.session_approve_started,hr.session_namespaces_validation_success]}}));const I=await this.client.core.crypto.generateKeyPair(),E=g.publicKey,C=await this.client.core.crypto.generateSharedKey(I,E),T=Ae(Ae(Ae({relay:{protocol:l??"irn"},namespaces:u,controller:{publicKey:I,metadata:this.client.metadata},expiry:ut(fo)},d&&{sessionProperties:d}),f&&{scopedProperties:f}),m&&{sessionConfig:m}),j=Ve.relay;b.addTrace(hr.subscribing_session_topic);try{await this.client.core.relayer.subscribe(C,{transportType:j,internal:{skipSubscribe:!0}})}catch(L){throw b.setError(ja.subscribe_session_topic_failure),L}b.addTrace(hr.subscribe_session_topic_success);const O=Pt(Ae({},T),{topic:C,requiredNamespaces:x,optionalNamespaces:_,pairingTopic:p,acknowledged:!1,self:T.controller,peer:{publicKey:g.publicKey,metadata:g.metadata},controller:I,transportType:Ve.relay});await this.client.session.set(C,O),b.addTrace(hr.store_session);try{await this.sendApproveSession({sessionTopic:C,proposal:y,pairingProposalResponse:{relay:{protocol:l??"irn"},responderPublicKey:I},sessionSettleRequest:T,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:a}}}),b.addTrace(hr.session_approve_publish_success)}catch(L){throw this.client.logger.error(L),this.client.session.delete(C,Ke("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(C),L}return this.client.core.eventClient.deleteEvent({eventId:b.eventId}),await this.client.core.pairing.updateMetadata({topic:p,metadata:g.metadata}),await this.deleteProposal(a),await this.client.core.pairing.activate({topic:p}),await this.setExpiry(C,ut(fo)),{topic:C,acknowledged:()=>Promise.resolve(this.client.session.get(C))}}),H(this,"reject",async n=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(n)}catch(o){throw this.client.logger.error("reject() -> isValidReject() failed"),o}const{id:i,reason:r}=n;let s;try{s=this.client.proposal.get(i).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${i}) failed`),o}s&&await this.sendError({id:i,topic:s,error:r,rpcOpts:Ct.wc_sessionPropose.reject}),await this.deleteProposal(i)}),H(this,"update",async n=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(n)}catch(f){throw this.client.logger.error("update() -> isValidUpdate() failed"),f}const{topic:i,namespaces:r}=n,{done:s,resolve:o,reject:a}=us(),l=nr(),u=fs().toString(),d=this.client.session.get(i).namespaces;return this.events.once(Ne("session_update",l),({error:f})=>{f?a(f):o()}),await this.client.session.update(i,{namespaces:r}),await this.sendRequest({topic:i,method:"wc_sessionUpdate",params:{namespaces:r},throwOnFailedPublish:!0,clientRpcId:l,relayRpcId:u}).catch(f=>{this.client.logger.error(f),this.client.session.update(i,{namespaces:d}),a(f)}),{acknowledged:s}}),H(this,"extend",async n=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(n)}catch(l){throw this.client.logger.error("extend() -> isValidExtend() failed"),l}const{topic:i}=n,r=nr(),{done:s,resolve:o,reject:a}=us();return this.events.once(Ne("session_extend",r),({error:l})=>{l?a(l):o()}),await this.setExpiry(i,ut(fo)),this.sendRequest({topic:i,method:"wc_sessionExtend",params:{},clientRpcId:r,throwOnFailedPublish:!0}).catch(l=>{a(l)}),{acknowledged:s}}),H(this,"request",async n=>{this.isInitialized();try{await this.isValidRequest(n)}catch(x){throw this.client.logger.error("request() -> isValidRequest() failed"),x}const{chainId:i,request:r,topic:s,expiry:o=Ct.wc_sessionRequest.req.ttl}=n,a=this.client.session.get(s);(a==null?void 0:a.transportType)===Ve.relay&&await this.confirmOnlineStateOrThrow();const l=nr(),u=fs().toString(),{done:d,resolve:f,reject:m}=us(o,"Request expired. Please try again.");this.events.once(Ne("session_request",l),({error:x,result:_})=>{x?m(x):f(_)});const y="wc_sessionRequest",p=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);if(p)return await this.sendRequest({clientRpcId:l,relayRpcId:u,topic:s,method:y,params:{request:Pt(Ae({},r),{expiryTimestamp:ut(o)}),chainId:i},expiry:o,throwOnFailedPublish:!0,appLink:p}).catch(x=>m(x)),this.client.events.emit("session_request_sent",{topic:s,request:r,chainId:i,id:l}),await d();const g={request:Pt(Ae({},r),{expiryTimestamp:ut(o)}),chainId:i};return await Promise.all([new Promise(async x=>{await this.sendRequest({clientRpcId:l,relayRpcId:u,topic:s,method:y,params:g,expiry:o,throwOnFailedPublish:!0,tvf:this.getTVFParams(l,g)}).catch(_=>m(_)),this.client.events.emit("session_request_sent",{topic:s,request:r,chainId:i,id:l}),x()}),new Promise(async x=>{var _;if(!((_=a.sessionConfig)!=null&&_.disableDeepLink)){const b=await MV(this.client.core.storage,Z2);await xV({id:l,topic:s,wcDeepLink:b})}x()}),d()]).then(x=>x[2])}),H(this,"respond",async n=>{this.isInitialized(),await this.isValidRespond(n);const{topic:i,response:r}=n,{id:s}=r,o=this.client.session.get(i);o.transportType===Ve.relay&&await this.confirmOnlineStateOrThrow();const a=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);Ai(r)?await this.sendResult({id:s,topic:i,result:r.result,throwOnFailedPublish:!0,appLink:a}):fi(r)&&await this.sendError({id:s,topic:i,error:r.error,appLink:a}),this.cleanupAfterResponse(n)}),H(this,"ping",async n=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(n)}catch(r){throw this.client.logger.error("ping() -> isValidPing() failed"),r}const{topic:i}=n;if(this.client.session.keys.includes(i)){const r=nr(),s=fs().toString(),{done:o,resolve:a,reject:l}=us();this.events.once(Ne("session_ping",r),({error:u})=>{u?l(u):a()}),await Promise.all([this.sendRequest({topic:i,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:r,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(i)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:i}))}),H(this,"emit",async n=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(n);const{topic:i,event:r,chainId:s}=n,o=fs().toString(),a=nr();await this.sendRequest({topic:i,method:"wc_sessionEvent",params:{event:r,chainId:s},throwOnFailedPublish:!0,relayRpcId:o,clientRpcId:a})}),H(this,"disconnect",async n=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(n);const{topic:i}=n;if(this.client.session.keys.includes(i))await this.sendRequest({topic:i,method:"wc_sessionDelete",params:Ke("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:i,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(i))await this.client.core.pairing.disconnect({topic:i});else{const{message:r}=J("MISMATCHED_TOPIC",`Session or pairing topic not found: ${i}`);throw new Error(r)}}),H(this,"find",n=>(this.isInitialized(),this.client.session.getAll().filter(i=>AY(i,n)))),H(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),H(this,"authenticate",async(n,i)=>{var r;this.isInitialized(),this.isValidAuthenticate(n);const s=i&&this.client.core.linkModeSupportedApps.includes(i)&&((r=this.client.metadata.redirect)==null?void 0:r.linkMode),o=s?Ve.link_mode:Ve.relay;o===Ve.relay&&await this.confirmOnlineStateOrThrow();const{chains:a,statement:l="",uri:u,domain:d,nonce:f,type:m,exp:y,nbf:p,methods:g=[],expiry:x}=n,_=[...n.resources||[]],{topic:b,uri:I}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:o});this.client.logger.info({message:"Generated new pairing",pairing:{topic:b,uri:I}});const E=await this.client.core.crypto.generateKeyPair(),C=Sl(E);if(await Promise.all([this.client.auth.authKeys.set(Dl,{responseTopic:C,publicKey:E}),this.client.auth.pairingTopics.set(C,{topic:C,pairingTopic:b})]),await this.client.core.relayer.subscribe(C,{transportType:o}),this.client.logger.info(`sending request to new pairing topic: ${b}`),g.length>0){const{namespace:V}=vl(a[0]);let Y=RW(V,"request",g);Nl(_)&&(Y=$W(Y,_.pop())),_.push(Y)}const T=x&&x>Ct.wc_sessionAuthenticate.req.ttl?x:Ct.wc_sessionAuthenticate.req.ttl,j={authPayload:{type:m??"caip122",chains:a,statement:l,aud:u,domain:d,version:"1",nonce:f,iat:new Date().toISOString(),exp:y,nbf:p,resources:_},requester:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:ut(T)},O={eip155:{chains:a,methods:[...new Set(["personal_sign",...g])],events:["chainChanged","accountsChanged"]}},L={requiredNamespaces:{},optionalNamespaces:O,relays:[{protocol:"irn"}],pairingTopic:b,proposer:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:ut(Ct.wc_sessionPropose.req.ttl),id:nr()},{done:N,resolve:v,reject:D}=us(T,"Request expired"),k=nr(),U=Ne("session_connect",L.id),R=Ne("session_request",k),B=async({error:V,session:Y})=>{this.events.off(R,F),V?D(V):Y&&v({session:Y})},F=async V=>{var Y,Q,G;if(await this.deletePendingAuthRequest(k,{message:"fulfilled",code:0}),V.error){const le=Ke("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return V.error.code===le.code?void 0:(this.events.off(U,B),D(V.error.message))}await this.deleteProposal(L.id),this.events.off(U,B);const{cacaos:ne,responder:ce}=V.result,q=[],he=[];for(const le of ne){await Hp({cacao:le,projectId:this.client.core.projectId})||(this.client.logger.error(le,"Signature verification failed"),D(Ke("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:Le}=le,Fe=Nl(Le.resources),rt=[y0(Le.iss)],mt=lu(Le.iss);if(Fe){const ue=Gp(Fe),fe=Zp(Fe);q.push(...ue),rt.push(...fe)}for(const ue of rt)he.push(`${ue}:${mt}`)}const re=await this.client.core.crypto.generateSharedKey(E,ce.publicKey);let se;q.length>0&&(se={topic:re,acknowledged:!0,self:{publicKey:E,metadata:this.client.metadata},peer:ce,controller:ce.publicKey,expiry:ut(fo),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:b,namespaces:x2([...new Set(q)],[...new Set(he)]),transportType:o},await this.client.core.relayer.subscribe(re,{transportType:o}),await this.client.session.set(re,se),b&&await this.client.core.pairing.updateMetadata({topic:b,metadata:ce.metadata}),se=this.client.session.get(re)),(Y=this.client.metadata.redirect)!=null&&Y.linkMode&&(Q=ce.metadata.redirect)!=null&&Q.linkMode&&(G=ce.metadata.redirect)!=null&&G.universal&&i&&(this.client.core.addLinkModeSupportedApp(ce.metadata.redirect.universal),this.client.session.update(re,{transportType:Ve.link_mode})),v({auths:ne,session:se})};this.events.once(U,B),this.events.once(R,F);let W;try{if(s){const V=pr("wc_sessionAuthenticate",j,k);this.client.core.history.set(b,V);const Y=await this.client.core.crypto.encode("",V,{type:Fc,encoding:Ir});W=Ml(i,b,Y)}else await Promise.all([this.sendRequest({topic:b,method:"wc_sessionAuthenticate",params:j,expiry:n.expiry,throwOnFailedPublish:!0,clientRpcId:k}),this.sendRequest({topic:b,method:"wc_sessionPropose",params:L,expiry:Ct.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:L.id})])}catch(V){throw this.events.off(U,B),this.events.off(R,F),V}return await this.setProposal(L.id,L),await this.setAuthRequest(k,{request:Pt(Ae({},j),{verifyContext:{}}),pairingTopic:b,transportType:o}),{uri:W??I,response:N}}),H(this,"approveSessionAuthenticate",async n=>{const{id:i,auths:r}=n,s=this.client.core.eventClient.createEvent({properties:{topic:i.toString(),trace:[cs.authenticated_session_approve_started]}});try{this.isInitialized()}catch(x){throw s.setError(va.no_internet_connection),x}const o=this.getPendingAuthRequest(i);if(!o)throw s.setError(va.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${i}`);const a=o.transportType||Ve.relay;a===Ve.relay&&await this.confirmOnlineStateOrThrow();const l=o.requester.publicKey,u=await this.client.core.crypto.generateKeyPair(),d=Sl(l),f={type:$i,receiverPublicKey:l,senderPublicKey:u},m=[],y=[];for(const x of r){if(!await Hp({cacao:x,projectId:this.client.core.projectId})){s.setError(va.invalid_cacao);const C=Ke("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:i,topic:d,error:C,encodeOpts:f}),new Error(C.message)}s.addTrace(cs.cacaos_verified);const{p:_}=x,b=Nl(_.resources),I=[y0(_.iss)],E=lu(_.iss);if(b){const C=Gp(b),T=Zp(b);m.push(...C),I.push(...T)}for(const C of I)y.push(`${C}:${E}`)}const p=await this.client.core.crypto.generateSharedKey(u,l);s.addTrace(cs.create_authenticated_session_topic);let g;if((m==null?void 0:m.length)>0){g={topic:p,acknowledged:!0,self:{publicKey:u,metadata:this.client.metadata},peer:{publicKey:l,metadata:o.requester.metadata},controller:l,expiry:ut(fo),authentication:r,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:o.pairingTopic,namespaces:x2([...new Set(m)],[...new Set(y)]),transportType:a},s.addTrace(cs.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(p,{transportType:a})}catch(x){throw s.setError(va.subscribe_authenticated_session_topic_failure),x}s.addTrace(cs.subscribe_authenticated_session_topic_success),await this.client.session.set(p,g),s.addTrace(cs.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:o.pairingTopic,metadata:o.requester.metadata})}s.addTrace(cs.publishing_authenticated_session_approve);try{await this.sendResult({topic:d,id:i,result:{cacaos:r,responder:{publicKey:u,metadata:this.client.metadata}},encodeOpts:f,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(o.requester.metadata,a)})}catch(x){throw s.setError(va.authenticated_session_approve_publish_failure),x}return await this.client.auth.requests.delete(i,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:o.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:s.eventId}),{session:g}}),H(this,"rejectSessionAuthenticate",async n=>{this.isInitialized();const{id:i,reason:r}=n,s=this.getPendingAuthRequest(i);if(!s)throw new Error(`Could not find pending auth request with id ${i}`);s.transportType===Ve.relay&&await this.confirmOnlineStateOrThrow();const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),l=Sl(o),u={type:$i,receiverPublicKey:o,senderPublicKey:a};await this.sendError({id:i,topic:l,error:r,encodeOpts:u,rpcOpts:Ct.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(s.requester.metadata,s.transportType)}),await this.client.auth.requests.delete(i,{message:"rejected",code:0}),await this.deleteProposal(i)}),H(this,"formatAuthMessage",n=>{this.isInitialized();const{request:i,iss:r}=n;return vM(i,r)}),H(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const n=this.relayMessageCache.shift();n&&await this.onRelayMessage(n)}catch(n){this.client.logger.error(n)}},50)}),H(this,"cleanupDuplicatePairings",async n=>{if(n.pairingTopic)try{const i=this.client.core.pairing.pairings.get(n.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===n.peer.metadata.url&&s.topic&&s.topic!==i.topic});if(r.length===0)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(i){this.client.logger.error(i)}}),H(this,"deleteSession",async n=>{var i;const{topic:r,expirerHasDeleted:s=!1,emitEvent:o=!0,id:a=0}=n,{self:l}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await this.client.session.delete(r,Ke("USER_DISCONNECTED")),this.addToRecentlyDeleted(r,"session"),this.client.core.crypto.keychain.has(l.publicKey)&&await this.client.core.crypto.deleteKeyPair(l.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),s||this.client.core.expirer.del(r),this.client.core.storage.removeItem(Z2).catch(u=>this.client.logger.warn(u)),this.getPendingSessionRequests().forEach(u=>{u.topic===r&&this.deletePendingSessionRequest(u.id,Ke("USER_DISCONNECTED"))}),r===((i=this.sessionRequestQueue.queue[0])==null?void 0:i.topic)&&(this.sessionRequestQueue.state=di.idle),o&&this.client.events.emit("session_delete",{id:a,topic:r})}),H(this,"deleteProposal",async(n,i)=>{if(i)try{const r=this.client.proposal.get(n),s=this.client.core.eventClient.getEvent({topic:r.pairingTopic});s==null||s.setError(ja.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(n,Ke("USER_DISCONNECTED")),i?Promise.resolve():this.client.core.expirer.del(n)]),this.addToRecentlyDeleted(n,"proposal")}),H(this,"deletePendingSessionRequest",async(n,i,r=!1)=>{await Promise.all([this.client.pendingRequest.delete(n,i),r?Promise.resolve():this.client.core.expirer.del(n)]),this.addToRecentlyDeleted(n,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==n),r&&(this.sessionRequestQueue.state=di.idle,this.client.events.emit("session_request_expire",{id:n}))}),H(this,"deletePendingAuthRequest",async(n,i,r=!1)=>{await Promise.all([this.client.auth.requests.delete(n,i),r?Promise.resolve():this.client.core.expirer.del(n)])}),H(this,"setExpiry",async(n,i)=>{this.client.session.keys.includes(n)&&(this.client.core.expirer.set(n,i),await this.client.session.update(n,{expiry:i}))}),H(this,"setProposal",async(n,i)=>{this.client.core.expirer.set(n,ut(Ct.wc_sessionPropose.req.ttl)),await this.client.proposal.set(n,i)}),H(this,"setAuthRequest",async(n,i)=>{const{request:r,pairingTopic:s,transportType:o=Ve.relay}=i;this.client.core.expirer.set(n,r.expiryTimestamp),await this.client.auth.requests.set(n,{authPayload:r.authPayload,requester:r.requester,expiryTimestamp:r.expiryTimestamp,id:n,pairingTopic:s,verifyContext:r.verifyContext,transportType:o})}),H(this,"setPendingSessionRequest",async n=>{const{id:i,topic:r,params:s,verifyContext:o}=n,a=s.request.expiryTimestamp||ut(Ct.wc_sessionRequest.req.ttl);this.client.core.expirer.set(i,a),await this.client.pendingRequest.set(i,{id:i,topic:r,params:s,verifyContext:o})}),H(this,"sendRequest",async n=>{const{topic:i,method:r,params:s,expiry:o,relayRpcId:a,clientRpcId:l,throwOnFailedPublish:u,appLink:d,tvf:f,publishOpts:m={}}=n,y=pr(r,s,l);let p;const g=!!d;try{const b=g?Ir:sn;p=await this.client.core.crypto.encode(i,y,{encoding:b})}catch(b){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${i} failed`),b}let x;if(rq.includes(r)){const b=Dn(JSON.stringify(y)),I=Dn(p);x=await this.client.core.verify.register({id:I,decryptedId:b})}const _=Ae(Ae({},Ct[r].req),m);if(_.attestation=x,o&&(_.ttl=o),a&&(_.id=a),this.client.core.history.set(i,y),g){const b=Ml(d,i,p);await _e.Linking.openURL(b,this.client.name)}else _.tvf=Pt(Ae({},f),{correlationId:y.id}),u?(_.internal=Pt(Ae({},_.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,p,_)):this.client.core.relayer.publish(i,p,_).catch(b=>this.client.logger.error(b));return y.id}),H(this,"sendProposeSession",async n=>{const{proposal:i,publishOpts:r}=n,s=pr("wc_sessionPropose",i,i.id);this.client.core.history.set(i.pairingTopic,s);const o=await this.client.core.crypto.encode(i.pairingTopic,s,{encoding:sn}),a=Dn(JSON.stringify(s)),l=Dn(o),u=await this.client.core.verify.register({id:l,decryptedId:a});await this.client.core.relayer.publishCustom({payload:{pairingTopic:i.pairingTopic,sessionProposal:o},opts:Pt(Ae({},r),{publishMethod:"wc_proposeSession",attestation:u})})}),H(this,"sendApproveSession",async n=>{const{sessionTopic:i,pairingProposalResponse:r,proposal:s,sessionSettleRequest:o,publishOpts:a}=n,l=Ol(s.id,r),u=await this.client.core.crypto.encode(s.pairingTopic,l,{encoding:sn}),d=pr("wc_sessionSettle",o,a==null?void 0:a.id),f=await this.client.core.crypto.encode(i,d,{encoding:sn});this.client.core.history.set(i,d),await this.client.core.relayer.publishCustom({payload:{sessionTopic:i,pairingTopic:s.pairingTopic,sessionProposalResponse:u,sessionSettlementRequest:f},opts:Pt(Ae({},a),{publishMethod:"wc_approveSession"})})}),H(this,"sendResult",async n=>{const{id:i,topic:r,result:s,throwOnFailedPublish:o,encodeOpts:a,appLink:l}=n,u=Ol(i,s);let d;const f=l&&typeof(_e==null?void 0:_e.Linking)<"u";try{const p=f?Ir:sn;d=await this.client.core.crypto.encode(r,u,Pt(Ae({},a||{}),{encoding:p}))}catch(p){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${r} failed`),p}let m,y;try{m=await this.client.core.history.get(r,i);const p=m.request;try{y=this.getTVFParams(i,p.params,s)}catch(g){this.client.logger.warn(`sendResult() -> getTVFParams() failed: ${g==null?void 0:g.message}`)}}catch(p){throw this.client.logger.error(`sendResult() -> history.get(${r}, ${i}) failed`),p}if(f){const p=Ml(l,r,d);await _e.Linking.openURL(p,this.client.name)}else{const p=m.request.method,g=Ct[p].res;g.tvf=Pt(Ae({},y),{correlationId:i}),o?(g.internal=Pt(Ae({},g.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,d,g)):this.client.core.relayer.publish(r,d,g).catch(x=>this.client.logger.error(x))}await this.client.core.history.resolve(u)}),H(this,"sendError",async n=>{const{id:i,topic:r,error:s,encodeOpts:o,rpcOpts:a,appLink:l}=n,u=y4(i,s);let d;const f=l&&typeof(_e==null?void 0:_e.Linking)<"u";try{const y=f?Ir:sn;d=await this.client.core.crypto.encode(r,u,Pt(Ae({},o||{}),{encoding:y}))}catch(y){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${r} failed`),y}let m;try{m=await this.client.core.history.get(r,i)}catch(y){throw this.client.logger.error(`sendError() -> history.get(${r}, ${i}) failed`),y}if(f){const y=Ml(l,r,d);await _e.Linking.openURL(y,this.client.name)}else{const y=m.request.method,p=a||Ct[y].res;this.client.core.relayer.publish(r,d,p)}await this.client.core.history.resolve(u)}),H(this,"cleanup",async()=>{const n=[],i=[];this.client.session.getAll().forEach(r=>{let s=!1;wr(r.expiry)&&(s=!0),this.client.core.crypto.keychain.has(r.topic)||(s=!0),s&&n.push(r.topic)}),this.client.proposal.getAll().forEach(r=>{wr(r.expiryTimestamp)&&i.push(r.id)}),await Promise.all([...n.map(r=>this.deleteSession({topic:r})),...i.map(r=>this.deleteProposal(r))])}),H(this,"onProviderMessageEvent",async n=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(n):await this.onRelayMessage(n)}),H(this,"onRelayEventRequest",async n=>{this.requestQueue.queue.push(n),await this.processRequestsQueue()}),H(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===di.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=di.active;const n=this.requestQueue.queue.shift();if(n)try{await this.processRequest(n)}catch(i){this.client.logger.warn(i)}}this.requestQueue.state=di.idle}),H(this,"processRequest",async n=>{const{topic:i,payload:r,attestation:s,transportType:o,encryptedId:a}=n,l=r.method;if(!this.shouldIgnorePairingRequest({topic:i,requestMethod:l}))switch(l){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:i,payload:r,attestation:s,encryptedId:a});case"wc_sessionSettle":return await this.onSessionSettleRequest(i,r);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(i,r);case"wc_sessionExtend":return await this.onSessionExtendRequest(i,r);case"wc_sessionPing":return await this.onSessionPingRequest(i,r);case"wc_sessionDelete":return await this.onSessionDeleteRequest(i,r);case"wc_sessionRequest":return await this.onSessionRequest({topic:i,payload:r,attestation:s,encryptedId:a,transportType:o});case"wc_sessionEvent":return await this.onSessionEventRequest(i,r);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:i,payload:r,attestation:s,encryptedId:a,transportType:o});default:return this.client.logger.info(`Unsupported request method ${l}`)}}),H(this,"onRelayEventResponse",async n=>{const{topic:i,payload:r,transportType:s}=n,o=(await this.client.core.history.get(i,r.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(i,r,s);case"wc_sessionSettle":return this.onSessionSettleResponse(i,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(i,r);case"wc_sessionExtend":return this.onSessionExtendResponse(i,r);case"wc_sessionPing":return this.onSessionPingResponse(i,r);case"wc_sessionRequest":return this.onSessionRequestResponse(i,r);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(i,r);default:return this.client.logger.info(`Unsupported response method ${o}`)}}),H(this,"onRelayEventUnknownPayload",n=>{const{topic:i}=n,{message:r}=J("MISSING_OR_INVALID",`Decoded payload on topic ${i} is not identifiable as a JSON-RPC request or a response.`);throw new Error(r)}),H(this,"shouldIgnorePairingRequest",n=>{const{topic:i,requestMethod:r}=n,s=this.expectedPairingMethodMap.get(i);return!s||s.includes(r)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),H(this,"onSessionProposeRequest",async n=>{const{topic:i,payload:r,attestation:s,encryptedId:o}=n,{params:a,id:l}=r;try{const u=this.client.core.eventClient.getEvent({topic:i});this.client.events.listenerCount("session_proposal")===0&&(console.warn("No listener for session_proposal event"),u==null||u.setError(Pi.proposal_listener_not_found)),this.isValidConnect(Ae({},r.params));const d=a.expiryTimestamp||ut(Ct.wc_sessionPropose.req.ttl),f=Ae({id:l,pairingTopic:i,expiryTimestamp:d,attestation:s,encryptedId:o},a);await this.setProposal(l,f);const m=await this.getVerifyContext({attestationId:s,hash:Dn(JSON.stringify(r)),encryptedId:o,metadata:f.proposer.metadata});u==null||u.addTrace(hi.emit_session_proposal),this.client.events.emit("session_proposal",{id:l,params:f,verifyContext:m})}catch(u){await this.sendError({id:l,topic:i,error:u,rpcOpts:Ct.wc_sessionPropose.autoReject}),this.client.logger.error(u)}}),H(this,"onSessionProposeResponse",async(n,i,r)=>{const{id:s}=i;if(Ai(i)){const{result:o}=i;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:o});const a=this.client.proposal.get(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});const l=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:l});const u=o.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:u});const d=await this.client.core.crypto.generateSharedKey(l,u);this.pendingSessions.set(s,{sessionTopic:d,pairingTopic:n,proposalId:s,publicKey:l});const f=await this.client.core.relayer.subscribe(d,{transportType:r});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:f}),await this.client.core.pairing.activate({topic:n})}else if(fi(i)){await this.deleteProposal(s);const o=Ne("session_connect",s);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners, 954`);this.events.emit(o,{error:i.error})}}),H(this,"onSessionSettleRequest",async(n,i)=>{const{id:r,params:s}=i;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:a,expiry:l,namespaces:u,sessionProperties:d,scopedProperties:f,sessionConfig:m}=i.params,y=[...this.pendingSessions.values()].find(x=>x.sessionTopic===n);if(!y)return this.client.logger.error(`Pending session not found for topic ${n}`);const p=this.client.proposal.get(y.proposalId),g=Pt(Ae(Ae(Ae({topic:n,relay:o,expiry:l,namespaces:u,acknowledged:!0,pairingTopic:y.pairingTopic,requiredNamespaces:p.requiredNamespaces,optionalNamespaces:p.optionalNamespaces,controller:a.publicKey,self:{publicKey:y.publicKey,metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},d&&{sessionProperties:d}),f&&{scopedProperties:f}),m&&{sessionConfig:m}),{transportType:Ve.relay});await this.client.session.set(g.topic,g),await this.setExpiry(g.topic,g.expiry),await this.client.core.pairing.updateMetadata({topic:y.pairingTopic,metadata:g.peer.metadata}),this.client.events.emit("session_connect",{session:g}),this.events.emit(Ne("session_connect",y.proposalId),{session:g}),this.pendingSessions.delete(y.proposalId),this.deleteProposal(y.proposalId,!1),this.cleanupDuplicatePairings(g),await this.sendResult({id:i.id,topic:n,result:!0})}catch(o){await this.sendError({id:r,topic:n,error:o}),this.client.logger.error(o)}}),H(this,"onSessionSettleResponse",async(n,i)=>{const{id:r}=i;Ai(i)?(await this.client.session.update(n,{acknowledged:!0}),this.events.emit(Ne("session_approve",r),{})):fi(i)&&(await this.client.session.delete(n,Ke("USER_DISCONNECTED")),this.events.emit(Ne("session_approve",r),{error:i.error}))}),H(this,"onSessionUpdateRequest",async(n,i)=>{const{params:r,id:s}=i;try{const o=`${n}_session_update`,a=La.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.warn(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:n,error:Ke("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(Ae({topic:n},r));try{La.set(o,s),await this.client.session.update(n,{namespaces:r.namespaces}),await this.sendResult({id:s,topic:n,result:!0})}catch(l){throw La.delete(o),l}this.client.events.emit("session_update",{id:s,topic:n,params:r})}catch(o){await this.sendError({id:s,topic:n,error:o}),this.client.logger.error(o)}}),H(this,"isRequestOutOfSync",(n,i)=>i.toString().slice(0,-3)<n.toString().slice(0,-3)),H(this,"onSessionUpdateResponse",(n,i)=>{const{id:r}=i,s=Ne("session_update",r);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ai(i)?this.events.emit(Ne("session_update",r),{}):fi(i)&&this.events.emit(Ne("session_update",r),{error:i.error})}),H(this,"onSessionExtendRequest",async(n,i)=>{const{id:r}=i;try{this.isValidExtend({topic:n}),await this.setExpiry(n,ut(fo)),await this.sendResult({id:r,topic:n,result:!0}),this.client.events.emit("session_extend",{id:r,topic:n})}catch(s){await this.sendError({id:r,topic:n,error:s}),this.client.logger.error(s)}}),H(this,"onSessionExtendResponse",(n,i)=>{const{id:r}=i,s=Ne("session_extend",r);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ai(i)?this.events.emit(Ne("session_extend",r),{}):fi(i)&&this.events.emit(Ne("session_extend",r),{error:i.error})}),H(this,"onSessionPingRequest",async(n,i)=>{const{id:r}=i;try{this.isValidPing({topic:n}),await this.sendResult({id:r,topic:n,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:r,topic:n})}catch(s){await this.sendError({id:r,topic:n,error:s}),this.client.logger.error(s)}}),H(this,"onSessionPingResponse",(n,i)=>{const{id:r}=i,s=Ne("session_ping",r);setTimeout(()=>{if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners 2176`);Ai(i)?this.events.emit(Ne("session_ping",r),{}):fi(i)&&this.events.emit(Ne("session_ping",r),{error:i.error})},500)}),H(this,"onSessionDeleteRequest",async(n,i)=>{const{id:r}=i;try{this.isValidDisconnect({topic:n,reason:i.params}),await Promise.all([new Promise(s=>{this.client.core.relayer.once(et.publish,async()=>{s(await this.deleteSession({topic:n,id:r}))})}),this.sendResult({id:r,topic:n,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:n,error:Ke("USER_DISCONNECTED")})]).catch(s=>this.client.logger.error(s))}catch(s){this.client.logger.error(s)}}),H(this,"onSessionRequest",async n=>{var i,r,s;const{topic:o,payload:a,attestation:l,encryptedId:u,transportType:d}=n,{id:f,params:m}=a;try{await this.isValidRequest(Ae({topic:o},m));const y=this.client.session.get(o),p=await this.getVerifyContext({attestationId:l,hash:Dn(JSON.stringify(pr("wc_sessionRequest",m,f))),encryptedId:u,metadata:y.peer.metadata,transportType:d}),g={id:f,topic:o,params:m,verifyContext:p};await this.setPendingSessionRequest(g),d===Ve.link_mode&&(i=y.peer.metadata.redirect)!=null&&i.universal&&this.client.core.addLinkModeSupportedApp((r=y.peer.metadata.redirect)==null?void 0:r.universal),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(g):(this.addSessionRequestToSessionRequestQueue(g),this.processSessionRequestQueue())}catch(y){await this.sendError({id:f,topic:o,error:y}),this.client.logger.error(y)}}),H(this,"onSessionRequestResponse",(n,i)=>{const{id:r}=i,s=Ne("session_request",r);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ai(i)?this.events.emit(Ne("session_request",r),{result:i.result}):fi(i)&&this.events.emit(Ne("session_request",r),{error:i.error})}),H(this,"onSessionEventRequest",async(n,i)=>{const{id:r,params:s}=i;try{const o=`${n}_session_event_${s.event.name}`,a=La.get(o);if(a&&this.isRequestOutOfSync(a,r)){this.client.logger.info(`Discarding out of sync request - ${r}`);return}this.isValidEmit(Ae({topic:n},s)),this.client.events.emit("session_event",{id:r,topic:n,params:s}),La.set(o,r)}catch(o){await this.sendError({id:r,topic:n,error:o}),this.client.logger.error(o)}}),H(this,"onSessionAuthenticateResponse",(n,i)=>{const{id:r}=i;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:n,payload:i}),Ai(i)?this.events.emit(Ne("session_request",r),{result:i.result}):fi(i)&&this.events.emit(Ne("session_request",r),{error:i.error})}),H(this,"onSessionAuthenticateRequest",async n=>{var i;const{topic:r,payload:s,attestation:o,encryptedId:a,transportType:l}=n;try{const{requester:u,authPayload:d,expiryTimestamp:f}=s.params,m=await this.getVerifyContext({attestationId:o,hash:Dn(JSON.stringify(s)),encryptedId:a,metadata:u.metadata,transportType:l}),y={requester:u,pairingTopic:r,id:s.id,authPayload:d,verifyContext:m,expiryTimestamp:f};await this.setAuthRequest(s.id,{request:y,pairingTopic:r,transportType:l}),l===Ve.link_mode&&(i=u.metadata.redirect)!=null&&i.universal&&this.client.core.addLinkModeSupportedApp(u.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:r,params:s.params,id:s.id,verifyContext:m})}catch(u){this.client.logger.error(u);const d=s.params.requester.publicKey,f=await this.client.core.crypto.generateKeyPair(),m=this.getAppLinkIfEnabled(s.params.requester.metadata,l),y={type:$i,receiverPublicKey:d,senderPublicKey:f};await this.sendError({id:s.id,topic:r,error:u,encodeOpts:y,rpcOpts:Ct.wc_sessionAuthenticate.autoReject,appLink:m})}}),H(this,"addSessionRequestToSessionRequestQueue",n=>{this.sessionRequestQueue.queue.push(n)}),H(this,"cleanupAfterResponse",n=>{this.deletePendingSessionRequest(n.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=di.idle,this.processSessionRequestQueue()},ee.toMiliseconds(this.requestQueueDelay))}),H(this,"cleanupPendingSentRequestsForTopic",({topic:n,error:i})=>{const r=this.client.core.history.pending;r.length>0&&r.filter(s=>s.topic===n&&s.request.method==="wc_sessionRequest").forEach(s=>{const o=s.request.id,a=Ne("session_request",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);this.events.emit(Ne("session_request",s.request.id),{error:i})})}),H(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===di.active){this.client.logger.info("session request queue is already active.");return}const n=this.sessionRequestQueue.queue[0];if(!n){this.client.logger.info("session request queue is empty.");return}try{this.emitSessionRequest(n)}catch(i){this.client.logger.error(i)}}),H(this,"emitSessionRequest",n=>{if(this.emittedSessionRequests.has(n.id)){this.client.logger.warn({id:n.id},`Skipping emitting \`session_request\` event for duplicate request. id: ${n.id}`);return}this.sessionRequestQueue.state=di.active,this.emittedSessionRequests.add(n.id),this.client.events.emit("session_request",n)}),H(this,"onPairingCreated",n=>{if(n.methods&&this.expectedPairingMethodMap.set(n.topic,n.methods),n.active)return;const i=this.client.proposal.getAll().find(r=>r.pairingTopic===n.topic);i&&this.onSessionProposeRequest({topic:n.topic,payload:pr("wc_sessionPropose",Pt(Ae({},i),{requiredNamespaces:i.requiredNamespaces,optionalNamespaces:i.optionalNamespaces,relays:i.relays,proposer:i.proposer,sessionProperties:i.sessionProperties,scopedProperties:i.scopedProperties}),i.id),attestation:i.attestation,encryptedId:i.encryptedId})}),H(this,"isValidConnect",async n=>{if(!Xt(n)){const{message:u}=J("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(n)}`);throw new Error(u)}const{pairingTopic:i,requiredNamespaces:r,optionalNamespaces:s,sessionProperties:o,scopedProperties:a,relays:l}=n;if(dt(i)||await this.isValidPairingTopic(i),!FY(l)){const{message:u}=J("MISSING_OR_INVALID",`connect() relays: ${l}`);throw new Error(u)}if(!dt(r)&&yc(r)!==0){const u="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(u):this.client.logger.warn(u),this.validateNamespaces(r,"requiredNamespaces")}if(!dt(s)&&yc(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),dt(o)||this.validateSessionProps(o,"sessionProperties"),!dt(a)){this.validateSessionProps(a,"scopedProperties");const u=Object.keys(r||{}).concat(Object.keys(s||{}));if(!Object.keys(a).every(d=>u.includes(d.split(":")[0])))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(a)}, required/optional namespaces: ${JSON.stringify(u)}`)}}),H(this,"validateNamespaces",(n,i)=>{const r=WY(n,"connect()",i);if(r)throw new Error(r.message)}),H(this,"isValidApprove",async n=>{if(!Xt(n))throw new Error(J("MISSING_OR_INVALID",`approve() params: ${n}`).message);const{id:i,namespaces:r,relayProtocol:s,sessionProperties:o,scopedProperties:a}=n;this.checkRecentlyDeleted(i),await this.isValidProposalId(i);const l=this.client.proposal.get(i),u=Oh(r,"approve()");if(u)throw new Error(u.message);const d=M2(l.requiredNamespaces,r,"approve()");if(d)throw new Error(d.message);if(!ct(s,!0)){const{message:f}=J("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(f)}if(dt(o)||this.validateSessionProps(o,"sessionProperties"),!dt(a)){this.validateSessionProps(a,"scopedProperties");const f=new Set(Object.keys(r));if(!Object.keys(a).every(m=>f.has(m.split(":")[0])))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(a)}, approved namespaces: ${Array.from(f).join(", ")}`)}}),H(this,"isValidReject",async n=>{if(!Xt(n)){const{message:s}=J("MISSING_OR_INVALID",`reject() params: ${n}`);throw new Error(s)}const{id:i,reason:r}=n;if(this.checkRecentlyDeleted(i),await this.isValidProposalId(i),!QY(r)){const{message:s}=J("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw new Error(s)}}),H(this,"isValidSessionSettleRequest",n=>{if(!Xt(n)){const{message:u}=J("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${n}`);throw new Error(u)}const{relay:i,controller:r,namespaces:s,expiry:o}=n;if(!aI(i)){const{message:u}=J("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const a=zY(r,"onSessionSettleRequest()");if(a)throw new Error(a.message);const l=Oh(s,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(wr(o)){const{message:u}=J("EXPIRED","onSessionSettleRequest()");throw new Error(u)}}),H(this,"isValidUpdate",async n=>{if(!Xt(n)){const{message:l}=J("MISSING_OR_INVALID",`update() params: ${n}`);throw new Error(l)}const{topic:i,namespaces:r}=n;this.checkRecentlyDeleted(i),await this.isValidSessionTopic(i);const s=this.client.session.get(i),o=Oh(r,"update()");if(o)throw new Error(o.message);const a=M2(s.requiredNamespaces,r,"update()");if(a)throw new Error(a.message)}),H(this,"isValidExtend",async n=>{if(!Xt(n)){const{message:r}=J("MISSING_OR_INVALID",`extend() params: ${n}`);throw new Error(r)}const{topic:i}=n;this.checkRecentlyDeleted(i),await this.isValidSessionTopic(i)}),H(this,"isValidRequest",async n=>{if(!Xt(n)){const{message:l}=J("MISSING_OR_INVALID",`request() params: ${n}`);throw new Error(l)}const{topic:i,request:r,chainId:s,expiry:o}=n;this.checkRecentlyDeleted(i),await this.isValidSessionTopic(i);const{namespaces:a}=this.client.session.get(i);if(!b2(a,s)){const{message:l}=J("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(l)}if(!HY(r)){const{message:l}=J("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw new Error(l)}if(!qY(a,s,r.method)){const{message:l}=J("MISSING_OR_INVALID",`request() method: ${r.method}`);throw new Error(l)}if(o&&!eQ(o,$h)){const{message:l}=J("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${$h.min} and ${$h.max}`);throw new Error(l)}}),H(this,"isValidRespond",async n=>{var i;if(!Xt(n)){const{message:o}=J("MISSING_OR_INVALID",`respond() params: ${n}`);throw new Error(o)}const{topic:r,response:s}=n;try{await this.isValidSessionTopic(r)}catch(o){throw(i=n==null?void 0:n.response)!=null&&i.id&&this.cleanupAfterResponse(n),o}if(!GY(s)){const{message:o}=J("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}}),H(this,"isValidPing",async n=>{if(!Xt(n)){const{message:r}=J("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(r)}const{topic:i}=n;await this.isValidSessionOrPairingTopic(i)}),H(this,"isValidEmit",async n=>{if(!Xt(n)){const{message:a}=J("MISSING_OR_INVALID",`emit() params: ${n}`);throw new Error(a)}const{topic:i,event:r,chainId:s}=n;await this.isValidSessionTopic(i);const{namespaces:o}=this.client.session.get(i);if(!b2(o,s)){const{message:a}=J("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(a)}if(!ZY(r)){const{message:a}=J("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(a)}if(!KY(o,s,r.name)){const{message:a}=J("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(a)}}),H(this,"isValidDisconnect",async n=>{if(!Xt(n)){const{message:r}=J("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(r)}const{topic:i}=n;await this.isValidSessionOrPairingTopic(i)}),H(this,"isValidAuthenticate",n=>{const{chains:i,uri:r,domain:s,nonce:o}=n;if(!Array.isArray(i)||i.length===0)throw new Error("chains is required and must be a non-empty array");if(!ct(r,!1))throw new Error("uri is required parameter");if(!ct(s,!1))throw new Error("domain is required parameter");if(!ct(o,!1))throw new Error("nonce is required parameter");if([...new Set(i.map(l=>vl(l).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:a}=vl(i[0]);if(a!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),H(this,"getVerifyContext",async n=>{const{attestationId:i,hash:r,encryptedId:s,metadata:o,transportType:a}=n,l={verified:{verifyUrl:o.verifyUrl||Fa,validation:"UNKNOWN",origin:o.url||""}};try{if(a===Ve.link_mode){const d=this.getAppLinkIfEnabled(o,a);return l.verified.validation=d&&new URL(d).origin===new URL(o.url).origin?"VALID":"INVALID",l}const u=await this.client.core.verify.resolve({attestationId:i,hash:r,encryptedId:s,verifyUrl:o.verifyUrl});u&&(l.verified.origin=u.origin,l.verified.isScam=u.isScam,l.verified.validation=u.origin===new URL(o.url).origin?"VALID":"INVALID")}catch(u){this.client.logger.warn(u)}return this.client.logger.debug(`Verify context: ${JSON.stringify(l)}`),l}),H(this,"validateSessionProps",(n,i)=>{Object.values(n).forEach((r,s)=>{if(r==null){const{message:o}=J("MISSING_OR_INVALID",`${i} must contain an existing value for each key. Received: ${r} for key ${Object.keys(n)[s]}`);throw new Error(o)}})}),H(this,"getPendingAuthRequest",n=>{const i=this.client.auth.requests.get(n);return typeof i=="object"?i:void 0}),H(this,"addToRecentlyDeleted",(n,i)=>{if(this.recentlyDeletedMap.set(n,i),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let r=0;const s=this.recentlyDeletedLimit/2;for(const o of this.recentlyDeletedMap.keys()){if(r++>=s)break;this.recentlyDeletedMap.delete(o)}}}),H(this,"checkRecentlyDeleted",n=>{const i=this.recentlyDeletedMap.get(n);if(i){const{message:r}=J("MISSING_OR_INVALID",`Record was recently deleted - ${i}: ${n}`);throw new Error(r)}}),H(this,"isLinkModeEnabled",(n,i)=>{var r,s,o,a,l,u,d,f,m;return!n||i!==Ve.link_mode?!1:((s=(r=this.client.metadata)==null?void 0:r.redirect)==null?void 0:s.linkMode)===!0&&((a=(o=this.client.metadata)==null?void 0:o.redirect)==null?void 0:a.universal)!==void 0&&((u=(l=this.client.metadata)==null?void 0:l.redirect)==null?void 0:u.universal)!==""&&((d=n==null?void 0:n.redirect)==null?void 0:d.universal)!==void 0&&((f=n==null?void 0:n.redirect)==null?void 0:f.universal)!==""&&((m=n==null?void 0:n.redirect)==null?void 0:m.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(n.redirect.universal)&&typeof(_e==null?void 0:_e.Linking)<"u"}),H(this,"getAppLinkIfEnabled",(n,i)=>{var r;return this.isLinkModeEnabled(n,i)?(r=n==null?void 0:n.redirect)==null?void 0:r.universal:void 0}),H(this,"handleLinkModeMessage",({url:n})=>{if(!n||!n.includes("wc_ev")||!n.includes("topic"))return;const i=Pp(n,"topic")||"",r=decodeURIComponent(Pp(n,"wc_ev")||""),s=this.client.session.keys.includes(i);s&&this.client.session.update(i,{transportType:Ve.link_mode}),this.client.core.dispatchEnvelope({topic:i,message:r,sessionExists:s})}),H(this,"registerLinkModeListeners",async()=>{var n;if(Hm()||os()&&(n=this.client.metadata.redirect)!=null&&n.linkMode){const i=_e==null?void 0:_e.Linking;if(typeof i<"u"){i.addEventListener("url",this.handleLinkModeMessage,this.client.name);const r=await i.getInitialURL();r&&setTimeout(()=>{this.handleLinkModeMessage({url:r})},50)}}}),H(this,"getTVFParams",(n,i,r)=>{var s,o,a;if(!((s=i.request)!=null&&s.method))return{};const l={correlationId:n,rpcMethods:[i.request.method],chainId:i.chainId};try{const u=this.extractTxHashesFromResult(i.request,r);l.txHashes=u,l.contractAddresses=this.isValidContractData(i.request.params)?[(a=(o=i.request.params)==null?void 0:o[0])==null?void 0:a.to]:[]}catch(u){this.client.logger.warn("Error getting TVF params",u)}return l}),H(this,"isValidContractData",n=>{var i;if(!n)return!1;try{const r=(n==null?void 0:n.data)||((i=n==null?void 0:n[0])==null?void 0:i.data);if(!r.startsWith("0x"))return!1;const s=r.slice(2);return/^[0-9a-fA-F]*$/.test(s)?s.length%2===0:!1}catch{}return!1}),H(this,"extractTxHashesFromResult",(n,i)=>{var r;try{if(!i)return[];const s=n.method,o=nq[s];if(s==="sui_signTransaction")return[MW(i.transactionBytes)];if(s==="near_signTransaction")return[Wp(i)];if(s==="near_signTransactions")return i.map(l=>Wp(l));if(s==="xrpl_signTransactionFor"||s==="xrpl_signTransaction")return[(r=i.tx_json)==null?void 0:r.hash];if(s==="polkadot_signTransaction")return[yQ({transaction:n.params.transactionPayload,signature:i.signature})];if(s==="algo_signTxn")return Go(i)?i.map(l=>Fp(l)):[Fp(i)];if(s==="cosmos_signDirect")return[EW(i)];if(typeof i=="string")return[i];const a=i[o.key];if(Go(a))return s==="solana_signAllTransactions"?a.map(l=>bW(l)):a;if(typeof a=="string")return[a]}catch(s){this.client.logger.warn("Error extracting tx hashes from result",s)}return[]})}async processPendingMessageEvents(){try{const t=this.client.session.keys,n=this.client.core.relayer.messages.getWithoutAck(t);for(const[i,r]of Object.entries(n))for(const s of r)try{await this.onProviderMessageEvent({topic:i,message:s,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${i}, message: ${s}`)}}catch(t){this.client.logger.warn("processPendingMessageEvents failed",t)}}isInitialized(){if(!this.initialized){const{message:t}=J("NOT_INITIALIZED",this.name);throw new Error(t)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(et.message,t=>{this.onProviderMessageEvent(t)})}async onRelayMessage(t){const{topic:n,message:i,attestation:r,transportType:s}=t,{publicKey:o}=this.client.auth.authKeys.keys.includes(Dl)?this.client.auth.authKeys.get(Dl):{publicKey:void 0};try{const a=await this.client.core.crypto.decode(n,i,{receiverPublicKey:o,encoding:s===Ve.link_mode?Ir:sn});B0(a)?(this.client.core.history.set(n,a),await this.onRelayEventRequest({topic:n,payload:a,attestation:r,transportType:s,encryptedId:Dn(i)})):V0(a)?(await this.client.core.history.resolve(a),await this.onRelayEventResponse({topic:n,payload:a,transportType:s}),this.client.core.history.delete(n,a.id)):await this.onRelayEventUnknownPayload({topic:n,payload:a,transportType:s}),await this.client.core.relayer.messages.ack(n,i)}catch(a){this.client.logger.error(a)}}registerExpirerEvents(){this.client.core.expirer.on(vn.expired,async t=>{const{topic:n,id:i}=mM(t.target);if(i&&this.client.pendingRequest.keys.includes(i))return await this.deletePendingSessionRequest(i,J("EXPIRED"),!0);if(i&&this.client.auth.requests.keys.includes(i))return await this.deletePendingAuthRequest(i,J("EXPIRED"),!0);n?this.client.session.keys.includes(n)&&(await this.deleteSession({topic:n,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:n})):i&&(await this.deleteProposal(i,!0),this.client.events.emit("proposal_expire",{id:i}))})}registerPairingEvents(){this.client.core.pairing.events.on(hs.create,t=>this.onPairingCreated(t)),this.client.core.pairing.events.on(hs.delete,t=>{this.addToRecentlyDeleted(t.topic,"pairing")})}isValidPairingTopic(t){if(!ct(t,!1)){const{message:n}=J("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(n)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:n}=J("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(n)}if(wr(this.client.core.pairing.pairings.get(t).expiry)){const{message:n}=J("EXPIRED",`pairing topic: ${t}`);throw new Error(n)}}async isValidSessionTopic(t){if(!ct(t,!1)){const{message:n}=J("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(n)}if(this.checkRecentlyDeleted(t),!this.client.session.keys.includes(t)){const{message:n}=J("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(n)}if(wr(this.client.session.get(t).expiry)){await this.deleteSession({topic:t});const{message:n}=J("EXPIRED",`session topic: ${t}`);throw new Error(n)}if(!this.client.core.crypto.keychain.has(t)){const{message:n}=J("MISSING_OR_INVALID",`session topic does not exist in keychain: ${t}`);throw await this.deleteSession({topic:t}),new Error(n)}}async isValidSessionOrPairingTopic(t){if(this.checkRecentlyDeleted(t),this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else if(this.client.core.pairing.pairings.keys.includes(t))this.isValidPairingTopic(t);else if(ct(t,!1)){const{message:n}=J("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(n)}else{const{message:n}=J("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(n)}}async isValidProposalId(t){if(!YY(t)){const{message:n}=J("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(n)}if(!this.client.proposal.keys.includes(t)){const{message:n}=J("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(n)}if(wr(this.client.proposal.get(t).expiryTimestamp)){await this.deleteProposal(t);const{message:n}=J("EXPIRED",`proposal id: ${t}`);throw new Error(n)}}}class gq extends Js{constructor(t,n){super(t,n,XZ,cy),this.core=t,this.logger=n}}class pq extends Js{constructor(t,n){super(t,n,eq,cy),this.core=t,this.logger=n}}class wq extends Js{constructor(t,n){super(t,n,iq,cy,i=>i.id),this.core=t,this.logger=n}}class xq extends Js{constructor(t,n){super(t,n,aq,Cd,()=>Dl),this.core=t,this.logger=n}}class _q extends Js{constructor(t,n){super(t,n,cq,Cd),this.core=t,this.logger=n}}class bq extends Js{constructor(t,n){super(t,n,lq,Cd,i=>i.id),this.core=t,this.logger=n}}var Mq=Object.defineProperty,Iq=(e,t,n)=>t in e?Mq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bh=(e,t,n)=>Iq(e,typeof t!="symbol"?t+"":t,n);class Eq{constructor(t,n){this.core=t,this.logger=n,Bh(this,"authKeys"),Bh(this,"pairingTopics"),Bh(this,"requests"),this.authKeys=new xq(this.core,this.logger),this.pairingTopics=new _q(this.core,this.logger),this.requests=new bq(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}var Cq=Object.defineProperty,Lq=(e,t,n)=>t in e?Cq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ee=(e,t,n)=>Lq(e,typeof t!="symbol"?t+"":t,n);class ly extends lB{constructor(t){super(t),Ee(this,"protocol",EI),Ee(this,"version",CI),Ee(this,"name",Uh.name),Ee(this,"metadata"),Ee(this,"core"),Ee(this,"logger"),Ee(this,"events",new Ws.EventEmitter),Ee(this,"engine"),Ee(this,"session"),Ee(this,"proposal"),Ee(this,"pendingRequest"),Ee(this,"auth"),Ee(this,"signConfig"),Ee(this,"on",(i,r)=>this.events.on(i,r)),Ee(this,"once",(i,r)=>this.events.once(i,r)),Ee(this,"off",(i,r)=>this.events.off(i,r)),Ee(this,"removeListener",(i,r)=>this.events.removeListener(i,r)),Ee(this,"removeAllListeners",i=>this.events.removeAllListeners(i)),Ee(this,"connect",async i=>{try{return await this.engine.connect(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"pair",async i=>{try{return await this.engine.pair(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"approve",async i=>{try{return await this.engine.approve(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"reject",async i=>{try{return await this.engine.reject(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"update",async i=>{try{return await this.engine.update(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"extend",async i=>{try{return await this.engine.extend(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"request",async i=>{try{return await this.engine.request(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"respond",async i=>{try{return await this.engine.respond(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"ping",async i=>{try{return await this.engine.ping(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"emit",async i=>{try{return await this.engine.emit(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"disconnect",async i=>{try{return await this.engine.disconnect(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"find",i=>{try{return this.engine.find(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(i){throw this.logger.error(i.message),i}}),Ee(this,"authenticate",async(i,r)=>{try{return await this.engine.authenticate(i,r)}catch(s){throw this.logger.error(s.message),s}}),Ee(this,"formatAuthMessage",i=>{try{return this.engine.formatAuthMessage(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"approveSessionAuthenticate",async i=>{try{return await this.engine.approveSessionAuthenticate(i)}catch(r){throw this.logger.error(r.message),r}}),Ee(this,"rejectSessionAuthenticate",async i=>{try{return await this.engine.rejectSessionAuthenticate(i)}catch(r){throw this.logger.error(r.message),r}}),this.name=(t==null?void 0:t.name)||Uh.name,this.metadata=fV(t==null?void 0:t.metadata),this.signConfig=t==null?void 0:t.signConfig;const n=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:gd(Ym({level:(t==null?void 0:t.logger)||Uh.logger}));this.core=(t==null?void 0:t.core)||new JZ(t),this.logger=Kt(n,this.name),this.session=new pq(this.core,this.logger),this.proposal=new gq(this.core,this.logger),this.pendingRequest=new wq(this.core,this.logger),this.engine=new yq(this),this.auth=new Eq(this.core,this.logger)}static async init(t){const n=new ly(t);return await n.initialize(),n}get context(){return dn(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(t){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(t.message),t}}}const Tq=ly,jq="08c4b07e3ad25f1a27c14a4e8cecb6f0",NX="eip155";let Ii;async function TI(){if(!Ii)return[];const e=await Ii.getWalletConnectSessions();return JSON.parse(e??"[]")}function vq(e){Ii||(Ii=new kc({clientId:e.clientId,storage:null}))}async function SX(e){if(!Ii)return;const t=await Ii.getWalletConnectSessions(),n=JSON.parse(t??"[]");n.push(e),await Ii.saveWalletConnectSessions(Me(n))}async function Nq(e){if(!Ii)return;const t=await Ii.getWalletConnectSessions(),i=JSON.parse(t??"[]").filter(r=>r.topic!==e.topic);await Ii.saveWalletConnectSessions(Me(i))}let Vh=new WeakMap;async function Sq(e){var d,f,m,y;const{wallet:t,requestHandlers:n,onConnect:i,onDisconnect:r,client:s}=e,o=e.chains&&e.chains.length>10?(console.warn("WalletConnect: Can specify no more than 10 chains, truncating to the first 10 provided chains..."),e.chains.slice(0,10)):e.chains;if(Vh.has(s))return Vh.get(s);vq({clientId:e.client.clientId});const a=Gl(),l=await Tq.init({metadata:{description:((d=e.appMetadata)==null?void 0:d.description)??a.description,icons:[((f=e.appMetadata)==null?void 0:f.logoUrl)??a.logoUrl],name:((m=e.appMetadata)==null?void 0:m.name)??a.name,url:((y=e.appMetadata)==null?void 0:y.url)??a.url},projectId:e.projectId??jq});l.on("session_proposal",async p=>{const{onSessionProposal:g}=await h(async()=>{const{onSessionProposal:x}=await import("./session-proposal-CgSgZiFG.js");return{onSessionProposal:x}},__vite__mapDeps([44,1,2,3,4,5]));await g({chains:o,event:p,onConnect:i,wallet:t,walletConnectClient:l}).catch(x=>{if(e.onError)e.onError(x);else throw x})}),l.on("session_request",async p=>{const{fulfillRequest:g}=await h(async()=>{const{fulfillRequest:x}=await import("./session-request-D9OBe44U.js");return{fulfillRequest:x}},__vite__mapDeps([45,1,2,3,4,5]));await g({event:p,handlers:n,thirdwebClient:s,wallet:t,walletConnectClient:l}).catch(x=>{if(e.onError)e.onError(x);else throw x})}),l.on("session_event",async p=>{}),l.on("session_ping",p=>{}),l.on("session_delete",async p=>{await jI({session:{topic:p.topic},walletConnectClient:l}).catch(g=>{if(e.onError)e.onError(g);else throw g})});const u=l.disconnect;return l.disconnect=async p=>{const g=await u(p).catch(()=>{});return r&&Oq({onDisconnect:r,topic:p.topic}),g},Vh.set(e.client,l),l}function Aq(e){const{uri:t,walletConnectClient:n}=e;n.core.pairing.pair({uri:t})}async function Dq(){return TI()}async function jI(e){Nq(e.session);try{await e.walletConnectClient.disconnect({reason:{code:6e3,message:"Disconnected"},topic:e.session.topic})}catch{}}async function Oq(e){const{topic:t,onDisconnect:n}=e,i=await TI();n(i.find(r=>r.topic===t)??{topic:t})}function Pq(e){return c.jsxs(M,{style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:"Connect an App"})}),c.jsx(We,{}),c.jsx(M,{px:"lg",scrollY:!0,style:{maxHeight:"500px"},children:c.jsxs(M,{py:"lg",style:{position:"relative"},children:[c.jsx(M,{py:"md",children:c.jsx(rd,{client:e.client,error:!!e.error,hideSpinner:!0,id:"walletConnect"})}),c.jsx(M,{animate:"fadein",style:{animationDuration:"200ms"},children:e.error?c.jsxs(c.Fragment,{children:[c.jsx(P,{balance:!0,center:!0,multiline:!0,size:"sm",children:e.error}),c.jsx($,{y:"md"}),c.jsx(M,{animate:"fadein",center:"x",flex:"row",children:c.jsxs(ae,{fullWidth:!0,onClick:()=>e.disconnect(),style:{alignItems:"center",gap:z.xs},variant:"accent",children:[c.jsx(Ac,{height:A.sm,width:A.sm}),"Retry"]})})]}):c.jsxs(c.Fragment,{children:[c.jsxs(P,{balance:!0,center:!0,multiline:!0,size:"md",children:["Connected to ",e.session.origin??"another app."]}),c.jsx($,{y:"xl"}),c.jsx(ae,{fullWidth:!0,onClick:()=>{e.disconnect()},variant:"accent",children:"Disconnect"})]})})]})})]})}function kq(e){const t=bt(),[n,i]=w.useState(!1),[r,s]=w.useState(!1),o=Ji(),{data:a}=xe({enabled:!!t,queryFn:async()=>{if(t)try{return await Sq({chains:e.chains,client:e.client,onConnect:()=>{i(!1),o.invalidateQueries({queryKey:["walletConnectSession"]})},onDisconnect:()=>{i(!1),o.invalidateQueries({queryKey:["walletConnectSession"]})},onError:m=>{s(m.message),i(!1)},wallet:t})}catch{s("Failed to establish WalletConnect connection");return}},queryKey:["walletConnectClient"],retry:!1}),{data:l,refetch:u}=xe({enabled:!!a,queryFn:async()=>a&&(await Dq())[0]||null,queryKey:["walletConnectSession"]}),{mutateAsync:d}=tc({mutationFn:async()=>{if(!a||!l)throw new Error("No session");await jI({session:l,walletConnectClient:a})},onError:f=>{console.error(f),s(f.message)},onSuccess:()=>{s(!1),o.invalidateQueries({queryKey:["walletConnectSession"]}),u()}});return l?c.jsx(Pq,{disconnect:d,error:r,...e,session:l}):c.jsxs(M,{style:{minHeight:"300px"},children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:"Connect an App"})}),c.jsx(We,{}),c.jsx(M,{px:"lg",scrollY:!0,style:{maxHeight:"500px"},children:c.jsxs(M,{py:"sm",style:{position:"relative"},children:[c.jsx(M,{py:"md",children:c.jsx(rd,{client:e.client,error:!!r,hideSpinner:!n,id:"walletConnect"})}),c.jsx(M,{animate:"fadein",style:{animationDuration:"200ms"},children:r?c.jsxs(c.Fragment,{children:[c.jsx(P,{balance:!0,center:!0,multiline:!0,size:"sm",children:r}),c.jsx($,{y:"md"}),c.jsx(M,{animate:"fadein",center:"x",flex:"row",children:c.jsxs(ae,{fullWidth:!0,onClick:()=>s(!1),style:{alignItems:"center",gap:z.xs},variant:"accent",children:[c.jsx(Ac,{height:A.sm,width:A.sm}),"Retry"]})})]}):c.jsxs(c.Fragment,{children:[c.jsx(P,{balance:!0,center:!0,multiline:!0,size:"sm",children:"Copy your connection URI from the external app."}),c.jsx($,{y:"xl"}),c.jsx(Yf,{lastUsedBadge:!1,disabled:n||!!r||!a,emptyErrorMessage:"Please enter a valid URI",name:"wcUri",onSelect:async f=>{if(i(!0),!a)s("No WalletConnect client found");else try{Aq({uri:f,walletConnectClient:a})}catch{s("Error creating WalletConnect session")}},placeholder:"WalletConnect URI",submitButtonText:"Connect",type:"text"})]})})]})}),c.jsxs(M,{children:[c.jsx($,{y:"lg"}),c.jsx(We,{}),c.jsx(M,{center:"x",flex:"row",p:"lg",children:c.jsx("a",{href:"https://blog.thirdweb.com/p/a62c0ef4-1d8f-424d-95b9-a006e5239849/",children:c.jsx(ae,{onClick:()=>{},variant:"link",children:"Where do I find the URI?"})})})]})]})}function zq(e){const t=_t(),n=p3(t),i=W5(e.address),r=w.useSyncExternalStore(i.subscribe,i.getValue),s=xe({enabled:!!t,queryFn:()=>bj({chain:t||sa,client:e.client,walletAddress:e.address}),queryKey:["transactions",e.address,t]}),o=[...[...r].reverse(),...s.data||[]];return c.jsx(M,{flex:"column",fullHeight:!0,scrollY:!0,style:{maxHeight:"370px",minHeight:"250px",paddingBottom:z.lg},children:c.jsxs(M,{expand:!0,flex:"column",gap:"xs",children:[s.isLoading&&c.jsxs(M,{center:"both",color:"secondaryText",flex:"column",gap:"md",style:{flex:"1",minHeight:"250px"},children:[c.jsx($e,{color:"secondaryText",size:"md"}),c.jsx(P,{children:"Loading recent transactions..."})]}),!s.isLoading&&o.length===0?c.jsxs(M,{center:"both",color:"secondaryText",flex:"column",gap:"md",style:{flex:"1",minHeight:"250px"},children:[c.jsx(is,{height:A.xl,width:A.xl}),c.jsx(P,{children:"No Transactions"})]}):c.jsx(M,{animate:"fadein",flex:"column",gap:"xs",style:{minHeight:"250px"},children:o.map(a=>{var l;return c.jsx(Rq,{client:e.client,explorerUrl:(l=n.explorers[0])==null?void 0:l.url,tx:a},a.transactionHash)})})]})})}function Rq(e){const{data:t,isLoading:n,error:i}=rv({chain:Pe(e.tx.chainId),client:e.client,queryOptions:{enabled:e.tx.receipt===void 0},transactionHash:e.tx.transactionHash}),r=F1(Pe(e.tx.chainId)),s=e.tx.receipt??t,o=e.tx.decoded,a=c.jsxs(Uq,{fullWidth:!0,style:{paddingBlock:z.sm},variant:"secondary",children:[c.jsxs(M,{center:"y",flex:"row",gap:"md",style:{flex:1},children:[c.jsx(Bb,{chainIconUrl:r.url,client:e.client,size:A.lg}),c.jsxs("div",{style:{display:"flex",flex:1,flexDirection:"column",justifyContent:"center"},children:[c.jsx(M,{center:"y",flex:"row",gap:"xs",style:{justifyContent:"space-between"},children:c.jsx(P,{color:"primaryText",size:"sm",children:o?o.name:"Transaction Sent"})}),c.jsx($,{y:"xxs"}),c.jsx(M,{center:"y",flex:"row",gap:"xxs",style:{justifyContent:"space-between"},children:c.jsx(P,{color:"secondaryText",size:"xs",children:s!=null&&s.to?Ga(s==null?void 0:s.to,4):Ga(e.tx.transactionHash,4)})})]})]}),c.jsxs(M,{center:"y",flex:"row",gap:"xxs",children:[n&&c.jsx($e,{color:"primaryText",size:"sm"}),!n&&s&&s.status==="success"&&c.jsx(P,{color:"success",size:"md",children:c.jsx(aa,{height:A.md,width:A.md})}),(i||!n&&s&&s.status!=="success")&&c.jsx(P,{color:"danger",size:"md",children:c.jsx(is,{height:A.md,width:A.md})})]})]});return e.explorerUrl?c.jsx("a",{href:eS(e.explorerUrl,e.tx.transactionHash),rel:"noreferrer",target:"_blank",children:a}):a}const Uq=Be(ae)(()=>{const e=X();return{"&:hover":{background:e.colors.secondaryButtonBg},background:e.colors.tertiaryBg,height:"62px"}});function $q(e){var o;const t=_t(),n=bt(),i=Tt(),r=p3(t),s=t&&i&&n?{account:i}:void 0;return s?c.jsxs(M,{animate:"fadein",children:[c.jsx(M,{p:"lg",children:c.jsx(be,{onBack:e.onBack,title:e.locale.transactions})}),c.jsx(We,{}),c.jsxs(M,{px:"lg",scrollY:!0,style:{minHeight:"330px"},children:[c.jsx($,{y:"md"}),c.jsx(zq,{address:s.account.address,client:e.client,locale:e.locale})]}),c.jsx(We,{}),c.jsx(M,{p:"lg",children:c.jsxs(U3,{as:"a",fullWidth:!0,gap:"xs",href:tS(((o=r.explorers[0])==null?void 0:o.url)??"",(i==null?void 0:i.address)??""),style:{color:"inherit",textDecoration:"none"},target:"_blank",variant:"outline",children:["View on Explorer",c.jsx(R3,{height:A.sm,width:A.sm})]})})]}):c.jsx(wt,{})}const gr="tw-connected-wallet",Bq=1337,Vq=e=>{var d,f,m,y,p,g,x,_,b,I,E;const{connectLocale:t,client:n}=e,i=w.useContext(N3),r=_t();function s(){i(null)}function o(){var C,T,j;i(c.jsx(vI,{assetTabs:(C=e.detailsModal)==null?void 0:C.assetTabs,chains:e.chains,client:n,closeModal:s,connectOptions:e.connectOptions,detailsModal:e.detailsModal,displayBalanceToken:(T=e.detailsButton)==null?void 0:T.displayBalanceToken,locale:t,onDisconnect:e.onDisconnect,supportedNFTs:e.supportedNFTs,supportedTokens:e.supportedTokens,theme:e.theme,showBalanceInFiat:(j=e.detailsButton)==null?void 0:j.showBalanceInFiat}))}const a=e.chain&&r&&r.id!==e.chain.id;if((d=e.detailsButton)!=null&&d.render)return c.jsx("div",{onClick:o,children:c.jsx(e.detailsButton.render,{})});if(e.chain&&a)return c.jsx(qq,{className:(f=e.switchButton)==null?void 0:f.className,connectLocale:t,style:(m=e.switchButton)==null?void 0:m.style,switchNetworkBtnTitle:(y=e.switchButton)==null?void 0:y.label,targetChain:e.chain});const l=`${gr} ${((p=e.detailsButton)==null?void 0:p.className)||""}`,u=(x=(g=e.detailsButton)==null?void 0:g.displayBalanceToken)==null?void 0:x[Number(r==null?void 0:r.id)];return c.jsxs(Qq,{className:l,"data-test":"connected-wallet-details",onClick:o,style:(_=e.detailsButton)==null?void 0:_.style,type:"button",children:[c.jsx(M,{style:{borderRadius:"100%",height:"35px",overflow:"hidden",width:"35px"},children:(b=e.detailsButton)!=null&&b.connectedAccountAvatarUrl?c.jsx("img",{alt:"",src:e.detailsButton.connectedAccountAvatarUrl,style:{height:"100%",objectFit:"cover",width:"100%"}}):c.jsx(Pm,{className:`${gr}__account_avatar`,fallbackComponent:c.jsx(oc,{className:`${gr}__account_avatar`,size:35}),loadingComponent:c.jsx(oc,{className:`${gr}__account_avatar`,size:35}),queryOptions:{refetchOnMount:!1,refetchOnWindowFocus:!1},style:{height:"100%",objectFit:"cover",width:"100%"}})}),c.jsxs(M,{flex:"column",gap:"4xs",style:{borderRadius:`0 ${Z.md} ${Z.md} 0`,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[(I=e.detailsButton)!=null&&I.connectedAccountName?c.jsx(P,{className:`${gr}__address`,color:"primaryText",size:"xs",weight:500,children:e.detailsButton.connectedAccountName}):c.jsx(P,{className:`${gr}__address`,color:"primaryText",size:"xs",weight:500,children:c.jsx(km,{fallbackComponent:c.jsx(tu,{formatFn:_n}),loadingComponent:c.jsx(tu,{formatFn:_n})})}),c.jsx(P,{className:`${gr}__balance`,color:"secondaryText",size:"xs",style:{alignItems:"center",display:"flex",gap:"2px"},weight:400,children:(E=e.detailsButton)!=null&&E.showBalanceInFiat?c.jsxs(c.Fragment,{children:[c.jsx(_o,{chain:r,fallbackComponent:c.jsx(ge,{height:ie.xs,width:"50px"}),loadingComponent:c.jsx(ge,{height:ie.xs,width:"50px"}),tokenAddress:u}),c.jsx(_o,{chain:r,formatFn:Wq,loadingComponent:c.jsx(ge,{height:ie.xs,width:"20px"}),showBalanceInFiat:"USD",tokenAddress:u})]}):c.jsx(_o,{chain:r,fallbackComponent:c.jsx(ge,{height:ie.xs,width:"70px"}),formatFn:Fq,loadingComponent:c.jsx(ge,{height:ie.xs,width:"70px"}),tokenAddress:u})})]})]})};function Wq(e){return` (${Dm({...e,decimals:0})})`}function Fq(e){return`${eu({...e,decimals:e.balance<1?5:4})}`}function vI(e){var O,L,N,v,D,k,U,R,B,F,W,V,Y,Q,G,ne,ce,q,he,re,se,le,Le,Fe,rt,mt,ue,fe,Ye,st,ot;const[t,n]=w.useState("main"),{disconnect:i}=Gu(),[r,s]=w.useState(!0),{client:o,locale:a}=e,l=_t(),u=Tt(),d=A3(e.theme),f=bt(),m=lv(l),y=Yu(l),p=!(f!=null&&f.switchChain),g=mm({size:"compact",wallets:f?[f]:[],welcomeScreen:void 0}),x=w.useCallback(()=>{s(!1),ql(()=>{e.closeModal()})},[e.closeModal]);function _(de){s(!1),e.closeModal(),e.onDisconnect(de)}w.useEffect(()=>{u||x()},[u,x]);const{hideSendFunds:b,hideReceiveFunds:I,hideBuyFunds:E}=e.detailsModal||{},C=b&&I&&E,T=c.jsxs(M,{style:{height:`${A.xl}px`,position:"relative",width:`${A.xl}px`},children:[c.jsx(M,{style:{borderRadius:"100%",height:"100%",overflow:"hidden",width:"100%"},children:(O=e.detailsModal)!=null&&O.connectedAccountAvatarUrl?c.jsx("img",{alt:"",src:e.detailsModal.connectedAccountAvatarUrl,style:{height:"100%",objectFit:"cover",width:"100%"}}):u&&c.jsx(Pm,{fallbackComponent:c.jsx(oc,{size:Number(A.xxl)}),loadingComponent:c.jsx(oc,{size:Number(A.xxl)}),style:{height:"100%",objectFit:"cover",width:"100%"}})}),(L=e.detailsModal)!=null&&L.hideSwitchWallet?null:c.jsx(M,{style:{bottom:-2,position:"absolute",right:-2},children:c.jsx(Dz,{padding:"4px",style:{background:d.colors.modalBg},children:f&&c.jsx(si,{client:o,id:f.id,size:"12",style:{borderRadius:0}})})})]});let j=c.jsxs("div",{className:`${gr}__default_modal_screen`,children:[c.jsx($,{y:"xs"}),c.jsxs(M,{center:"y",flex:"row",gap:"sm",px:"lg",style:{paddingBottom:C?z.md:z.lg,paddingTop:z.lg},children:[(N=e.detailsModal)!=null&&N.hideSwitchWallet?T:c.jsx(Jl,{tip:"Switch wallet",children:c.jsx("div",{onClick:()=>{n("wallet-manager")},onKeyDown:de=>{de.key==="w"&&n("wallet-manager")},style:{cursor:"pointer"},children:T})}),c.jsxs(M,{flex:"column",gap:"3xs",children:[c.jsxs("div",{style:{alignItems:"center",display:"flex",gap:z.xxs},children:[(v=e.detailsModal)!=null&&v.connectedAccountName?c.jsx(P,{color:"primaryText",size:"md",weight:500,children:e.detailsModal.connectedAccountName}):c.jsx(P,{color:"primaryText",size:"md",weight:500,children:c.jsx(km,{fallbackComponent:c.jsx(tu,{formatFn:_n}),loadingComponent:c.jsx(tu,{formatFn:_n})})}),c.jsx(Yi,{children:c.jsx(Yo,{text:(u==null?void 0:u.address)||"",tip:a.copyAddress})})]}),c.jsx(Zq,{client:o,locale:a})]})]}),!C&&c.jsxs(c.Fragment,{children:[c.jsx(M,{px:"lg",children:c.jsxs(M,{className:"tw-highlight-buttons",style:{display:"flex",gap:z.xs},children:[!b&&c.jsxs(ae,{className:"tw-highlight-button__send",onClick:()=>{n("send")},style:{alignItems:"center",display:"flex",flex:1,fontSize:ie.sm,gap:z.xs,padding:z.sm},variant:"outline",children:[c.jsx(M,{center:"both",color:"secondaryText",flex:"row",children:c.jsx(PN,{height:A.sm,style:{transform:"translateY(-10%) rotate(-45deg) "},width:A.sm})}),a.send]}),!I&&c.jsxs(ae,{className:"tw-highlight-button__receive",onClick:()=>{n("receive")},style:{alignItems:"center",display:"flex",flex:1,fontSize:ie.sm,gap:z.xs,padding:z.sm},variant:"outline",children:[c.jsx(M,{center:"both",color:"secondaryText",flex:"row",children:c.jsx(zN,{height:A.sm,width:A.sm})}),a.receive]}),!E&&y.data&&!y.data.testnet&&c.jsxs(ae,{className:"tw-highlight-button__buy",onClick:()=>{xn({client:o,event:"details_modal_buy_click",walletAddress:u==null?void 0:u.address,walletType:f==null?void 0:f.id}),n("buy")},style:{alignItems:"center",display:"flex",flex:1,fontSize:ie.sm,gap:z.xs,padding:z.sm},variant:"outline",children:[c.jsx(M,{center:"both",color:"secondaryText",flex:"row",children:c.jsx(Ku,{height:A.sm,width:A.sm})}),a.buy]})]})}),c.jsx($,{y:"md"})]}),c.jsxs(M,{px:"md",children:[c.jsxs(M,{flex:"column",style:{gap:"1px"},children:[c.jsx(Yq,{client:e.client,disableSwitchChain:p,displayBalanceToken:e.displayBalanceToken,setScreen:()=>n("network-switcher"),showBalanceInFiat:(D=e.detailsModal)==null?void 0:D.showBalanceInFiat}),c.jsxs(Rn,{className:"tw-view-transactions-button",onClick:()=>{n("transactions")},style:{fontSize:ie.sm},children:[c.jsx(YN,{height:A.md,width:A.md}),c.jsx(M,{center:"y",flex:"row",gap:"xs",children:c.jsx(P,{color:"primaryText",children:a.transactions})})]}),(e.assetTabs===void 0||e.assetTabs.length>0)&&c.jsxs(Rn,{className:"tw-view-assets-button",onClick:()=>{n("view-assets")},style:{fontSize:ie.sm},children:[c.jsx(fd,{size:A.md}),c.jsx(P,{color:"primaryText",children:a.viewFunds.viewAssets})]}),c.jsxs(Rn,{className:"tw-manage-wallet-button",onClick:()=>{n("manage-wallet")},style:{fontSize:ie.sm},children:[c.jsx(Rs,{size:A.md}),c.jsx(P,{color:"primaryText",children:e.locale.manageWallet.title})]}),(((k=e.detailsModal)==null?void 0:k.showTestnetFaucet)??!1)&&(m.faucets.length>0||(l==null?void 0:l.id)===Bq)&&c.jsxs(Uz,{className:"tw-request-testnet-funds-button",as:"a",href:m.faucets?m.faucets[0]:"#",style:{color:"inherit",textDecoration:"none"},target:"_blank",children:[c.jsx(M,{center:"both",color:"secondaryText",flex:"row",children:c.jsx(Rz,{size:A.md})}),a.requestTestnetFunds]}),((U=e.detailsModal)==null?void 0:U.footer)&&c.jsx(e.detailsModal.footer,{close:x})]}),c.jsx($,{y:"md"})]}),((R=e.detailsModal)==null?void 0:R.hideDisconnect)!==!0&&c.jsxs(M,{children:[c.jsx(We,{}),c.jsx($,{y:"sm"}),c.jsx(M,{px:"md",children:c.jsxs(Rn,{className:"tw-disconnect-wallet-button","data-variant":"danger",onClick:()=>{f&&u&&(i(f),_({account:u,wallet:f}))},type:"button",children:[c.jsx(vN,{height:A.md,width:A.md}),c.jsx(P,{color:"primaryText",children:a.disconnectWallet})]})}),c.jsx($,{y:"sm"})]})]});if(t==="transactions"&&(j=c.jsx($q,{client:o,closeModal:x,locale:a,onBack:()=>n("main"),setScreen:n,title:a.buy})),t==="wallet-manager"&&u&&l&&f&&(j=c.jsx(SR,{accountAbstraction:(B=e.connectOptions)==null?void 0:B.accountAbstraction,activeAccount:u,activeChain:l,activeWallet:f,appMetadata:(F=e.connectOptions)==null?void 0:F.appMetadata,chain:(W=e.connectOptions)==null?void 0:W.chain,chains:(V=e.connectOptions)==null?void 0:V.chains,client:o,connectLocale:a,hiddenWallets:(Y=e.connectOptions)==null?void 0:Y.hiddenWallets,onBack:()=>n("main"),recommendedWallets:(Q=e.connectOptions)==null?void 0:Q.recommendedWallets,showAllWallets:!!((G=e.connectOptions)!=null&&G.showAllWallets),walletConnect:(ne=e.connectOptions)==null?void 0:ne.walletConnect,wallets:(ce=e.connectOptions)==null?void 0:ce.wallets})),t==="network-switcher")j=c.jsx(Nb,{chains:l&&e.chains.find(de=>de.id===l.id)===void 0?[l,...e.chains]:e.chains,client:o,closeModal:x,connectLocale:a,networkSelector:(q=e.detailsModal)==null?void 0:q.networkSelector,onBack:()=>{n("main")}});else if(t==="view-assets")j=c.jsx(x$,{assetTabs:(he=e.detailsModal)==null?void 0:he.assetTabs,client:o,connectLocale:a,onBack:()=>{n("main")},setScreen:n,supportedNFTs:e.supportedNFTs,supportedTokens:e.supportedTokens,theme:e.theme});else if(t==="view-nfts")j=c.jsx(g$,{client:o,connectLocale:a,onBack:()=>{n("main")},supportedNFTs:e.supportedNFTs,theme:e.theme});else if(t==="view-tokens")j=c.jsx(w$,{client:o,connectLocale:a,onBack:()=>{n("main")},supportedTokens:e.supportedTokens});else if(t==="private-key")j=c.jsx(DU,{client:o,connectLocale:a,onBack:()=>{n("manage-wallet")},theme:e.theme,wallet:f});else if(t==="manage-wallet")j=c.jsx(SU,{client:o,closeModal:x,locale:a,onBack:()=>{n("main")},manageWallet:(re=e.detailsModal)==null?void 0:re.manageWallet,setScreen:n});else if(t==="wallet-connect-receiver")j=c.jsx(kq,{chains:e.chains,client:o,onBack:()=>{n("manage-wallet")}});else if(t==="linked-profiles")j=c.jsx(kR,{client:o,locale:a,onBack:()=>n("manage-wallet"),setScreen:n});else if(t==="link-profile")j=c.jsx(TU,{client:o,locale:a,onBack:()=>{n("linked-profiles")},walletConnect:(se=e.connectOptions)==null?void 0:se.walletConnect});else if(t==="send")j=c.jsx(JU,{client:o,connectLocale:a,onBack:()=>{n("main")},supportedTokens:e.supportedTokens});else if(t==="receive")j=c.jsx(PU,{client:o,connectLocale:a,onBack:()=>{n("main")},walletId:f==null?void 0:f.id});else if(t==="buy"){const de=((rt=(Fe=(Le=(le=e.detailsModal)==null?void 0:le.payOptions)==null?void 0:Le.prefillBuy)==null?void 0:Fe.chain)==null?void 0:rt.id)||(l==null?void 0:l.id)||((mt=e.chains[0])==null?void 0:mt.id)||1;j=c.jsx(Nz,{amount:((Ye=(fe=(ue=e.detailsModal)==null?void 0:ue.payOptions)==null?void 0:fe.prefillBuy)==null?void 0:Ye.amount)||"0.01",chain:Pe(de),client:o,hiddenWallets:(st=e.detailsModal)==null?void 0:st.hiddenWallets,connectOptions:e.connectOptions,onCancel:()=>n("main"),onSuccess:()=>n("main"),supportedTokens:e.supportedTokens,theme:e.theme,style:{border:"none",borderRadius:Z.lg},tokenAddress:(ot=e.displayBalanceToken)==null?void 0:ot[Number(de)]})}return c.jsx(X1,{theme:e.theme,children:c.jsx(lx,{isOpen:!1,theme:e.theme,children:c.jsx(fm.Provider,{value:g,children:c.jsx(hd,{className:"tw-modal__wallet-details",title:"Manage Wallet",open:r,crossContainerStyles:{display:t==="buy"?"none":"block"},setOpen:de=>{var yt,vt;de||(x(),(yt=e.detailsModal)!=null&&yt.onClose&&((vt=e.detailsModal)==null||vt.onClose(t)))},size:"compact",children:(u==null?void 0:u.address)&&c.jsx(P1,{address:u.address,client:o,children:j})})})})})}function Yq(e){var o,a,l;const{disableSwitchChain:t,setScreen:n,showBalanceInFiat:i,client:r}=e,s=_t();return s?c.jsxs(Rn,{className:"tw-internal-network-switcher-button tw-switch-network-button","data-variant":"primary",disabled:t,onClick:()=>{n("network-switcher")},type:"button",children:[c.jsxs(pb,{chain:s,children:[c.jsx("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:c.jsxs(M,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[c.jsx(xb,{client:r,fallbackComponent:c.jsx("img",{alt:"",src:Jr,style:{height:`${A.md}px`,width:`${A.md}px`}}),loadingComponent:c.jsx(ge,{height:`${A.md}px`,width:`${A.md}px`}),style:{height:`${A.md}px`,width:`${A.md}px`}}),c.jsx(Rm,{className:"tw-chain-active-dot-details-button"})]})}),c.jsxs(P,{color:"primaryText",multiline:!0,size:"md",children:[c.jsx(e0,{fallbackComponent:c.jsxs("span",{children:["Unknown chain #",s==null?void 0:s.id]}),loadingComponent:c.jsx(ge,{height:"16px",width:"150px"})}),c.jsx(P,{color:"secondaryText",size:"xs",children:i?c.jsxs(c.Fragment,{children:[c.jsx(_o,{chain:s,fallbackComponent:c.jsx(ge,{height:"1em",width:"70px"}),formatFn:u=>eu({...u,decimals:7}),loadingComponent:c.jsx(ge,{height:"1em",width:"70px"}),tokenAddress:(o=e.displayBalanceToken)==null?void 0:o[Number(s==null?void 0:s.id)]})," ",c.jsx(_o,{chain:s,formatFn:u=>` (${Dm({...u,decimals:3})})`,loadingComponent:c.jsx(ge,{height:"1em",width:"30px"}),showBalanceInFiat:"USD",tokenAddress:(a=e.displayBalanceToken)==null?void 0:a[Number(s==null?void 0:s.id)]})]}):c.jsx(_o,{chain:s,fallbackComponent:c.jsx(ge,{height:"1em",width:"100px"}),formatFn:u=>eu({...u,decimals:7}),loadingComponent:c.jsx(ge,{height:"1em",width:"100px"}),tokenAddress:(l=e.displayBalanceToken)==null?void 0:l[Number(s==null?void 0:s.id)]})})]})]}),c.jsx(Hq,{height:A.sm,style:{flexShrink:0,marginLeft:"auto"},width:A.sm})]}):null}const Qq=Xi(e=>{const t=X();return{all:"unset","&:hover":{background:t.colors.connectedButtonBgHover,transition:"background 250ms ease"},alignItems:"center",animation:`${Gs} 300ms ease`,background:t.colors.connectedButtonBg,border:`1px solid ${t.colors.borderColor}`,borderRadius:Z.md,boxSizing:"border-box",cursor:"pointer",display:"inline-flex",gap:z.xs,height:"50px",lineHeight:"normal",minWidth:"165px",overflow:"hidden",padding:z.xs,WebkitTapHighlightColor:"transparent"}}),Hq=Be(_N)(()=>({color:X().colors.secondaryText}));function Gq(e){const t=Tt(),n=bt(),i=Vo(n),r=_t(),{client:s,connectLocale:o}=e,[a,l]=w.useState(!1);w.useEffect(()=>{if(t&&i&&t.address&&r){const d=qt({address:t.address,chain:r,client:s});Q5(d).then(f=>{l(f)})}else l(!1)},[t,r,s,i]);const u=c.jsx(M,{center:"y",flex:"row",gap:"3xs",children:c.jsx(P,{color:"secondaryText",size:"xs",weight:400,children:o.connectedToSmartWallet})});return r&&t&&i?c.jsx(c.Fragment,{children:a?c.jsx(Zr,{color:"secondaryText",hoverColor:"primaryText",href:`https://thirdweb.com/${r.id}/${t.address}/account`,size:"sm",target:"_blank",children:u}):c.jsxs(P,{size:"sm",children:[" ",u]})}):null}function Zq(e){const{client:t,locale:n}=e,i=Tt(),r=bt(),s=Hu(),{data:o}=oa(r==null?void 0:r.id),a=Vo(r),{data:l}=xe({enabled:!!(r!=null&&r.id)&&!!o,queryFn:async()=>{const d=await Mx(Ut);return d==="guest"?"Guest":d&&((r==null?void 0:r.id)==="inApp"||(r==null?void 0:r.id)==="smart")&&ed.includes(d)?d.slice(0,1).toUpperCase()+d.slice(1):o==null?void 0:o.name},queryKey:["wallet-name",{walletAddress:i==null?void 0:i.address,walletId:r==null?void 0:r.id}]}),u=xe({enabled:!!s,queryFn:async()=>{var x;if(!(s&&(s.id==="inApp"||s.id.startsWith("ecosystem."))))return null;let f;if(Oe(s)){const _=s,b=(x=_.getConfig())==null?void 0:x.partnerId;f={id:_.id,partnerId:b}}const{getUserEmail:m,getUserPhoneNumber:y}=await h(async()=>{const{getUserEmail:_,getUserPhoneNumber:b}=await Promise.resolve().then(()=>zA);return{getUserEmail:_,getUserPhoneNumber:b}},void 0),[p,g]=await Promise.all([m({client:t,ecosystem:f}),y({client:t,ecosystem:f})]);return p||g||null},queryKey:["in-app-wallet-user",t,i==null?void 0:i.address]});return!u.data&&a?c.jsx(Gq,{client:t,connectLocale:n}):u.data||l?c.jsx(P,{size:"xs",weight:400,children:u.data||l}):c.jsx(ge,{className:"InAppWalletUserInfo__skeleton",height:"10px",width:"50px"})}function qq(e){const t=I3(),[n,i]=w.useState(!1),r=e.connectLocale,s=e.switchNetworkBtnTitle??r.switchNetwork;return c.jsx(ae,{"aria-label":n?r.switchingNetwork:void 0,className:`tw-connect-wallet--switch-network ${e.className||""}`,"data-is-loading":n,"data-test":"switch-network-button",disabled:n,onClick:async()=>{i(!0);try{await t(e.targetChain)}catch(o){console.error(o)}i(!1)},style:{minWidth:"140px",...e.style},type:"button",variant:"primary",children:n?c.jsx($e,{color:"primaryButtonText",size:"sm"}):s})}const Kq=e=>c.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 16 21",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M2 21C1.45 21 0.979333 20.8043 0.588 20.413C0.196 20.021 0 19.55 0 19V9C0 8.45 0.196 7.979 0.588 7.587C0.979333 7.19567 1.45 7 2 7H3V5C3 3.61667 3.48767 2.43733 4.463 1.462C5.43767 0.487333 6.61667 0 8 0C9.38333 0 10.5627 0.487333 11.538 1.462C12.5127 2.43733 13 3.61667 13 5V7H14C14.55 7 15.021 7.19567 15.413 7.587C15.8043 7.979 16 8.45 16 9V19C16 19.55 15.8043 20.021 15.413 20.413C15.021 20.8043 14.55 21 14 21H2ZM8 16C8.55 16 9.021 15.8043 9.413 15.413C9.80433 15.021 10 14.55 10 14C10 13.45 9.80433 12.979 9.413 12.587C9.021 12.1957 8.55 12 8 12C7.45 12 6.97933 12.1957 6.588 12.587C6.196 12.979 6 13.45 6 14C6 14.55 6.196 15.021 6.588 15.413C6.97933 15.8043 7.45 16 8 16ZM5 7H11V5C11 4.16667 10.7083 3.45833 10.125 2.875C9.54167 2.29167 8.83333 2 8 2C7.16667 2 6.45833 2.29167 5.875 2.875C5.29167 3.45833 5 4.16667 5 5V7Z",fill:"currentColor"})}),Jq=e=>{const t=mm({size:e.size,wallets:e.wallets,welcomeScreen:e.welcomeScreen}),n=Zs(),{screen:i,setScreen:r,initialScreen:s}=t,o=IS(),a=ux(),[l,u]=w.useState(!1),d=w.useCallback(()=>{var y;(y=e.onClose)==null||y.call(e),a(!1),ql(()=>{r(s),n({})})},[s,a,r,n,e.onClose]),f=Tt();w.useEffect(()=>{o||ql(()=>{u(!1)})},[o]);const m=w.useCallback(y=>u(!y),[]);return w.useEffect(()=>{o&&i===Wt.signIn&&!f&&(r(s),a(!1))},[s,o,i,a,r,f]),c.jsx(hd,{className:"tw-modal__connect-wallet",title:"Connect Wallet",hide:l,open:o,setOpen:y=>{l||y||d()},size:e.size,children:c.jsx(i_,{accountAbstraction:e.accountAbstraction,auth:e.auth,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,hideHeader:!1,isOpen:o,meta:e.meta,modalHeader:void 0,onClose:d,onConnect:e.onConnect,recommendedWallets:e.recommendedWallets,screenSetup:t,setModalVisibility:m,shouldSetActive:e.shouldSetActive,showAllWallets:e.showAllWallets,size:e.size,walletConnect:e.walletConnect,walletIdsToHide:e.hiddenWallets,wallets:e.wallets,welcomeScreen:e.welcomeScreen})})},R0="tw-connect-wallet";function NI(e){var f,m,y,p,g,x,_,b,I,E,C,T,j,O;const t=w.useMemo(()=>e.wallets||Xu({appMetadata:e.appMetadata,chains:e.chains,executionMode:e.accountAbstraction?{mode:"EIP4337",smartAccount:e.accountAbstraction}:void 0}),[e.wallets,e.appMetadata,e.chains,e.accountAbstraction]),n=JN(e.locale||"en_US"),i=Q1(),r=Tt(),s=bt(),o=W1(s,r,e.auth),a=e.hiddenWallets||((f=e.detailsModal)==null?void 0:f.hiddenWallets);TS({wallets:t}),w.useEffect(()=>{e.chain&&i.defineChains([e.chain])},[e.chain,i]),w.useEffect(()=>{e.chains&&i.defineChains(e.chains)},[e.chains,i]);const l=w.useMemo(()=>{var L;return!LS()||t.length===1?"compact":((L=e.connectModal)==null?void 0:L.size)||"compact"},[t.length,(m=e.connectModal)==null?void 0:m.size]),u=((y=e.accountAbstraction)==null?void 0:y.chain)||e.chain||((p=e.chains)==null?void 0:p[0]),d=e.autoConnect!==!1&&c.jsx(Ix,{accountAbstraction:e.accountAbstraction,appMetadata:e.appMetadata,chain:u,client:e.client,onConnect:e.onConnect,siweAuth:o,timeout:typeof e.autoConnect=="boolean"||(g=e.autoConnect)==null?void 0:g.timeout,wallets:t});if(!n.data){const L=`${((x=e.connectButton)==null?void 0:x.className)||""} ${R0}`;return c.jsxs(U0,{className:L,disabled:!0,style:{height:"50px",minWidth:"165px",...(_=e.connectButton)==null?void 0:_.style},type:"button",variant:"primary",children:[d,c.jsx($e,{color:"primaryButtonText",size:"sm"})]})}return c.jsxs(lx,{isOpen:!1,theme:e.theme,children:[c.jsx(Xq,{...e,connectLocale:n.data,siweAuth:o}),c.jsx(Jq,{accountAbstraction:e.accountAbstraction,auth:e.auth,chain:u,chains:e.chains,client:e.client,connectLocale:n.data,hiddenWallets:a,localeId:e.locale||"en_US",meta:{privacyPolicyUrl:(b=e.connectModal)==null?void 0:b.privacyPolicyUrl,requireApproval:(I=e.connectModal)==null?void 0:I.requireApproval,showThirdwebBranding:(E=e.connectModal)==null?void 0:E.showThirdwebBranding,termsOfServiceUrl:(C=e.connectModal)==null?void 0:C.termsOfServiceUrl,title:(T=e.connectModal)==null?void 0:T.title,titleIconUrl:(j=e.connectModal)==null?void 0:j.titleIcon},onConnect:e.onConnect,recommendedWallets:e.recommendedWallets,shouldSetActive:!0,showAllWallets:e.showAllWallets,size:l,walletConnect:e.walletConnect,wallets:t,welcomeScreen:(O=e.connectModal)==null?void 0:O.welcomeScreen}),d]})}function Xq(e){var y,p,g,x,_,b,I,E,C,T,j;const t=e.siweAuth,n=Tt(),[i,r]=w.useState(!1),s=e.hiddenWallets||((y=e.detailsModal)==null?void 0:y.hiddenWallets);w.useEffect(()=>{n||r(!1)},[n]);const o=e.theme||"dark",a=uv(),l=e.connectLocale,u=a==="connecting",d=((p=e.connectButton)==null?void 0:p.label)||l.defaultButtonTitle,f=ux(),m=w.useMemo(()=>{if(!e.supportedTokens)return;const O={...nc};for(const L in e.supportedTokens){const N=Number(L),v=e.supportedTokens[N];v&&(O[N]=v)}return O},[e.supportedTokens]);if(!n){const O=`${((g=e.connectButton)==null?void 0:g.className)||""} ${R0}`;return c.jsx(U0,{"aria-label":a==="connecting"?l.connecting:typeof d=="string"?d:l.defaultButtonTitle,className:O,"data-is-loading":u,"data-test":"connect-wallet-button","data-theme":o,disabled:u,onClick:()=>{f(!0)},style:{fontSize:"16px",height:"50px",minWidth:"165px",...(x=e.connectButton)==null?void 0:x.style},type:"button",variant:"primary",children:u?c.jsx($e,{color:"primaryButtonText",size:"sm"}):d})}if(t.requiresAuth){if(t.isPending||t.isLoggingIn||t.isLoggingOut){const O=`${((_=e.connectButton)==null?void 0:_.className)||""} ${R0}`;return c.jsx(U0,{className:O,disabled:!0,style:{height:"50px",minWidth:"165px",...(b=e.connectButton)==null?void 0:b.style},type:"button",variant:"primary",children:c.jsx($e,{color:"primaryButtonText",size:"sm"})})}if(!t.isLoggedIn)return c.jsxs(c.Fragment,{children:[c.jsx(ae,{className:(I=e.signInButton)==null?void 0:I.className,onClick:()=>{r(!0)},style:{minHeight:"50px",minWidth:"165px",...(E=e.signInButton)==null?void 0:E.style},type:"button",variant:"primary",children:t.isLoggingIn?c.jsx($e,{color:"primaryButtonText",size:"sm"}):c.jsxs(M,{center:"y",flex:"row",gap:"sm",children:[c.jsx(Kq,{size:A.sm}),c.jsxs("span",{children:[" ",((C=e.signInButton)==null?void 0:C.label)||l.signIn," "]})]})}),c.jsx(hd,{className:"tw-modal__sign-in",title:"Sign in",open:i,setOpen:r,size:"compact",children:c.jsx(Wx,{auth:e.auth,client:e.client,connectLocale:l,modalSize:"compact",onDone:()=>r(!1),privacyPolicyUrl:(T=e.connectModal)==null?void 0:T.privacyPolicyUrl,termsOfServiceUrl:(j=e.connectModal)==null?void 0:j.termsOfServiceUrl})})]})}return c.jsx(P1,{address:n.address,client:e.client,children:c.jsx(Vq,{chain:e.chain,chains:(e==null?void 0:e.chains)||[],client:e.client,connectLocale:l,connectOptions:{accountAbstraction:e.accountAbstraction,appMetadata:e.appMetadata,chain:e.chain,chains:e.chains,connectModal:e.connectModal,hiddenWallets:s,recommendedWallets:e.recommendedWallets,showAllWallets:e.showAllWallets,walletConnect:e.walletConnect,wallets:e.wallets},detailsButton:e.detailsButton,detailsModal:{...e.detailsModal,hiddenWallets:s},onDisconnect:O=>{var L;t.requiresAuth&&t.doLogout(),(L=e.onDisconnect)==null||L.call(e,O)},supportedNFTs:e.supportedNFTs,supportedTokens:m,switchButton:e.switchButton,theme:o})})}const U0=Be(ae)({animation:`${Gs} 300ms ease`});function $0(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,i;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!$0(e[i],t[i]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e);if(n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.hasOwn(t,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(s&&!$0(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function eK(e,t){return $0(e,t)?e:Fu(e,t)}function tK(e){const[t,n]=w.useState(null),[i]=w.useState(()=>new Gj({defaultOptions:{mutations:{onSettled:(r,s,o)=>{Cj(o)&&Fl(r,["transactionHash"])&&Fl(o,["client","chain"])&&Vu({chain:o.chain,client:o.client,transactionHash:r.transactionHash}).catch(a=>{console.error("[Transaction Error]",a)}).then(()=>{var a,l,u;return Promise.all([i.invalidateQueries({queryKey:["readContract",((a=o.__contract)==null?void 0:a.chain.id)||o.chain.id,((l=o.__contract)==null?void 0:l.address)||o.to]}),x3(i,((u=o.__contract)==null?void 0:u.chain.id)||o.chain.id)])})}},queries:{staleTime:60*1e3,structuralSharing:eK}}}));return c.jsx(_3.Provider,{value:e.manager,children:c.jsxs(ev,{client:i,children:[c.jsx(N3.Provider,{value:n,children:e.children}),t]})})}function nK(e){const t=w.useMemo(()=>e.connectionManager||rA(Ut),[e.connectionManager]);return c.jsx(tK,{manager:t,children:e.children})}const iK=HI().thirdweb,J2=dC({clientId:iK.clientId}),rK=()=>{const{connect:e}=b3(),[t,n]=w.useState(!1);return w.useEffect(()=>{e(async()=>{const i=kf();return await i.autoConnect({client:J2}),i}).then(i=>{i&&n(!0)}).catch(()=>{})},[e]),t?c.jsx(NI,{client:J2,wallets:[kf()],theme:"dark",connectModal:{size:"compact"},detailsButton:{style:{width:"100%"}}}):null},sK=()=>c.jsx(nK,{children:c.jsx(rK,{})}),AX=Object.freeze(Object.defineProperty({__proto__:null,default:sK},Symbol.toStringTag,{value:"Module"}));export{fC as $,jI as A,TI as B,bm as C,jq as D,Du as E,nt as F,lw as G,on as H,_j as I,gd as J,Ym as K,Ke as L,Go as M,NX as N,ly as O,sI as P,vl as Q,As as R,wr as S,ut as T,Qe as U,yc as V,ts as W,qt as X,TY as Y,w1 as Z,Kh as _,Sc as a,ea as a$,Vu as a0,ym as a1,M as a2,be as a3,Xe as a4,A as a5,Ju as a6,$ as a7,Kx as a8,id as a9,ni as aA,EE as aB,ju as aC,na as aD,Lu as aE,_5 as aF,jc as aG,PL as aH,bn as aI,XC as aJ,cJ as aK,Vy as aL,Ew as aM,qa as aN,HC as aO,Iw as aP,eL as aQ,lJ as aR,m1 as aS,$o as aT,O1 as aU,js as aV,ME as aW,NK as aX,Uu as aY,z5 as aZ,BJ as a_,sd as aa,ES as ab,Zs as ac,Jx as ad,wt as ae,lU as af,wU as ag,BR as ah,MU as ai,VR as aj,Un as ak,we as al,Su as am,$w as an,QL as ao,Gr as ap,ta as aq,PJ as ar,bv as as,mf as at,_u as au,ii as av,F7 as aw,p5 as ax,hp as ay,Y5 as az,Pe as b,YJ as b$,Q5 as b0,Zt as b1,zu as b2,ve as b3,ft as b4,UJ as b5,kT as b6,vy as b7,MT as b8,TT as b9,px as bA,Wu as bB,He as bC,Sj as bD,JJ as bE,K0 as bF,KJ as bG,I1 as bH,GJ as bI,zJ as bJ,qJ as bK,VJ as bL,jj as bM,n5 as bN,Nj as bO,XJ as bP,eX as bQ,ZJ as bR,i5 as bS,r5 as bT,Vo as bU,it as bV,gm as bW,iX as bX,Y7 as bY,kc as bZ,Ut as b_,AT as ba,$J as bb,vT as bc,q4 as bd,N1 as be,zB as bf,_X as bg,Lp as bh,rM as bi,uc as bj,SB as bk,iM as bl,RB as bm,bX as bn,xX as bo,au as bp,IX as bq,MX as br,Vn as bs,hC as bt,wj as bu,F5 as bv,gx as bw,Jn as bx,rf as by,H5 as bz,Gt as c,jC as c$,Fs as c0,UK as c1,Gx as c2,rX as c3,ed as c4,SS as c5,QJ as c6,HJ as c7,RK as c8,OK as c9,pC as cA,wC as cB,xC as cC,HK as cD,GK as cE,_C as cF,Uy as cG,bC as cH,gw as cI,ZK as cJ,qK as cK,KK as cL,IC as cM,ef as cN,pw as cO,CC as cP,EC as cQ,LC as cR,TC as cS,eJ as cT,WK as cU,xw as cV,ww as cW,_w as cX,NC as cY,SC as cZ,AC as c_,cC as ca,gJ as cb,kn as cc,Wl as cd,rJ as ce,ht as cf,uJ as cg,n9 as ch,xL as ci,tt as cj,SJ as ck,Za as cl,f1 as cm,Hr as cn,Ka as co,Ns as cp,Rr as cq,Bw as cr,p1 as cs,Nw as ct,Mw as cu,FK as cv,YK as cw,QK as cx,mw as cy,yw as cz,Gl as d,Z8 as d$,i9 as d0,r9 as d1,s9 as d2,HL as d3,NL as d4,vL as d5,ZL as d6,t9 as d7,pL as d8,wL as d9,g1 as dA,vu as dB,yL as dC,Hw as dD,Gw as dE,NJ as dF,tw as dG,DK as dH,Cu as dI,Bl as dJ,Lc as dK,pK as dL,H8 as dM,bK as dN,gK as dO,yK as dP,IK as dQ,_K as dR,G8 as dS,xK as dT,wK as dU,Y4 as dV,Q4 as dW,s1 as dX,MK as dY,EK as dZ,fK as d_,vC as da,Dw as db,zw as dc,Rw as dd,bi as de,Uw as df,MJ as dg,oJ as dh,DC as di,OC as dj,RC as dk,UC as dl,y1 as dm,bw as dn,e9 as dp,CJ as dq,Fw as dr,KL as ds,EJ as dt,Ww as du,Vw as dv,LJ as dw,Yw as dx,IJ as dy,WL as dz,V4 as e,mK as e0,zK as e1,PK as e2,x7 as e3,mC as e4,VK as e5,$K as e6,BK as e7,Bo as e8,wJ as e9,nJ as ea,JL as eb,SL as ec,XL as ed,Ow as ee,_L as ef,pJ as eg,dL as eh,ga as ei,aJ as ej,Vl as ek,fJ as el,dJ as em,yC as en,pt as eo,B8 as ep,hK as eq,W4 as er,t1 as es,AJ as et,DJ as eu,OJ as ev,xj as ew,oX as ex,AX as ey,Y3 as f,nX as g,Me as h,me as i,M1 as j,o9 as k,Tc as l,Ue as m,ri as n,ex as o,rm as p,U8 as q,Bu as r,tX as s,E1 as t,Ys as u,Qw as v,$u as w,vc as x,Nu as y,SX as z};