@acedatacloud/nexior 3.58.0 → 3.59.0

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 (245) hide show
  1. package/dist/assets/{Auth-DYGNDqCW.js → Auth-BOjoGVPa.js} +1 -1
  2. package/dist/assets/{BotPlaceholder-ChCb8Vv8.js → BotPlaceholder-iP-I_96W.js} +1 -1
  3. package/dist/assets/{Callback-D6hA0ji-.js → Callback-DwQ-y6wb.js} +1 -1
  4. package/dist/assets/{Console-CD1F8NGN.js → Console-CP4EPQ7U.js} +1 -1
  5. package/dist/assets/{Consumption-DfeDOZae.js → Consumption-BnXzOUE_.js} +1 -1
  6. package/dist/assets/{Conversation-B4PNsemL.js → Conversation-Bpz-s8PZ.js} +1 -1
  7. package/dist/assets/{CopyToClipboard-BM_lDXUt.js → CopyToClipboard-fn_nwY_d.js} +1 -1
  8. package/dist/assets/{Detail-aNp4-Sp1.js → Detail-BJua1nTD.js} +2 -2
  9. package/dist/assets/{EditArray-CBdYV5V0.js → EditArray-BIIirHzH.js} +1 -1
  10. package/dist/assets/{Extra-CmpCn6PS.js → Extra-W0lSoPdR.js} +1 -1
  11. package/dist/assets/{FilePreview-D29J-g_1.js → FilePreview-CACmXSY6.js} +1 -1
  12. package/dist/assets/{History-CW8HZxm2.js → History-EUHYPb2e.js} +1 -1
  13. package/dist/assets/{IconPark.vue_vue_type_script_setup_true_lang-7d4twQSG.js → IconPark.vue_vue_type_script_setup_true_lang-CLYzZ3mY.js} +1 -1
  14. package/dist/assets/{ImagePreview-DfqytLVt.js → ImagePreview-PJxjd25O.js} +1 -1
  15. package/dist/assets/{ImageWrapper-BvdzaQyW.js → ImageWrapper-DmiNXaFI.js} +1 -1
  16. package/dist/assets/{Index-5Ew_nUjP.js → Index-1_WFSK0z.js} +1 -1
  17. package/dist/assets/{Index-B6B3lGgv.js → Index-BIAKbrS3.js} +1 -1
  18. package/dist/assets/{Index-BBXhcLe3.js → Index-BR-mtCNa.js} +1 -1
  19. package/dist/assets/{Index-BN68BETM.js → Index-BRG5rlvr.js} +1 -1
  20. package/dist/assets/{Index-Cv8w1bl-.js → Index-BVA2uzlh.js} +1 -1
  21. package/dist/assets/{Index-BhbrHnuw.js → Index-BVAhoPx0.js} +1 -1
  22. package/dist/assets/{Index-03DGesjV.js → Index-BdzRcEDi.js} +1 -1
  23. package/dist/assets/{Index-DtH3VYmQ.js → Index-BqTiqn85.js} +1 -1
  24. package/dist/assets/{Index-qsmXsP0U.js → Index-BvjpqTjG.js} +1 -1
  25. package/dist/assets/{Index-QvBxzlbu.js → Index-C2NkzdFT.js} +1 -1
  26. package/dist/assets/{Index-BeyI91Ap.js → Index-C4PtvABe.js} +1 -1
  27. package/dist/assets/{Index-DZFHVttQ.js → Index-CFXCOs0b.js} +1 -1
  28. package/dist/assets/{Index-DceE04r8.js → Index-ChCLXFc-.js} +1 -1
  29. package/dist/assets/{Index-KBisOGIs.js → Index-CtMp9pcO.js} +1 -1
  30. package/dist/assets/{Index-BKrksj2b.js → Index-Cv-CA2to.js} +1 -1
  31. package/dist/assets/{Index-Cm5jI-BT.js → Index-D9a4aKlK.js} +1 -1
  32. package/dist/assets/{Index-DzBiOr6Q.js → Index-DGhlT5Am.js} +1 -1
  33. package/dist/assets/{Index-CIDu_0km.js → Index-DTU40i5N.js} +1 -1
  34. package/dist/assets/{Index-DFsTf4U0.js → Index-DXS-pKWy.js} +1 -1
  35. package/dist/assets/{Index-BL5xyEGb.js → Index-O0hNM4DY.js} +1 -1
  36. package/dist/assets/{Index-Bm0mOK1G.js → Index-U2Th7MFb.js} +1 -1
  37. package/dist/assets/{Index-DKUupcBI.js → Index-aVCnReDH.js} +1 -1
  38. package/dist/assets/{Index-BmlsKknA.js → Index-fAVlBArK.js} +1 -1
  39. package/dist/assets/{Index-CFv_2F4m.js → Index-okUMsiI8.js} +1 -1
  40. package/dist/assets/{Invitees-DambzAZ5.js → Invitees-DTc-uRwH.js} +1 -1
  41. package/dist/assets/{List-Gv-kPRLv.js → List-CHbGTPix.js} +1 -1
  42. package/dist/assets/{List-CRrgHzH8.js → List-CPoQS59d.js} +1 -1
  43. package/dist/assets/{List-Cb2kPVhy.js → List-CwQZ8l7n.js} +1 -1
  44. package/dist/assets/{Main-B_OQq6Hu.js → Main-DFOFHNzz.js} +1 -1
  45. package/dist/assets/{Navigator-hKVLCxHm.js → Navigator-DX0ngNUw.js} +1 -1
  46. package/dist/assets/{NoTasks-BQcfOWR1.js → NoTasks-6jLB0z0S.js} +1 -1
  47. package/dist/assets/{NotFound-D9G0sMKY.js → NotFound-CYDiS0xZ.js} +1 -1
  48. package/dist/assets/{OAuthCallback-Bft7N_6M.js → OAuthCallback-DdC1XcIn.js} +1 -1
  49. package/dist/assets/{Pagination-CwKQPumN.js → Pagination-Dv0q3YQm.js} +1 -1
  50. package/dist/assets/{ScrollList-Ct0Km1sY.js → ScrollList-B_os7rKv.js} +1 -1
  51. package/dist/assets/{Status-CmGIO8J1.js → Status-C-yGWs1P.js} +1 -1
  52. package/dist/assets/{Subscribe-jOjSvjKO.js → Subscribe-X9LorY-E.js} +1 -1
  53. package/dist/assets/{TransportWebHID-ZBNiW_Ch.js → TransportWebHID-OXnRnpHk.js} +1 -1
  54. package/dist/assets/{VideoPlayer-BkUkC5yH.js → VideoPlayer-j9EDNteq.js} +1 -1
  55. package/dist/assets/{_Uint8Array-DRbO7RkA.js → _Uint8Array-TWgJfHaq.js} +1 -1
  56. package/dist/assets/{_baseClone-DHUSso_K.js → _baseClone-BwQqJ6Mj.js} +1 -1
  57. package/dist/assets/{_baseIteratee-hfdFxZm7.js → _baseIteratee-DqzoSbDh.js} +1 -1
  58. package/dist/assets/{_initCloneObject-B2aXh2fK.js → _initCloneObject-CuFnHNvQ.js} +1 -1
  59. package/dist/assets/{add-DhadK362.js → add-CendK0-H.js} +1 -1
  60. package/dist/assets/{all-wallets-Ni8qhSZL.js → all-wallets-B_EF6tBT.js} +1 -1
  61. package/dist/assets/{app-store-DVcmMDzD.js → app-store-IHq7fpLc.js} +1 -1
  62. package/dist/assets/{apple-BOu8fl8n.js → apple-CPWBnBin.js} +1 -1
  63. package/dist/assets/{arrow-bottom-circle-DfpGNMRg.js → arrow-bottom-circle-b0lIeqpI.js} +1 -1
  64. package/dist/assets/{arrow-bottom-wRnCvG-y.js → arrow-bottom-yMTVaw4-.js} +1 -1
  65. package/dist/assets/{arrow-left-CRlumsiB.js → arrow-left-Dj0tO_fN.js} +1 -1
  66. package/dist/assets/{arrow-right-rAXL4ENL.js → arrow-right-bichMKoP.js} +1 -1
  67. package/dist/assets/{arrow-top-DB51jSRj.js → arrow-top-BBr2PAsE.js} +1 -1
  68. package/dist/assets/{avatar-BO8ODAAQ.js → avatar-cr7dNZBa.js} +1 -1
  69. package/dist/assets/{bank-9ZOJ8L3s.js → bank-cCH7VqID.js} +1 -1
  70. package/dist/assets/{basic-BKQ-9IWm.js → basic-00GXVSWf.js} +1 -1
  71. package/dist/assets/{browser-CO2zYrsc.js → browser-CXCm-Abw.js} +1 -1
  72. package/dist/assets/{card-BONzkVYn.js → card-CNzCiFDZ.js} +1 -1
  73. package/dist/assets/{castArray-boTYBhhU.js → castArray-CdYPRNOL.js} +1 -1
  74. package/dist/assets/{chat-BnbsSb28.js → chat-7gz06CCd.js} +1 -1
  75. package/dist/assets/{checkmark-BVayYgzC.js → checkmark-DoBvoJpb.js} +1 -1
  76. package/dist/assets/{checkmark-bold-BNy9Wrun.js → checkmark-bold-DleRkBmA.js} +1 -1
  77. package/dist/assets/{chevron-bottom-CxFddH5r.js → chevron-bottom-4oh8Xz_q.js} +1 -1
  78. package/dist/assets/{chevron-left-BYh0usVR.js → chevron-left-Dis9zIiD.js} +1 -1
  79. package/dist/assets/{chevron-right-oL5SSFS-.js → chevron-right-GHe1pMm-.js} +1 -1
  80. package/dist/assets/{chevron-top-DjwqpzIA.js → chevron-top-CBTdWZ7A.js} +1 -1
  81. package/dist/assets/{chrome-store-B6OHi5WC.js → chrome-store-D2T3bboy.js} +1 -1
  82. package/dist/assets/{clock-C5C_CaH6.js → clock-BWsM_Jwe.js} +1 -1
  83. package/dist/assets/{close-CvZTt_oz.js → close-C6e31_6B.js} +1 -1
  84. package/dist/assets/{coinPlaceholder-DZokdzDS.js → coinPlaceholder-txtFkOvp.js} +1 -1
  85. package/dist/assets/common-BjTyswUh.js +1 -0
  86. package/dist/assets/common-Dv6xK4CK.js +1 -0
  87. package/dist/assets/{compass-B3rqEe9w.js → compass-e3AQ35--.js} +1 -1
  88. package/dist/assets/{copy-DFZolEQK.js → copy-BC6zw_Cv.js} +1 -1
  89. package/dist/assets/{cursor-DjniHeDZ.js → cursor-AdyvKAuU.js} +1 -1
  90. package/dist/assets/{cursor-transparent-DI-y0M24.js → cursor-transparent-Cg_-p5l3.js} +1 -1
  91. package/dist/assets/{debounce-CVEmZFNe.js → debounce-zrV8olMo.js} +1 -1
  92. package/dist/assets/{desktop-C_HwU0UG.js → desktop-BvgMbGSK.js} +1 -1
  93. package/dist/assets/{disconnect-DDQS_OiL.js → disconnect-BaqkNod6.js} +1 -1
  94. package/dist/assets/{discord-CQ3KrLAd.js → discord-6H4TlK-L.js} +1 -1
  95. package/dist/assets/{distribution-tRLoajUC.js → distribution-RxK_GLVV.js} +1 -1
  96. package/dist/assets/{dropdown-Di-OQgFj.js → dropdown-BboSGDnv.js} +1 -1
  97. package/dist/assets/{etherscan-CM7uLO7K.js → etherscan-Dqi3hxAV.js} +1 -1
  98. package/dist/assets/{exclamation-triangle-DIIgA_js.js → exclamation-triangle-DYdohtZq.js} +1 -1
  99. package/dist/assets/{extension-DyvmlZM2.js → extension-Cnq7nqgE.js} +1 -1
  100. package/dist/assets/{external-link-BhmKJ37p.js → external-link-44k69Npx.js} +1 -1
  101. package/dist/assets/{facebook-DSC3nSpY.js → facebook-CQ_cre7D.js} +1 -1
  102. package/dist/assets/{farcaster-CjMNvEMi.js → farcaster-zj-Ydc_8.js} +1 -1
  103. package/dist/assets/{filters-WkKrBs_-.js → filters-CHkFvtIR.js} +1 -1
  104. package/dist/assets/{flux-BuXPvQIy.js → flux-BI18HbWX.js} +1 -1
  105. package/dist/assets/{github-BqamU31R.js → github-BHuS0aDn.js} +1 -1
  106. package/dist/assets/{google-DdqSu_Y-.js → google-BS10DCBP.js} +1 -1
  107. package/dist/assets/{hailuo-KQG2WmuV.js → hailuo-c79hvE-k.js} +1 -1
  108. package/dist/assets/{headshots-XMemsZ0g.js → headshots-BejJSgAc.js} +1 -1
  109. package/dist/assets/{help-circle-DhFYS3R2.js → help-circle-DTk_Rl8g.js} +1 -1
  110. package/dist/assets/{id-Cx8qcdPw.js → id-DaPMErfb.js} +1 -1
  111. package/dist/assets/{image-Maq0XRYp.js → image-CiLnnndp.js} +1 -1
  112. package/dist/assets/{index-DmGUQNIF.js → index-A2RiK2Pv.js} +1 -1
  113. package/dist/assets/{index-D07OZdqt.js → index-B7Vd6ecw.js} +1 -1
  114. package/dist/assets/{index-C6aOwQV6.js → index-BGV6cpWg.js} +1 -1
  115. package/dist/assets/{index-BI8dCsU_.js → index-BHNlEm5l.js} +1 -1
  116. package/dist/assets/{index-CaUDDPQ_.js → index-BPAIr1xJ.js} +3 -3
  117. package/dist/assets/{index-DXs08-vF.js → index-BPEcq-yg.js} +1 -1
  118. package/dist/assets/{index-BrzeY6o4.js → index-BZndR7tm.js} +1 -1
  119. package/dist/assets/{index-DVhJKDru.js → index-Bf0J1OEE.js} +1 -1
  120. package/dist/assets/{index-Di6x4d6J.js → index-BgrTTau2.js} +1 -1
  121. package/dist/assets/{index-Cz_pUAj0.js → index-Bn0JrXX8.js} +1 -1
  122. package/dist/assets/{index-DdlRdmBp.js → index-C0MCBiqd.js} +1 -1
  123. package/dist/assets/{index-Bbo9QFjr.js → index-C3oNk2nU.js} +1 -1
  124. package/dist/assets/{index-C0OivO0I.js → index-C45Qn_Vn.js} +1 -1
  125. package/dist/assets/{index-CJgc03o7.js → index-C6nlXAq5.js} +1 -1
  126. package/dist/assets/{index-BI0gGf-3.js → index-CLM-XFzI.js} +1 -1
  127. package/dist/assets/{index-Dt1mN8jC.js → index-CRaNDzK3.js} +1 -1
  128. package/dist/assets/{index-CgATUzcB.js → index-CX0i29jq.js} +1 -1
  129. package/dist/assets/{index-DBY6jjcR.js → index-CYbiCdsV.js} +1 -1
  130. package/dist/assets/{index-DrVoTBh9.js → index-CYrLPjwJ.js} +1 -1
  131. package/dist/assets/{index-B20YcFJ8.js → index-CbuVIZuU.js} +1 -1
  132. package/dist/assets/{index-CmozsmzZ.js → index-Ces-clFL.js} +1 -1
  133. package/dist/assets/{index-9szaY8p5.js → index-CexMBW_C.js} +1 -1
  134. package/dist/assets/{index-o0J_0rGw.js → index-Cf1AYPky.js} +1 -1
  135. package/dist/assets/{index-0ofnOFaT.js → index-CrIktcEz.js} +1 -1
  136. package/dist/assets/{index-DDzvF3is.js → index-CuYbcAA-.js} +7 -7
  137. package/dist/assets/{index-D7MVODqe.js → index-CueEMhHd.js} +1 -1
  138. package/dist/assets/{index-DDhlU0g3.js → index-D3IxHR9r.js} +1 -1
  139. package/dist/assets/{index-BuhoT_Et.js → index-DAfYK5fF.js} +1 -1
  140. package/dist/assets/{index-D9G1sBr2.js → index-DP09366_.js} +1 -1
  141. package/dist/assets/{index-CB8f7OLq.js → index-DPY_K5CJ.js} +1 -1
  142. package/dist/assets/{index-C9xhN24M.js → index-DPc-DpGN.js} +1 -1
  143. package/dist/assets/{index-D-dlJ-aT.js → index-DSA5Z1jW.js} +1 -1
  144. package/dist/assets/{index-Btb2Kqu3.js → index-DUAE5LtC.js} +1 -1
  145. package/dist/assets/{index-g-iFajHB.js → index-DXanGmmk.js} +1 -1
  146. package/dist/assets/{index-CN2LiVMo.js → index-Da724mod.js} +1 -1
  147. package/dist/assets/{index-RljJMDHd.js → index-DbjB1Leu.js} +1 -1
  148. package/dist/assets/{index-DByFUX_w.js → index-DebcMYQ3.js} +1 -1
  149. package/dist/assets/{index-edWGeP0p.js → index-DhUtgeUX.js} +1 -1
  150. package/dist/assets/{index-CvPaTM2w.js → index-DicieQUX.js} +1 -1
  151. package/dist/assets/{index-D8L9insm.js → index-DnLh5JCV.js} +1 -1
  152. package/dist/assets/{index-DdFII0BA.js → index-Dw1_LlGZ.js} +1 -1
  153. package/dist/assets/{index-BFjkLxAL.js → index-DwnpMIlQ.js} +1 -1
  154. package/dist/assets/{index-BQfx3xgL.js → index-DySsM_b8.js} +1 -1
  155. package/dist/assets/{index-DU3pVVDP.js → index-DzX0ckuK.js} +1 -1
  156. package/dist/assets/{index-KS_ASdMS.js → index-FbNz6XJS.js} +1 -1
  157. package/dist/assets/{index-CnnRg155.js → index-G1BEl1jD.js} +1 -1
  158. package/dist/assets/{index-CXHd491Q.js → index-JbpQrIOX.js} +1 -1
  159. package/dist/assets/{index-JUgdZ--r.js → index-KxJr27_H.js} +1 -1
  160. package/dist/assets/{index-CM4diDdr.js → index-MxlW0mhF.js} +1 -1
  161. package/dist/assets/{index-DUKehVcR.js → index-R2Qh4dy1.js} +1 -1
  162. package/dist/assets/{index-iN2PeQEN.js → index-VCwSyJnf.js} +1 -1
  163. package/dist/assets/{index-CN4Fuyfy.js → index-ZAy4UAok.js} +1 -1
  164. package/dist/assets/{index-DCg4Dkdi.js → index-_RH8zzKi.js} +4 -4
  165. package/dist/assets/{index-DQbaTzuT.js → index-anhXkBPX.js} +1 -1
  166. package/dist/assets/{index-DujV5uiQ.js → index-bFaHDMDe.js} +1 -1
  167. package/dist/assets/{index-5xA8y5QF.js → index-bLOUiWt8.js} +1 -1
  168. package/dist/assets/{index-zi0qhO12.js → index-eJnlNZHP.js} +1 -1
  169. package/dist/assets/{index-CeYRpRe_.js → index-jXKxgtQR.js} +1 -1
  170. package/dist/assets/{index-ClCxNcRl.js → index-l9O-gzsT.js} +1 -1
  171. package/dist/assets/{index-BxprUbM8.js → index-mv516rU7.js} +1 -1
  172. package/dist/assets/{index-CfBt-7Qg.js → index-uwKYhL7W.js} +1 -1
  173. package/dist/assets/{index-DqmH3VWE.js → index-v0HgGsak.js} +1 -1
  174. package/dist/assets/{index.browser.esm-uBaXz-Gy.js → index.browser.esm-ClNh4Ujp.js} +1 -1
  175. package/dist/assets/{index.es-DQSkYkzb.js → index.es-MD4fTDrA.js} +1 -1
  176. package/dist/assets/{info-Caab-juq.js → info-C67H9bbJ.js} +1 -1
  177. package/dist/assets/{info-circle-7CoG-nwM.js → info-circle-C7JTo2du.js} +1 -1
  178. package/dist/assets/{isEqual-7DyH1zpL.js → isEqual-nU2nTZuA.js} +1 -1
  179. package/dist/assets/{isPlainObject-CcQDDiIC.js → isPlainObject-CFs7v_uP.js} +1 -1
  180. package/dist/assets/{kling-CcsG_zjz.js → kling-uJ6f36ty.js} +1 -1
  181. package/dist/assets/{lightbulb-elhvzwVM.js → lightbulb-zXS7aKlM.js} +1 -1
  182. package/dist/assets/{luma-B9z-LqT4.js → luma-BTWPd5gZ.js} +1 -1
  183. package/dist/assets/{mail-Bi5adMHa.js → mail-DwAooLdV.js} +1 -1
  184. package/dist/assets/{midjourney-BITXq65L.js → midjourney-CEzGuC4j.js} +1 -1
  185. package/dist/assets/{mobile-t8hcXVRB.js → mobile-TOlyN7Yl.js} +1 -1
  186. package/dist/assets/{more-CA3r7H1s.js → more-COkRRGdd.js} +1 -1
  187. package/dist/assets/{nanobanana-DVBYAXad.js → nanobanana-C5DUSpCn.js} +1 -1
  188. package/dist/assets/{network-placeholder-DPM6L2lr.js → network-placeholder-DIttQrnU.js} +1 -1
  189. package/dist/assets/{nftPlaceholder-CxjU0Uj9.js → nftPlaceholder-rPCWllwU.js} +1 -1
  190. package/dist/assets/{off-ByxHjo6B.js → off-IHVA5Yjk.js} +1 -1
  191. package/dist/assets/{openaiimage-DmZ4rtOW.js → openaiimage-DDMVbcOw.js} +1 -1
  192. package/dist/assets/{order-BStPpJZr.js → order-C0qhnExA.js} +1 -1
  193. package/dist/assets/{pika-CrPvsxcR.js → pika-_dA0jE76.js} +1 -1
  194. package/dist/assets/{pixverse-DbrgLmEa.js → pixverse-DNLSNYvl.js} +1 -1
  195. package/dist/assets/{play-store-CuxFBK0A.js → play-store-H_TiR3d7.js} +1 -1
  196. package/dist/assets/{plus-BrKh6o3U.js → plus-Ba3DyPxk.js} +1 -1
  197. package/dist/assets/{price-DAh4h84D.js → price-BUVhY5oq.js} +1 -1
  198. package/dist/assets/{producer-DdBwxuB4.js → producer-Wqi7wtOt.js} +1 -1
  199. package/dist/assets/{qr-code-DxHRxaxj.js → qr-code-Dmvik8KA.js} +1 -1
  200. package/dist/assets/{qrart-B1CpQE1F.js → qrart-CB5JXfeo.js} +1 -1
  201. package/dist/assets/{recycle-horizontal-C0Kevh8S.js → recycle-horizontal-KfahpaoF.js} +1 -1
  202. package/dist/assets/{refresh-BP3yEHbs.js → refresh-BawsnUP2.js} +1 -1
  203. package/dist/assets/{reown-logo-C_5FtN8d.js → reown-logo-CCKWzAPf.js} +1 -1
  204. package/dist/assets/{search-CVudJ8LY.js → search-0dogxKz4.js} +1 -1
  205. package/dist/assets/{secp256k1-CNY_qDc6.js → secp256k1-APpyNjvj.js} +1 -1
  206. package/dist/assets/{secp256k1-DYjP08cD.js → secp256k1-_zqIuT1r.js} +1 -1
  207. package/dist/assets/{seedance-CjCdMQc2.js → seedance-CJcbz8WV.js} +1 -1
  208. package/dist/assets/{seedream-Bd4cNrMU.js → seedream-DbdX_c_R.js} +1 -1
  209. package/dist/assets/{send-BPbPi2QR.js → send-D6u2Rzxi.js} +1 -1
  210. package/dist/assets/{service-Djt3u4NK.js → service-ClFEW6Wh.js} +1 -1
  211. package/dist/assets/{solana-wallets-DS6NPicw.js → solana-wallets-CKPSENed.js} +2 -2
  212. package/dist/assets/{solana-wallets-vue-WaPOrf75.js → solana-wallets-vue-BkDGU89K.js} +1 -1
  213. package/dist/assets/{solanaEmbed.esm-C-ewx9GG.js → solanaEmbed.esm-Hd6Kd-UL.js} +1 -1
  214. package/dist/assets/{sora-C8htab1Z.js → sora-DTbgKn7i.js} +1 -1
  215. package/dist/assets/{string_decoder-CseZS9ez.js → string_decoder-BQgBpjZL.js} +1 -1
  216. package/dist/assets/{suno-CET3_qoZ.js → suno-Dz2pKiMh.js} +1 -1
  217. package/dist/assets/{swapHorizontal-DxbcSfrX.js → swapHorizontal-C81K6CZ_.js} +1 -1
  218. package/dist/assets/{swapHorizontalBold-CSsCLIDQ.js → swapHorizontalBold-CyzLY663.js} +1 -1
  219. package/dist/assets/{swapHorizontalMedium-BLMooGz3.js → swapHorizontalMedium-DbaD03U8.js} +1 -1
  220. package/dist/assets/{swapHorizontalRoundedBold-M454M7e2.js → swapHorizontalRoundedBold-BeyMqxyk.js} +1 -1
  221. package/dist/assets/{swapVertical-BDQH6x9G.js → swapVertical-CbTrzcGz.js} +1 -1
  222. package/dist/assets/{telegram-CRQUEqB3.js → telegram-ww_DJjag.js} +1 -1
  223. package/dist/assets/{three-dots-BYPcIbkP.js → three-dots-WeYL80Hx.js} +1 -1
  224. package/dist/assets/{twitch-BFrXlxO8.js → twitch-CN-gYqmF.js} +1 -1
  225. package/dist/assets/{twitterIcon-DUKFvBEP.js → twitterIcon-DF7sv4AY.js} +1 -1
  226. package/dist/assets/{typescript-BR9jNAAl.js → typescript-CCFoDe4e.js} +1 -1
  227. package/dist/assets/{use-form-item-uOcrry0J.js → use-form-item-CauB91Au.js} +1 -1
  228. package/dist/assets/validator-Iqxw4yLu.js +1 -0
  229. package/dist/assets/{veo-DEXaPvpl.js → veo-KD23bVL9.js} +1 -1
  230. package/dist/assets/{verify-CGC2-5v6.js → verify-CwilU6t7.js} +1 -1
  231. package/dist/assets/{verify-filled-eopuvi_U.js → verify-filled-bP1MMTgf.js} +1 -1
  232. package/dist/assets/{w3m-modal-D5zLQHPN.js → w3m-modal-Ci7BNq7S.js} +1 -1
  233. package/dist/assets/{wallet-BnenGNvH.js → wallet-Ctkb29QM.js} +1 -1
  234. package/dist/assets/{wallet-placeholder-B2kJ5YQW.js → wallet-placeholder-BHYgkjuu.js} +1 -1
  235. package/dist/assets/{walletconnect-B-tbPQEO.js → walletconnect-cCvPzYIl.js} +1 -1
  236. package/dist/assets/{wan-qrpwEMGw.js → wan-dy08lCX2.js} +1 -1
  237. package/dist/assets/{warning-circle-d8wdF7hh.js → warning-circle-DNEcP85y.js} +1 -1
  238. package/dist/assets/{web-CHBRhTqb.js → web-R5_RJlut.js} +1 -1
  239. package/dist/assets/{web-dX_vAzUV.js → web-csGpOepU.js} +1 -1
  240. package/dist/assets/{x-CRJXddsS.js → x-CugvypIK.js} +1 -1
  241. package/dist/index.html +1 -1
  242. package/package.json +1 -1
  243. package/dist/assets/common-DbzOeqFx.js +0 -1
  244. package/dist/assets/common-frp9uHUU.js +0 -1
  245. package/dist/assets/validator-DwlbfJWW.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as _i,Y as On,r as re,Z as Si,_ as Ci,$ as Ii,s as fe,w as Be,a0 as ie,o as qr,n as kn,k as jr,f as q,u as Bi,t as Ti,d as ht,z as le,a1 as ce,a2 as de,a3 as pt,I as pe,J as Ie,E as j,q as ft,Q as it,a4 as Ri,O as Fn,y as kt,D as je,a5 as Pe,x as ne,F as He,M as Mi,N as Ni,C as Vr,K as Hr,R as Ui}from"./vendor-vue-CpN3YBVJ.js";import{P as Gr,V as Sn,T as Cn,a as Li,S as Pi}from"./index.browser.esm-uBaXz-Gy.js";import{a as Mt,W as x,l as be,b as Ve,w as Oi,j as Yr,B as ki,f as xr,g as Wi,h as Ke,d as ot,m as In,x as st,e as at,n as Bn,o as Jr,p as Kn}from"./events-C1bJOe9X.js";import{i as Di}from"./standard-CDjM418q.js";import"./vendor-dayjs-D7e3rSuL.js";import"./index-DCg4Dkdi.js";import"./vendor-axios-NIGUFBhG.js";import"./vendor-vue-router-DjvMdekB.js";import"./index-4erIVwAR.js";function Wn(e){return Ci()?(Ii(e),!0):!1}const Nt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zi=Object.prototype.toString,$i=e=>zi.call(e)==="[object Object]",Te=()=>{},Tn=Fi();function Fi(){var e,t;return Nt&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Ki(e,t){function i(...r){return new Promise((a,l)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(a).catch(l)})}return i}const Qr=e=>e();function qi(e=Qr,t={}){const{initialState:i="active"}=t,r=Zr(i==="active");function a(){r.value=!1}function l(){r.value=!0}const c=(...s)=>{r.value&&e(...s)};return{isActive:On(r),pause:a,resume:l,eventFilter:c}}function ji(e){let t;function i(){return t||(t=e()),t}return i.reset=async()=>{const r=t;t=void 0,r&&await r},i}function Vi(e){return jr()}function Wt(e){return Array.isArray(e)?e:[e]}function Zr(...e){if(e.length!==1)return _i(...e);const t=e[0];return typeof t=="function"?On(Si(()=>({get:t,set:Te}))):re(t)}function Hi(e,t,i={}){const{eventFilter:r=Qr,...a}=i;return Be(e,Ki(r,t),a)}function Gi(e,t,i={}){const{eventFilter:r,initialState:a="active",...l}=i,{eventFilter:c,pause:s,resume:d,isActive:h}=qi(r,{initialState:a});return{stop:Hi(e,t,{...l,eventFilter:c}),pause:s,resume:d,isActive:h}}function Yi(e,t=!0,i){Vi()?qr(e,i):t?e():kn(e)}function xi(e,t,i={}){const{immediate:r=!0,immediateCallback:a=!1}=i,l=fe(!1);let c=null;function s(){c&&(clearTimeout(c),c=null)}function d(){l.value=!1,s()}function h(...g){a&&e(),s(),l.value=!0,c=setTimeout(()=>{l.value=!1,c=null,e(...g)},ie(t))}return r&&(l.value=!0,Nt&&h()),Wn(d),{isPending:On(l),start:h,stop:d}}function Ji(e,t,i){return Be(e,t,{...i,immediate:!0})}const Ge=Nt?window:void 0,Xr=Nt?window.navigator:void 0;function lt(e){var t;const i=ie(e);return(t=i?.$el)!=null?t:i}function ge(...e){const t=[],i=()=>{t.forEach(s=>s()),t.length=0},r=(s,d,h,g)=>(s.addEventListener(d,h,g),()=>s.removeEventListener(d,h,g)),a=q(()=>{const s=Wt(ie(e[0])).filter(d=>d!=null);return s.every(d=>typeof d!="string")?s:void 0}),l=Ji(()=>{var s,d;return[(d=(s=a.value)==null?void 0:s.map(h=>lt(h)))!=null?d:[Ge].filter(h=>h!=null),Wt(ie(a.value?e[1]:e[0])),Wt(Bi(a.value?e[2]:e[1])),ie(a.value?e[3]:e[2])]},([s,d,h,g])=>{if(i(),!s?.length||!d?.length||!h?.length)return;const m=$i(g)?{...g}:g;t.push(...s.flatMap(_=>d.flatMap(y=>h.map(A=>r(_,y,A,m)))))},{flush:"post"}),c=()=>{l(),i()};return Wn(i),c}let qn=!1;function ei(e,t,i={}){const{window:r=Ge,ignore:a=[],capture:l=!0,detectIframe:c=!1,controls:s=!1}=i;if(!r)return s?{stop:Te,cancel:Te,trigger:Te}:Te;if(Tn&&!qn){qn=!0;const C={passive:!0};Array.from(r.document.body.children).forEach(E=>ge(E,"click",Te,C)),ge(r.document.documentElement,"click",Te,C)}let d=!0;const h=C=>ie(a).some(E=>{if(typeof E=="string")return Array.from(r.document.querySelectorAll(E)).some(v=>v===C.target||C.composedPath().includes(v));{const v=lt(E);return v&&(C.target===v||C.composedPath().includes(v))}});function g(C){const E=ie(C);return E&&E.$.subTree.shapeFlag===16}function m(C,E){const v=ie(C),S=v.$.subTree&&v.$.subTree.children;return S==null||!Array.isArray(S)?!1:S.some(T=>T.el===E.target||E.composedPath().includes(T.el))}const _=C=>{const E=lt(e);if(C.target!=null&&!(!(E instanceof Element)&&g(e)&&m(e,C))&&!(!E||E===C.target||C.composedPath().includes(E))){if("detail"in C&&C.detail===0&&(d=!h(C)),!d){d=!0;return}t(C)}};let y=!1;const A=[ge(r,"click",C=>{y||(y=!0,setTimeout(()=>{y=!1},0),_(C))},{passive:!0,capture:l}),ge(r,"pointerdown",C=>{const E=lt(e);d=!h(C)&&!!(E&&!C.composedPath().includes(E))},{passive:!0}),c&&ge(r,"blur",C=>{setTimeout(()=>{var E;const v=lt(e);((E=r.document.activeElement)==null?void 0:E.tagName)==="IFRAME"&&!v?.contains(r.document.activeElement)&&t(C)},0)},{passive:!0})].filter(Boolean),b=()=>A.forEach(C=>C());return s?{stop:b,cancel:()=>{d=!1},trigger:C=>{d=!0,_(C),d=!1}}:b}function Qi(){const e=fe(!1),t=jr();return t&&qr(()=>{e.value=!0},t),e}function ti(e){const t=Qi();return q(()=>(t.value,!!e()))}function Zi(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function jn(...e){let t,i,r={};e.length===3?(t=e[0],i=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,i=e[0],r=e[1]):(t=e[0],i=e[1]):(t=!0,i=e[0]);const{target:a=Ge,eventName:l="keydown",passive:c=!1,dedupe:s=!1}=r,d=Zi(t);return ge(a,l,g=>{g.repeat&&ie(s)||d(g)&&i(g)},c)}function Vn(e,t={}){const{controls:i=!1,navigator:r=Xr}=t,a=ti(()=>r&&"permissions"in r),l=fe(),c=typeof e=="string"?{name:e}:e,s=fe(),d=()=>{var g,m;s.value=(m=(g=l.value)==null?void 0:g.state)!=null?m:"prompt"};ge(l,"change",d,{passive:!0});const h=ji(async()=>{if(a.value){if(!l.value)try{l.value=await r.permissions.query(c)}catch{l.value=void 0}finally{d()}if(i)return Ti(l.value)}});return h(),i?{state:s,isSupported:a,query:h}:s}function Xi(e={}){const{navigator:t=Xr,read:i=!1,source:r,copiedDuring:a=1500,legacy:l=!1}=e,c=ti(()=>t&&"clipboard"in t),s=Vn("clipboard-read"),d=Vn("clipboard-write"),h=q(()=>c.value||l),g=fe(""),m=fe(!1),_=xi(()=>m.value=!1,a,{immediate:!1});async function y(){let v=!(c.value&&E(s.value));if(!v)try{g.value=await t.clipboard.readText()}catch{v=!0}v&&(g.value=C())}h.value&&i&&ge(["copy","cut"],y,{passive:!0});async function A(v=ie(r)){if(h.value&&v!=null){let S=!(c.value&&E(d.value));if(!S)try{await t.clipboard.writeText(v)}catch{S=!0}S&&b(v),g.value=v,m.value=!0,_.start()}}function b(v){const S=document.createElement("textarea");S.value=v??"",S.style.position="absolute",S.style.opacity="0",document.body.appendChild(S),S.select(),document.execCommand("copy"),S.remove()}function C(){var v,S,T;return(T=(S=(v=document?.getSelection)==null?void 0:v.call(document))==null?void 0:S.toString())!=null?T:""}function E(v){return v==="granted"||v==="prompt"}return{isSupported:h,text:g,copied:m,copy:A}}const mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vt="__vueuse_ssr_handlers__",eo=to();function to(){return vt in mt||(mt[vt]=mt[vt]||{}),mt[vt]}function no(e,t){return eo[e]||t}function ro(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const io={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Hn="vueuse-storage";function oo(e,t,i,r={}){var a;const{flush:l="pre",deep:c=!0,listenToStorageChanges:s=!0,writeDefaults:d=!0,mergeDefaults:h=!1,shallow:g,window:m=Ge,eventFilter:_,onError:y=L=>{console.error(L)},initOnMounted:A}=r,b=(g?fe:re)(typeof t=="function"?t():t),C=q(()=>ie(e));if(!i)try{i=no("getDefaultStorage",()=>{var L;return(L=Ge)==null?void 0:L.localStorage})()}catch(L){y(L)}if(!i)return b;const E=ie(t),v=ro(E),S=(a=r.serializer)!=null?a:io[v],{pause:T,resume:U}=Gi(b,()=>R(b.value),{flush:l,deep:c,eventFilter:_});Be(C,()=>M(),{flush:l}),m&&s&&Yi(()=>{i instanceof Storage?ge(m,"storage",M,{passive:!0}):ge(m,Hn,k),A&&M()}),A||M();function B(L,P){if(m){const O={key:C.value,oldValue:L,newValue:P,storageArea:i};m.dispatchEvent(i instanceof Storage?new StorageEvent("storage",O):new CustomEvent(Hn,{detail:O}))}}function R(L){try{const P=i.getItem(C.value);if(L==null)B(P,null),i.removeItem(C.value);else{const O=S.write(L);P!==O&&(i.setItem(C.value,O),B(P,O))}}catch(P){y(P)}}function N(L){const P=L?L.newValue:i.getItem(C.value);if(P==null)return d&&E!=null&&i.setItem(C.value,S.write(E)),E;if(!L&&h){const O=S.read(P);return typeof h=="function"?h(O,E):v==="object"&&!Array.isArray(O)?{...E,...O}:O}else return typeof P!="string"?P:S.read(P)}function M(L){if(!(L&&L.storageArea!==i)){if(L&&L.key==null){b.value=E;return}if(!(L&&L.key!==C.value)){T();try{L?.newValue!==S.write(b.value)&&(b.value=N(L))}catch(P){y(P)}finally{L?kn(U):U()}}}}function k(L){M(L.detail)}return b}function Dt(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function so(e,t,i={}){const{window:r=Ge}=i;return oo(e,t,r?.localStorage,i)}function ni(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const i=e.parentNode;return!i||i.tagName==="BODY"?!1:ni(i)}}function ao(e){const t=e||window.event,i=t.target;return ni(i)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const zt=new WeakMap;function lo(e,t=!1){const i=fe(t);let r=null,a="";Be(Zr(e),s=>{const d=Dt(ie(s));if(d){const h=d;if(zt.get(h)||zt.set(h,h.style.overflow),h.style.overflow!=="hidden"&&(a=h.style.overflow),h.style.overflow==="hidden")return i.value=!0;if(i.value)return h.style.overflow="hidden"}},{immediate:!0});const l=()=>{const s=Dt(ie(e));!s||i.value||(Tn&&(r=ge(s,"touchmove",d=>{ao(d)},{passive:!1})),s.style.overflow="hidden",i.value=!0)},c=()=>{const s=Dt(ie(e));!s||!i.value||(Tn&&r?.(),s.style.overflow=a,zt.delete(s),i.value=!1)};return Wn(c),q({get(){return i.value},set(s){s?l():c()}})}var uo=Object.defineProperty,co=(e,t,i)=>t in e?uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,ri=(e,t,i)=>co(e,t+"",i);class ii extends Mt{constructor(){super(...arguments),ri(this,"name","WalletNotSelectedError")}}class fo extends Mt{constructor(){super(...arguments),ri(this,"name","WalletNotSelectedError")}}function $t(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}const Gn="solana:mainnet",ho="solana:devnet",po="solana:testnet",go="solana:localnet",wo="https://api.mainnet-beta.solana.com";function yo(e){return e.includes(wo)?Gn:/\bdevnet\b/i.test(e)?ho:/\btestnet\b/i.test(e)?po:/\blocalhost\b/i.test(e)||/\b127\.0\.0\.1\b/.test(e)?go:Gn}function mo(e){let t=`${e.domain} wants you to sign in with your Solana account:
1
+ import{j as _i,Y as On,r as re,Z as Si,_ as Ci,$ as Ii,s as fe,w as Be,a0 as ie,o as qr,n as kn,k as jr,f as q,u as Bi,t as Ti,d as ht,z as le,a1 as ce,a2 as de,a3 as pt,I as pe,J as Ie,E as j,q as ft,Q as it,a4 as Ri,O as Fn,y as kt,D as je,a5 as Pe,x as ne,F as He,M as Mi,N as Ni,C as Vr,K as Hr,R as Ui}from"./vendor-vue-CpN3YBVJ.js";import{P as Gr,V as Sn,T as Cn,a as Li,S as Pi}from"./index.browser.esm-ClNh4Ujp.js";import{a as Mt,W as x,l as be,b as Ve,w as Oi,j as Yr,B as ki,f as xr,g as Wi,h as Ke,d as ot,m as In,x as st,e as at,n as Bn,o as Jr,p as Kn}from"./events-C1bJOe9X.js";import{i as Di}from"./standard-CDjM418q.js";import"./vendor-dayjs-D7e3rSuL.js";import"./index-_RH8zzKi.js";import"./vendor-axios-NIGUFBhG.js";import"./vendor-vue-router-DjvMdekB.js";import"./index-4erIVwAR.js";function Wn(e){return Ci()?(Ii(e),!0):!1}const Nt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zi=Object.prototype.toString,$i=e=>zi.call(e)==="[object Object]",Te=()=>{},Tn=Fi();function Fi(){var e,t;return Nt&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Ki(e,t){function i(...r){return new Promise((a,l)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(a).catch(l)})}return i}const Qr=e=>e();function qi(e=Qr,t={}){const{initialState:i="active"}=t,r=Zr(i==="active");function a(){r.value=!1}function l(){r.value=!0}const c=(...s)=>{r.value&&e(...s)};return{isActive:On(r),pause:a,resume:l,eventFilter:c}}function ji(e){let t;function i(){return t||(t=e()),t}return i.reset=async()=>{const r=t;t=void 0,r&&await r},i}function Vi(e){return jr()}function Wt(e){return Array.isArray(e)?e:[e]}function Zr(...e){if(e.length!==1)return _i(...e);const t=e[0];return typeof t=="function"?On(Si(()=>({get:t,set:Te}))):re(t)}function Hi(e,t,i={}){const{eventFilter:r=Qr,...a}=i;return Be(e,Ki(r,t),a)}function Gi(e,t,i={}){const{eventFilter:r,initialState:a="active",...l}=i,{eventFilter:c,pause:s,resume:d,isActive:h}=qi(r,{initialState:a});return{stop:Hi(e,t,{...l,eventFilter:c}),pause:s,resume:d,isActive:h}}function Yi(e,t=!0,i){Vi()?qr(e,i):t?e():kn(e)}function xi(e,t,i={}){const{immediate:r=!0,immediateCallback:a=!1}=i,l=fe(!1);let c=null;function s(){c&&(clearTimeout(c),c=null)}function d(){l.value=!1,s()}function h(...g){a&&e(),s(),l.value=!0,c=setTimeout(()=>{l.value=!1,c=null,e(...g)},ie(t))}return r&&(l.value=!0,Nt&&h()),Wn(d),{isPending:On(l),start:h,stop:d}}function Ji(e,t,i){return Be(e,t,{...i,immediate:!0})}const Ge=Nt?window:void 0,Xr=Nt?window.navigator:void 0;function lt(e){var t;const i=ie(e);return(t=i?.$el)!=null?t:i}function ge(...e){const t=[],i=()=>{t.forEach(s=>s()),t.length=0},r=(s,d,h,g)=>(s.addEventListener(d,h,g),()=>s.removeEventListener(d,h,g)),a=q(()=>{const s=Wt(ie(e[0])).filter(d=>d!=null);return s.every(d=>typeof d!="string")?s:void 0}),l=Ji(()=>{var s,d;return[(d=(s=a.value)==null?void 0:s.map(h=>lt(h)))!=null?d:[Ge].filter(h=>h!=null),Wt(ie(a.value?e[1]:e[0])),Wt(Bi(a.value?e[2]:e[1])),ie(a.value?e[3]:e[2])]},([s,d,h,g])=>{if(i(),!s?.length||!d?.length||!h?.length)return;const m=$i(g)?{...g}:g;t.push(...s.flatMap(_=>d.flatMap(y=>h.map(A=>r(_,y,A,m)))))},{flush:"post"}),c=()=>{l(),i()};return Wn(i),c}let qn=!1;function ei(e,t,i={}){const{window:r=Ge,ignore:a=[],capture:l=!0,detectIframe:c=!1,controls:s=!1}=i;if(!r)return s?{stop:Te,cancel:Te,trigger:Te}:Te;if(Tn&&!qn){qn=!0;const C={passive:!0};Array.from(r.document.body.children).forEach(E=>ge(E,"click",Te,C)),ge(r.document.documentElement,"click",Te,C)}let d=!0;const h=C=>ie(a).some(E=>{if(typeof E=="string")return Array.from(r.document.querySelectorAll(E)).some(v=>v===C.target||C.composedPath().includes(v));{const v=lt(E);return v&&(C.target===v||C.composedPath().includes(v))}});function g(C){const E=ie(C);return E&&E.$.subTree.shapeFlag===16}function m(C,E){const v=ie(C),S=v.$.subTree&&v.$.subTree.children;return S==null||!Array.isArray(S)?!1:S.some(T=>T.el===E.target||E.composedPath().includes(T.el))}const _=C=>{const E=lt(e);if(C.target!=null&&!(!(E instanceof Element)&&g(e)&&m(e,C))&&!(!E||E===C.target||C.composedPath().includes(E))){if("detail"in C&&C.detail===0&&(d=!h(C)),!d){d=!0;return}t(C)}};let y=!1;const A=[ge(r,"click",C=>{y||(y=!0,setTimeout(()=>{y=!1},0),_(C))},{passive:!0,capture:l}),ge(r,"pointerdown",C=>{const E=lt(e);d=!h(C)&&!!(E&&!C.composedPath().includes(E))},{passive:!0}),c&&ge(r,"blur",C=>{setTimeout(()=>{var E;const v=lt(e);((E=r.document.activeElement)==null?void 0:E.tagName)==="IFRAME"&&!v?.contains(r.document.activeElement)&&t(C)},0)},{passive:!0})].filter(Boolean),b=()=>A.forEach(C=>C());return s?{stop:b,cancel:()=>{d=!1},trigger:C=>{d=!0,_(C),d=!1}}:b}function Qi(){const e=fe(!1),t=jr();return t&&qr(()=>{e.value=!0},t),e}function ti(e){const t=Qi();return q(()=>(t.value,!!e()))}function Zi(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function jn(...e){let t,i,r={};e.length===3?(t=e[0],i=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,i=e[0],r=e[1]):(t=e[0],i=e[1]):(t=!0,i=e[0]);const{target:a=Ge,eventName:l="keydown",passive:c=!1,dedupe:s=!1}=r,d=Zi(t);return ge(a,l,g=>{g.repeat&&ie(s)||d(g)&&i(g)},c)}function Vn(e,t={}){const{controls:i=!1,navigator:r=Xr}=t,a=ti(()=>r&&"permissions"in r),l=fe(),c=typeof e=="string"?{name:e}:e,s=fe(),d=()=>{var g,m;s.value=(m=(g=l.value)==null?void 0:g.state)!=null?m:"prompt"};ge(l,"change",d,{passive:!0});const h=ji(async()=>{if(a.value){if(!l.value)try{l.value=await r.permissions.query(c)}catch{l.value=void 0}finally{d()}if(i)return Ti(l.value)}});return h(),i?{state:s,isSupported:a,query:h}:s}function Xi(e={}){const{navigator:t=Xr,read:i=!1,source:r,copiedDuring:a=1500,legacy:l=!1}=e,c=ti(()=>t&&"clipboard"in t),s=Vn("clipboard-read"),d=Vn("clipboard-write"),h=q(()=>c.value||l),g=fe(""),m=fe(!1),_=xi(()=>m.value=!1,a,{immediate:!1});async function y(){let v=!(c.value&&E(s.value));if(!v)try{g.value=await t.clipboard.readText()}catch{v=!0}v&&(g.value=C())}h.value&&i&&ge(["copy","cut"],y,{passive:!0});async function A(v=ie(r)){if(h.value&&v!=null){let S=!(c.value&&E(d.value));if(!S)try{await t.clipboard.writeText(v)}catch{S=!0}S&&b(v),g.value=v,m.value=!0,_.start()}}function b(v){const S=document.createElement("textarea");S.value=v??"",S.style.position="absolute",S.style.opacity="0",document.body.appendChild(S),S.select(),document.execCommand("copy"),S.remove()}function C(){var v,S,T;return(T=(S=(v=document?.getSelection)==null?void 0:v.call(document))==null?void 0:S.toString())!=null?T:""}function E(v){return v==="granted"||v==="prompt"}return{isSupported:h,text:g,copied:m,copy:A}}const mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vt="__vueuse_ssr_handlers__",eo=to();function to(){return vt in mt||(mt[vt]=mt[vt]||{}),mt[vt]}function no(e,t){return eo[e]||t}function ro(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const io={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Hn="vueuse-storage";function oo(e,t,i,r={}){var a;const{flush:l="pre",deep:c=!0,listenToStorageChanges:s=!0,writeDefaults:d=!0,mergeDefaults:h=!1,shallow:g,window:m=Ge,eventFilter:_,onError:y=L=>{console.error(L)},initOnMounted:A}=r,b=(g?fe:re)(typeof t=="function"?t():t),C=q(()=>ie(e));if(!i)try{i=no("getDefaultStorage",()=>{var L;return(L=Ge)==null?void 0:L.localStorage})()}catch(L){y(L)}if(!i)return b;const E=ie(t),v=ro(E),S=(a=r.serializer)!=null?a:io[v],{pause:T,resume:U}=Gi(b,()=>R(b.value),{flush:l,deep:c,eventFilter:_});Be(C,()=>M(),{flush:l}),m&&s&&Yi(()=>{i instanceof Storage?ge(m,"storage",M,{passive:!0}):ge(m,Hn,k),A&&M()}),A||M();function B(L,P){if(m){const O={key:C.value,oldValue:L,newValue:P,storageArea:i};m.dispatchEvent(i instanceof Storage?new StorageEvent("storage",O):new CustomEvent(Hn,{detail:O}))}}function R(L){try{const P=i.getItem(C.value);if(L==null)B(P,null),i.removeItem(C.value);else{const O=S.write(L);P!==O&&(i.setItem(C.value,O),B(P,O))}}catch(P){y(P)}}function N(L){const P=L?L.newValue:i.getItem(C.value);if(P==null)return d&&E!=null&&i.setItem(C.value,S.write(E)),E;if(!L&&h){const O=S.read(P);return typeof h=="function"?h(O,E):v==="object"&&!Array.isArray(O)?{...E,...O}:O}else return typeof P!="string"?P:S.read(P)}function M(L){if(!(L&&L.storageArea!==i)){if(L&&L.key==null){b.value=E;return}if(!(L&&L.key!==C.value)){T();try{L?.newValue!==S.write(b.value)&&(b.value=N(L))}catch(P){y(P)}finally{L?kn(U):U()}}}}function k(L){M(L.detail)}return b}function Dt(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function so(e,t,i={}){const{window:r=Ge}=i;return oo(e,t,r?.localStorage,i)}function ni(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const i=e.parentNode;return!i||i.tagName==="BODY"?!1:ni(i)}}function ao(e){const t=e||window.event,i=t.target;return ni(i)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const zt=new WeakMap;function lo(e,t=!1){const i=fe(t);let r=null,a="";Be(Zr(e),s=>{const d=Dt(ie(s));if(d){const h=d;if(zt.get(h)||zt.set(h,h.style.overflow),h.style.overflow!=="hidden"&&(a=h.style.overflow),h.style.overflow==="hidden")return i.value=!0;if(i.value)return h.style.overflow="hidden"}},{immediate:!0});const l=()=>{const s=Dt(ie(e));!s||i.value||(Tn&&(r=ge(s,"touchmove",d=>{ao(d)},{passive:!1})),s.style.overflow="hidden",i.value=!0)},c=()=>{const s=Dt(ie(e));!s||!i.value||(Tn&&r?.(),s.style.overflow=a,zt.delete(s),i.value=!1)};return Wn(c),q({get(){return i.value},set(s){s?l():c()}})}var uo=Object.defineProperty,co=(e,t,i)=>t in e?uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,ri=(e,t,i)=>co(e,t+"",i);class ii extends Mt{constructor(){super(...arguments),ri(this,"name","WalletNotSelectedError")}}class fo extends Mt{constructor(){super(...arguments),ri(this,"name","WalletNotSelectedError")}}function $t(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}const Gn="solana:mainnet",ho="solana:devnet",po="solana:testnet",go="solana:localnet",wo="https://api.mainnet-beta.solana.com";function yo(e){return e.includes(wo)?Gn:/\bdevnet\b/i.test(e)?ho:/\btestnet\b/i.test(e)?po:/\blocalhost\b/i.test(e)||/\b127\.0\.0\.1\b/.test(e)?go:Gn}function mo(e){let t=`${e.domain} wants you to sign in with your Solana account:
2
2
  `;t+=`${e.address}`,e.statement&&(t+=`
3
3
 
4
4
  ${e.statement}`);const i=[];if(e.uri&&i.push(`URI: ${e.uri}`),e.version&&i.push(`Version: ${e.version}`),e.chainId&&i.push(`Chain ID: ${e.chainId}`),e.nonce&&i.push(`Nonce: ${e.nonce}`),e.issuedAt&&i.push(`Issued At: ${e.issuedAt}`),e.expirationTime&&i.push(`Expiration Time: ${e.expirationTime}`),e.notBefore&&i.push(`Not Before: ${e.notBefore}`),e.requestId&&i.push(`Request ID: ${e.requestId}`),e.resources){i.push("Resources:");for(const r of e.resources)i.push(`- ${r}`)}return i.length&&(t+=`
@@ -1,4 +1,4 @@
1
- import{c as Ct,P as Ai}from"./index.browser.esm-uBaXz-Gy.js";import{ae as Mr,ac as ea}from"./index-DDzvF3is.js";import{r as ta}from"./string_decoder-CseZS9ez.js";import{g as Ut,c as Jt}from"./vendor-dayjs-D7e3rSuL.js";import{e2 as ra}from"./index-DCg4Dkdi.js";import"./index-4erIVwAR.js";import"./events-C1bJOe9X.js";import"./types-Cvj5H4DH.js";import"./vendor-vue-CpN3YBVJ.js";import"./vendor-axios-NIGUFBhG.js";import"./vendor-vue-router-DjvMdekB.js";function er(r){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},er(r)}function na(r,e){if(er(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(er(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ia(r){var e=na(r,"string");return er(e)=="symbol"?e:e+""}function ge(r,e,t){return(e=ia(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ri(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ke(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ri(Object(t),!0).forEach(function(n){ge(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ri(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}var sn={exports:{}},an={exports:{}},ln,Ii;function Ie(){if(Ii)return ln;Ii=1;class r extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let n="";for(let i=0;i<t.length;i++)n+=` ${t[i].stack}
1
+ import{c as Ct,P as Ai}from"./index.browser.esm-ClNh4Ujp.js";import{ae as Mr,ac as ea}from"./index-CuYbcAA-.js";import{r as ta}from"./string_decoder-BQgBpjZL.js";import{g as Ut,c as Jt}from"./vendor-dayjs-D7e3rSuL.js";import{e2 as ra}from"./index-_RH8zzKi.js";import"./index-4erIVwAR.js";import"./events-C1bJOe9X.js";import"./types-Cvj5H4DH.js";import"./vendor-vue-CpN3YBVJ.js";import"./vendor-axios-NIGUFBhG.js";import"./vendor-vue-router-DjvMdekB.js";function er(r){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},er(r)}function na(r,e){if(er(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(er(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ia(r){var e=na(r,"string");return er(e)=="symbol"?e:e+""}function ge(r,e,t){return(e=ia(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ri(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ke(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ri(Object(t),!0).forEach(function(n){ge(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ri(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}var sn={exports:{}},an={exports:{}},ln,Ii;function Ie(){if(Ii)return ln;Ii=1;class r extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let n="";for(let i=0;i<t.length;i++)n+=` ${t[i].stack}
2
2
  `;super(n),this.name="AggregateError",this.errors=t}}return ln={AggregateError:r,ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},FunctionPrototypeSymbolHasInstance(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,n){return Object.defineProperty(e,t,n)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,n){return e.then(t,n)},PromiseReject(e){return Promise.reject(e)},PromiseResolve(e){return Promise.resolve(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,n){return e.slice(t,n)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return e.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(e,t,n){return e.set(t,n)},Boolean,Uint8Array},ln}var un={exports:{}},fn,Ti;function Ho(){return Ti||(Ti=1,fn={format(r,...e){return r.replace(/%([sdifj])/g,function(...[t,n]){const i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(r){switch(typeof r){case"string":if(r.includes("'"))if(r.includes('"')){if(!r.includes("`")&&!r.includes("${"))return`\`${r}\``}else return`"${r}"`;return`'${r}'`;case"number":return isNaN(r)?"NaN":Object.is(r,-0)?String(r):r;case"bigint":return`${String(r)}n`;case"boolean":case"undefined":return String(r);case"object":return"{}"}}}),fn}var cn,Oi;function De(){if(Oi)return cn;Oi=1;const{format:r,inspect:e}=Ho(),{AggregateError:t}=Ie(),n=globalThis.AggregateError||t,i=Symbol("kIsNodeError"),s=["string","function","number","object","Function","Object","boolean","bigint","symbol"],o=/^([A-Z][a-z0-9]*)+$/,l="__node_internal_",c={};function g(p,R){if(!p)throw new c.ERR_INTERNAL_ASSERTION(R)}function C(p){let R="",b=p.length;const T=p[0]==="-"?1:0;for(;b>=T+4;b-=3)R=`_${p.slice(b-3,b)}${R}`;return`${p.slice(0,b)}${R}`}function x(p,R,b){if(typeof R=="function")return g(R.length<=b.length,`Code: ${p}; The provided arguments length (${b.length}) does not match the required ones (${R.length}).`),R(...b);const T=(R.match(/%[dfijoOs]/g)||[]).length;return g(T===b.length,`Code: ${p}; The provided arguments length (${b.length}) does not match the required ones (${T}).`),b.length===0?R:r(R,...b)}function A(p,R,b){b||(b=Error);class T extends b{constructor(...z){super(x(p,R,z))}toString(){return`${this.name} [${p}]: ${this.message}`}}Object.defineProperties(T.prototype,{name:{value:b.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${p}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),T.prototype.code=p,T.prototype[i]=!0,c[p]=T}function U(p){const R=l+p.name;return Object.defineProperty(p,"name",{value:R}),p}function B(p,R){if(p&&R&&p!==R){if(Array.isArray(R.errors))return R.errors.push(p),R;const b=new n([R,p],R.message);return b.code=R.code,b}return p||R}class y extends Error{constructor(R="The operation was aborted",b=void 0){if(b!==void 0&&typeof b!="object")throw new c.ERR_INVALID_ARG_TYPE("options","Object",b);super(R,b),this.code="ABORT_ERR",this.name="AbortError"}}return A("ERR_ASSERTION","%s",Error),A("ERR_INVALID_ARG_TYPE",(p,R,b)=>{g(typeof p=="string","'name' must be a string"),Array.isArray(R)||(R=[R]);let T="The ";p.endsWith(" argument")?T+=`${p} `:T+=`"${p}" ${p.includes(".")?"property":"argument"} `,T+="must be ";const Y=[],z=[],J=[];for(const a of R)g(typeof a=="string","All expected entries have to be of type string"),s.includes(a)?Y.push(a.toLowerCase()):o.test(a)?z.push(a):(g(a!=="object",'The value "object" should be written as "Object"'),J.push(a));if(z.length>0){const a=Y.indexOf("object");a!==-1&&(Y.splice(Y,a,1),z.push("Object"))}if(Y.length>0){switch(Y.length){case 1:T+=`of type ${Y[0]}`;break;case 2:T+=`one of type ${Y[0]} or ${Y[1]}`;break;default:{const a=Y.pop();T+=`one of type ${Y.join(", ")}, or ${a}`}}(z.length>0||J.length>0)&&(T+=" or ")}if(z.length>0){switch(z.length){case 1:T+=`an instance of ${z[0]}`;break;case 2:T+=`an instance of ${z[0]} or ${z[1]}`;break;default:{const a=z.pop();T+=`an instance of ${z.join(", ")}, or ${a}`}}J.length>0&&(T+=" or ")}switch(J.length){case 0:break;case 1:J[0].toLowerCase()!==J[0]&&(T+="an "),T+=`${J[0]}`;break;case 2:T+=`one of ${J[0]} or ${J[1]}`;break;default:{const a=J.pop();T+=`one of ${J.join(", ")}, or ${a}`}}if(b==null)T+=`. Received ${b}`;else if(typeof b=="function"&&b.name)T+=`. Received function ${b.name}`;else if(typeof b=="object"){var X;if((X=b.constructor)!==null&&X!==void 0&&X.name)T+=`. Received an instance of ${b.constructor.name}`;else{const a=e(b,{depth:-1});T+=`. Received ${a}`}}else{let a=e(b,{colors:!1});a.length>25&&(a=`${a.slice(0,25)}...`),T+=`. Received type ${typeof b} (${a})`}return T},TypeError),A("ERR_INVALID_ARG_VALUE",(p,R,b="is invalid")=>{let T=e(R);return T.length>128&&(T=T.slice(0,128)+"..."),`The ${p.includes(".")?"property":"argument"} '${p}' ${b}. Received ${T}`},TypeError),A("ERR_INVALID_RETURN_VALUE",(p,R,b)=>{var T;const Y=b!=null&&(T=b.constructor)!==null&&T!==void 0&&T.name?`instance of ${b.constructor.name}`:`type ${typeof b}`;return`Expected ${p} to be returned from the "${R}" function but got ${Y}.`},TypeError),A("ERR_MISSING_ARGS",(...p)=>{g(p.length>0,"At least one arg needs to be specified");let R;const b=p.length;switch(p=(Array.isArray(p)?p:[p]).map(T=>`"${T}"`).join(" or "),b){case 1:R+=`The ${p[0]} argument`;break;case 2:R+=`The ${p[0]} and ${p[1]} arguments`;break;default:{const T=p.pop();R+=`The ${p.join(", ")}, and ${T} arguments`}break}return`${R} must be specified`},TypeError),A("ERR_OUT_OF_RANGE",(p,R,b)=>{g(R,'Missing "range" argument');let T;if(Number.isInteger(b)&&Math.abs(b)>2**32)T=C(String(b));else if(typeof b=="bigint"){T=String(b);const Y=BigInt(2)**BigInt(32);(b>Y||b<-Y)&&(T=C(T)),T+="n"}else T=e(b);return`The value of "${p}" is out of range. It must be ${R}. Received ${T}`},RangeError),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),A("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),A("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),A("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),A("ERR_STREAM_WRITE_AFTER_END","write after end",Error),A("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),cn={AbortError:y,aggregateTwoErrors:U(B),hideStackFrames:U,codes:c},cn}var Vt={exports:{}},xi;function tr(){if(xi)return Vt.exports;xi=1;const{AbortController:r,AbortSignal:e}=typeof self<"u"?self:typeof window<"u"?window:void 0;return Vt.exports=r,Vt.exports.AbortSignal=e,Vt.exports.default=r,Vt.exports}var Ni;function We(){return Ni||(Ni=1,function(r){const e=Ct(),{format:t,inspect:n}=Ho(),{codes:{ERR_INVALID_ARG_TYPE:i}}=De(),{kResistStopPropagation:s,AggregateError:o,SymbolDispose:l}=Ie(),c=globalThis.AbortSignal||tr().AbortSignal,g=globalThis.AbortController||tr().AbortController,C=Object.getPrototypeOf(async function(){}).constructor,x=globalThis.Blob||e.Blob,A=typeof x<"u"?function(p){return p instanceof x}:function(p){return!1},U=(y,p)=>{if(y!==void 0&&(y===null||typeof y!="object"||!("aborted"in y)))throw new i(p,"AbortSignal",y)},B=(y,p)=>{if(typeof y!="function")throw new i(p,"Function",y)};r.exports={AggregateError:o,kEmptyObject:Object.freeze({}),once(y){let p=!1;return function(...R){p||(p=!0,y.apply(this,R))}},createDeferredPromise:function(){let y,p;return{promise:new Promise((b,T)=>{y=b,p=T}),resolve:y,reject:p}},promisify(y){return new Promise((p,R)=>{y((b,...T)=>b?R(b):p(...T))})},debuglog(){return function(){}},format:t,inspect:n,types:{isAsyncFunction(y){return y instanceof C},isArrayBufferView(y){return ArrayBuffer.isView(y)}},isBlob:A,deprecate(y,p){return y},addAbortListener:Mr().addAbortListener||function(p,R){if(p===void 0)throw new i("signal","AbortSignal",p);U(p,"signal"),B(R,"listener");let b;return p.aborted?queueMicrotask(()=>R()):(p.addEventListener("abort",R,{__proto__:null,once:!0,[s]:!0}),b=()=>{p.removeEventListener("abort",R)}),{__proto__:null,[l](){var T;(T=b)===null||T===void 0||T()}}},AbortSignalAny:c.any||function(p){if(p.length===1)return p[0];const R=new g,b=()=>R.abort();return p.forEach(T=>{U(T,"signals"),T.addEventListener("abort",b,{once:!0})}),R.signal.addEventListener("abort",()=>{p.forEach(T=>T.removeEventListener("abort",b))},{once:!0}),R.signal}},r.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}(un)),un.exports}var mr={},dn,Ci;function nr(){if(Ci)return dn;Ci=1;const{ArrayIsArray:r,ArrayPrototypeIncludes:e,ArrayPrototypeJoin:t,ArrayPrototypeMap:n,NumberIsInteger:i,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:o,NumberMIN_SAFE_INTEGER:l,NumberParseInt:c,ObjectPrototypeHasOwnProperty:g,RegExpPrototypeExec:C,String:x,StringPrototypeToUpperCase:A,StringPrototypeTrim:U}=Ie(),{hideStackFrames:B,codes:{ERR_SOCKET_BAD_PORT:y,ERR_INVALID_ARG_TYPE:p,ERR_INVALID_ARG_VALUE:R,ERR_OUT_OF_RANGE:b,ERR_UNKNOWN_SIGNAL:T}}=De(),{normalizeEncoding:Y}=We(),{isAsyncFunction:z,isArrayBufferView:J}=We().types,X={};function a(k){return k===(k|0)}function _(k){return k===k>>>0}const u=/^[0-7]+$/,d="must be a 32-bit unsigned integer or an octal string";function w(k,Z,re){if(typeof k>"u"&&(k=re),typeof k=="string"){if(C(u,k)===null)throw new R(Z,k,d);k=c(k,8)}return h(k,Z),k}const f=B((k,Z,re=l,K=o)=>{if(typeof k!="number")throw new p(Z,"number",k);if(!i(k))throw new b(Z,"an integer",k);if(k<re||k>K)throw new b(Z,`>= ${re} && <= ${K}`,k)}),N=B((k,Z,re=-2147483648,K=2147483647)=>{if(typeof k!="number")throw new p(Z,"number",k);if(!i(k))throw new b(Z,"an integer",k);if(k<re||k>K)throw new b(Z,`>= ${re} && <= ${K}`,k)}),h=B((k,Z,re=!1)=>{if(typeof k!="number")throw new p(Z,"number",k);if(!i(k))throw new b(Z,"an integer",k);const K=re?1:0,we=4294967295;if(k<K||k>we)throw new b(Z,`>= ${K} && <= ${we}`,k)});function S(k,Z){if(typeof k!="string")throw new p(Z,"string",k)}function P(k,Z,re=void 0,K){if(typeof k!="number")throw new p(Z,"number",k);if(re!=null&&k<re||K!=null&&k>K||(re!=null||K!=null)&&s(k))throw new b(Z,`${re!=null?`>= ${re}`:""}${re!=null&&K!=null?" && ":""}${K!=null?`<= ${K}`:""}`,k)}const m=B((k,Z,re)=>{if(!e(re,k)){const we="must be one of: "+t(n(re,Pe=>typeof Pe=="string"?`'${Pe}'`:x(Pe)),", ");throw new R(Z,k,we)}});function M(k,Z){if(typeof k!="boolean")throw new p(Z,"boolean",k)}function E(k,Z,re){return k==null||!g(k,Z)?re:k[Z]}const j=B((k,Z,re=null)=>{const K=E(re,"allowArray",!1),we=E(re,"allowFunction",!1);if(!E(re,"nullable",!1)&&k===null||!K&&r(k)||typeof k!="object"&&(!we||typeof k!="function"))throw new p(Z,"Object",k)}),V=B((k,Z)=>{if(k!=null&&typeof k!="object"&&typeof k!="function")throw new p(Z,"a dictionary",k)}),W=B((k,Z,re=0)=>{if(!r(k))throw new p(Z,"Array",k);if(k.length<re){const K=`must be longer than ${re}`;throw new R(Z,k,K)}});function ee(k,Z){W(k,Z);for(let re=0;re<k.length;re++)S(k[re],`${Z}[${re}]`)}function Q(k,Z){W(k,Z);for(let re=0;re<k.length;re++)M(k[re],`${Z}[${re}]`)}function le(k,Z){W(k,Z);for(let re=0;re<k.length;re++){const K=k[re],we=`${Z}[${re}]`;if(K==null)throw new p(we,"AbortSignal",K);ce(K,we)}}function ue(k,Z="signal"){if(S(k,Z),X[k]===void 0)throw X[A(k)]!==void 0?new T(k+" (signals must use all capital letters)"):new T(k)}const H=B((k,Z="buffer")=>{if(!J(k))throw new p(Z,["Buffer","TypedArray","DataView"],k)});function G(k,Z){const re=Y(Z),K=k.length;if(re==="hex"&&K%2!==0)throw new R("encoding",Z,`is invalid for data of length ${K}`)}function oe(k,Z="Port",re=!0){if(typeof k!="number"&&typeof k!="string"||typeof k=="string"&&U(k).length===0||+k!==+k>>>0||k>65535||k===0&&!re)throw new y(Z,k,re);return k|0}const ce=B((k,Z)=>{if(k!==void 0&&(k===null||typeof k!="object"||!("aborted"in k)))throw new p(Z,"AbortSignal",k)}),fe=B((k,Z)=>{if(typeof k!="function")throw new p(Z,"Function",k)}),L=B((k,Z)=>{if(typeof k!="function"||z(k))throw new p(Z,"Function",k)}),D=B((k,Z)=>{if(k!==void 0)throw new p(Z,"undefined",k)});function F(k,Z,re){if(!e(re,k))throw new p(Z,`('${t(re,"|")}')`,k)}const ne=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function se(k,Z){if(typeof k>"u"||!C(ne,k))throw new R(Z,k,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function ie(k){if(typeof k=="string")return se(k,"hints"),k;if(r(k)){const Z=k.length;let re="";if(Z===0)return re;for(let K=0;K<Z;K++){const we=k[K];se(we,"hints"),re+=we,K!==Z-1&&(re+=", ")}return re}throw new R("hints",k,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return dn={isInt32:a,isUint32:_,parseFileMode:w,validateArray:W,validateStringArray:ee,validateBooleanArray:Q,validateAbortSignalArray:le,validateBoolean:M,validateBuffer:H,validateDictionary:V,validateEncoding:G,validateFunction:fe,validateInt32:N,validateInteger:f,validateNumber:P,validateObject:j,validateOneOf:m,validatePlainFunction:L,validatePort:oe,validateSignalName:ue,validateString:S,validateUint32:h,validateUndefined:D,validateUnion:F,validateAbortSignal:ce,validateLinkHeaderValue:ie},dn}var Er={exports:{}},hn={exports:{}},Pi;function Pt(){if(Pi)return hn.exports;Pi=1;var r=hn.exports={},e,t;function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=n}catch{e=n}try{typeof clearTimeout=="function"?t=clearTimeout:t=i}catch{t=i}})();function s(y){if(e===setTimeout)return setTimeout(y,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(y,0);try{return e(y,0)}catch{try{return e.call(null,y,0)}catch{return e.call(this,y,0)}}}function o(y){if(t===clearTimeout)return clearTimeout(y);if((t===i||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(y);try{return t(y)}catch{try{return t.call(null,y)}catch{return t.call(this,y)}}}var l=[],c=!1,g,C=-1;function x(){!c||!g||(c=!1,g.length?l=g.concat(l):C=-1,l.length&&A())}function A(){if(!c){var y=s(x);c=!0;for(var p=l.length;p;){for(g=l,l=[];++C<p;)g&&g[C].run();C=-1,p=l.length}g=null,c=!1,o(y)}}r.nextTick=function(y){var p=new Array(arguments.length-1);if(arguments.length>1)for(var R=1;R<arguments.length;R++)p[R-1]=arguments[R];l.push(new U(y,p)),l.length===1&&!c&&s(A)};function U(y,p){this.fun=y,this.array=p}U.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={};function B(){}return r.on=B,r.addListener=B,r.once=B,r.off=B,r.removeListener=B,r.removeAllListeners=B,r.emit=B,r.prependListener=B,r.prependOnceListener=B,r.listeners=function(y){return[]},r.binding=function(y){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(y){throw new Error("process.chdir is not supported")},r.umask=function(){return 0},hn.exports}var gn,Li;function dt(){if(Li)return gn;Li=1;const{SymbolAsyncIterator:r,SymbolIterator:e,SymbolFor:t}=Ie(),n=t("nodejs.stream.destroyed"),i=t("nodejs.stream.errored"),s=t("nodejs.stream.readable"),o=t("nodejs.stream.writable"),l=t("nodejs.stream.disturbed"),c=t("nodejs.webstream.isClosedPromise"),g=t("nodejs.webstream.controllerErrorFunction");function C(E,j=!1){var V;return!!(E&&typeof E.pipe=="function"&&typeof E.on=="function"&&(!j||typeof E.pause=="function"&&typeof E.resume=="function")&&(!E._writableState||((V=E._readableState)===null||V===void 0?void 0:V.readable)!==!1)&&(!E._writableState||E._readableState))}function x(E){var j;return!!(E&&typeof E.write=="function"&&typeof E.on=="function"&&(!E._readableState||((j=E._writableState)===null||j===void 0?void 0:j.writable)!==!1))}function A(E){return!!(E&&typeof E.pipe=="function"&&E._readableState&&typeof E.on=="function"&&typeof E.write=="function")}function U(E){return E&&(E._readableState||E._writableState||typeof E.write=="function"&&typeof E.on=="function"||typeof E.pipe=="function"&&typeof E.on=="function")}function B(E){return!!(E&&!U(E)&&typeof E.pipeThrough=="function"&&typeof E.getReader=="function"&&typeof E.cancel=="function")}function y(E){return!!(E&&!U(E)&&typeof E.getWriter=="function"&&typeof E.abort=="function")}function p(E){return!!(E&&!U(E)&&typeof E.readable=="object"&&typeof E.writable=="object")}function R(E){return B(E)||y(E)||p(E)}function b(E,j){return E==null?!1:j===!0?typeof E[r]=="function":j===!1?typeof E[e]=="function":typeof E[r]=="function"||typeof E[e]=="function"}function T(E){if(!U(E))return null;const j=E._writableState,V=E._readableState,W=j||V;return!!(E.destroyed||E[n]||W!=null&&W.destroyed)}function Y(E){if(!x(E))return null;if(E.writableEnded===!0)return!0;const j=E._writableState;return j!=null&&j.errored?!1:typeof j?.ended!="boolean"?null:j.ended}function z(E,j){if(!x(E))return null;if(E.writableFinished===!0)return!0;const V=E._writableState;return V!=null&&V.errored?!1:typeof V?.finished!="boolean"?null:!!(V.finished||j===!1&&V.ended===!0&&V.length===0)}function J(E){if(!C(E))return null;if(E.readableEnded===!0)return!0;const j=E._readableState;return!j||j.errored?!1:typeof j?.ended!="boolean"?null:j.ended}function X(E,j){if(!C(E))return null;const V=E._readableState;return V!=null&&V.errored?!1:typeof V?.endEmitted!="boolean"?null:!!(V.endEmitted||j===!1&&V.ended===!0&&V.length===0)}function a(E){return E&&E[s]!=null?E[s]:typeof E?.readable!="boolean"?null:T(E)?!1:C(E)&&E.readable&&!X(E)}function _(E){return E&&E[o]!=null?E[o]:typeof E?.writable!="boolean"?null:T(E)?!1:x(E)&&E.writable&&!Y(E)}function u(E,j){return U(E)?T(E)?!0:!(j?.readable!==!1&&a(E)||j?.writable!==!1&&_(E)):null}function d(E){var j,V;return U(E)?E.writableErrored?E.writableErrored:(j=(V=E._writableState)===null||V===void 0?void 0:V.errored)!==null&&j!==void 0?j:null:null}function w(E){var j,V;return U(E)?E.readableErrored?E.readableErrored:(j=(V=E._readableState)===null||V===void 0?void 0:V.errored)!==null&&j!==void 0?j:null:null}function f(E){if(!U(E))return null;if(typeof E.closed=="boolean")return E.closed;const j=E._writableState,V=E._readableState;return typeof j?.closed=="boolean"||typeof V?.closed=="boolean"?j?.closed||V?.closed:typeof E._closed=="boolean"&&N(E)?E._closed:null}function N(E){return typeof E._closed=="boolean"&&typeof E._defaultKeepAlive=="boolean"&&typeof E._removedConnection=="boolean"&&typeof E._removedContLen=="boolean"}function h(E){return typeof E._sent100=="boolean"&&N(E)}function S(E){var j;return typeof E._consuming=="boolean"&&typeof E._dumped=="boolean"&&((j=E.req)===null||j===void 0?void 0:j.upgradeOrConnect)===void 0}function P(E){if(!U(E))return null;const j=E._writableState,V=E._readableState,W=j||V;return!W&&h(E)||!!(W&&W.autoDestroy&&W.emitClose&&W.closed===!1)}function m(E){var j;return!!(E&&((j=E[l])!==null&&j!==void 0?j:E.readableDidRead||E.readableAborted))}function M(E){var j,V,W,ee,Q,le,ue,H,G,oe;return!!(E&&((j=(V=(W=(ee=(Q=(le=E[i])!==null&&le!==void 0?le:E.readableErrored)!==null&&Q!==void 0?Q:E.writableErrored)!==null&&ee!==void 0?ee:(ue=E._readableState)===null||ue===void 0?void 0:ue.errorEmitted)!==null&&W!==void 0?W:(H=E._writableState)===null||H===void 0?void 0:H.errorEmitted)!==null&&V!==void 0?V:(G=E._readableState)===null||G===void 0?void 0:G.errored)!==null&&j!==void 0?j:!((oe=E._writableState)===null||oe===void 0)&&oe.errored))}return gn={isDestroyed:T,kIsDestroyed:n,isDisturbed:m,kIsDisturbed:l,isErrored:M,kIsErrored:i,isReadable:a,kIsReadable:s,kIsClosedPromise:c,kControllerErrorFunction:g,kIsWritable:o,isClosed:f,isDuplexNodeStream:A,isFinished:u,isIterable:b,isReadableNodeStream:C,isReadableStream:B,isReadableEnded:J,isReadableFinished:X,isReadableErrored:w,isNodeStream:U,isWebStream:R,isWritable:_,isWritableNodeStream:x,isWritableStream:y,isWritableEnded:Y,isWritableFinished:z,isWritableErrored:d,isServerRequest:S,isServerResponse:h,willEmitClose:P,isTransformStream:p},gn}var Mi;function _t(){if(Mi)return Er.exports;Mi=1;const r=Pt(),{AbortError:e,codes:t}=De(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:i}=t,{kEmptyObject:s,once:o}=We(),{validateAbortSignal:l,validateFunction:c,validateObject:g,validateBoolean:C}=nr(),{Promise:x,PromisePrototypeThen:A,SymbolDispose:U}=Ie(),{isClosed:B,isReadable:y,isReadableNodeStream:p,isReadableStream:R,isReadableFinished:b,isReadableErrored:T,isWritable:Y,isWritableNodeStream:z,isWritableStream:J,isWritableFinished:X,isWritableErrored:a,isNodeStream:_,willEmitClose:u,kIsClosedPromise:d}=dt();let w;function f(m){return m.setHeader&&typeof m.abort=="function"}const N=()=>{};function h(m,M,E){var j,V;if(arguments.length===2?(E=M,M=s):M==null?M=s:g(M,"options"),c(E,"callback"),l(M.signal,"options.signal"),E=o(E),R(m)||J(m))return S(m,M,E);if(!_(m))throw new n("stream",["ReadableStream","WritableStream","Stream"],m);const W=(j=M.readable)!==null&&j!==void 0?j:p(m),ee=(V=M.writable)!==null&&V!==void 0?V:z(m),Q=m._writableState,le=m._readableState,ue=()=>{m.writable||oe()};let H=u(m)&&p(m)===W&&z(m)===ee,G=X(m,!1);const oe=()=>{G=!0,m.destroyed&&(H=!1),!(H&&(!m.readable||W))&&(!W||ce)&&E.call(m)};let ce=b(m,!1);const fe=()=>{ce=!0,m.destroyed&&(H=!1),!(H&&(!m.writable||ee))&&(!ee||G)&&E.call(m)},L=k=>{E.call(m,k)};let D=B(m);const F=()=>{D=!0;const k=a(m)||T(m);if(k&&typeof k!="boolean")return E.call(m,k);if(W&&!ce&&p(m,!0)&&!b(m,!1))return E.call(m,new i);if(ee&&!G&&!X(m,!1))return E.call(m,new i);E.call(m)},ne=()=>{D=!0;const k=a(m)||T(m);if(k&&typeof k!="boolean")return E.call(m,k);E.call(m)},se=()=>{m.req.on("finish",oe)};f(m)?(m.on("complete",oe),H||m.on("abort",F),m.req?se():m.on("request",se)):ee&&!Q&&(m.on("end",ue),m.on("close",ue)),!H&&typeof m.aborted=="boolean"&&m.on("aborted",F),m.on("end",fe),m.on("finish",oe),M.error!==!1&&m.on("error",L),m.on("close",F),D?r.nextTick(F):Q!=null&&Q.errorEmitted||le!=null&&le.errorEmitted?H||r.nextTick(ne):(!W&&(!H||y(m))&&(G||Y(m)===!1)||!ee&&(!H||Y(m))&&(ce||y(m)===!1)||le&&m.req&&m.aborted)&&r.nextTick(ne);const ie=()=>{E=N,m.removeListener("aborted",F),m.removeListener("complete",oe),m.removeListener("abort",F),m.removeListener("request",se),m.req&&m.req.removeListener("finish",oe),m.removeListener("end",ue),m.removeListener("close",ue),m.removeListener("finish",oe),m.removeListener("end",fe),m.removeListener("error",L),m.removeListener("close",F)};if(M.signal&&!D){const k=()=>{const Z=E;ie(),Z.call(m,new e(void 0,{cause:M.signal.reason}))};if(M.signal.aborted)r.nextTick(k);else{w=w||We().addAbortListener;const Z=w(M.signal,k),re=E;E=o((...K)=>{Z[U](),re.apply(m,K)})}}return ie}function S(m,M,E){let j=!1,V=N;if(M.signal)if(V=()=>{j=!0,E.call(m,new e(void 0,{cause:M.signal.reason}))},M.signal.aborted)r.nextTick(V);else{w=w||We().addAbortListener;const ee=w(M.signal,V),Q=E;E=o((...le)=>{ee[U](),Q.apply(m,le)})}const W=(...ee)=>{j||r.nextTick(()=>E.apply(m,ee))};return A(m[d].promise,W,W),N}function P(m,M){var E;let j=!1;return M===null&&(M=s),(E=M)!==null&&E!==void 0&&E.cleanup&&(C(M.cleanup,"cleanup"),j=M.cleanup),new x((V,W)=>{const ee=h(m,M,Q=>{j&&ee(),Q?W(Q):V()})})}return Er.exports=h,Er.exports.finished=P,Er.exports}var pn,Bi;function qt(){if(Bi)return pn;Bi=1;const r=Pt(),{aggregateTwoErrors:e,codes:{ERR_MULTIPLE_CALLBACK:t},AbortError:n}=De(),{Symbol:i}=Ie(),{kIsDestroyed:s,isDestroyed:o,isFinished:l,isServerRequest:c}=dt(),g=i("kDestroy"),C=i("kConstruct");function x(u,d,w){u&&(u.stack,d&&!d.errored&&(d.errored=u),w&&!w.errored&&(w.errored=u))}function A(u,d){const w=this._readableState,f=this._writableState,N=f||w;return f!=null&&f.destroyed||w!=null&&w.destroyed?(typeof d=="function"&&d(),this):(x(u,f,w),f&&(f.destroyed=!0),w&&(w.destroyed=!0),N.constructed?U(this,u,d):this.once(g,function(h){U(this,e(h,u),d)}),this)}function U(u,d,w){let f=!1;function N(h){if(f)return;f=!0;const S=u._readableState,P=u._writableState;x(h,P,S),P&&(P.closed=!0),S&&(S.closed=!0),typeof w=="function"&&w(h),h?r.nextTick(B,u,h):r.nextTick(y,u)}try{u._destroy(d||null,N)}catch(h){N(h)}}function B(u,d){p(u,d),y(u)}function y(u){const d=u._readableState,w=u._writableState;w&&(w.closeEmitted=!0),d&&(d.closeEmitted=!0),(w!=null&&w.emitClose||d!=null&&d.emitClose)&&u.emit("close")}function p(u,d){const w=u._readableState,f=u._writableState;f!=null&&f.errorEmitted||w!=null&&w.errorEmitted||(f&&(f.errorEmitted=!0),w&&(w.errorEmitted=!0),u.emit("error",d))}function R(){const u=this._readableState,d=this._writableState;u&&(u.constructed=!0,u.closed=!1,u.closeEmitted=!1,u.destroyed=!1,u.errored=null,u.errorEmitted=!1,u.reading=!1,u.ended=u.readable===!1,u.endEmitted=u.readable===!1),d&&(d.constructed=!0,d.destroyed=!1,d.closed=!1,d.closeEmitted=!1,d.errored=null,d.errorEmitted=!1,d.finalCalled=!1,d.prefinished=!1,d.ended=d.writable===!1,d.ending=d.writable===!1,d.finished=d.writable===!1)}function b(u,d,w){const f=u._readableState,N=u._writableState;if(N!=null&&N.destroyed||f!=null&&f.destroyed)return this;f!=null&&f.autoDestroy||N!=null&&N.autoDestroy?u.destroy(d):d&&(d.stack,N&&!N.errored&&(N.errored=d),f&&!f.errored&&(f.errored=d),w?r.nextTick(p,u,d):p(u,d))}function T(u,d){if(typeof u._construct!="function")return;const w=u._readableState,f=u._writableState;w&&(w.constructed=!1),f&&(f.constructed=!1),u.once(C,d),!(u.listenerCount(C)>1)&&r.nextTick(Y,u)}function Y(u){let d=!1;function w(f){if(d){b(u,f??new t);return}d=!0;const N=u._readableState,h=u._writableState,S=h||N;N&&(N.constructed=!0),h&&(h.constructed=!0),S.destroyed?u.emit(g,f):f?b(u,f,!0):r.nextTick(z,u)}try{u._construct(f=>{r.nextTick(w,f)})}catch(f){r.nextTick(w,f)}}function z(u){u.emit(C)}function J(u){return u?.setHeader&&typeof u.abort=="function"}function X(u){u.emit("close")}function a(u,d){u.emit("error",d),r.nextTick(X,u)}function _(u,d){!u||o(u)||(!d&&!l(u)&&(d=new n),c(u)?(u.socket=null,u.destroy(d)):J(u)?u.abort():J(u.req)?u.req.abort():typeof u.destroy=="function"?u.destroy(d):typeof u.close=="function"?u.close():d?r.nextTick(a,u,d):r.nextTick(X,u),u.destroyed||(u[s]=!0))}return pn={construct:T,destroyer:_,destroy:A,undestroy:R,errorOrDestroy:b},pn}var wn,Di;function ti(){if(Di)return wn;Di=1;const{ArrayIsArray:r,ObjectSetPrototypeOf:e}=Ie(),{EventEmitter:t}=Mr();function n(s){t.call(this,s)}e(n.prototype,t.prototype),e(n,t),n.prototype.pipe=function(s,o){const l=this;function c(y){s.writable&&s.write(y)===!1&&l.pause&&l.pause()}l.on("data",c);function g(){l.readable&&l.resume&&l.resume()}s.on("drain",g),!s._isStdio&&(!o||o.end!==!1)&&(l.on("end",x),l.on("close",A));let C=!1;function x(){C||(C=!0,s.end())}function A(){C||(C=!0,typeof s.destroy=="function"&&s.destroy())}function U(y){B(),t.listenerCount(this,"error")===0&&this.emit("error",y)}i(l,"error",U),i(s,"error",U);function B(){l.removeListener("data",c),s.removeListener("drain",g),l.removeListener("end",x),l.removeListener("close",A),l.removeListener("error",U),s.removeListener("error",U),l.removeListener("end",B),l.removeListener("close",B),s.removeListener("close",B)}return l.on("end",B),l.on("close",B),s.on("close",B),s.emit("pipe",l),s};function i(s,o,l){if(typeof s.prependListener=="function")return s.prependListener(o,l);!s._events||!s._events[o]?s.on(o,l):r(s._events[o])?s._events[o].unshift(l):s._events[o]=[l,s._events[o]]}return wn={Stream:n,prependListener:i},wn}var bn={exports:{}},ki;function Br(){return ki||(ki=1,function(r){const{SymbolDispose:e}=Ie(),{AbortError:t,codes:n}=De(),{isNodeStream:i,isWebStream:s,kControllerErrorFunction:o}=dt(),l=_t(),{ERR_INVALID_ARG_TYPE:c}=n;let g;const C=(x,A)=>{if(typeof x!="object"||!("aborted"in x))throw new c(A,"AbortSignal",x)};r.exports.addAbortSignal=function(A,U){if(C(A,"signal"),!i(U)&&!s(U))throw new c("stream",["ReadableStream","WritableStream","Stream"],U);return r.exports.addAbortSignalNoValidate(A,U)},r.exports.addAbortSignalNoValidate=function(x,A){if(typeof x!="object"||!("aborted"in x))return A;const U=i(A)?()=>{A.destroy(new t(void 0,{cause:x.reason}))}:()=>{A[o](new t(void 0,{cause:x.reason}))};if(x.aborted)U();else{g=g||We().addAbortListener;const B=g(x,U);l(A,B[e])}return A}}(bn)),bn.exports}var yn,Ui;function oa(){if(Ui)return yn;Ui=1;const{StringPrototypeSlice:r,SymbolIterator:e,TypedArrayPrototypeSet:t,Uint8Array:n}=Ie(),{Buffer:i}=Ct(),{inspect:s}=We();return yn=class{constructor(){this.head=null,this.tail=null,this.length=0}push(l){const c={data:l,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length}unshift(l){const c={data:l,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length}shift(){if(this.length===0)return;const l=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,l}clear(){this.head=this.tail=null,this.length=0}join(l){if(this.length===0)return"";let c=this.head,g=""+c.data;for(;(c=c.next)!==null;)g+=l+c.data;return g}concat(l){if(this.length===0)return i.alloc(0);const c=i.allocUnsafe(l>>>0);let g=this.head,C=0;for(;g;)t(c,g.data,C),C+=g.data.length,g=g.next;return c}consume(l,c){const g=this.head.data;if(l<g.length){const C=g.slice(0,l);return this.head.data=g.slice(l),C}return l===g.length?this.shift():c?this._getString(l):this._getBuffer(l)}first(){return this.head.data}*[e](){for(let l=this.head;l;l=l.next)yield l.data}_getString(l){let c="",g=this.head,C=0;do{const x=g.data;if(l>x.length)c+=x,l-=x.length;else{l===x.length?(c+=x,++C,g.next?this.head=g.next:this.head=this.tail=null):(c+=r(x,0,l),this.head=g,g.data=r(x,l));break}++C}while((g=g.next)!==null);return this.length-=C,c}_getBuffer(l){const c=i.allocUnsafe(l),g=l;let C=this.head,x=0;do{const A=C.data;if(l>A.length)t(c,A,g-l),l-=A.length;else{l===A.length?(t(c,A,g-l),++x,C.next?this.head=C.next:this.head=this.tail=null):(t(c,new n(A.buffer,A.byteOffset,l),g-l),this.head=C,C.data=A.slice(l));break}++x}while((C=C.next)!==null);return this.length-=x,c}[Symbol.for("nodejs.util.inspect.custom")](l,c){return s(this,{...c,depth:0,customInspect:!1})}},yn}var _n,qi;function Dr(){if(qi)return _n;qi=1;const{MathFloor:r,NumberIsInteger:e}=Ie(),{validateInteger:t}=nr(),{ERR_INVALID_ARG_VALUE:n}=De().codes;let i=16*1024,s=16;function o(C,x,A){return C.highWaterMark!=null?C.highWaterMark:x?C[A]:null}function l(C){return C?s:i}function c(C,x){t(x,"value",0),C?s=x:i=x}function g(C,x,A,U){const B=o(x,U,A);if(B!=null){if(!e(B)||B<0){const y=U?`options.${A}`:"options.highWaterMark";throw new n(y,B)}return r(B)}return l(C.objectMode)}return _n={getHighWaterMark:g,getDefaultHighWaterMark:l,setDefaultHighWaterMark:c},_n}var mn,ji;function zo(){if(ji)return mn;ji=1;const r=Pt(),{PromisePrototypeThen:e,SymbolAsyncIterator:t,SymbolIterator:n}=Ie(),{Buffer:i}=Ct(),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:o}=De().codes;function l(c,g,C){let x;if(typeof g=="string"||g instanceof i)return new c({objectMode:!0,...C,read(){this.push(g),this.push(null)}});let A;if(g&&g[t])A=!0,x=g[t]();else if(g&&g[n])A=!1,x=g[n]();else throw new s("iterable",["Iterable"],g);const U=new c({objectMode:!0,highWaterMark:1,...C});let B=!1;U._read=function(){B||(B=!0,p())},U._destroy=function(R,b){e(y(R),()=>r.nextTick(b,R),T=>r.nextTick(b,T||R))};async function y(R){const b=R!=null,T=typeof x.throw=="function";if(b&&T){const{value:Y,done:z}=await x.throw(R);if(await Y,z)return}if(typeof x.return=="function"){const{value:Y}=await x.return();await Y}}async function p(){for(;;){try{const{value:R,done:b}=A?await x.next():x.next();if(b)U.push(null);else{const T=R&&typeof R.then=="function"?await R:R;if(T===null)throw B=!1,new o;if(U.push(T))continue;B=!1}}catch(R){U.destroy(R)}break}}return U}return mn=l,mn}var En,Wi;function kr(){if(Wi)return En;Wi=1;const r=Pt(),{ArrayPrototypeIndexOf:e,NumberIsInteger:t,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:s,ObjectKeys:o,ObjectSetPrototypeOf:l,Promise:c,SafeSet:g,SymbolAsyncDispose:C,SymbolAsyncIterator:x,Symbol:A}=Ie();En=K,K.ReadableState=re;const{EventEmitter:U}=Mr(),{Stream:B,prependListener:y}=ti(),{Buffer:p}=Ct(),{addAbortSignal:R}=Br(),b=_t();let T=We().debuglog("stream",v=>{T=v});const Y=oa(),z=qt(),{getHighWaterMark:J,getDefaultHighWaterMark:X}=Dr(),{aggregateTwoErrors:a,codes:{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:u,ERR_OUT_OF_RANGE:d,ERR_STREAM_PUSH_AFTER_EOF:w,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:f},AbortError:N}=De(),{validateObject:h}=nr(),S=A("kPaused"),{StringDecoder:P}=ta(),m=zo();l(K.prototype,B.prototype),l(K,B);const M=()=>{},{errorOrDestroy:E}=z,j=1,V=2,W=4,ee=8,Q=16,le=32,ue=64,H=128,G=256,oe=512,ce=1024,fe=2048,L=4096,D=8192,F=16384,ne=32768,se=65536,ie=1<<17,k=1<<18;function Z(v){return{enumerable:!1,get(){return(this.state&v)!==0},set(O){O?this.state|=v:this.state&=~v}}}s(re.prototype,{objectMode:Z(j),ended:Z(V),endEmitted:Z(W),reading:Z(ee),constructed:Z(Q),sync:Z(le),needReadable:Z(ue),emittedReadable:Z(H),readableListening:Z(G),resumeScheduled:Z(oe),errorEmitted:Z(ce),emitClose:Z(fe),autoDestroy:Z(L),destroyed:Z(D),closed:Z(F),closeEmitted:Z(ne),multiAwaitDrain:Z(se),readingMore:Z(ie),dataEmitted:Z(k)});function re(v,O,te){typeof te!="boolean"&&(te=O instanceof ct()),this.state=fe|L|Q|le,v&&v.objectMode&&(this.state|=j),te&&v&&v.readableObjectMode&&(this.state|=j),this.highWaterMark=v?J(this,v,"readableHighWaterMark",te):X(!1),this.buffer=new Y,this.length=0,this.pipes=[],this.flowing=null,this[S]=null,v&&v.emitClose===!1&&(this.state&=~fe),v&&v.autoDestroy===!1&&(this.state&=~L),this.errored=null,this.defaultEncoding=v&&v.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,v&&v.encoding&&(this.decoder=new P(v.encoding),this.encoding=v.encoding)}function K(v){if(!(this instanceof K))return new K(v);const O=this instanceof ct();this._readableState=new re(v,this,O),v&&(typeof v.read=="function"&&(this._read=v.read),typeof v.destroy=="function"&&(this._destroy=v.destroy),typeof v.construct=="function"&&(this._construct=v.construct),v.signal&&!O&&R(v.signal,this)),B.call(this,v),z.construct(this,()=>{this._readableState.needReadable&&Me(this,this._readableState)})}K.prototype.destroy=z.destroy,K.prototype._undestroy=z.undestroy,K.prototype._destroy=function(v,O){O(v)},K.prototype[U.captureRejectionSymbol]=function(v){this.destroy(v)},K.prototype[C]=function(){let v;return this.destroyed||(v=this.readableEnded?null:new N,this.destroy(v)),new c((O,te)=>b(this,ae=>ae&&ae!==v?te(ae):O(null)))},K.prototype.push=function(v,O){return we(this,v,O,!1)},K.prototype.unshift=function(v,O){return we(this,v,O,!0)};function we(v,O,te,ae){T("readableAddChunk",O);const de=v._readableState;let xe;if((de.state&j)===0&&(typeof O=="string"?(te=te||de.defaultEncoding,de.encoding!==te&&(ae&&de.encoding?O=p.from(O,te).toString(de.encoding):(O=p.from(O,te),te=""))):O instanceof p?te="":B._isUint8Array(O)?(O=B._uint8ArrayToBuffer(O),te=""):O!=null&&(xe=new _("chunk",["string","Buffer","Uint8Array"],O))),xe)E(v,xe);else if(O===null)de.state&=~ee,Le(v,de);else if((de.state&j)!==0||O&&O.length>0)if(ae)if((de.state&W)!==0)E(v,new f);else{if(de.destroyed||de.errored)return!1;Pe(v,de,O,!0)}else if(de.ended)E(v,new w);else{if(de.destroyed||de.errored)return!1;de.state&=~ee,de.decoder&&!te?(O=de.decoder.write(O),de.objectMode||O.length!==0?Pe(v,de,O,!1):Me(v,de)):Pe(v,de,O,!1)}else ae||(de.state&=~ee,Me(v,de));return!de.ended&&(de.length<de.highWaterMark||de.length===0)}function Pe(v,O,te,ae){O.flowing&&O.length===0&&!O.sync&&v.listenerCount("data")>0?((O.state&se)!==0?O.awaitDrainWriters.clear():O.awaitDrainWriters=null,O.dataEmitted=!0,v.emit("data",te)):(O.length+=O.objectMode?1:te.length,ae?O.buffer.unshift(te):O.buffer.push(te),(O.state&ue)!==0&&Ye(v)),Me(v,O)}K.prototype.isPaused=function(){const v=this._readableState;return v[S]===!0||v.flowing===!1},K.prototype.setEncoding=function(v){const O=new P(v);this._readableState.decoder=O,this._readableState.encoding=this._readableState.decoder.encoding;const te=this._readableState.buffer;let ae="";for(const de of te)ae+=O.write(de);return te.clear(),ae!==""&&te.push(ae),this._readableState.length=ae.length,this};const ye=1073741824;function Be(v){if(v>ye)throw new d("size","<= 1GiB",v);return v--,v|=v>>>1,v|=v>>>2,v|=v>>>4,v|=v>>>8,v|=v>>>16,v++,v}function Oe(v,O){return v<=0||O.length===0&&O.ended?0:(O.state&j)!==0?1:n(v)?O.flowing&&O.length?O.buffer.first().length:O.length:v<=O.length?v:O.ended?O.length:0}K.prototype.read=function(v){T("read",v),v===void 0?v=NaN:t(v)||(v=i(v,10));const O=this._readableState,te=v;if(v>O.highWaterMark&&(O.highWaterMark=Be(v)),v!==0&&(O.state&=~H),v===0&&O.needReadable&&((O.highWaterMark!==0?O.length>=O.highWaterMark:O.length>0)||O.ended))return T("read: emitReadable",O.length,O.ended),O.length===0&&O.ended?Wt(this):Ye(this),null;if(v=Oe(v,O),v===0&&O.ended)return O.length===0&&Wt(this),null;let ae=(O.state&ue)!==0;if(T("need readable",ae),(O.length===0||O.length-v<O.highWaterMark)&&(ae=!0,T("length less than watermark",ae)),O.ended||O.reading||O.destroyed||O.errored||!O.constructed)ae=!1,T("reading, ended or constructing",ae);else if(ae){T("do read"),O.state|=ee|le,O.length===0&&(O.state|=ue);try{this._read(O.highWaterMark)}catch(xe){E(this,xe)}O.state&=~le,O.reading||(v=Oe(te,O))}let de;return v>0?de=ht(v,O):de=null,de===null?(O.needReadable=O.length<=O.highWaterMark,v=0):(O.length-=v,O.multiAwaitDrain?O.awaitDrainWriters.clear():O.awaitDrainWriters=null),O.length===0&&(O.ended||(O.needReadable=!0),te!==v&&O.ended&&Wt(this)),de!==null&&!O.errorEmitted&&!O.closeEmitted&&(O.dataEmitted=!0,this.emit("data",de)),de};function Le(v,O){if(T("onEofChunk"),!O.ended){if(O.decoder){const te=O.decoder.end();te&&te.length&&(O.buffer.push(te),O.length+=O.objectMode?1:te.length)}O.ended=!0,O.sync?Ye(v):(O.needReadable=!1,O.emittedReadable=!0,mt(v))}}function Ye(v){const O=v._readableState;T("emitReadable",O.needReadable,O.emittedReadable),O.needReadable=!1,O.emittedReadable||(T("emitReadable",O.flowing),O.emittedReadable=!0,r.nextTick(mt,v))}function mt(v){const O=v._readableState;T("emitReadable_",O.destroyed,O.length,O.ended),!O.destroyed&&!O.errored&&(O.length||O.ended)&&(v.emit("readable"),O.emittedReadable=!1),O.needReadable=!O.flowing&&!O.ended&&O.length<=O.highWaterMark,jt(v)}function Me(v,O){!O.readingMore&&O.constructed&&(O.readingMore=!0,r.nextTick(ar,v,O))}function ar(v,O){for(;!O.reading&&!O.ended&&(O.length<O.highWaterMark||O.flowing&&O.length===0);){const te=O.length;if(T("maybeReadMore read 0"),v.read(0),te===O.length)break}O.readingMore=!1}K.prototype._read=function(v){throw new u("_read()")},K.prototype.pipe=function(v,O){const te=this,ae=this._readableState;ae.pipes.length===1&&(ae.multiAwaitDrain||(ae.multiAwaitDrain=!0,ae.awaitDrainWriters=new g(ae.awaitDrainWriters?[ae.awaitDrainWriters]:[]))),ae.pipes.push(v),T("pipe count=%d opts=%j",ae.pipes.length,O);const xe=(!O||O.end!==!1)&&v!==r.stdout&&v!==r.stderr?dr:Et;ae.endEmitted?r.nextTick(xe):te.once("end",xe),v.on("unpipe",ke);function ke(ot,Je){T("onunpipe"),ot===te&&Je&&Je.hasUnpiped===!1&&(Je.hasUnpiped=!0,Kr())}function dr(){T("onend"),v.end()}let Ue,hr=!1;function Kr(){T("cleanup"),v.removeListener("close",et),v.removeListener("finish",Ht),Ue&&v.removeListener("drain",Ue),v.removeListener("error",$t),v.removeListener("unpipe",ke),te.removeListener("end",dr),te.removeListener("end",Et),te.removeListener("data",pr),hr=!0,Ue&&ae.awaitDrainWriters&&(!v._writableState||v._writableState.needDrain)&&Ue()}function gr(){hr||(ae.pipes.length===1&&ae.pipes[0]===v?(T("false write response, pause",0),ae.awaitDrainWriters=v,ae.multiAwaitDrain=!1):ae.pipes.length>1&&ae.pipes.includes(v)&&(T("false write response, pause",ae.awaitDrainWriters.size),ae.awaitDrainWriters.add(v)),te.pause()),Ue||(Ue=zr(te,v),v.on("drain",Ue))}te.on("data",pr);function pr(ot){T("ondata");const Je=v.write(ot);T("dest.write",Je),Je===!1&&gr()}function $t(ot){if(T("onerror",ot),Et(),v.removeListener("error",$t),v.listenerCount("error")===0){const Je=v._writableState||v._readableState;Je&&!Je.errorEmitted?E(v,ot):v.emit("error",ot)}}y(v,"error",$t);function et(){v.removeListener("finish",Ht),Et()}v.once("close",et);function Ht(){T("onfinish"),v.removeListener("close",et),Et()}v.once("finish",Ht);function Et(){T("unpipe"),te.unpipe(v)}return v.emit("pipe",te),v.writableNeedDrain===!0?gr():ae.flowing||(T("pipe resume"),te.resume()),v};function zr(v,O){return function(){const ae=v._readableState;ae.awaitDrainWriters===O?(T("pipeOnDrain",1),ae.awaitDrainWriters=null):ae.multiAwaitDrain&&(T("pipeOnDrain",ae.awaitDrainWriters.size),ae.awaitDrainWriters.delete(O)),(!ae.awaitDrainWriters||ae.awaitDrainWriters.size===0)&&v.listenerCount("data")&&v.resume()}}K.prototype.unpipe=function(v){const O=this._readableState,te={hasUnpiped:!1};if(O.pipes.length===0)return this;if(!v){const de=O.pipes;O.pipes=[],this.pause();for(let xe=0;xe<de.length;xe++)de[xe].emit("unpipe",this,{hasUnpiped:!1});return this}const ae=e(O.pipes,v);return ae===-1?this:(O.pipes.splice(ae,1),O.pipes.length===0&&this.pause(),v.emit("unpipe",this,te),this)},K.prototype.on=function(v,O){const te=B.prototype.on.call(this,v,O),ae=this._readableState;return v==="data"?(ae.readableListening=this.listenerCount("readable")>0,ae.flowing!==!1&&this.resume()):v==="readable"&&!ae.endEmitted&&!ae.readableListening&&(ae.readableListening=ae.needReadable=!0,ae.flowing=!1,ae.emittedReadable=!1,T("on readable",ae.length,ae.reading),ae.length?Ye(this):ae.reading||r.nextTick(nt,this)),te},K.prototype.addListener=K.prototype.on,K.prototype.removeListener=function(v,O){const te=B.prototype.removeListener.call(this,v,O);return v==="readable"&&r.nextTick(lr,this),te},K.prototype.off=K.prototype.removeListener,K.prototype.removeAllListeners=function(v){const O=B.prototype.removeAllListeners.apply(this,arguments);return(v==="readable"||v===void 0)&&r.nextTick(lr,this),O};function lr(v){const O=v._readableState;O.readableListening=v.listenerCount("readable")>0,O.resumeScheduled&&O[S]===!1?O.flowing=!0:v.listenerCount("data")>0?v.resume():O.readableListening||(O.flowing=null)}function nt(v){T("readable nexttick read 0"),v.read(0)}K.prototype.resume=function(){const v=this._readableState;return v.flowing||(T("resume"),v.flowing=!v.readableListening,Lt(this,v)),v[S]=!1,this};function Lt(v,O){O.resumeScheduled||(O.resumeScheduled=!0,r.nextTick(Gr,v,O))}function Gr(v,O){T("resume",O.reading),O.reading||v.read(0),O.resumeScheduled=!1,v.emit("resume"),jt(v),O.flowing&&!O.reading&&v.read(0)}K.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[S]=!0,this};function jt(v){const O=v._readableState;for(T("flow",O.flowing);O.flowing&&v.read()!==null;);}K.prototype.wrap=function(v){let O=!1;v.on("data",ae=>{!this.push(ae)&&v.pause&&(O=!0,v.pause())}),v.on("end",()=>{this.push(null)}),v.on("error",ae=>{E(this,ae)}),v.on("close",()=>{this.destroy()}),v.on("destroy",()=>{this.destroy()}),this._read=()=>{O&&v.resume&&(O=!1,v.resume())};const te=o(v);for(let ae=1;ae<te.length;ae++){const de=te[ae];this[de]===void 0&&typeof v[de]=="function"&&(this[de]=v[de].bind(v))}return this},K.prototype[x]=function(){return ur(this)},K.prototype.iterator=function(v){return v!==void 0&&h(v,"options"),ur(this,v)};function ur(v,O){typeof v.read!="function"&&(v=K.wrap(v,{objectMode:!0}));const te=fr(v,O);return te.stream=v,te}async function*fr(v,O){let te=M;function ae(ke){this===v?(te(),te=M):te=ke}v.on("readable",ae);let de;const xe=b(v,{writable:!1},ke=>{de=ke?a(de,ke):null,te(),te=M});try{for(;;){const ke=v.destroyed?null:v.read();if(ke!==null)yield ke;else{if(de)throw de;if(de===null)return;await new c(ae)}}}catch(ke){throw de=a(de,ke),de}finally{(de||O?.destroyOnReturn!==!1)&&(de===void 0||v._readableState.autoDestroy)?z.destroyer(v,null):(v.off("readable",ae),xe())}}s(K.prototype,{readable:{__proto__:null,get(){const v=this._readableState;return!!v&&v.readable!==!1&&!v.destroyed&&!v.errorEmitted&&!v.endEmitted},set(v){this._readableState&&(this._readableState.readable=!!v)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(v){this._readableState&&(this._readableState.flowing=v)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(v){this._readableState&&(this._readableState.destroyed=v)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),s(re.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[S]!==!1},set(v){this[S]=!!v}}}),K._fromList=ht;function ht(v,O){if(O.length===0)return null;let te;return O.objectMode?te=O.buffer.shift():!v||v>=O.length?(O.decoder?te=O.buffer.join(""):O.buffer.length===1?te=O.buffer.first():te=O.buffer.concat(O.length),O.buffer.clear()):te=O.buffer.consume(v,O.decoder),te}function Wt(v){const O=v._readableState;T("endReadable",O.endEmitted),O.endEmitted||(O.ended=!0,r.nextTick(it,O,v))}function it(v,O){if(T("endReadableNT",v.endEmitted,v.length),!v.errored&&!v.closeEmitted&&!v.endEmitted&&v.length===0){if(v.endEmitted=!0,O.emit("end"),O.writable&&O.allowHalfOpen===!1)r.nextTick(Vr,O);else if(v.autoDestroy){const te=O._writableState;(!te||te.autoDestroy&&(te.finished||te.writable===!1))&&O.destroy()}}}function Vr(v){v.writable&&!v.writableEnded&&!v.destroyed&&v.end()}K.from=function(v,O){return m(K,v,O)};let Ft;function cr(){return Ft===void 0&&(Ft={}),Ft}return K.fromWeb=function(v,O){return cr().newStreamReadableFromReadableStream(v,O)},K.toWeb=function(v,O){return cr().newReadableStreamFromStreamReadable(v,O)},K.wrap=function(v,O){var te,ae;return new K({objectMode:(te=(ae=v.readableObjectMode)!==null&&ae!==void 0?ae:v.objectMode)!==null&&te!==void 0?te:!0,...O,destroy(de,xe){z.destroyer(v,de),xe(de)}}).wrap(v)},En}var Sn,Fi;function ri(){if(Fi)return Sn;Fi=1;const r=Pt(),{ArrayPrototypeSlice:e,Error:t,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:s,ObjectSetPrototypeOf:o,StringPrototypeToLowerCase:l,Symbol:c,SymbolHasInstance:g}=Ie();Sn=h,h.WritableState=f;const{EventEmitter:C}=Mr(),x=ti().Stream,{Buffer:A}=Ct(),U=qt(),{addAbortSignal:B}=Br(),{getHighWaterMark:y,getDefaultHighWaterMark:p}=Dr(),{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:b,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:Y,ERR_STREAM_DESTROYED:z,ERR_STREAM_ALREADY_FINISHED:J,ERR_STREAM_NULL_VALUES:X,ERR_STREAM_WRITE_AFTER_END:a,ERR_UNKNOWN_ENCODING:_}=De().codes,{errorOrDestroy:u}=U;o(h.prototype,x.prototype),o(h,x);function d(){}const w=c("kOnFinished");function f(L,D,F){typeof F!="boolean"&&(F=D instanceof ct()),this.objectMode=!!(L&&L.objectMode),F&&(this.objectMode=this.objectMode||!!(L&&L.writableObjectMode)),this.highWaterMark=L?y(this,L,"writableHighWaterMark",F):p(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const ne=!!(L&&L.decodeStrings===!1);this.decodeStrings=!ne,this.defaultEncoding=L&&L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=E.bind(void 0,D),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,N(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!L||L.emitClose!==!1,this.autoDestroy=!L||L.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[w]=[]}function N(L){L.buffered=[],L.bufferedIndex=0,L.allBuffers=!0,L.allNoop=!0}f.prototype.getBuffer=function(){return e(this.buffered,this.bufferedIndex)},i(f.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function h(L){const D=this instanceof ct();if(!D&&!n(h,this))return new h(L);this._writableState=new f(L,this,D),L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final),typeof L.construct=="function"&&(this._construct=L.construct),L.signal&&B(L.signal,this)),x.call(this,L),U.construct(this,()=>{const F=this._writableState;F.writing||ee(this,F),H(this,F)})}i(h,g,{__proto__:null,value:function(L){return n(this,L)?!0:this!==h?!1:L&&L._writableState instanceof f}}),h.prototype.pipe=function(){u(this,new Y)};function S(L,D,F,ne){const se=L._writableState;if(typeof F=="function")ne=F,F=se.defaultEncoding;else{if(!F)F=se.defaultEncoding;else if(F!=="buffer"&&!A.isEncoding(F))throw new _(F);typeof ne!="function"&&(ne=d)}if(D===null)throw new X;if(!se.objectMode)if(typeof D=="string")se.decodeStrings!==!1&&(D=A.from(D,F),F="buffer");else if(D instanceof A)F="buffer";else if(x._isUint8Array(D))D=x._uint8ArrayToBuffer(D),F="buffer";else throw new R("chunk",["string","Buffer","Uint8Array"],D);let ie;return se.ending?ie=new a:se.destroyed&&(ie=new z("write")),ie?(r.nextTick(ne,ie),u(L,ie,!0),ie):(se.pendingcb++,P(L,se,D,F,ne))}h.prototype.write=function(L,D,F){return S(this,L,D,F)===!0},h.prototype.cork=function(){this._writableState.corked++},h.prototype.uncork=function(){const L=this._writableState;L.corked&&(L.corked--,L.writing||ee(this,L))},h.prototype.setDefaultEncoding=function(D){if(typeof D=="string"&&(D=l(D)),!A.isEncoding(D))throw new _(D);return this._writableState.defaultEncoding=D,this};function P(L,D,F,ne,se){const ie=D.objectMode?1:F.length;D.length+=ie;const k=D.length<D.highWaterMark;return k||(D.needDrain=!0),D.writing||D.corked||D.errored||!D.constructed?(D.buffered.push({chunk:F,encoding:ne,callback:se}),D.allBuffers&&ne!=="buffer"&&(D.allBuffers=!1),D.allNoop&&se!==d&&(D.allNoop=!1)):(D.writelen=ie,D.writecb=se,D.writing=!0,D.sync=!0,L._write(F,ne,D.onwrite),D.sync=!1),k&&!D.errored&&!D.destroyed}function m(L,D,F,ne,se,ie,k){D.writelen=ne,D.writecb=k,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new z("write")):F?L._writev(se,D.onwrite):L._write(se,ie,D.onwrite),D.sync=!1}function M(L,D,F,ne){--D.pendingcb,ne(F),W(D),u(L,F)}function E(L,D){const F=L._writableState,ne=F.sync,se=F.writecb;if(typeof se!="function"){u(L,new T);return}F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0,D?(D.stack,F.errored||(F.errored=D),L._readableState&&!L._readableState.errored&&(L._readableState.errored=D),ne?r.nextTick(M,L,F,D,se):M(L,F,D,se)):(F.buffered.length>F.bufferedIndex&&ee(L,F),ne?F.afterWriteTickInfo!==null&&F.afterWriteTickInfo.cb===se?F.afterWriteTickInfo.count++:(F.afterWriteTickInfo={count:1,cb:se,stream:L,state:F},r.nextTick(j,F.afterWriteTickInfo)):V(L,F,1,se))}function j({stream:L,state:D,count:F,cb:ne}){return D.afterWriteTickInfo=null,V(L,D,F,ne)}function V(L,D,F,ne){for(!D.ending&&!L.destroyed&&D.length===0&&D.needDrain&&(D.needDrain=!1,L.emit("drain"));F-- >0;)D.pendingcb--,ne();D.destroyed&&W(D),H(L,D)}function W(L){if(L.writing)return;for(let se=L.bufferedIndex;se<L.buffered.length;++se){var D;const{chunk:ie,callback:k}=L.buffered[se],Z=L.objectMode?1:ie.length;L.length-=Z,k((D=L.errored)!==null&&D!==void 0?D:new z("write"))}const F=L[w].splice(0);for(let se=0;se<F.length;se++){var ne;F[se]((ne=L.errored)!==null&&ne!==void 0?ne:new z("end"))}N(L)}function ee(L,D){if(D.corked||D.bufferProcessing||D.destroyed||!D.constructed)return;const{buffered:F,bufferedIndex:ne,objectMode:se}=D,ie=F.length-ne;if(!ie)return;let k=ne;if(D.bufferProcessing=!0,ie>1&&L._writev){D.pendingcb-=ie-1;const Z=D.allNoop?d:K=>{for(let we=k;we<F.length;++we)F[we].callback(K)},re=D.allNoop&&k===0?F:e(F,k);re.allBuffers=D.allBuffers,m(L,D,!0,D.length,re,"",Z),N(D)}else{do{const{chunk:Z,encoding:re,callback:K}=F[k];F[k++]=null;const we=se?1:Z.length;m(L,D,!1,we,Z,re,K)}while(k<F.length&&!D.writing);k===F.length?N(D):k>256?(F.splice(0,k),D.bufferedIndex=0):D.bufferedIndex=k}D.bufferProcessing=!1}h.prototype._write=function(L,D,F){if(this._writev)this._writev([{chunk:L,encoding:D}],F);else throw new b("_write()")},h.prototype._writev=null,h.prototype.end=function(L,D,F){const ne=this._writableState;typeof L=="function"?(F=L,L=null,D=null):typeof D=="function"&&(F=D,D=null);let se;if(L!=null){const ie=S(this,L,D);ie instanceof t&&(se=ie)}return ne.corked&&(ne.corked=1,this.uncork()),se||(!ne.errored&&!ne.ending?(ne.ending=!0,H(this,ne,!0),ne.ended=!0):ne.finished?se=new J("end"):ne.destroyed&&(se=new z("end"))),typeof F=="function"&&(se||ne.finished?r.nextTick(F,se):ne[w].push(F)),this};function Q(L){return L.ending&&!L.destroyed&&L.constructed&&L.length===0&&!L.errored&&L.buffered.length===0&&!L.finished&&!L.writing&&!L.errorEmitted&&!L.closeEmitted}function le(L,D){let F=!1;function ne(se){if(F){u(L,se??T());return}if(F=!0,D.pendingcb--,se){const ie=D[w].splice(0);for(let k=0;k<ie.length;k++)ie[k](se);u(L,se,D.sync)}else Q(D)&&(D.prefinished=!0,L.emit("prefinish"),D.pendingcb++,r.nextTick(G,L,D))}D.sync=!0,D.pendingcb++;try{L._final(ne)}catch(se){ne(se)}D.sync=!1}function ue(L,D){!D.prefinished&&!D.finalCalled&&(typeof L._final=="function"&&!D.destroyed?(D.finalCalled=!0,le(L,D)):(D.prefinished=!0,L.emit("prefinish")))}function H(L,D,F){Q(D)&&(ue(L,D),D.pendingcb===0&&(F?(D.pendingcb++,r.nextTick((ne,se)=>{Q(se)?G(ne,se):se.pendingcb--},L,D)):Q(D)&&(D.pendingcb++,G(L,D))))}function G(L,D){D.pendingcb--,D.finished=!0;const F=D[w].splice(0);for(let ne=0;ne<F.length;ne++)F[ne]();if(L.emit("finish"),D.autoDestroy){const ne=L._readableState;(!ne||ne.autoDestroy&&(ne.endEmitted||ne.readable===!1))&&L.destroy()}}s(h.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(L){this._writableState&&(this._writableState.destroyed=L)}},writable:{__proto__:null,get(){const L=this._writableState;return!!L&&L.writable!==!1&&!L.destroyed&&!L.errored&&!L.ending&&!L.ended},set(L){this._writableState&&(this._writableState.writable=!!L)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const L=this._writableState;return L?!L.destroyed&&!L.ending&&L.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const oe=U.destroy;h.prototype.destroy=function(L,D){const F=this._writableState;return!F.destroyed&&(F.bufferedIndex<F.buffered.length||F[w].length)&&r.nextTick(W,F),oe.call(this,L,D),this},h.prototype._undestroy=U.undestroy,h.prototype._destroy=function(L,D){D(L)},h.prototype[C.captureRejectionSymbol]=function(L){this.destroy(L)};let ce;function fe(){return ce===void 0&&(ce={}),ce}return h.fromWeb=function(L,D){return fe().newStreamWritableFromWritableStream(L,D)},h.toWeb=function(L){return fe().newWritableStreamFromStreamWritable(L)},Sn}var vn,$i;function sa(){if($i)return vn;$i=1;const r=Pt(),e=Ct(),{isReadable:t,isWritable:n,isIterable:i,isNodeStream:s,isReadableNodeStream:o,isWritableNodeStream:l,isDuplexNodeStream:c,isReadableStream:g,isWritableStream:C}=dt(),x=_t(),{AbortError:A,codes:{ERR_INVALID_ARG_TYPE:U,ERR_INVALID_RETURN_VALUE:B}}=De(),{destroyer:y}=qt(),p=ct(),R=kr(),b=ri(),{createDeferredPromise:T}=We(),Y=zo(),z=globalThis.Blob||e.Blob,J=typeof z<"u"?function(f){return f instanceof z}:function(f){return!1},X=globalThis.AbortController||tr().AbortController,{FunctionPrototypeCall:a}=Ie();class _ extends p{constructor(f){super(f),f?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),f?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}vn=function w(f,N){if(c(f))return f;if(o(f))return d({readable:f});if(l(f))return d({writable:f});if(s(f))return d({writable:!1,readable:!1});if(g(f))return d({readable:R.fromWeb(f)});if(C(f))return d({writable:b.fromWeb(f)});if(typeof f=="function"){const{value:S,write:P,final:m,destroy:M}=u(f);if(i(S))return Y(_,S,{objectMode:!0,write:P,final:m,destroy:M});const E=S?.then;if(typeof E=="function"){let j;const V=a(E,S,W=>{if(W!=null)throw new B("nully","body",W)},W=>{y(j,W)});return j=new _({objectMode:!0,readable:!1,write:P,final(W){m(async()=>{try{await V,r.nextTick(W,null)}catch(ee){r.nextTick(W,ee)}})},destroy:M})}throw new B("Iterable, AsyncIterable or AsyncFunction",N,S)}if(J(f))return w(f.arrayBuffer());if(i(f))return Y(_,f,{objectMode:!0,writable:!1});if(g(f?.readable)&&C(f?.writable))return _.fromWeb(f);if(typeof f?.writable=="object"||typeof f?.readable=="object"){const S=f!=null&&f.readable?o(f?.readable)?f?.readable:w(f.readable):void 0,P=f!=null&&f.writable?l(f?.writable)?f?.writable:w(f.writable):void 0;return d({readable:S,writable:P})}const h=f?.then;if(typeof h=="function"){let S;return a(h,f,P=>{P!=null&&S.push(P),S.push(null)},P=>{y(S,P)}),S=new _({objectMode:!0,writable:!1,read(){}})}throw new U(N,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],f)};function u(w){let{promise:f,resolve:N}=T();const h=new X,S=h.signal;return{value:w(async function*(){for(;;){const m=f;f=null;const{chunk:M,done:E,cb:j}=await m;if(r.nextTick(j),E)return;if(S.aborted)throw new A(void 0,{cause:S.reason});({promise:f,resolve:N}=T()),yield M}}(),{signal:S}),write(m,M,E){const j=N;N=null,j({chunk:m,done:!1,cb:E})},final(m){const M=N;N=null,M({done:!0,cb:m})},destroy(m,M){h.abort(),M(m)}}}function d(w){const f=w.readable&&typeof w.readable.read!="function"?R.wrap(w.readable):w.readable,N=w.writable;let h=!!t(f),S=!!n(N),P,m,M,E,j;function V(W){const ee=E;E=null,ee?ee(W):W&&j.destroy(W)}return j=new _({readableObjectMode:!!(f!=null&&f.readableObjectMode),writableObjectMode:!!(N!=null&&N.writableObjectMode),readable:h,writable:S}),S&&(x(N,W=>{S=!1,W&&y(f,W),V(W)}),j._write=function(W,ee,Q){N.write(W,ee)?Q():P=Q},j._final=function(W){N.end(),m=W},N.on("drain",function(){if(P){const W=P;P=null,W()}}),N.on("finish",function(){if(m){const W=m;m=null,W()}})),h&&(x(f,W=>{h=!1,W&&y(f,W),V(W)}),f.on("readable",function(){if(M){const W=M;M=null,W()}}),f.on("end",function(){j.push(null)}),j._read=function(){for(;;){const W=f.read();if(W===null){M=j._read;return}if(!j.push(W))return}}),j._destroy=function(W,ee){!W&&E!==null&&(W=new A),M=null,P=null,m=null,E===null?ee(W):(E=ee,y(N,W),y(f,W))},j}return vn}var An,Hi;function ct(){if(Hi)return An;Hi=1;const{ObjectDefineProperties:r,ObjectGetOwnPropertyDescriptor:e,ObjectKeys:t,ObjectSetPrototypeOf:n}=Ie();An=o;const i=kr(),s=ri();n(o.prototype,i.prototype),n(o,i);{const C=t(s.prototype);for(let x=0;x<C.length;x++){const A=C[x];o.prototype[A]||(o.prototype[A]=s.prototype[A])}}function o(C){if(!(this instanceof o))return new o(C);i.call(this,C),s.call(this,C),C?(this.allowHalfOpen=C.allowHalfOpen!==!1,C.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),C.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}r(o.prototype,{writable:{__proto__:null,...e(s.prototype,"writable")},writableHighWaterMark:{__proto__:null,...e(s.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...e(s.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...e(s.prototype,"writableBuffer")},writableLength:{__proto__:null,...e(s.prototype,"writableLength")},writableFinished:{__proto__:null,...e(s.prototype,"writableFinished")},writableCorked:{__proto__:null,...e(s.prototype,"writableCorked")},writableEnded:{__proto__:null,...e(s.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...e(s.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(C){this._readableState&&this._writableState&&(this._readableState.destroyed=C,this._writableState.destroyed=C)}}});let l;function c(){return l===void 0&&(l={}),l}o.fromWeb=function(C,x){return c().newStreamDuplexFromReadableWritablePair(C,x)},o.toWeb=function(C){return c().newReadableWritablePairFromDuplex(C)};let g;return o.from=function(C){return g||(g=sa()),g(C,"body")},An}var Rn,zi;function Go(){if(zi)return Rn;zi=1;const{ObjectSetPrototypeOf:r,Symbol:e}=Ie();Rn=o;const{ERR_METHOD_NOT_IMPLEMENTED:t}=De().codes,n=ct(),{getHighWaterMark:i}=Dr();r(o.prototype,n.prototype),r(o,n);const s=e("kCallback");function o(g){if(!(this instanceof o))return new o(g);const C=g?i(this,g,"readableHighWaterMark",!0):null;C===0&&(g={...g,highWaterMark:null,readableHighWaterMark:C,writableHighWaterMark:g.writableHighWaterMark||0}),n.call(this,g),this._readableState.sync=!1,this[s]=null,g&&(typeof g.transform=="function"&&(this._transform=g.transform),typeof g.flush=="function"&&(this._flush=g.flush)),this.on("prefinish",c)}function l(g){typeof this._flush=="function"&&!this.destroyed?this._flush((C,x)=>{if(C){g?g(C):this.destroy(C);return}x!=null&&this.push(x),this.push(null),g&&g()}):(this.push(null),g&&g())}function c(){this._final!==l&&l.call(this)}return o.prototype._final=l,o.prototype._transform=function(g,C,x){throw new t("_transform()")},o.prototype._write=function(g,C,x){const A=this._readableState,U=this._writableState,B=A.length;this._transform(g,C,(y,p)=>{if(y){x(y);return}p!=null&&this.push(p),U.ended||B===A.length||A.length<A.highWaterMark?x():this[s]=x})},o.prototype._read=function(){if(this[s]){const g=this[s];this[s]=null,g()}},Rn}var In,Gi;function Vo(){if(Gi)return In;Gi=1;const{ObjectSetPrototypeOf:r}=Ie();In=t;const e=Go();r(t.prototype,e.prototype),r(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,i,s){s(null,n)},In}var Tn,Vi;function ni(){if(Vi)return Tn;Vi=1;const r=Pt(),{ArrayIsArray:e,Promise:t,SymbolAsyncIterator:n,SymbolDispose:i}=Ie(),s=_t(),{once:o}=We(),l=qt(),c=ct(),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:C,ERR_INVALID_RETURN_VALUE:x,ERR_MISSING_ARGS:A,ERR_STREAM_DESTROYED:U,ERR_STREAM_PREMATURE_CLOSE:B},AbortError:y}=De(),{validateFunction:p,validateAbortSignal:R}=nr(),{isIterable:b,isReadable:T,isReadableNodeStream:Y,isNodeStream:z,isTransformStream:J,isWebStream:X,isReadableStream:a,isReadableFinished:_}=dt(),u=globalThis.AbortController||tr().AbortController;let d,w,f;function N(W,ee,Q){let le=!1;W.on("close",()=>{le=!0});const ue=s(W,{readable:ee,writable:Q},H=>{le=!H});return{destroy:H=>{le||(le=!0,l.destroyer(W,H||new U("pipe")))},cleanup:ue}}function h(W){return p(W[W.length-1],"streams[stream.length - 1]"),W.pop()}function S(W){if(b(W))return W;if(Y(W))return P(W);throw new C("val",["Readable","Iterable","AsyncIterable"],W)}async function*P(W){w||(w=kr()),yield*w.prototype[n].call(W)}async function m(W,ee,Q,{end:le}){let ue,H=null;const G=fe=>{if(fe&&(ue=fe),H){const L=H;H=null,L()}},oe=()=>new t((fe,L)=>{ue?L(ue):H=()=>{ue?L(ue):fe()}});ee.on("drain",G);const ce=s(ee,{readable:!1},G);try{ee.writableNeedDrain&&await oe();for await(const fe of W)ee.write(fe)||await oe();le&&(ee.end(),await oe()),Q()}catch(fe){Q(ue!==fe?g(ue,fe):fe)}finally{ce(),ee.off("drain",G)}}async function M(W,ee,Q,{end:le}){J(ee)&&(ee=ee.writable);const ue=ee.getWriter();try{for await(const H of W)await ue.ready,ue.write(H).catch(()=>{});await ue.ready,le&&await ue.close(),Q()}catch(H){try{await ue.abort(H),Q(H)}catch(G){Q(G)}}}function E(...W){return j(W,o(h(W)))}function j(W,ee,Q){if(W.length===1&&e(W[0])&&(W=W[0]),W.length<2)throw new A("streams");const le=new u,ue=le.signal,H=Q?.signal,G=[];R(H,"options.signal");function oe(){se(new y)}f=f||We().addAbortListener;let ce;H&&(ce=f(H,oe));let fe,L;const D=[];let F=0;function ne(re){se(re,--F===0)}function se(re,K){var we;if(re&&(!fe||fe.code==="ERR_STREAM_PREMATURE_CLOSE")&&(fe=re),!(!fe&&!K)){for(;D.length;)D.shift()(fe);(we=ce)===null||we===void 0||we[i](),le.abort(),K&&(fe||G.forEach(Pe=>Pe()),r.nextTick(ee,fe,L))}}let ie;for(let re=0;re<W.length;re++){const K=W[re],we=re<W.length-1,Pe=re>0,ye=we||Q?.end!==!1,Be=re===W.length-1;if(z(K)){let Oe=function(Le){Le&&Le.name!=="AbortError"&&Le.code!=="ERR_STREAM_PREMATURE_CLOSE"&&ne(Le)};if(ye){const{destroy:Le,cleanup:Ye}=N(K,we,Pe);D.push(Le),T(K)&&Be&&G.push(Ye)}K.on("error",Oe),T(K)&&Be&&G.push(()=>{K.removeListener("error",Oe)})}if(re===0)if(typeof K=="function"){if(ie=K({signal:ue}),!b(ie))throw new x("Iterable, AsyncIterable or Stream","source",ie)}else b(K)||Y(K)||J(K)?ie=K:ie=c.from(K);else if(typeof K=="function"){if(J(ie)){var k;ie=S((k=ie)===null||k===void 0?void 0:k.readable)}else ie=S(ie);if(ie=K(ie,{signal:ue}),we){if(!b(ie,!0))throw new x("AsyncIterable",`transform[${re-1}]`,ie)}else{var Z;d||(d=Vo());const Oe=new d({objectMode:!0}),Le=(Z=ie)===null||Z===void 0?void 0:Z.then;if(typeof Le=="function")F++,Le.call(ie,Me=>{L=Me,Me!=null&&Oe.write(Me),ye&&Oe.end(),r.nextTick(ne)},Me=>{Oe.destroy(Me),r.nextTick(ne,Me)});else if(b(ie,!0))F++,m(ie,Oe,ne,{end:ye});else if(a(ie)||J(ie)){const Me=ie.readable||ie;F++,m(Me,Oe,ne,{end:ye})}else throw new x("AsyncIterable or Promise","destination",ie);ie=Oe;const{destroy:Ye,cleanup:mt}=N(ie,!1,!0);D.push(Ye),Be&&G.push(mt)}}else if(z(K)){if(Y(ie)){F+=2;const Oe=V(ie,K,ne,{end:ye});T(K)&&Be&&G.push(Oe)}else if(J(ie)||a(ie)){const Oe=ie.readable||ie;F++,m(Oe,K,ne,{end:ye})}else if(b(ie))F++,m(ie,K,ne,{end:ye});else throw new C("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=K}else if(X(K)){if(Y(ie))F++,M(S(ie),K,ne,{end:ye});else if(a(ie)||b(ie))F++,M(ie,K,ne,{end:ye});else if(J(ie))F++,M(ie.readable,K,ne,{end:ye});else throw new C("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=K}else ie=c.from(K)}return(ue!=null&&ue.aborted||H!=null&&H.aborted)&&r.nextTick(oe),ie}function V(W,ee,Q,{end:le}){let ue=!1;if(ee.on("close",()=>{ue||Q(new B)}),W.pipe(ee,{end:!1}),le){let H=function(){ue=!0,ee.end()};_(W)?r.nextTick(H):W.once("end",H)}else Q();return s(W,{readable:!0,writable:!1},H=>{const G=W._readableState;H&&H.code==="ERR_STREAM_PREMATURE_CLOSE"&&G&&G.ended&&!G.errored&&!G.errorEmitted?W.once("end",Q).once("error",Q):Q(H)}),s(ee,{readable:!1,writable:!0},Q)}return Tn={pipelineImpl:j,pipeline:E},Tn}var On,Ki;function Ko(){if(Ki)return On;Ki=1;const{pipeline:r}=ni(),e=ct(),{destroyer:t}=qt(),{isNodeStream:n,isReadable:i,isWritable:s,isWebStream:o,isTransformStream:l,isWritableStream:c,isReadableStream:g}=dt(),{AbortError:C,codes:{ERR_INVALID_ARG_VALUE:x,ERR_MISSING_ARGS:A}}=De(),U=_t();return On=function(...y){if(y.length===0)throw new A("streams");if(y.length===1)return e.from(y[0]);const p=[...y];if(typeof y[0]=="function"&&(y[0]=e.from(y[0])),typeof y[y.length-1]=="function"){const d=y.length-1;y[d]=e.from(y[d])}for(let d=0;d<y.length;++d)if(!(!n(y[d])&&!o(y[d]))){if(d<y.length-1&&!(i(y[d])||g(y[d])||l(y[d])))throw new x(`streams[${d}]`,p[d],"must be readable");if(d>0&&!(s(y[d])||c(y[d])||l(y[d])))throw new x(`streams[${d}]`,p[d],"must be writable")}let R,b,T,Y,z;function J(d){const w=Y;Y=null,w?w(d):d?z.destroy(d):!u&&!_&&z.destroy()}const X=y[0],a=r(y,J),_=!!(s(X)||c(X)||l(X)),u=!!(i(a)||g(a)||l(a));if(z=new e({writableObjectMode:!!(X!=null&&X.writableObjectMode),readableObjectMode:!!(a!=null&&a.readableObjectMode),writable:_,readable:u}),_){if(n(X))z._write=function(w,f,N){X.write(w,f)?N():R=N},z._final=function(w){X.end(),b=w},X.on("drain",function(){if(R){const w=R;R=null,w()}});else if(o(X)){const f=(l(X)?X.writable:X).getWriter();z._write=async function(N,h,S){try{await f.ready,f.write(N).catch(()=>{}),S()}catch(P){S(P)}},z._final=async function(N){try{await f.ready,f.close().catch(()=>{}),b=N}catch(h){N(h)}}}const d=l(a)?a.readable:a;U(d,()=>{if(b){const w=b;b=null,w()}})}if(u){if(n(a))a.on("readable",function(){if(T){const d=T;T=null,d()}}),a.on("end",function(){z.push(null)}),z._read=function(){for(;;){const d=a.read();if(d===null){T=z._read;return}if(!z.push(d))return}};else if(o(a)){const w=(l(a)?a.readable:a).getReader();z._read=async function(){for(;;)try{const{value:f,done:N}=await w.read();if(!z.push(f))return;if(N){z.push(null);return}}catch{return}}}}return z._destroy=function(d,w){!d&&Y!==null&&(d=new C),T=null,R=null,b=null,Y===null?w(d):(Y=w,n(a)&&t(a,d))},z},On}var Yi;function aa(){if(Yi)return mr;Yi=1;const r=globalThis.AbortController||tr().AbortController,{codes:{ERR_INVALID_ARG_VALUE:e,ERR_INVALID_ARG_TYPE:t,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:i},AbortError:s}=De(),{validateAbortSignal:o,validateInteger:l,validateObject:c}=nr(),g=Ie().Symbol("kWeak"),C=Ie().Symbol("kResistStopPropagation"),{finished:x}=_t(),A=Ko(),{addAbortSignalNoValidate:U}=Br(),{isWritable:B,isNodeStream:y}=dt(),{deprecate:p}=We(),{ArrayPrototypePush:R,Boolean:b,MathFloor:T,Number:Y,NumberIsNaN:z,Promise:J,PromiseReject:X,PromiseResolve:a,PromisePrototypeThen:_,Symbol:u}=Ie(),d=u("kEmpty"),w=u("kEof");function f(H,G){if(G!=null&&c(G,"options"),G?.signal!=null&&o(G.signal,"options.signal"),y(H)&&!B(H))throw new e("stream",H,"must be writable");const oe=A(this,H);return G!=null&&G.signal&&U(G.signal,oe),oe}function N(H,G){if(typeof H!="function")throw new t("fn",["Function","AsyncFunction"],H);G!=null&&c(G,"options"),G?.signal!=null&&o(G.signal,"options.signal");let oe=1;G?.concurrency!=null&&(oe=T(G.concurrency));let ce=oe-1;return G?.highWaterMark!=null&&(ce=T(G.highWaterMark)),l(oe,"options.concurrency",1),l(ce,"options.highWaterMark",0),ce+=oe,(async function*(){const L=We().AbortSignalAny([G?.signal].filter(b)),D=this,F=[],ne={signal:L};let se,ie,k=!1,Z=0;function re(){k=!0,K()}function K(){Z-=1,we()}function we(){ie&&!k&&Z<oe&&F.length<ce&&(ie(),ie=null)}async function Pe(){try{for await(let ye of D){if(k)return;if(L.aborted)throw new s;try{if(ye=H(ye,ne),ye===d)continue;ye=a(ye)}catch(Be){ye=X(Be)}Z+=1,_(ye,K,re),F.push(ye),se&&(se(),se=null),!k&&(F.length>=ce||Z>=oe)&&await new J(Be=>{ie=Be})}F.push(w)}catch(ye){const Be=X(ye);_(Be,K,re),F.push(Be)}finally{k=!0,se&&(se(),se=null)}}Pe();try{for(;;){for(;F.length>0;){const ye=await F[0];if(ye===w)return;if(L.aborted)throw new s;ye!==d&&(yield ye),F.shift(),we()}await new J(ye=>{se=ye})}}finally{k=!0,ie&&(ie(),ie=null)}}).call(this)}function h(H=void 0){return H!=null&&c(H,"options"),H?.signal!=null&&o(H.signal,"options.signal"),(async function*(){let oe=0;for await(const fe of this){var ce;if(H!=null&&(ce=H.signal)!==null&&ce!==void 0&&ce.aborted)throw new s({cause:H.signal.reason});yield[oe++,fe]}}).call(this)}async function S(H,G=void 0){for await(const oe of E.call(this,H,G))return!0;return!1}async function P(H,G=void 0){if(typeof H!="function")throw new t("fn",["Function","AsyncFunction"],H);return!await S.call(this,async(...oe)=>!await H(...oe),G)}async function m(H,G){for await(const oe of E.call(this,H,G))return oe}async function M(H,G){if(typeof H!="function")throw new t("fn",["Function","AsyncFunction"],H);async function oe(ce,fe){return await H(ce,fe),d}for await(const ce of N.call(this,oe,G));}function E(H,G){if(typeof H!="function")throw new t("fn",["Function","AsyncFunction"],H);async function oe(ce,fe){return await H(ce,fe)?ce:d}return N.call(this,oe,G)}class j extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function V(H,G,oe){var ce;if(typeof H!="function")throw new t("reducer",["Function","AsyncFunction"],H);oe!=null&&c(oe,"options"),oe?.signal!=null&&o(oe.signal,"options.signal");let fe=arguments.length>1;if(oe!=null&&(ce=oe.signal)!==null&&ce!==void 0&&ce.aborted){const se=new s(void 0,{cause:oe.signal.reason});throw this.once("error",()=>{}),await x(this.destroy(se)),se}const L=new r,D=L.signal;if(oe!=null&&oe.signal){const se={once:!0,[g]:this,[C]:!0};oe.signal.addEventListener("abort",()=>L.abort(),se)}let F=!1;try{for await(const se of this){var ne;if(F=!0,oe!=null&&(ne=oe.signal)!==null&&ne!==void 0&&ne.aborted)throw new s;fe?G=await H(G,se,{signal:D}):(G=se,fe=!0)}if(!F&&!fe)throw new j}finally{L.abort()}return G}async function W(H){H!=null&&c(H,"options"),H?.signal!=null&&o(H.signal,"options.signal");const G=[];for await(const ce of this){var oe;if(H!=null&&(oe=H.signal)!==null&&oe!==void 0&&oe.aborted)throw new s(void 0,{cause:H.signal.reason});R(G,ce)}return G}function ee(H,G){const oe=N.call(this,H,G);return(async function*(){for await(const fe of oe)yield*fe}).call(this)}function Q(H){if(H=Y(H),z(H))return 0;if(H<0)throw new i("number",">= 0",H);return H}function le(H,G=void 0){return G!=null&&c(G,"options"),G?.signal!=null&&o(G.signal,"options.signal"),H=Q(H),(async function*(){var ce;if(G!=null&&(ce=G.signal)!==null&&ce!==void 0&&ce.aborted)throw new s;for await(const L of this){var fe;if(G!=null&&(fe=G.signal)!==null&&fe!==void 0&&fe.aborted)throw new s;H--<=0&&(yield L)}}).call(this)}function ue(H,G=void 0){return G!=null&&c(G,"options"),G?.signal!=null&&o(G.signal,"options.signal"),H=Q(H),(async function*(){var ce;if(G!=null&&(ce=G.signal)!==null&&ce!==void 0&&ce.aborted)throw new s;for await(const L of this){var fe;if(G!=null&&(fe=G.signal)!==null&&fe!==void 0&&fe.aborted)throw new s;if(H-- >0&&(yield L),H<=0)return}}).call(this)}return mr.streamReturningOperators={asIndexedPairs:p(h,"readable.asIndexedPairs will be removed in a future version."),drop:le,filter:E,flatMap:ee,map:N,take:ue,compose:f},mr.promiseReturningOperators={every:P,forEach:M,reduce:V,toArray:W,some:S,find:m},mr}var xn,Ji;function Yo(){if(Ji)return xn;Ji=1;const{ArrayPrototypePop:r,Promise:e}=Ie(),{isIterable:t,isNodeStream:n,isWebStream:i}=dt(),{pipelineImpl:s}=ni(),{finished:o}=_t();Jo();function l(...c){return new e((g,C)=>{let x,A;const U=c[c.length-1];if(U&&typeof U=="object"&&!n(U)&&!t(U)&&!i(U)){const B=r(c);x=B.signal,A=B.end}s(c,(B,y)=>{B?C(B):g(y)},{signal:x,end:A})})}return xn={finished:o,pipeline:l},xn}var Zi;function Jo(){if(Zi)return an.exports;Zi=1;const{Buffer:r}=Ct(),{ObjectDefineProperty:e,ObjectKeys:t,ReflectApply:n}=Ie(),{promisify:{custom:i}}=We(),{streamReturningOperators:s,promiseReturningOperators:o}=aa(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=De(),c=Ko(),{setDefaultHighWaterMark:g,getDefaultHighWaterMark:C}=Dr(),{pipeline:x}=ni(),{destroyer:A}=qt(),U=_t(),B=Yo(),y=dt(),p=an.exports=ti().Stream;p.isDestroyed=y.isDestroyed,p.isDisturbed=y.isDisturbed,p.isErrored=y.isErrored,p.isReadable=y.isReadable,p.isWritable=y.isWritable,p.Readable=kr();for(const b of t(s)){let Y=function(...z){if(new.target)throw l();return p.Readable.from(n(T,this,z))};const T=s[b];e(Y,"name",{__proto__:null,value:T.name}),e(Y,"length",{__proto__:null,value:T.length}),e(p.Readable.prototype,b,{__proto__:null,value:Y,enumerable:!1,configurable:!0,writable:!0})}for(const b of t(o)){let Y=function(...z){if(new.target)throw l();return n(T,this,z)};const T=o[b];e(Y,"name",{__proto__:null,value:T.name}),e(Y,"length",{__proto__:null,value:T.length}),e(p.Readable.prototype,b,{__proto__:null,value:Y,enumerable:!1,configurable:!0,writable:!0})}p.Writable=ri(),p.Duplex=ct(),p.Transform=Go(),p.PassThrough=Vo(),p.pipeline=x;const{addAbortSignal:R}=Br();return p.addAbortSignal=R,p.finished=U,p.destroy=A,p.compose=c,p.setDefaultHighWaterMark=g,p.getDefaultHighWaterMark=C,e(p,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return B}}),e(x,i,{__proto__:null,enumerable:!0,get(){return B.pipeline}}),e(U,i,{__proto__:null,enumerable:!0,get(){return B.finished}}),p.Stream=p,p._isUint8Array=function(T){return T instanceof Uint8Array},p._uint8ArrayToBuffer=function(T){return r.from(T.buffer,T.byteOffset,T.byteLength)},an.exports}var Xi;function la(){return Xi||(Xi=1,function(r){const e=Jo(),t=Yo(),n=e.Readable.destroy;r.exports=e.Readable,r.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,r.exports._isUint8Array=e._isUint8Array,r.exports.isDisturbed=e.isDisturbed,r.exports.isErrored=e.isErrored,r.exports.isReadable=e.isReadable,r.exports.Readable=e.Readable,r.exports.Writable=e.Writable,r.exports.Duplex=e.Duplex,r.exports.Transform=e.Transform,r.exports.PassThrough=e.PassThrough,r.exports.addAbortSignal=e.addAbortSignal,r.exports.finished=e.finished,r.exports.destroy=e.destroy,r.exports.destroy=n,r.exports.pipeline=e.pipeline,r.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get(){return t}}),r.exports.Stream=e.Stream,r.exports.default=r.exports}(sn)),sn.exports}var Ur=la(),Nn,Qi;function Zo(){if(Qi)return Nn;Qi=1,Nn=s,s.default=s,s.stable=g,s.stableStringify=g;var r="[...]",e="[Circular]",t=[],n=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(A,U,B,y){typeof y>"u"&&(y=i()),l(A,"",0,[],void 0,0,y);var p;try{n.length===0?p=JSON.stringify(A,U,B):p=JSON.stringify(A,x(U),B)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;t.length!==0;){var R=t.pop();R.length===4?Object.defineProperty(R[0],R[1],R[3]):R[0][R[1]]=R[2]}}return p}function o(A,U,B,y){var p=Object.getOwnPropertyDescriptor(y,B);p.get!==void 0?p.configurable?(Object.defineProperty(y,B,{value:A}),t.push([y,B,U,p])):n.push([U,B,A]):(y[B]=A,t.push([y,B,U]))}function l(A,U,B,y,p,R,b){R+=1;var T;if(typeof A=="object"&&A!==null){for(T=0;T<y.length;T++)if(y[T]===A){o(e,A,U,p);return}if(typeof b.depthLimit<"u"&&R>b.depthLimit){o(r,A,U,p);return}if(typeof b.edgesLimit<"u"&&B+1>b.edgesLimit){o(r,A,U,p);return}if(y.push(A),Array.isArray(A))for(T=0;T<A.length;T++)l(A[T],T,T,y,A,R,b);else{var Y=Object.keys(A);for(T=0;T<Y.length;T++){var z=Y[T];l(A[z],z,T,y,A,R,b)}}y.pop()}}function c(A,U){return A<U?-1:A>U?1:0}function g(A,U,B,y){typeof y>"u"&&(y=i());var p=C(A,"",0,[],void 0,0,y)||A,R;try{n.length===0?R=JSON.stringify(p,U,B):R=JSON.stringify(p,x(U),B)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;t.length!==0;){var b=t.pop();b.length===4?Object.defineProperty(b[0],b[1],b[3]):b[0][b[1]]=b[2]}}return R}function C(A,U,B,y,p,R,b){R+=1;var T;if(typeof A=="object"&&A!==null){for(T=0;T<y.length;T++)if(y[T]===A){o(e,A,U,p);return}try{if(typeof A.toJSON=="function")return}catch{return}if(typeof b.depthLimit<"u"&&R>b.depthLimit){o(r,A,U,p);return}if(typeof b.edgesLimit<"u"&&B+1>b.edgesLimit){o(r,A,U,p);return}if(y.push(A),Array.isArray(A))for(T=0;T<A.length;T++)C(A[T],T,T,y,A,R,b);else{var Y={},z=Object.keys(A).sort(c);for(T=0;T<z.length;T++){var J=z[T];C(A[J],J,T,y,A,R,b),Y[J]=A[J]}if(typeof p<"u")t.push([p,U,A]),p[U]=Y;else return Y}y.pop()}}function x(A){return A=typeof A<"u"?A:function(U,B){return B},function(U,B){if(n.length>0)for(var y=0;y<n.length;y++){var p=n[y];if(p[1]===U&&p[0]===B){B=p[2],n.splice(y,1);break}}return A.call(this,U,B)}}return Nn}var ua=Zo();const fa=Ut(ua);var Sr={exports:{}},Cn,eo;function ca(){if(eo)return Cn;eo=1,Cn=r;function r(e,t){if(e&&t)return r(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(i){n[i]=e[i]}),n;function n(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];var o=e.apply(this,i),l=i[i.length-1];return typeof o=="function"&&o!==l&&Object.keys(l).forEach(function(c){o[c]=l[c]}),o}}return Cn}var to;function ii(){if(to)return Sr.exports;to=1;var r=ca();Sr.exports=r(e),Sr.exports.strict=r(t),e.proto=e(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return e(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return t(this)},configurable:!0})});function e(n){var i=function(){return i.called?i.value:(i.called=!0,i.value=n.apply(this,arguments))};return i.called=!1,i}function t(n){var i=function(){if(i.called)throw new Error(i.onceError);return i.called=!0,i.value=n.apply(this,arguments)},s=n.name||"Function wrapped with `once`";return i.onceError=s+" shouldn't be called more than once",i.called=!1,i}return Sr.exports}var Pn,ro;function Xo(){if(ro)return Pn;ro=1;var r=ii(),e=function(){},t=Jt.Bare?queueMicrotask:process.nextTick.bind(process),n=function(o){return o.setHeader&&typeof o.abort=="function"},i=function(o){return o.stdio&&Array.isArray(o.stdio)&&o.stdio.length===3},s=function(o,l,c){if(typeof l=="function")return s(o,null,l);l||(l={}),c=r(c||e);var g=o._writableState,C=o._readableState,x=l.readable||l.readable!==!1&&o.readable,A=l.writable||l.writable!==!1&&o.writable,U=!1,B=function(){o.writable||y()},y=function(){A=!1,x||c.call(o)},p=function(){x=!1,A||c.call(o)},R=function(J){c.call(o,J?new Error("exited with error code: "+J):null)},b=function(J){c.call(o,J)},T=function(){t(Y)},Y=function(){if(!U){if(x&&!(C&&C.ended&&!C.destroyed))return c.call(o,new Error("premature close"));if(A&&!(g&&g.ended&&!g.destroyed))return c.call(o,new Error("premature close"))}},z=function(){o.req.on("finish",y)};return n(o)?(o.on("complete",y),o.on("abort",T),o.req?z():o.on("request",z)):A&&!g&&(o.on("end",B),o.on("close",B)),i(o)&&o.on("exit",R),o.on("end",p),o.on("finish",y),l.error!==!1&&o.on("error",b),o.on("close",T),function(){U=!0,o.removeListener("complete",y),o.removeListener("abort",T),o.removeListener("request",z),o.req&&o.req.removeListener("finish",y),o.removeListener("end",B),o.removeListener("close",B),o.removeListener("finish",y),o.removeListener("exit",R),o.removeListener("end",p),o.removeListener("error",b),o.removeListener("close",T)}};return Pn=s,Pn}var da=Xo();const no=Ut(da);var ha=ii();const ga=Ut(ha);var Ln,io;function pa(){if(io)return Ln;io=1;var r=ii(),e=Xo(),t;try{t=ra}catch{}var n=function(){},i=typeof process>"u"?!1:/^v?\.0/.test(process.version),s=function(A){return typeof A=="function"},o=function(A){return!i||!t?!1:(A instanceof(t.ReadStream||n)||A instanceof(t.WriteStream||n))&&s(A.close)},l=function(A){return A.setHeader&&s(A.abort)},c=function(A,U,B,y){y=r(y);var p=!1;A.on("close",function(){p=!0}),e(A,{readable:U,writable:B},function(b){if(b)return y(b);p=!0,y()});var R=!1;return function(b){if(!p&&!R){if(R=!0,o(A))return A.close(n);if(l(A))return A.abort();if(s(A.destroy))return A.destroy();y(b||new Error("stream was destroyed"))}}},g=function(A){A()},C=function(A,U){return A.pipe(U)},x=function(){var A=Array.prototype.slice.call(arguments),U=s(A[A.length-1]||n)&&A.pop()||n;if(Array.isArray(A[0])&&(A=A[0]),A.length<2)throw new Error("pump requires two streams per minimum");var B,y=A.map(function(p,R){var b=R<A.length-1,T=R>0;return c(p,b,T,function(Y){B||(B=Y),Y&&y.forEach(g),!b&&(y.forEach(g),U(B))})});return A.reduce(C)};return Ln=x,Ln}var wa=pa();const oo=Ut(wa);function vr(){}const so="SYN",Mn="ACK",ao="BRK";class lo extends Ur.Duplex{constructor(e){let{name:t,target:n,targetWindow:i=window,targetOrigin:s="*"}=e;if(super({objectMode:!0}),ge(this,"_init",void 0),ge(this,"_haveSyn",void 0),ge(this,"_name",void 0),ge(this,"_target",void 0),ge(this,"_targetWindow",void 0),ge(this,"_targetOrigin",void 0),ge(this,"_onMessage",void 0),ge(this,"_synIntervalId",void 0),!t||!n)throw new Error("Invalid input.");this._init=!1,this._haveSyn=!1,this._name=t,this._target=n,this._targetWindow=i,this._targetOrigin=s,this._onMessage=this.onMessage.bind(this),this._synIntervalId=null,window.addEventListener("message",this._onMessage,!1),this._handShake()}_break(){this.cork(),this._write(ao,null,vr),this._haveSyn=!1,this._init=!1}_handShake(){this._write(so,null,vr),this.cork()}_onData(e){if(!this._init)e===so?(this._haveSyn=!0,this._write(Mn,null,vr)):e===Mn&&(this._init=!0,this._haveSyn||this._write(Mn,null,vr),this.uncork());else if(e===ao)this._break();else try{this.push(e)}catch(t){this.emit("error",t)}}_postMessage(e){const t=this._targetOrigin;this._targetWindow.postMessage({target:this._target,data:e},t)}onMessage(e){const t=e.data;this._targetOrigin!=="*"&&e.origin!==this._targetOrigin||e.source!==this._targetWindow||typeof t!="object"||t.target!==this._name||!t.data||this._onData(t.data)}_read(){}_write(e,t,n){this._postMessage(e),n()}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}const ba={rpc:{internal:-32603}},uo={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},fo=ba.rpc.internal,ya="Unspecified error message. This is a bug, please report it.";function Qo(r){return Number.isInteger(r)}function co(r){return typeof r=="string"&&r.length>0}function ho(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}function es(r){const e=r;return!(!e||!Qo(e.code)||!co(e.message)||e.stack&&!co(e.stack))}function _a(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ya;if(Qo(r)){const t=r.toString();if(Object.hasOwn(uo,t))return uo[t].message}return e}const ma={code:fo,message:_a(fo)};function Vn(r){try{JSON.parse(JSON.stringify(r,(e,t)=>{if(e==="__proto__"||e==="constructor")throw new Error("Not valid json");if(typeof t=="function"||typeof t=="symbol")throw new Error("Not valid json");return t}),(e,t)=>{if(!(e==="__proto__"||e==="constructor"))return t})}catch{return!1}return!0}function go(r){return Object.getOwnPropertyNames(r).reduce((e,t)=>{const n=r[t];return Vn(n)&&(e[t]=n),e},{})}function Ea(r){return Array.isArray(r)?r.map(e=>Vn(e)?e:ho(e)?go(e):null):ho(r)?go(r):Vn(r)?r:null}function Sa(r,e){if(r&&typeof r=="object"&&"serialize"in r&&typeof r.serialize=="function")return r.serialize();if(es(r))return r;const t=Ea(r);return Ke(Ke({},e),{},{data:{cause:t}})}function po(r){let{fallbackError:e=ma,shouldIncludeStack:t=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!es(e))throw new Error("Must provide fallback error with integer number code and string message.");const n=Sa(r,e);return t||delete n.stack,n}function wo(r,e,t){try{Reflect.apply(r,e,t)}catch(n){setTimeout(()=>{throw n})}}function va(r){const e=r.length,t=new Array(e);for(let n=0;n<e;n+=1)t[n]=r[n];return t}class qr extends ea.EventEmitter{emit(e){let t=e==="error";const n=this._events;if(n!==void 0)t=t&&n.error===void 0;else if(!t)return!1;for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(t){let c;if(s.length>0&&([c]=s),c instanceof Error)throw c;const g=new Error(`Unhandled error.${c?` (${c.message})`:""}`);throw g.context=c,g}const l=n[e];if(l===void 0)return!1;if(typeof l=="function")wo(l,this,s);else{const c=l.length,g=va(l);for(let C=0;C<c;C+=1)wo(g[C],this,s)}return!0}}class Kt extends Error{constructor(e){let{code:t,message:n,data:i}=e;if(!Number.isInteger(t))throw new Error("code must be an integer");if(!n||typeof n!="string")throw new Error("message must be string");super(n),ge(this,"code",void 0),ge(this,"data",void 0),this.code=t,i!==void 0&&(this.data=i)}toString(){return fa({code:this.code,message:this.message,data:this.data,stack:this.stack})}}const Kn=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(n,i)=>{n||i.error?e(n||i.error):!t||Array.isArray(i)?r(i):r(i.result)}};function Aa(){const r={};function e(){return!1}const t=new qr;function n(c){const g=r[c.id];if(!g)throw new Error(`StreamMiddleware - Unknown response id "${c.id}"`);delete r[c.id],Object.assign(g.res,c),setTimeout(g.end)}function i(c){t.emit("notification",c)}function s(c,g,C){let x;try{!c.id?i(c):n(c)}catch(A){x=A}C(x)}const o=new Ur.Duplex({objectMode:!0,read:e,write:s});return{events:t,middleware:(c,g,C,x)=>{o.push(c),r[c.id]={req:c,res:g,next:C,end:x}},stream:o}}function Ra(){return(r,e,t,n)=>{const i=r.id,s=Math.random().toString(36).slice(2);r.id=s,e.id=s,t(o=>{r.id=i,e.id=i,o()})}}class lt extends qr{constructor(){super(),ge(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,n){const i=[];let s=null,o=!1;for(const l of n)if([s,o]=await lt._runMiddleware(e,t,l,i),o)break;return[s,o,i.reverse()]}static _runMiddleware(e,t,n,i){return new Promise(s=>{const o=c=>{const g=c||t.error;g&&(typeof g=="object"&&Object.keys(g).includes("stack")===!1&&(g.stack="Stack trace is not available."),t.error=po(g,{shouldIncludeStack:!0,fallbackError:{message:g?.message||g?.toString(),code:g?.code||-32603,stack:g?.stack||"Stack trace is not available.",data:g?.data||g?.message||g?.toString()}})),s([g,!0])},l=c=>{t.error?o(t.error):(c&&(typeof c!="function"&&o(new Kt({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),i.push(c)),s([null,!1]))};try{n(e,t,l,o)}catch(c){o(c)}})}static async _runReturnHandlers(e){for(const t of e)await new Promise((n,i)=>{t(s=>s?i(s):n())})}static _checkForCompletion(e,t,n){if(!("result"in t)&&!("error"in t))throw new Kt({code:-32603,message:"Response has no error or result for request"});if(!n)throw new Kt({code:-32603,message:"Nothing ended request"})}push(e){this._middleware.push(e)}handle(e,t){if(t&&typeof t!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,n,i)=>{try{const[s,o,l]=await lt._runAllMiddleware(e,t,this._middleware);return o?(await lt._runReturnHandlers(l),i(s)):n(async c=>{try{await lt._runReturnHandlers(l)}catch(g){return c(g)}return c()})}catch(s){return i(s)}}}async _handleBatch(e,t){try{const n=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,n):n}catch(n){if(t)return t(n);throw n}}_promiseHandle(e){return new Promise((t,n)=>{this._handle(e,(i,s)=>{i&&s===void 0?n(i):t(s)}).catch(n)})}async _handle(e,t){if(!e||Array.isArray(e)||typeof e!="object"){const U=new Kt({code:-32603,message:"request must be plain object"});return t(U,{id:void 0,jsonrpc:"2.0",error:U})}if(typeof e.method!="string"){const U=new Kt({code:-32603,message:"method must be string"});return t(U,{id:e.id,jsonrpc:"2.0",error:U})}const n=Ke({},e),i={id:n.id,jsonrpc:n.jsonrpc};let s=null;try{await this._processRequest(n,i)}catch(U){s=U}if(s&&(delete i.result,!i.error)){var o,l,c,g,C,x,A;typeof s=="object"&&Object.keys(s).includes("stack")===!1&&(s.stack="Stack trace is not available."),i.error=po(s,{shouldIncludeStack:!0,fallbackError:{message:((o=s)===null||o===void 0?void 0:o.message)||((l=s)===null||l===void 0?void 0:l.toString()),code:((c=s)===null||c===void 0?void 0:c.code)||-32603,stack:((g=s)===null||g===void 0?void 0:g.stack)||"Stack trace is not available.",data:((C=s)===null||C===void 0?void 0:C.data)||((x=s)===null||x===void 0?void 0:x.message)||((A=s)===null||A===void 0?void 0:A.toString())}})}return t(s,i)}async _processRequest(e,t){const[n,i,s]=await lt._runAllMiddleware(e,t,this._middleware);if(lt._checkForCompletion(e,t,i),await lt._runReturnHandlers(s),n)throw n}}class Ia extends Ur.Duplex{constructor(e){let{parent:t,name:n}=e;super({objectMode:!0}),ge(this,"_parent",void 0),ge(this,"_name",void 0),this._parent=t,this._name=n}_read(){}_write(e,t,n){this._parent.push({name:this._name,data:e}),n()}}const bo=Symbol("IGNORE_SUBSTREAM");class Ta extends Ur.Duplex{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(Ke(Ke({},e),{},{objectMode:!0})),ge(this,"_substreams",void 0),ge(this,"getStream",void 0),this._substreams={}}createStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new Ia({parent:this,name:e});return this._substreams[e]=t,Oa(this,n=>t.destroy(n||void 0)),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=bo}_read(){}_write(e,t,n){const{name:i,data:s}=e;if(!i)return window.console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),n();const o=this._substreams[i];return o?(o!==bo&&o.push(s),n()):(window.console.warn(`ObjectMultiplex - orphaned data for stream "${i}"`),n())}}function Oa(r,e){const t=ga(e);no(r,{readable:!1},t),no(r,{writable:!1},t)}var Zt={exports:{}};Zt.exports;var yo;function xa(){return yo||(yo=1,function(r,e){var t=200,n="__lodash_hash_undefined__",i=800,s=16,o=9007199254740991,l="[object Arguments]",c="[object Array]",g="[object AsyncFunction]",C="[object Boolean]",x="[object Date]",A="[object Error]",U="[object Function]",B="[object GeneratorFunction]",y="[object Map]",p="[object Number]",R="[object Null]",b="[object Object]",T="[object Proxy]",Y="[object RegExp]",z="[object Set]",J="[object String]",X="[object Undefined]",a="[object WeakMap]",_="[object ArrayBuffer]",u="[object DataView]",d="[object Float32Array]",w="[object Float64Array]",f="[object Int8Array]",N="[object Int16Array]",h="[object Int32Array]",S="[object Uint8Array]",P="[object Uint8ClampedArray]",m="[object Uint16Array]",M="[object Uint32Array]",E=/[\\^$.*+?()[\]{}|]/g,j=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,W={};W[d]=W[w]=W[f]=W[N]=W[h]=W[S]=W[P]=W[m]=W[M]=!0,W[l]=W[c]=W[_]=W[C]=W[u]=W[x]=W[A]=W[U]=W[y]=W[p]=W[b]=W[Y]=W[z]=W[J]=W[a]=!1;var ee=typeof Jt=="object"&&Jt&&Jt.Object===Object&&Jt,Q=typeof self=="object"&&self&&self.Object===Object&&self,le=ee||Q||Function("return this")(),ue=e&&!e.nodeType&&e,H=ue&&!0&&r&&!r.nodeType&&r,G=H&&H.exports===ue,oe=G&&ee.process,ce=function(){try{var I=H&&H.require&&H.require("util").types;return I||oe&&oe.binding&&oe.binding("util")}catch{}}(),fe=ce&&ce.isTypedArray;function L(I,q,$){switch($.length){case 0:return I.call(q);case 1:return I.call(q,$[0]);case 2:return I.call(q,$[0],$[1]);case 3:return I.call(q,$[0],$[1],$[2])}return I.apply(q,$)}function D(I,q){for(var $=-1,he=Array(I);++$<I;)he[$]=q($);return he}function F(I){return function(q){return I(q)}}function ne(I,q){return I?.[q]}function se(I,q){return function($){return I(q($))}}var ie=Array.prototype,k=Function.prototype,Z=Object.prototype,re=le["__core-js_shared__"],K=k.toString,we=Z.hasOwnProperty,Pe=function(){var I=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||"");return I?"Symbol(src)_1."+I:""}(),ye=Z.toString,Be=K.call(Object),Oe=RegExp("^"+K.call(we).replace(E,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=G?le.Buffer:void 0,Ye=le.Symbol,mt=le.Uint8Array;Le&&Le.allocUnsafe;var Me=se(Object.getPrototypeOf,Object),ar=Object.create,zr=Z.propertyIsEnumerable,lr=ie.splice,nt=Ye?Ye.toStringTag:void 0,Lt=function(){try{var I=Zr(Object,"defineProperty");return I({},"",{}),I}catch{}}(),Gr=Le?Le.isBuffer:void 0,jt=Math.max,ur=Date.now,fr=Zr(le,"Map"),ht=Zr(Object,"create"),Wt=function(){function I(){}return function(q){if(!St(q))return{};if(ar)return ar(q);I.prototype=q;var $=new I;return I.prototype=void 0,$}}();function it(I){var q=-1,$=I==null?0:I.length;for(this.clear();++q<$;){var he=I[q];this.set(he[0],he[1])}}function Vr(){this.__data__=ht?ht(null):{},this.size=0}function Ft(I){var q=this.has(I)&&delete this.__data__[I];return this.size-=q?1:0,q}function cr(I){var q=this.__data__;if(ht){var $=q[I];return $===n?void 0:$}return we.call(q,I)?q[I]:void 0}function v(I){var q=this.__data__;return ht?q[I]!==void 0:we.call(q,I)}function O(I,q){var $=this.__data__;return this.size+=this.has(I)?0:1,$[I]=ht&&q===void 0?n:q,this}it.prototype.clear=Vr,it.prototype.delete=Ft,it.prototype.get=cr,it.prototype.has=v,it.prototype.set=O;function te(I){var q=-1,$=I==null?0:I.length;for(this.clear();++q<$;){var he=I[q];this.set(he[0],he[1])}}function ae(){this.__data__=[],this.size=0}function de(I){var q=this.__data__,$=wr(q,I);if($<0)return!1;var he=q.length-1;return $==he?q.pop():lr.call(q,$,1),--this.size,!0}function xe(I){var q=this.__data__,$=wr(q,I);return $<0?void 0:q[$][1]}function ke(I){return wr(this.__data__,I)>-1}function dr(I,q){var $=this.__data__,he=wr($,I);return he<0?(++this.size,$.push([I,q])):$[he][1]=q,this}te.prototype.clear=ae,te.prototype.delete=de,te.prototype.get=xe,te.prototype.has=ke,te.prototype.set=dr;function Ue(I){var q=-1,$=I==null?0:I.length;for(this.clear();++q<$;){var he=I[q];this.set(he[0],he[1])}}function hr(){this.size=0,this.__data__={hash:new it,map:new(fr||te),string:new it}}function Kr(I){var q=yr(this,I).delete(I);return this.size-=q?1:0,q}function gr(I){return yr(this,I).get(I)}function pr(I){return yr(this,I).has(I)}function $t(I,q){var $=yr(this,I),he=$.size;return $.set(I,q),this.size+=$.size==he?0:1,this}Ue.prototype.clear=hr,Ue.prototype.delete=Kr,Ue.prototype.get=gr,Ue.prototype.has=pr,Ue.prototype.set=$t;function et(I){var q=this.__data__=new te(I);this.size=q.size}function Ht(){this.__data__=new te,this.size=0}function Et(I){var q=this.__data__,$=q.delete(I);return this.size=q.size,$}function ot(I){return this.__data__.get(I)}function Je(I){return this.__data__.has(I)}function ms(I,q){var $=this.__data__;if($ instanceof te){var he=$.__data__;if(!fr||he.length<t-1)return he.push([I,q]),this.size=++$.size,this;$=this.__data__=new Ue(he)}return $.set(I,q),this.size=$.size,this}et.prototype.clear=Ht,et.prototype.delete=Et,et.prototype.get=ot,et.prototype.has=Je,et.prototype.set=ms;function Es(I,q){var $=en(I),he=!$&&Qr(I),be=!$&&!he&&yi(I),me=!$&&!he&&!be&&mi(I),ve=$||he||be||me,_e=ve?D(I.length,String):[],Ae=_e.length;for(var Ze in I)ve&&(Ze=="length"||be&&(Ze=="offset"||Ze=="parent")||me&&(Ze=="buffer"||Ze=="byteLength"||Ze=="byteOffset")||wi(Ze,Ae))||_e.push(Ze);return _e}function Yr(I,q,$){($!==void 0&&!_r(I[q],$)||$===void 0&&!(q in I))&&Jr(I,q,$)}function Ss(I,q,$){var he=I[q];(!(we.call(I,q)&&_r(he,$))||$===void 0&&!(q in I))&&Jr(I,q,$)}function wr(I,q){for(var $=I.length;$--;)if(_r(I[$][0],q))return $;return-1}function Jr(I,q,$){q=="__proto__"&&Lt?Lt(I,q,{configurable:!0,enumerable:!0,value:$,writable:!0}):I[q]=$}var vs=Ds();function br(I){return I==null?I===void 0?X:R:nt&&nt in Object(I)?ks(I):$s(I)}function gi(I){return zt(I)&&br(I)==l}function As(I){if(!St(I)||Ws(I))return!1;var q=rn(I)?Oe:j;return q.test(Vs(I))}function Rs(I){return zt(I)&&_i(I.length)&&!!W[br(I)]}function Is(I){if(!St(I))return Fs(I);var q=bi(I),$=[];for(var he in I)he=="constructor"&&(q||!we.call(I,he))||$.push(he);return $}function pi(I,q,$,he,be){I!==q&&vs(q,function(me,ve){if(be||(be=new et),St(me))Ts(I,q,ve,$,pi,he,be);else{var _e=he?he(Xr(I,ve),me,ve+"",I,q,be):void 0;_e===void 0&&(_e=me),Yr(I,ve,_e)}},Ei)}function Ts(I,q,$,he,be,me,ve){var _e=Xr(I,$),Ae=Xr(q,$),Ze=ve.get(Ae);if(Ze){Yr(I,$,Ze);return}var Fe=me?me(_e,Ae,$+"",I,q,ve):void 0,Gt=Fe===void 0;if(Gt){var nn=en(Ae),on=!nn&&yi(Ae),vi=!nn&&!on&&mi(Ae);Fe=Ae,nn||on||vi?en(_e)?Fe=_e:Ks(_e)?Fe=Ls(_e):on?(Gt=!1,Fe=Ns(Ae)):vi?(Gt=!1,Fe=Ps(Ae)):Fe=[]:Ys(Ae)||Qr(Ae)?(Fe=_e,Qr(_e)?Fe=Js(_e):(!St(_e)||rn(_e))&&(Fe=Us(Ae))):Gt=!1}Gt&&(ve.set(Ae,Fe),be(Fe,Ae,he,me,ve),ve.delete(Ae)),Yr(I,$,Fe)}function Os(I,q){return zs(Hs(I,q,Si),I+"")}var xs=Lt?function(I,q){return Lt(I,"toString",{configurable:!0,enumerable:!1,value:Xs(q),writable:!0})}:Si;function Ns(I,q){return I.slice()}function Cs(I){var q=new I.constructor(I.byteLength);return new mt(q).set(new mt(I)),q}function Ps(I,q){var $=Cs(I.buffer);return new I.constructor($,I.byteOffset,I.length)}function Ls(I,q){var $=-1,he=I.length;for(q||(q=Array(he));++$<he;)q[$]=I[$];return q}function Ms(I,q,$,he){var be=!$;$||($={});for(var me=-1,ve=q.length;++me<ve;){var _e=q[me],Ae=void 0;Ae===void 0&&(Ae=I[_e]),be?Jr($,_e,Ae):Ss($,_e,Ae)}return $}function Bs(I){return Os(function(q,$){var he=-1,be=$.length,me=be>1?$[be-1]:void 0,ve=be>2?$[2]:void 0;for(me=I.length>3&&typeof me=="function"?(be--,me):void 0,ve&&qs($[0],$[1],ve)&&(me=be<3?void 0:me,be=1),q=Object(q);++he<be;){var _e=$[he];_e&&I(q,_e,he,me)}return q})}function Ds(I){return function(q,$,he){for(var be=-1,me=Object(q),ve=he(q),_e=ve.length;_e--;){var Ae=ve[++be];if($(me[Ae],Ae,me)===!1)break}return q}}function yr(I,q){var $=I.__data__;return js(q)?$[typeof q=="string"?"string":"hash"]:$.map}function Zr(I,q){var $=ne(I,q);return As($)?$:void 0}function ks(I){var q=we.call(I,nt),$=I[nt];try{I[nt]=void 0;var he=!0}catch{}var be=ye.call(I);return he&&(q?I[nt]=$:delete I[nt]),be}function Us(I){return typeof I.constructor=="function"&&!bi(I)?Wt(Me(I)):{}}function wi(I,q){var $=typeof I;return q=q??o,!!q&&($=="number"||$!="symbol"&&V.test(I))&&I>-1&&I%1==0&&I<q}function qs(I,q,$){if(!St($))return!1;var he=typeof q;return(he=="number"?tn($)&&wi(q,$.length):he=="string"&&q in $)?_r($[q],I):!1}function js(I){var q=typeof I;return q=="string"||q=="number"||q=="symbol"||q=="boolean"?I!=="__proto__":I===null}function Ws(I){return!!Pe&&Pe in I}function bi(I){var q=I&&I.constructor,$=typeof q=="function"&&q.prototype||Z;return I===$}function Fs(I){var q=[];if(I!=null)for(var $ in Object(I))q.push($);return q}function $s(I){return ye.call(I)}function Hs(I,q,$){return q=jt(q===void 0?I.length-1:q,0),function(){for(var he=arguments,be=-1,me=jt(he.length-q,0),ve=Array(me);++be<me;)ve[be]=he[q+be];be=-1;for(var _e=Array(q+1);++be<q;)_e[be]=he[be];return _e[q]=$(ve),L(I,this,_e)}}function Xr(I,q){if(!(q==="constructor"&&typeof I[q]=="function")&&q!="__proto__")return I[q]}var zs=Gs(xs);function Gs(I){var q=0,$=0;return function(){var he=ur(),be=s-(he-$);if($=he,be>0){if(++q>=i)return arguments[0]}else q=0;return I.apply(void 0,arguments)}}function Vs(I){if(I!=null){try{return K.call(I)}catch{}try{return I+""}catch{}}return""}function _r(I,q){return I===q||I!==I&&q!==q}var Qr=gi(function(){return arguments}())?gi:function(I){return zt(I)&&we.call(I,"callee")&&!zr.call(I,"callee")},en=Array.isArray;function tn(I){return I!=null&&_i(I.length)&&!rn(I)}function Ks(I){return zt(I)&&tn(I)}var yi=Gr||Qs;function rn(I){if(!St(I))return!1;var q=br(I);return q==U||q==B||q==g||q==T}function _i(I){return typeof I=="number"&&I>-1&&I%1==0&&I<=o}function St(I){var q=typeof I;return I!=null&&(q=="object"||q=="function")}function zt(I){return I!=null&&typeof I=="object"}function Ys(I){if(!zt(I)||br(I)!=b)return!1;var q=Me(I);if(q===null)return!0;var $=we.call(q,"constructor")&&q.constructor;return typeof $=="function"&&$ instanceof $&&K.call($)==Be}var mi=fe?F(fe):Rs;function Js(I){return Ms(I,Ei(I))}function Ei(I){return tn(I)?Es(I):Is(I)}var Zs=Bs(function(I,q,$){pi(I,q,$)});function Xs(I){return function(){return I}}function Si(I){return I}function Qs(){return!1}r.exports=Zs}(Zt,Zt.exports)),Zt.exports}xa();var Cr={exports:{}},Na=Cr.exports,_o;function Ca(){return _o||(_o=1,function(r){(function(e,t){r.exports?r.exports=t():e.log=t()})(Na,function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],s={},o=null;function l(y,p){var R=y[p];if(typeof R.bind=="function")return R.bind(y);try{return Function.prototype.bind.call(R,y)}catch{return function(){return Function.prototype.apply.apply(R,[y,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function g(y){return y==="debug"&&(y="log"),typeof console===t?!1:y==="trace"&&n?c:console[y]!==void 0?l(console,y):console.log!==void 0?l(console,"log"):e}function C(){for(var y=this.getLevel(),p=0;p<i.length;p++){var R=i[p];this[R]=p<y?e:this.methodFactory(R,y,this.name)}if(this.log=this.debug,typeof console===t&&y<this.levels.SILENT)return"No console available for logging"}function x(y){return function(){typeof console!==t&&(C.call(this),this[y].apply(this,arguments))}}function A(y,p,R){return g(y)||x.apply(this,arguments)}function U(y,p){var R=this,b,T,Y,z="loglevel";typeof y=="string"?z+=":"+y:typeof y=="symbol"&&(z=void 0);function J(d){var w=(i[d]||"silent").toUpperCase();if(!(typeof window===t||!z)){try{window.localStorage[z]=w;return}catch{}try{window.document.cookie=encodeURIComponent(z)+"="+w+";"}catch{}}}function X(){var d;if(!(typeof window===t||!z)){try{d=window.localStorage[z]}catch{}if(typeof d===t)try{var w=window.document.cookie,f=encodeURIComponent(z),N=w.indexOf(f+"=");N!==-1&&(d=/^([^;]+)/.exec(w.slice(N+f.length+1))[1])}catch{}return R.levels[d]===void 0&&(d=void 0),d}}function a(){if(!(typeof window===t||!z)){try{window.localStorage.removeItem(z)}catch{}try{window.document.cookie=encodeURIComponent(z)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function _(d){var w=d;if(typeof w=="string"&&R.levels[w.toUpperCase()]!==void 0&&(w=R.levels[w.toUpperCase()]),typeof w=="number"&&w>=0&&w<=R.levels.SILENT)return w;throw new TypeError("log.setLevel() called with invalid level: "+d)}R.name=y,R.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},R.methodFactory=p||A,R.getLevel=function(){return Y??T??b},R.setLevel=function(d,w){return Y=_(d),w!==!1&&J(Y),C.call(R)},R.setDefaultLevel=function(d){T=_(d),X()||R.setLevel(d,!1)},R.resetLevel=function(){Y=null,a(),C.call(R)},R.enableAll=function(d){R.setLevel(R.levels.TRACE,d)},R.disableAll=function(d){R.setLevel(R.levels.SILENT,d)},R.rebuild=function(){if(o!==R&&(b=_(o.getLevel())),C.call(R),o===R)for(var d in s)s[d].rebuild()},b=_(o?o.getLevel():"WARN");var u=X();u!=null&&(Y=_(u)),C.call(R)}o=new U,o.getLogger=function(p){if(typeof p!="symbol"&&typeof p!="string"||p==="")throw new TypeError("You must supply a name when creating a logger.");var R=s[p];return R||(R=s[p]=new U(p,o.methodFactory)),R};var B=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=B),o},o.getLoggers=function(){return s},o.default=o,o})}(Cr)),Cr.exports}var ts=Ca();const Pr=Ut(ts),Pa=Pr.getLogger("http-helpers");Pa.setLevel(ts.levels.INFO);function mo(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`positive integer expected, not ${r}`)}function La(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}function jr(r,...e){if(!La(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${r.length}`)}function Ma(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");mo(r.outputLen),mo(r.blockLen)}function Lr(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function Ba(r,e){jr(r);const t=e.outputLen;if(r.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}const Bn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dn=r=>new DataView(r.buffer,r.byteOffset,r.byteLength),tt=(r,e)=>r<<32-e|r>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function Da(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function oi(r){return typeof r=="string"&&(r=Da(r)),jr(r),r}function ka(...r){let e=0;for(let n=0;n<r.length;n++){const i=r[n];jr(i),e+=i.length}const t=new Uint8Array(e);for(let n=0,i=0;n<r.length;n++){const s=r[n];t.set(s,i),i+=s.length}return t}class rs{clone(){return this._cloneInto()}}function Ua(r){const e=n=>r().update(oi(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function qa(r=32){if(Bn&&typeof Bn.getRandomValues=="function")return Bn.getRandomValues(new Uint8Array(r));throw new Error("crypto.getRandomValues must be defined")}function ja(r,e,t,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(t>>i&s),l=Number(t&s),c=n?4:0,g=n?0:4;r.setUint32(e+c,o,n),r.setUint32(e+g,l,n)}const Wa=(r,e,t)=>r&e^~r&t,Fa=(r,e,t)=>r&e^r&t^e&t;class $a extends rs{constructor(e,t,n,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Dn(this.buffer)}update(e){Lr(this);const{view:t,buffer:n,blockLen:i}=this;e=oi(e);const s=e.length;for(let o=0;o<s;){const l=Math.min(i-this.pos,s-o);if(l===i){const c=Dn(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+l),this.pos),this.pos+=l,o+=l,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Lr(this),Ba(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let x=o;x<i;x++)t[x]=0;ja(n,i-8,BigInt(this.length*8),s),this.process(n,0);const l=Dn(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const g=c/4,C=this.get();if(g>C.length)throw new Error("_sha2: outputLen bigger than state");for(let x=0;x<g;x++)l.setUint32(4*x,C[x],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:i,finished:s,destroyed:o,pos:l}=this;return e.length=i,e.pos=l,e.finished=s,e.destroyed=o,i%t&&e.buffer.set(n),e}}const Ha=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]),gt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),pt=new Uint32Array(64);class za extends $a{constructor(){super(64,32,8,!1),this.A=gt[0]|0,this.B=gt[1]|0,this.C=gt[2]|0,this.D=gt[3]|0,this.E=gt[4]|0,this.F=gt[5]|0,this.G=gt[6]|0,this.H=gt[7]|0}get(){const{A:e,B:t,C:n,D:i,E:s,F:o,G:l,H:c}=this;return[e,t,n,i,s,o,l,c]}set(e,t,n,i,s,o,l,c){this.A=e|0,this.B=t|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=l|0,this.H=c|0}process(e,t){for(let x=0;x<16;x++,t+=4)pt[x]=e.getUint32(t,!1);for(let x=16;x<64;x++){const A=pt[x-15],U=pt[x-2],B=tt(A,7)^tt(A,18)^A>>>3,y=tt(U,17)^tt(U,19)^U>>>10;pt[x]=y+pt[x-7]+B+pt[x-16]|0}let{A:n,B:i,C:s,D:o,E:l,F:c,G:g,H:C}=this;for(let x=0;x<64;x++){const A=tt(l,6)^tt(l,11)^tt(l,25),U=C+A+Wa(l,c,g)+Ha[x]+pt[x]|0,y=(tt(n,2)^tt(n,13)^tt(n,22))+Fa(n,i,s)|0;C=g,g=c,c=l,l=o+U|0,o=s,s=i,i=n,n=U+y|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,l=l+this.E|0,c=c+this.F|0,g=g+this.G|0,C=C+this.H|0,this.set(n,i,s,o,l,c,g,C)}roundClean(){pt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Ga=Ua(()=>new za);class ns extends rs{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Ma(e);const n=oi(t);if(this.iHash=e.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 i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return Lr(this),this.iHash.update(e),this}digestInto(e){Lr(this),jr(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:l}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=l,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const is=(r,e,t)=>new ns(r,e).update(t).digest();is.create=(r,e)=>new ns(r,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const os=BigInt(0),Wr=BigInt(1),Va=BigInt(2);function xt(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}function ir(r){if(!xt(r))throw new Error("Uint8Array expected")}const Ka=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function Bt(r){ir(r);let e="";for(let t=0;t<r.length;t++)e+=Ka[r[t]];return e}function ss(r){const e=r.toString(16);return e.length&1?`0${e}`:e}function si(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);return BigInt(r===""?"0":`0x${r}`)}const st={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Eo(r){if(r>=st._0&&r<=st._9)return r-st._0;if(r>=st._A&&r<=st._F)return r-(st._A-10);if(r>=st._a&&r<=st._f)return r-(st._a-10)}function Dt(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);const e=r.length,t=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(t);for(let i=0,s=0;i<t;i++,s+=2){const o=Eo(r.charCodeAt(s)),l=Eo(r.charCodeAt(s+1));if(o===void 0||l===void 0){const c=r[s]+r[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+l}return n}function Ot(r){return si(Bt(r))}function ai(r){return ir(r),si(Bt(Uint8Array.from(r).reverse()))}function kt(r,e){return Dt(r.toString(16).padStart(e*2,"0"))}function li(r,e){return kt(r,e).reverse()}function Ya(r){return Dt(ss(r))}function Qe(r,e,t){let n;if(typeof e=="string")try{n=Dt(e)}catch(s){throw new Error(`${r} must be valid hex string, got "${e}". Cause: ${s}`)}else if(xt(e))n=Uint8Array.from(e);else throw new Error(`${r} must be hex string or Uint8Array`);const i=n.length;if(typeof t=="number"&&i!==t)throw new Error(`${r} expected ${t} bytes, got ${i}`);return n}function rr(...r){let e=0;for(let n=0;n<r.length;n++){const i=r[n];ir(i),e+=i.length}const t=new Uint8Array(e);for(let n=0,i=0;n<r.length;n++){const s=r[n];t.set(s,i),i+=s.length}return t}function Ja(r,e){if(r.length!==e.length)return!1;let t=0;for(let n=0;n<r.length;n++)t|=r[n]^e[n];return t===0}function Za(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function Xa(r){let e;for(e=0;r>os;r>>=Wr,e+=1);return e}function Qa(r,e){return r>>BigInt(e)&Wr}function el(r,e,t){return r|(t?Wr:os)<<BigInt(e)}const ui=r=>(Va<<BigInt(r-1))-Wr,kn=r=>new Uint8Array(r),So=r=>Uint8Array.from(r);function as(r,e,t){if(typeof r!="number"||r<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let n=kn(r),i=kn(r),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},l=(...x)=>t(i,n,...x),c=(x=kn())=>{i=l(So([0]),x),n=l(),x.length!==0&&(i=l(So([1]),x),n=l())},g=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let x=0;const A=[];for(;x<e;){n=l();const U=n.slice();A.push(U),x+=n.length}return rr(...A)};return(x,A)=>{o(),c(x);let U;for(;!(U=A(g()));)c();return o(),U}}const tl={bigint:r=>typeof r=="bigint",function:r=>typeof r=="function",boolean:r=>typeof r=="boolean",string:r=>typeof r=="string",stringOrUint8Array:r=>typeof r=="string"||xt(r),isSafeInteger:r=>Number.isSafeInteger(r),array:r=>Array.isArray(r),field:(r,e)=>e.Fp.isValid(r),hash:r=>typeof r=="function"&&Number.isSafeInteger(r.outputLen)};function or(r,e,t={}){const n=(i,s,o)=>{const l=tl[s];if(typeof l!="function")throw new Error(`Invalid validator "${s}", expected function`);const c=r[i];if(!(o&&c===void 0)&&!l(c,r))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${s}`)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(t))n(i,s,!0);return r}const rl=Object.freeze(Object.defineProperty({__proto__:null,abytes:ir,bitGet:Qa,bitLen:Xa,bitMask:ui,bitSet:el,bytesToHex:Bt,bytesToNumberBE:Ot,bytesToNumberLE:ai,concatBytes:rr,createHmacDrbg:as,ensureBytes:Qe,equalBytes:Ja,hexToBytes:Dt,hexToNumber:si,isBytes:xt,numberToBytesBE:kt,numberToBytesLE:li,numberToHexUnpadded:ss,numberToVarBytesBE:Ya,utf8ToBytes:Za,validateObject:or},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ce=BigInt(0),Te=BigInt(1),It=BigInt(2),nl=BigInt(3),Yn=BigInt(4),vo=BigInt(5),Ao=BigInt(8);BigInt(9);BigInt(16);function je(r,e){const t=r%e;return t>=Ce?t:e+t}function il(r,e,t){if(t<=Ce||e<Ce)throw new Error("Expected power/modulo > 0");if(t===Te)return Ce;let n=Te;for(;e>Ce;)e&Te&&(n=n*r%t),r=r*r%t,e>>=Te;return n}function $e(r,e,t){let n=r;for(;e-- >Ce;)n*=n,n%=t;return n}function Jn(r,e){if(r===Ce||e<=Ce)throw new Error(`invert: expected positive integers, got n=${r} mod=${e}`);let t=je(r,e),n=e,i=Ce,s=Te;for(;t!==Ce;){const l=n/t,c=n%t,g=i-s*l;n=t,t=c,i=s,s=g}if(n!==Te)throw new Error("invert: does not exist");return je(i,e)}function ol(r){const e=(r-Te)/It;let t,n,i;for(t=r-Te,n=0;t%It===Ce;t/=It,n++);for(i=It;i<r&&il(i,e,r)!==r-Te;i++);if(n===1){const o=(r+Te)/Yn;return function(c,g){const C=c.pow(g,o);if(!c.eql(c.sqr(C),g))throw new Error("Cannot find square root");return C}}const s=(t+Te)/It;return function(l,c){if(l.pow(c,e)===l.neg(l.ONE))throw new Error("Cannot find square root");let g=n,C=l.pow(l.mul(l.ONE,i),t),x=l.pow(c,s),A=l.pow(c,t);for(;!l.eql(A,l.ONE);){if(l.eql(A,l.ZERO))return l.ZERO;let U=1;for(let y=l.sqr(A);U<g&&!l.eql(y,l.ONE);U++)y=l.sqr(y);const B=l.pow(C,Te<<BigInt(g-U-1));C=l.sqr(B),x=l.mul(x,B),A=l.mul(A,C),g=U}return x}}function sl(r){if(r%Yn===nl){const e=(r+Te)/Yn;return function(n,i){const s=n.pow(i,e);if(!n.eql(n.sqr(s),i))throw new Error("Cannot find square root");return s}}if(r%Ao===vo){const e=(r-vo)/Ao;return function(n,i){const s=n.mul(i,It),o=n.pow(s,e),l=n.mul(i,o),c=n.mul(n.mul(l,It),o),g=n.mul(l,n.sub(c,n.ONE));if(!n.eql(n.sqr(g),i))throw new Error("Cannot find square root");return g}}return ol(r)}const al=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ll(r){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},t=al.reduce((n,i)=>(n[i]="function",n),e);return or(r,t)}function ul(r,e,t){if(t<Ce)throw new Error("Expected power > 0");if(t===Ce)return r.ONE;if(t===Te)return e;let n=r.ONE,i=e;for(;t>Ce;)t&Te&&(n=r.mul(n,i)),i=r.sqr(i),t>>=Te;return n}function fl(r,e){const t=new Array(e.length),n=e.reduce((s,o,l)=>r.is0(o)?s:(t[l]=s,r.mul(s,o)),r.ONE),i=r.inv(n);return e.reduceRight((s,o,l)=>r.is0(o)?s:(t[l]=r.mul(s,t[l]),r.mul(s,o)),i),t}function ls(r,e){const t=e!==void 0?e:r.toString(2).length,n=Math.ceil(t/8);return{nBitLength:t,nByteLength:n}}function cl(r,e,t=!1,n={}){if(r<=Ce)throw new Error(`Expected Field ORDER > 0, got ${r}`);const{nBitLength:i,nByteLength:s}=ls(r,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=sl(r),l=Object.freeze({ORDER:r,BITS:i,BYTES:s,MASK:ui(i),ZERO:Ce,ONE:Te,create:c=>je(c,r),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Ce<=c&&c<r},is0:c=>c===Ce,isOdd:c=>(c&Te)===Te,neg:c=>je(-c,r),eql:(c,g)=>c===g,sqr:c=>je(c*c,r),add:(c,g)=>je(c+g,r),sub:(c,g)=>je(c-g,r),mul:(c,g)=>je(c*g,r),pow:(c,g)=>ul(l,c,g),div:(c,g)=>je(c*Jn(g,r),r),sqrN:c=>c*c,addN:(c,g)=>c+g,subN:(c,g)=>c-g,mulN:(c,g)=>c*g,inv:c=>Jn(c,r),sqrt:n.sqrt||(c=>o(l,c)),invertBatch:c=>fl(l,c),cmov:(c,g,C)=>C?g:c,toBytes:c=>t?li(c,s):kt(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return t?ai(c):Ot(c)}});return Object.freeze(l)}function us(r){if(typeof r!="bigint")throw new Error("field order must be bigint");const e=r.toString(2).length;return Math.ceil(e/8)}function fs(r){const e=us(r);return e+Math.ceil(e/2)}function dl(r,e,t=!1){const n=r.length,i=us(e),s=fs(e);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const o=t?Ot(r):ai(r),l=je(o,e-Te)+Te;return t?li(l,i):kt(l,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hl=BigInt(0),Un=BigInt(1);function gl(r,e){const t=(i,s)=>{const o=s.negate();return i?o:s},n=i=>{const s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:t,unsafeLadder(i,s){let o=r.ZERO,l=i;for(;s>hl;)s&Un&&(o=o.add(l)),l=l.double(),s>>=Un;return o},precomputeWindow(i,s){const{windows:o,windowSize:l}=n(s),c=[];let g=i,C=g;for(let x=0;x<o;x++){C=g,c.push(C);for(let A=1;A<l;A++)C=C.add(g),c.push(C);g=C.double()}return c},wNAF(i,s,o){const{windows:l,windowSize:c}=n(i);let g=r.ZERO,C=r.BASE;const x=BigInt(2**i-1),A=2**i,U=BigInt(i);for(let B=0;B<l;B++){const y=B*c;let p=Number(o&x);o>>=U,p>c&&(p-=A,o+=Un);const R=y,b=y+Math.abs(p)-1,T=B%2!==0,Y=p<0;p===0?C=C.add(t(T,s[R])):g=g.add(t(Y,s[b]))}return{p:g,f:C}},wNAFCached(i,s,o,l){const c=i._WINDOW_SIZE||1;let g=s.get(i);return g||(g=this.precomputeWindow(i,c),c!==1&&s.set(i,l(g))),this.wNAF(c,g,o)}}}function cs(r){return ll(r.Fp),or(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ls(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function pl(r){const e=cs(r);or(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:n,a:i}=e;if(t){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:wl,hexToBytes:bl}=rl,Tt={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(r){const{Err:e}=Tt;if(r.length<2||r[0]!==2)throw new e("Invalid signature integer tag");const t=r[1],n=r.subarray(2,t+2);if(!t||n.length!==t)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:wl(n),l:r.subarray(t+2)}},toSig(r){const{Err:e}=Tt,t=typeof r=="string"?bl(r):r;ir(t);let n=t.length;if(n<2||t[0]!=48)throw new e("Invalid signature tag");if(t[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=Tt._parseInt(t.subarray(2)),{d:o,l}=Tt._parseInt(s);if(l.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(r){const e=g=>Number.parseInt(g[0],16)&8?"00"+g:g,t=g=>{const C=g.toString(16);return C.length&1?`0${C}`:C},n=e(t(r.s)),i=e(t(r.r)),s=n.length/2,o=i.length/2,l=t(s),c=t(o);return`30${t(o+s+4)}02${c}${i}02${l}${n}`}},ut=BigInt(0),Ve=BigInt(1);BigInt(2);const Ro=BigInt(3);BigInt(4);function yl(r){const e=pl(r),{Fp:t}=e,n=e.toBytes||((B,y,p)=>{const R=y.toAffine();return rr(Uint8Array.from([4]),t.toBytes(R.x),t.toBytes(R.y))}),i=e.fromBytes||(B=>{const y=B.subarray(1),p=t.fromBytes(y.subarray(0,t.BYTES)),R=t.fromBytes(y.subarray(t.BYTES,2*t.BYTES));return{x:p,y:R}});function s(B){const{a:y,b:p}=e,R=t.sqr(B),b=t.mul(R,B);return t.add(t.add(b,t.mul(B,y)),p)}if(!t.eql(t.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(B){return typeof B=="bigint"&&ut<B&&B<e.n}function l(B){if(!o(B))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(B){const{allowedPrivateKeyLengths:y,nByteLength:p,wrapPrivateKey:R,n:b}=e;if(y&&typeof B!="bigint"){if(xt(B)&&(B=Bt(B)),typeof B!="string"||!y.includes(B.length))throw new Error("Invalid key");B=B.padStart(p*2,"0")}let T;try{T=typeof B=="bigint"?B:Ot(Qe("private key",B,p))}catch{throw new Error(`private key must be ${p} bytes, hex or bigint, not ${typeof B}`)}return R&&(T=je(T,b)),l(T),T}const g=new Map;function C(B){if(!(B instanceof x))throw new Error("ProjectivePoint expected")}class x{constructor(y,p,R){if(this.px=y,this.py=p,this.pz=R,y==null||!t.isValid(y))throw new Error("x required");if(p==null||!t.isValid(p))throw new Error("y required");if(R==null||!t.isValid(R))throw new Error("z required")}static fromAffine(y){const{x:p,y:R}=y||{};if(!y||!t.isValid(p)||!t.isValid(R))throw new Error("invalid affine point");if(y instanceof x)throw new Error("projective point not allowed");const b=T=>t.eql(T,t.ZERO);return b(p)&&b(R)?x.ZERO:new x(p,R,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){const p=t.invertBatch(y.map(R=>R.pz));return y.map((R,b)=>R.toAffine(p[b])).map(x.fromAffine)}static fromHex(y){const p=x.fromAffine(i(Qe("pointHex",y)));return p.assertValidity(),p}static fromPrivateKey(y){return x.BASE.multiply(c(y))}_setWindowSize(y){this._WINDOW_SIZE=y,g.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:y,y:p}=this.toAffine();if(!t.isValid(y)||!t.isValid(p))throw new Error("bad point: x or y not FE");const R=t.sqr(p),b=s(y);if(!t.eql(R,b))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y}=this.toAffine();if(t.isOdd)return!t.isOdd(y);throw new Error("Field doesn't support isOdd")}equals(y){C(y);const{px:p,py:R,pz:b}=this,{px:T,py:Y,pz:z}=y,J=t.eql(t.mul(p,z),t.mul(T,b)),X=t.eql(t.mul(R,z),t.mul(Y,b));return J&&X}negate(){return new x(this.px,t.neg(this.py),this.pz)}double(){const{a:y,b:p}=e,R=t.mul(p,Ro),{px:b,py:T,pz:Y}=this;let z=t.ZERO,J=t.ZERO,X=t.ZERO,a=t.mul(b,b),_=t.mul(T,T),u=t.mul(Y,Y),d=t.mul(b,T);return d=t.add(d,d),X=t.mul(b,Y),X=t.add(X,X),z=t.mul(y,X),J=t.mul(R,u),J=t.add(z,J),z=t.sub(_,J),J=t.add(_,J),J=t.mul(z,J),z=t.mul(d,z),X=t.mul(R,X),u=t.mul(y,u),d=t.sub(a,u),d=t.mul(y,d),d=t.add(d,X),X=t.add(a,a),a=t.add(X,a),a=t.add(a,u),a=t.mul(a,d),J=t.add(J,a),u=t.mul(T,Y),u=t.add(u,u),a=t.mul(u,d),z=t.sub(z,a),X=t.mul(u,_),X=t.add(X,X),X=t.add(X,X),new x(z,J,X)}add(y){C(y);const{px:p,py:R,pz:b}=this,{px:T,py:Y,pz:z}=y;let J=t.ZERO,X=t.ZERO,a=t.ZERO;const _=e.a,u=t.mul(e.b,Ro);let d=t.mul(p,T),w=t.mul(R,Y),f=t.mul(b,z),N=t.add(p,R),h=t.add(T,Y);N=t.mul(N,h),h=t.add(d,w),N=t.sub(N,h),h=t.add(p,b);let S=t.add(T,z);return h=t.mul(h,S),S=t.add(d,f),h=t.sub(h,S),S=t.add(R,b),J=t.add(Y,z),S=t.mul(S,J),J=t.add(w,f),S=t.sub(S,J),a=t.mul(_,h),J=t.mul(u,f),a=t.add(J,a),J=t.sub(w,a),a=t.add(w,a),X=t.mul(J,a),w=t.add(d,d),w=t.add(w,d),f=t.mul(_,f),h=t.mul(u,h),w=t.add(w,f),f=t.sub(d,f),f=t.mul(_,f),h=t.add(h,f),d=t.mul(w,h),X=t.add(X,d),d=t.mul(S,h),J=t.mul(N,J),J=t.sub(J,d),d=t.mul(N,w),a=t.mul(S,a),a=t.add(a,d),new x(J,X,a)}subtract(y){return this.add(y.negate())}is0(){return this.equals(x.ZERO)}wNAF(y){return U.wNAFCached(this,g,y,p=>{const R=t.invertBatch(p.map(b=>b.pz));return p.map((b,T)=>b.toAffine(R[T])).map(x.fromAffine)})}multiplyUnsafe(y){const p=x.ZERO;if(y===ut)return p;if(l(y),y===Ve)return this;const{endo:R}=e;if(!R)return U.unsafeLadder(this,y);let{k1neg:b,k1:T,k2neg:Y,k2:z}=R.splitScalar(y),J=p,X=p,a=this;for(;T>ut||z>ut;)T&Ve&&(J=J.add(a)),z&Ve&&(X=X.add(a)),a=a.double(),T>>=Ve,z>>=Ve;return b&&(J=J.negate()),Y&&(X=X.negate()),X=new x(t.mul(X.px,R.beta),X.py,X.pz),J.add(X)}multiply(y){l(y);let p=y,R,b;const{endo:T}=e;if(T){const{k1neg:Y,k1:z,k2neg:J,k2:X}=T.splitScalar(p);let{p:a,f:_}=this.wNAF(z),{p:u,f:d}=this.wNAF(X);a=U.constTimeNegate(Y,a),u=U.constTimeNegate(J,u),u=new x(t.mul(u.px,T.beta),u.py,u.pz),R=a.add(u),b=_.add(d)}else{const{p:Y,f:z}=this.wNAF(p);R=Y,b=z}return x.normalizeZ([R,b])[0]}multiplyAndAddUnsafe(y,p,R){const b=x.BASE,T=(z,J)=>J===ut||J===Ve||!z.equals(b)?z.multiplyUnsafe(J):z.multiply(J),Y=T(this,p).add(T(y,R));return Y.is0()?void 0:Y}toAffine(y){const{px:p,py:R,pz:b}=this,T=this.is0();y==null&&(y=T?t.ONE:t.inv(b));const Y=t.mul(p,y),z=t.mul(R,y),J=t.mul(b,y);if(T)return{x:t.ZERO,y:t.ZERO};if(!t.eql(J,t.ONE))throw new Error("invZ was invalid");return{x:Y,y:z}}isTorsionFree(){const{h:y,isTorsionFree:p}=e;if(y===Ve)return!0;if(p)return p(x,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:y,clearCofactor:p}=e;return y===Ve?this:p?p(x,this):this.multiplyUnsafe(e.h)}toRawBytes(y=!0){return this.assertValidity(),n(x,this,y)}toHex(y=!0){return Bt(this.toRawBytes(y))}}x.BASE=new x(e.Gx,e.Gy,t.ONE),x.ZERO=new x(t.ZERO,t.ONE,t.ZERO);const A=e.nBitLength,U=gl(x,e.endo?Math.ceil(A/2):A);return{CURVE:e,ProjectivePoint:x,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function _l(r){const e=cs(r);return or(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function ml(r){const e=_l(r),{Fp:t,n}=e,i=t.BYTES+1,s=2*t.BYTES+1;function o(h){return ut<h&&h<t.ORDER}function l(h){return je(h,n)}function c(h){return Jn(h,n)}const{ProjectivePoint:g,normPrivateKeyToScalar:C,weierstrassEquation:x,isWithinCurveOrder:A}=yl({...e,toBytes(h,S,P){const m=S.toAffine(),M=t.toBytes(m.x),E=rr;return P?E(Uint8Array.from([S.hasEvenY()?2:3]),M):E(Uint8Array.from([4]),M,t.toBytes(m.y))},fromBytes(h){const S=h.length,P=h[0],m=h.subarray(1);if(S===i&&(P===2||P===3)){const M=Ot(m);if(!o(M))throw new Error("Point is not on curve");const E=x(M);let j;try{j=t.sqrt(E)}catch(ee){const Q=ee instanceof Error?": "+ee.message:"";throw new Error("Point is not on curve"+Q)}const V=(j&Ve)===Ve;return(P&1)===1!==V&&(j=t.neg(j)),{x:M,y:j}}else if(S===s&&P===4){const M=t.fromBytes(m.subarray(0,t.BYTES)),E=t.fromBytes(m.subarray(t.BYTES,2*t.BYTES));return{x:M,y:E}}else throw new Error(`Point of length ${S} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}}),U=h=>Bt(kt(h,e.nByteLength));function B(h){const S=n>>Ve;return h>S}function y(h){return B(h)?l(-h):h}const p=(h,S,P)=>Ot(h.slice(S,P));class R{constructor(S,P,m){this.r=S,this.s=P,this.recovery=m,this.assertValidity()}static fromCompact(S){const P=e.nByteLength;return S=Qe("compactSignature",S,P*2),new R(p(S,0,P),p(S,P,2*P))}static fromDER(S){const{r:P,s:m}=Tt.toSig(Qe("DER",S));return new R(P,m)}assertValidity(){if(!A(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!A(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(S){return new R(this.r,this.s,S)}recoverPublicKey(S){const{r:P,s:m,recovery:M}=this,E=X(Qe("msgHash",S));if(M==null||![0,1,2,3].includes(M))throw new Error("recovery id invalid");const j=M===2||M===3?P+e.n:P;if(j>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const V=(M&1)===0?"02":"03",W=g.fromHex(V+U(j)),ee=c(j),Q=l(-E*ee),le=l(m*ee),ue=g.BASE.multiplyAndAddUnsafe(W,Q,le);if(!ue)throw new Error("point at infinify");return ue.assertValidity(),ue}hasHighS(){return B(this.s)}normalizeS(){return this.hasHighS()?new R(this.r,l(-this.s),this.recovery):this}toDERRawBytes(){return Dt(this.toDERHex())}toDERHex(){return Tt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Dt(this.toCompactHex())}toCompactHex(){return U(this.r)+U(this.s)}}const b={isValidPrivateKey(h){try{return C(h),!0}catch{return!1}},normPrivateKeyToScalar:C,randomPrivateKey:()=>{const h=fs(e.n);return dl(e.randomBytes(h),e.n)},precompute(h=8,S=g.BASE){return S._setWindowSize(h),S.multiply(BigInt(3)),S}};function T(h,S=!0){return g.fromPrivateKey(h).toRawBytes(S)}function Y(h){const S=xt(h),P=typeof h=="string",m=(S||P)&&h.length;return S?m===i||m===s:P?m===2*i||m===2*s:h instanceof g}function z(h,S,P=!0){if(Y(h))throw new Error("first arg must be private key");if(!Y(S))throw new Error("second arg must be public key");return g.fromHex(S).multiply(C(h)).toRawBytes(P)}const J=e.bits2int||function(h){const S=Ot(h),P=h.length*8-e.nBitLength;return P>0?S>>BigInt(P):S},X=e.bits2int_modN||function(h){return l(J(h))},a=ui(e.nBitLength);function _(h){if(typeof h!="bigint")throw new Error("bigint expected");if(!(ut<=h&&h<a))throw new Error(`bigint expected < 2^${e.nBitLength}`);return kt(h,e.nByteLength)}function u(h,S,P=d){if(["recovered","canonical"].some(G=>G in P))throw new Error("sign() legacy options not supported");const{hash:m,randomBytes:M}=e;let{lowS:E,prehash:j,extraEntropy:V}=P;E==null&&(E=!0),h=Qe("msgHash",h),j&&(h=Qe("prehashed msgHash",m(h)));const W=X(h),ee=C(S),Q=[_(ee),_(W)];if(V!=null&&V!==!1){const G=V===!0?M(t.BYTES):V;Q.push(Qe("extraEntropy",G))}const le=rr(...Q),ue=W;function H(G){const oe=J(G);if(!A(oe))return;const ce=c(oe),fe=g.BASE.multiply(oe).toAffine(),L=l(fe.x);if(L===ut)return;const D=l(ce*l(ue+L*ee));if(D===ut)return;let F=(fe.x===L?0:2)|Number(fe.y&Ve),ne=D;return E&&B(D)&&(ne=y(D),F^=1),new R(L,ne,F)}return{seed:le,k2sig:H}}const d={lowS:e.lowS,prehash:!1},w={lowS:e.lowS,prehash:!1};function f(h,S,P=d){const{seed:m,k2sig:M}=u(h,S,P),E=e;return as(E.hash.outputLen,E.nByteLength,E.hmac)(m,M)}g.BASE._setWindowSize(8);function N(h,S,P,m=w){const M=h;if(S=Qe("msgHash",S),P=Qe("publicKey",P),"strict"in m)throw new Error("options.strict was renamed to lowS");const{lowS:E,prehash:j}=m;let V,W;try{if(typeof M=="string"||xt(M))try{V=R.fromDER(M)}catch(fe){if(!(fe instanceof Tt.Err))throw fe;V=R.fromCompact(M)}else if(typeof M=="object"&&typeof M.r=="bigint"&&typeof M.s=="bigint"){const{r:fe,s:L}=M;V=new R(fe,L)}else throw new Error("PARSE");W=g.fromHex(P)}catch(fe){if(fe.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(E&&V.hasHighS())return!1;j&&(S=e.hash(S));const{r:ee,s:Q}=V,le=X(S),ue=c(Q),H=l(le*ue),G=l(ee*ue),oe=g.BASE.multiplyAndAddUnsafe(W,H,G)?.toAffine();return oe?l(oe.x)===ee:!1}return{CURVE:e,getPublicKey:T,getSharedSecret:z,sign:f,verify:N,ProjectivePoint:g,Signature:R,utils:b}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function El(r){return{hash:r,hmac:(e,...t)=>is(r,e,ka(...t)),randomBytes:qa}}function Sl(r,e){const t=n=>ml({...r,...El(n)});return Object.freeze({...t(e),create:t})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ds=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Io=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),vl=BigInt(1),Zn=BigInt(2),To=(r,e)=>(r+e/Zn)/e;function Al(r){const e=ds,t=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),l=BigInt(44),c=BigInt(88),g=r*r*r%e,C=g*g*r%e,x=$e(C,t,e)*C%e,A=$e(x,t,e)*C%e,U=$e(A,Zn,e)*g%e,B=$e(U,i,e)*U%e,y=$e(B,s,e)*B%e,p=$e(y,l,e)*y%e,R=$e(p,c,e)*p%e,b=$e(R,l,e)*y%e,T=$e(b,t,e)*C%e,Y=$e(T,o,e)*B%e,z=$e(Y,n,e)*g%e,J=$e(z,Zn,e);if(!Xn.eql(Xn.sqr(J),r))throw new Error("Cannot find square root");return J}const Xn=cl(ds,void 0,void 0,{sqrt:Al}),fi=Sl({a:BigInt(0),b:BigInt(7),Fp:Xn,n:Io,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{const e=Io,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-vl*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=t,o=BigInt("0x100000000000000000000000000000000"),l=To(s*r,e),c=To(-n*r,e);let g=je(r-l*t-c*i,e),C=je(-l*n-c*s,e);const x=g>o,A=C>o;if(x&&(g=e-g),A&&(C=e-C),g>o||C>o)throw new Error("splitScalar: Endomorphism failed, k="+r);return{k1neg:x,k1:g,k2neg:A,k2:C}}}},Ga);BigInt(0);fi.ProjectivePoint;function Rl(r){let e=r;if(typeof e!="string")throw new Error(`[padToEven] value must be type 'string', received ${typeof e}`);return e.length%2&&(e=`0${e}`),e}BigInt(0);const Qn={},ei={};for(let r=0;r<16;r++){const e=r,t=r*16,n=r.toString(16).toLowerCase();ei[n]=e,ei[n.toUpperCase()]=e,Qn[n]=t,Qn[n.toUpperCase()]=t}function Il(r){const e=r.length,t=new Uint8Array(e/2);for(let n=0;n<e;n+=2)t[n/2]=Qn[r[n]]+ei[r[n+1]];return t}Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));for(let r=0;r<=256*256-1;r++)BigInt(r);const Fr=r=>{if(typeof r!="string")throw new Error(`hex argument type ${typeof r} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(r))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${r}`);const e=r.slice(2);return Il(e.length%2===0?e:Rl(e))},Tl=r=>{if(!Number.isSafeInteger(r)||r<0)throw new Error(`Received an invalid integer type: ${r}`);return`0x${r.toString(16)}`},sr=r=>{const e=Tl(r);return Fr(e)};BigInt("0xffffffffffffffff");BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935");fi.CURVE.n;fi.CURVE.n/BigInt(2);BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");const Ol="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470";Fr(Ol);const xl="0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347";Fr(xl);const Nl="0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421";Fr(Nl);Uint8Array.from([128]);BigInt(-1);BigInt(0);BigInt(1);BigInt(2);BigInt(3);BigInt(7);BigInt(8);BigInt(27);BigInt(28);BigInt(31);BigInt(32);BigInt(64);BigInt(128);BigInt(255);BigInt(256);BigInt(96);BigInt(100);BigInt(160);BigInt(224);BigInt(7922816251426434e13);BigInt(1461501637330903e33);BigInt(2695994666715064e52);BigInt(1e9);Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));var Oo;(function(r){r.String="string",r.Bytes="view",r.Number="number"})(Oo||(Oo={}));var xo;(function(r){r.String="string",r.Bytes="view",r.JSON="json"})(xo||(xo={}));var No;(function(r){r[r.Number=0]="Number",r[r.BigInt=1]="BigInt",r[r.Uint8Array=2]="Uint8Array",r[r.PrefixedHexString=3]="PrefixedHexString"})(No||(No={}));var Co;(function(r){r[r.Deposit=0]="Deposit",r[r.Withdrawal=1]="Withdrawal",r[r.Consolidation=2]="Consolidation"})(Co||(Co={}));var Nt;(function(r){r[r.Version=0]="Version",r[r.Balance=1]="Balance",r[r.Nonce=2]="Nonce",r[r.CodeHash=3]="CodeHash",r[r.CodeSize=4]="CodeSize"})(Nt||(Nt={}));sr(Nt.Version);sr(Nt.Balance);sr(Nt.Nonce);sr(Nt.CodeHash);sr(Nt.CodeSize);BigInt(256)**BigInt(31);var qn={exports:{}},Ar={},Rr={},Po;function Cl(){if(Po)return Rr;Po=1,Object.defineProperty(Rr,"__esModule",{value:!0});function r(e){var t=4,n=e.length,i=n%t;if(!i)return e;var s=n,o=t-i,l=n+o,c=Buffer.alloc(l);for(c.write(e);o--;)c.write("=",s++);return c.toString()}return Rr.default=r,Rr}var Lo;function Pl(){if(Lo)return Ar;Lo=1,Object.defineProperty(Ar,"__esModule",{value:!0});var r=Cl();function e(l,c){return c===void 0&&(c="utf8"),Buffer.isBuffer(l)?i(l.toString("base64")):i(Buffer.from(l,c).toString("base64"))}function t(l,c){return c===void 0&&(c="utf8"),Buffer.from(n(l),"base64").toString(c)}function n(l){return l=l.toString(),r.default(l).replace(/\-/g,"+").replace(/_/g,"/")}function i(l){return l.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function s(l){return Buffer.from(n(l),"base64")}var o=e;return o.encode=e,o.decode=t,o.toBase64=n,o.fromBase64=i,o.toBuffer=s,Ar.default=o,Ar}var Mo;function Ll(){return Mo||(Mo=1,function(r){r.exports=Pl().default,r.exports.default=r.exports}(qn)),qn.exports}Ll();const Se={MAINNET:"mainnet",TESTNET:"testnet",CYAN:"cyan",AQUA:"aqua",CELESTE:"celeste"},bt={SAPPHIRE_DEVNET:"sapphire_devnet",SAPPHIRE_MAINNET:"sapphire_mainnet"};Se.MAINNET+"",Se.TESTNET+"",Se.CYAN+"",Se.AQUA+"",Se.CELESTE+"";Se.AQUA+"",bt.SAPPHIRE_MAINNET,Se.CELESTE+"",bt.SAPPHIRE_MAINNET,Se.CYAN+"",bt.SAPPHIRE_MAINNET,Se.MAINNET+"",bt.SAPPHIRE_MAINNET,Se.TESTNET+"",bt.SAPPHIRE_DEVNET;Se.MAINNET+"",Se.TESTNET+"",Se.CYAN+"",Se.AQUA+"",Se.CELESTE+"";bt.SAPPHIRE_MAINNET+"",bt.SAPPHIRE_DEVNET+"",Se.MAINNET+"",Se.TESTNET+"",Se.CYAN+"",Se.AQUA+"",Se.CELESTE+"";Se.MAINNET+"",Se.TESTNET+"",Se.CYAN+"",Se.AQUA+"",Se.CELESTE+"";function Bo(r){let e=!1,t=0,n;try{n=window[r],e=!0,t=n.length;const i="__storage_test__";return n.setItem(i,i),n.removeItem(i),!0}catch(i){const s=i;return s&&(s.code===22||s.code===1014||s.name==="QuotaExceededError"||s.name==="NS_ERROR_DOM_QUOTA_REACHED")&&e&&t!==0}}class Ml{constructor(){ge(this,"store",new Map)}getItem(e){return this.store.get(e)||null}setItem(e,t){this.store.set(e,t)}removeItem(e){this.store.delete(e)}}class Bl{constructor(e,t){ge(this,"storage",void 0),ge(this,"_storeKey",void 0),this.storage=t,this._storeKey=e;try{t.getItem(e)||this.resetStore()}catch{}}static getInstance(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"local";if(!this.instanceMap.has(e)){let n;t==="local"&&Bo("localStorage")?n=window.localStorage:t==="session"&&Bo("sessionStorage")?n=window.sessionStorage:n=new Ml,this.instanceMap.set(e,new this(e,n))}return this.instanceMap.get(e)}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const e=this.getStore();return this.storage.removeItem(this._storeKey),e}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(e){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[e]}set(e,t){const n=JSON.parse(this.storage.getItem(this._storeKey)||"{}");n[e]=t,this.storage.setItem(this._storeKey,JSON.stringify(n))}}ge(Bl,"instanceMap",new Map);Ke(Ke({},bt),Se);var Dl=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,jn=Math.ceil,ze=Math.floor,qe="[BigNumber Error] ",Do=qe+"Number primitive has more than 15 significant digits: ",Xe=1e14,pe=14,Wn=9007199254740991,Fn=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],wt=1e7,Ne=1e9;function hs(r){var e,t,n,i=b.prototype={constructor:b,toString:null,valueOf:null},s=new b(1),o=20,l=4,c=-7,g=21,C=-1e7,x=1e7,A=!1,U=1,B=0,y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},p="0123456789abcdefghijklmnopqrstuvwxyz",R=!0;function b(a,_){var u,d,w,f,N,h,S,P,m=this;if(!(m instanceof b))return new b(a,_);if(_==null){if(a&&a._isBigNumber===!0){m.s=a.s,!a.c||a.e>x?m.c=m.e=null:a.e<C?m.c=[m.e=0]:(m.e=a.e,m.c=a.c.slice());return}if((h=typeof a=="number")&&a*0==0){if(m.s=1/a<0?(a=-a,-1):1,a===~~a){for(f=0,N=a;N>=10;N/=10,f++);f>x?m.c=m.e=null:(m.e=f,m.c=[a]);return}P=String(a)}else{if(!Dl.test(P=String(a)))return n(m,P,h);m.s=P.charCodeAt(0)==45?(P=P.slice(1),-1):1}(f=P.indexOf("."))>-1&&(P=P.replace(".","")),(N=P.search(/e/i))>0?(f<0&&(f=N),f+=+P.slice(N+1),P=P.substring(0,N)):f<0&&(f=P.length)}else{if(Re(_,2,p.length,"Base"),_==10&&R)return m=new b(a),J(m,o+m.e+1,l);if(P=String(a),h=typeof a=="number"){if(a*0!=0)return n(m,P,h,_);if(m.s=1/a<0?(P=P.slice(1),-1):1,b.DEBUG&&P.replace(/^0\.0*|\./,"").length>15)throw Error(Do+a)}else m.s=P.charCodeAt(0)===45?(P=P.slice(1),-1):1;for(u=p.slice(0,_),f=N=0,S=P.length;N<S;N++)if(u.indexOf(d=P.charAt(N))<0){if(d=="."){if(N>f){f=S;continue}}else if(!w&&(P==P.toUpperCase()&&(P=P.toLowerCase())||P==P.toLowerCase()&&(P=P.toUpperCase()))){w=!0,N=-1,f=0;continue}return n(m,String(a),h,_)}h=!1,P=t(P,_,10,m.s),(f=P.indexOf("."))>-1?P=P.replace(".",""):f=P.length}for(N=0;P.charCodeAt(N)===48;N++);for(S=P.length;P.charCodeAt(--S)===48;);if(P=P.slice(N,++S)){if(S-=N,h&&b.DEBUG&&S>15&&(a>Wn||a!==ze(a)))throw Error(Do+m.s*a);if((f=f-N-1)>x)m.c=m.e=null;else if(f<C)m.c=[m.e=0];else{if(m.e=f,m.c=[],N=(f+1)%pe,f<0&&(N+=pe),N<S){for(N&&m.c.push(+P.slice(0,N)),S-=pe;N<S;)m.c.push(+P.slice(N,N+=pe));N=pe-(P=P.slice(N)).length}else N-=S;for(;N--;P+="0");m.c.push(+P)}}else m.c=[m.e=0]}b.clone=hs,b.ROUND_UP=0,b.ROUND_DOWN=1,b.ROUND_CEIL=2,b.ROUND_FLOOR=3,b.ROUND_HALF_UP=4,b.ROUND_HALF_DOWN=5,b.ROUND_HALF_EVEN=6,b.ROUND_HALF_CEIL=7,b.ROUND_HALF_FLOOR=8,b.EUCLID=9,b.config=b.set=function(a){var _,u;if(a!=null)if(typeof a=="object"){if(a.hasOwnProperty(_="DECIMAL_PLACES")&&(u=a[_],Re(u,0,Ne,_),o=u),a.hasOwnProperty(_="ROUNDING_MODE")&&(u=a[_],Re(u,0,8,_),l=u),a.hasOwnProperty(_="EXPONENTIAL_AT")&&(u=a[_],u&&u.pop?(Re(u[0],-Ne,0,_),Re(u[1],0,Ne,_),c=u[0],g=u[1]):(Re(u,-Ne,Ne,_),c=-(g=u<0?-u:u))),a.hasOwnProperty(_="RANGE"))if(u=a[_],u&&u.pop)Re(u[0],-Ne,-1,_),Re(u[1],1,Ne,_),C=u[0],x=u[1];else if(Re(u,-Ne,Ne,_),u)C=-(x=u<0?-u:u);else throw Error(qe+_+" cannot be zero: "+u);if(a.hasOwnProperty(_="CRYPTO"))if(u=a[_],u===!!u)if(u)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))A=u;else throw A=!u,Error(qe+"crypto unavailable");else A=u;else throw Error(qe+_+" not true or false: "+u);if(a.hasOwnProperty(_="MODULO_MODE")&&(u=a[_],Re(u,0,9,_),U=u),a.hasOwnProperty(_="POW_PRECISION")&&(u=a[_],Re(u,0,Ne,_),B=u),a.hasOwnProperty(_="FORMAT"))if(u=a[_],typeof u=="object")y=u;else throw Error(qe+_+" not an object: "+u);if(a.hasOwnProperty(_="ALPHABET"))if(u=a[_],typeof u=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(u))R=u.slice(0,10)=="0123456789",p=u;else throw Error(qe+_+" invalid: "+u)}else throw Error(qe+"Object expected: "+a);return{DECIMAL_PLACES:o,ROUNDING_MODE:l,EXPONENTIAL_AT:[c,g],RANGE:[C,x],CRYPTO:A,MODULO_MODE:U,POW_PRECISION:B,FORMAT:y,ALPHABET:p}},b.isBigNumber=function(a){if(!a||a._isBigNumber!==!0)return!1;if(!b.DEBUG)return!0;var _,u,d=a.c,w=a.e,f=a.s;e:if({}.toString.call(d)=="[object Array]"){if((f===1||f===-1)&&w>=-Ne&&w<=Ne&&w===ze(w)){if(d[0]===0){if(w===0&&d.length===1)return!0;break e}if(_=(w+1)%pe,_<1&&(_+=pe),String(d[0]).length==_){for(_=0;_<d.length;_++)if(u=d[_],u<0||u>=Xe||u!==ze(u))break e;if(u!==0)return!0}}}else if(d===null&&w===null&&(f===null||f===1||f===-1))return!0;throw Error(qe+"Invalid BigNumber: "+a)},b.maximum=b.max=function(){return Y(arguments,-1)},b.minimum=b.min=function(){return Y(arguments,1)},b.random=function(){var a=9007199254740992,_=Math.random()*a&2097151?function(){return ze(Math.random()*a)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(u){var d,w,f,N,h,S=0,P=[],m=new b(s);if(u==null?u=o:Re(u,0,Ne),N=jn(u/pe),A)if(crypto.getRandomValues){for(d=crypto.getRandomValues(new Uint32Array(N*=2));S<N;)h=d[S]*131072+(d[S+1]>>>11),h>=9e15?(w=crypto.getRandomValues(new Uint32Array(2)),d[S]=w[0],d[S+1]=w[1]):(P.push(h%1e14),S+=2);S=N/2}else if(crypto.randomBytes){for(d=crypto.randomBytes(N*=7);S<N;)h=(d[S]&31)*281474976710656+d[S+1]*1099511627776+d[S+2]*4294967296+d[S+3]*16777216+(d[S+4]<<16)+(d[S+5]<<8)+d[S+6],h>=9e15?crypto.randomBytes(7).copy(d,S):(P.push(h%1e14),S+=7);S=N/7}else throw A=!1,Error(qe+"crypto unavailable");if(!A)for(;S<N;)h=_(),h<9e15&&(P[S++]=h%1e14);for(N=P[--S],u%=pe,N&&u&&(h=Fn[pe-u],P[S]=ze(N/h)*h);P[S]===0;P.pop(),S--);if(S<0)P=[f=0];else{for(f=-1;P[0]===0;P.splice(0,1),f-=pe);for(S=1,h=P[0];h>=10;h/=10,S++);S<pe&&(f-=pe-S)}return m.e=f,m.c=P,m}}(),b.sum=function(){for(var a=1,_=arguments,u=new b(_[0]);a<_.length;)u=u.plus(_[a++]);return u},t=function(){var a="0123456789";function _(u,d,w,f){for(var N,h=[0],S,P=0,m=u.length;P<m;){for(S=h.length;S--;h[S]*=d);for(h[0]+=f.indexOf(u.charAt(P++)),N=0;N<h.length;N++)h[N]>w-1&&(h[N+1]==null&&(h[N+1]=0),h[N+1]+=h[N]/w|0,h[N]%=w)}return h.reverse()}return function(u,d,w,f,N){var h,S,P,m,M,E,j,V,W=u.indexOf("."),ee=o,Q=l;for(W>=0&&(m=B,B=0,u=u.replace(".",""),V=new b(d),E=V.pow(u.length-W),B=m,V.c=_(at(He(E.c),E.e,"0"),10,w,a),V.e=V.c.length),j=_(u,d,w,N?(h=p,a):(h=a,p)),P=m=j.length;j[--m]==0;j.pop());if(!j[0])return h.charAt(0);if(W<0?--P:(E.c=j,E.e=P,E.s=f,E=e(E,V,ee,Q,w),j=E.c,M=E.r,P=E.e),S=P+ee+1,W=j[S],m=w/2,M=M||S<0||j[S+1]!=null,M=Q<4?(W!=null||M)&&(Q==0||Q==(E.s<0?3:2)):W>m||W==m&&(Q==4||M||Q==6&&j[S-1]&1||Q==(E.s<0?8:7)),S<1||!j[0])u=M?at(h.charAt(1),-ee,h.charAt(0)):h.charAt(0);else{if(j.length=S,M)for(--w;++j[--S]>w;)j[S]=0,S||(++P,j=[1].concat(j));for(m=j.length;!j[--m];);for(W=0,u="";W<=m;u+=h.charAt(j[W++]));u=at(u,P,h.charAt(0))}return u}}(),e=function(){function a(d,w,f){var N,h,S,P,m=0,M=d.length,E=w%wt,j=w/wt|0;for(d=d.slice();M--;)S=d[M]%wt,P=d[M]/wt|0,N=j*S+P*E,h=E*S+N%wt*wt+m,m=(h/f|0)+(N/wt|0)+j*P,d[M]=h%f;return m&&(d=[m].concat(d)),d}function _(d,w,f,N){var h,S;if(f!=N)S=f>N?1:-1;else for(h=S=0;h<f;h++)if(d[h]!=w[h]){S=d[h]>w[h]?1:-1;break}return S}function u(d,w,f,N){for(var h=0;f--;)d[f]-=h,h=d[f]<w[f]?1:0,d[f]=h*N+d[f]-w[f];for(;!d[0]&&d.length>1;d.splice(0,1));}return function(d,w,f,N,h){var S,P,m,M,E,j,V,W,ee,Q,le,ue,H,G,oe,ce,fe,L=d.s==w.s?1:-1,D=d.c,F=w.c;if(!D||!D[0]||!F||!F[0])return new b(!d.s||!w.s||(D?F&&D[0]==F[0]:!F)?NaN:D&&D[0]==0||!F?L*0:L/0);for(W=new b(L),ee=W.c=[],P=d.e-w.e,L=f+P+1,h||(h=Xe,P=Ge(d.e/pe)-Ge(w.e/pe),L=L/pe|0),m=0;F[m]==(D[m]||0);m++);if(F[m]>(D[m]||0)&&P--,L<0)ee.push(1),M=!0;else{for(G=D.length,ce=F.length,m=0,L+=2,E=ze(h/(F[0]+1)),E>1&&(F=a(F,E,h),D=a(D,E,h),ce=F.length,G=D.length),H=ce,Q=D.slice(0,ce),le=Q.length;le<ce;Q[le++]=0);fe=F.slice(),fe=[0].concat(fe),oe=F[0],F[1]>=h/2&&oe++;do{if(E=0,S=_(F,Q,ce,le),S<0){if(ue=Q[0],ce!=le&&(ue=ue*h+(Q[1]||0)),E=ze(ue/oe),E>1)for(E>=h&&(E=h-1),j=a(F,E,h),V=j.length,le=Q.length;_(j,Q,V,le)==1;)E--,u(j,ce<V?fe:F,V,h),V=j.length,S=1;else E==0&&(S=E=1),j=F.slice(),V=j.length;if(V<le&&(j=[0].concat(j)),u(Q,j,le,h),le=Q.length,S==-1)for(;_(F,Q,ce,le)<1;)E++,u(Q,ce<le?fe:F,le,h),le=Q.length}else S===0&&(E++,Q=[0]);ee[m++]=E,Q[0]?Q[le++]=D[H]||0:(Q=[D[H]],le=1)}while((H++<G||Q[0]!=null)&&L--);M=Q[0]!=null,ee[0]||ee.splice(0,1)}if(h==Xe){for(m=1,L=ee[0];L>=10;L/=10,m++);J(W,f+(W.e=m+P*pe-1)+1,N,M)}else W.e=P,W.r=+M;return W}}();function T(a,_,u,d){var w,f,N,h,S;if(u==null?u=l:Re(u,0,8),!a.c)return a.toString();if(w=a.c[0],N=a.e,_==null)S=He(a.c),S=d==1||d==2&&(N<=c||N>=g)?Tr(S,N):at(S,N,"0");else if(a=J(new b(a),_,u),f=a.e,S=He(a.c),h=S.length,d==1||d==2&&(_<=f||f<=c)){for(;h<_;S+="0",h++);S=Tr(S,f)}else if(_-=N+(d===2&&f>N),S=at(S,f,"0"),f+1>h){if(--_>0)for(S+=".";_--;S+="0");}else if(_+=f-h,_>0)for(f+1==h&&(S+=".");_--;S+="0");return a.s<0&&w?"-"+S:S}function Y(a,_){for(var u,d,w=1,f=new b(a[0]);w<a.length;w++)d=new b(a[w]),(!d.s||(u=vt(f,d))===_||u===0&&f.s===_)&&(f=d);return f}function z(a,_,u){for(var d=1,w=_.length;!_[--w];_.pop());for(w=_[0];w>=10;w/=10,d++);return(u=d+u*pe-1)>x?a.c=a.e=null:u<C?a.c=[a.e=0]:(a.e=u,a.c=_),a}n=function(){var a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,_=/^([^.]+)\.$/,u=/^\.([^.]+)$/,d=/^-?(Infinity|NaN)$/,w=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(f,N,h,S){var P,m=h?N:N.replace(w,"");if(d.test(m))f.s=isNaN(m)?null:m<0?-1:1;else{if(!h&&(m=m.replace(a,function(M,E,j){return P=(j=j.toLowerCase())=="x"?16:j=="b"?2:8,!S||S==P?E:M}),S&&(P=S,m=m.replace(_,"$1").replace(u,"0.$1")),N!=m))return new b(m,P);if(b.DEBUG)throw Error(qe+"Not a"+(S?" base "+S:"")+" number: "+N);f.s=null}f.c=f.e=null}}();function J(a,_,u,d){var w,f,N,h,S,P,m,M=a.c,E=Fn;if(M){e:{for(w=1,h=M[0];h>=10;h/=10,w++);if(f=_-w,f<0)f+=pe,N=_,S=M[P=0],m=ze(S/E[w-N-1]%10);else if(P=jn((f+1)/pe),P>=M.length)if(d){for(;M.length<=P;M.push(0));S=m=0,w=1,f%=pe,N=f-pe+1}else break e;else{for(S=h=M[P],w=1;h>=10;h/=10,w++);f%=pe,N=f-pe+w,m=N<0?0:ze(S/E[w-N-1]%10)}if(d=d||_<0||M[P+1]!=null||(N<0?S:S%E[w-N-1]),d=u<4?(m||d)&&(u==0||u==(a.s<0?3:2)):m>5||m==5&&(u==4||d||u==6&&(f>0?N>0?S/E[w-N]:0:M[P-1])%10&1||u==(a.s<0?8:7)),_<1||!M[0])return M.length=0,d?(_-=a.e+1,M[0]=E[(pe-_%pe)%pe],a.e=-_||0):M[0]=a.e=0,a;if(f==0?(M.length=P,h=1,P--):(M.length=P+1,h=E[pe-f],M[P]=N>0?ze(S/E[w-N]%E[N])*h:0),d)for(;;)if(P==0){for(f=1,N=M[0];N>=10;N/=10,f++);for(N=M[0]+=h,h=1;N>=10;N/=10,h++);f!=h&&(a.e++,M[0]==Xe&&(M[0]=1));break}else{if(M[P]+=h,M[P]!=Xe)break;M[P--]=0,h=1}for(f=M.length;M[--f]===0;M.pop());}a.e>x?a.c=a.e=null:a.e<C&&(a.c=[a.e=0])}return a}function X(a){var _,u=a.e;return u===null?a.toString():(_=He(a.c),_=u<=c||u>=g?Tr(_,u):at(_,u,"0"),a.s<0?"-"+_:_)}return i.absoluteValue=i.abs=function(){var a=new b(this);return a.s<0&&(a.s=1),a},i.comparedTo=function(a,_){return vt(this,new b(a,_))},i.decimalPlaces=i.dp=function(a,_){var u,d,w,f=this;if(a!=null)return Re(a,0,Ne),_==null?_=l:Re(_,0,8),J(new b(f),a+f.e+1,_);if(!(u=f.c))return null;if(d=((w=u.length-1)-Ge(this.e/pe))*pe,w=u[w])for(;w%10==0;w/=10,d--);return d<0&&(d=0),d},i.dividedBy=i.div=function(a,_){return e(this,new b(a,_),o,l)},i.dividedToIntegerBy=i.idiv=function(a,_){return e(this,new b(a,_),0,1)},i.exponentiatedBy=i.pow=function(a,_){var u,d,w,f,N,h,S,P,m,M=this;if(a=new b(a),a.c&&!a.isInteger())throw Error(qe+"Exponent not an integer: "+X(a));if(_!=null&&(_=new b(_)),h=a.e>14,!M.c||!M.c[0]||M.c[0]==1&&!M.e&&M.c.length==1||!a.c||!a.c[0])return m=new b(Math.pow(+X(M),h?a.s*(2-Ir(a)):+X(a))),_?m.mod(_):m;if(S=a.s<0,_){if(_.c?!_.c[0]:!_.s)return new b(NaN);d=!S&&M.isInteger()&&_.isInteger(),d&&(M=M.mod(_))}else{if(a.e>9&&(M.e>0||M.e<-1||(M.e==0?M.c[0]>1||h&&M.c[1]>=24e7:M.c[0]<8e13||h&&M.c[0]<=9999975e7)))return f=M.s<0&&Ir(a)?-0:0,M.e>-1&&(f=1/f),new b(S?1/f:f);B&&(f=jn(B/pe+2))}for(h?(u=new b(.5),S&&(a.s=1),P=Ir(a)):(w=Math.abs(+X(a)),P=w%2),m=new b(s);;){if(P){if(m=m.times(M),!m.c)break;f?m.c.length>f&&(m.c.length=f):d&&(m=m.mod(_))}if(w){if(w=ze(w/2),w===0)break;P=w%2}else if(a=a.times(u),J(a,a.e+1,1),a.e>14)P=Ir(a);else{if(w=+X(a),w===0)break;P=w%2}M=M.times(M),f?M.c&&M.c.length>f&&(M.c.length=f):d&&(M=M.mod(_))}return d?m:(S&&(m=s.div(m)),_?m.mod(_):f?J(m,B,l,N):m)},i.integerValue=function(a){var _=new b(this);return a==null?a=l:Re(a,0,8),J(_,_.e+1,a)},i.isEqualTo=i.eq=function(a,_){return vt(this,new b(a,_))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(a,_){return vt(this,new b(a,_))>0},i.isGreaterThanOrEqualTo=i.gte=function(a,_){return(_=vt(this,new b(a,_)))===1||_===0},i.isInteger=function(){return!!this.c&&Ge(this.e/pe)>this.c.length-2},i.isLessThan=i.lt=function(a,_){return vt(this,new b(a,_))<0},i.isLessThanOrEqualTo=i.lte=function(a,_){return(_=vt(this,new b(a,_)))===-1||_===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(a,_){var u,d,w,f,N=this,h=N.s;if(a=new b(a,_),_=a.s,!h||!_)return new b(NaN);if(h!=_)return a.s=-_,N.plus(a);var S=N.e/pe,P=a.e/pe,m=N.c,M=a.c;if(!S||!P){if(!m||!M)return m?(a.s=-_,a):new b(M?N:NaN);if(!m[0]||!M[0])return M[0]?(a.s=-_,a):new b(m[0]?N:l==3?-0:0)}if(S=Ge(S),P=Ge(P),m=m.slice(),h=S-P){for((f=h<0)?(h=-h,w=m):(P=S,w=M),w.reverse(),_=h;_--;w.push(0));w.reverse()}else for(d=(f=(h=m.length)<(_=M.length))?h:_,h=_=0;_<d;_++)if(m[_]!=M[_]){f=m[_]<M[_];break}if(f&&(w=m,m=M,M=w,a.s=-a.s),_=(d=M.length)-(u=m.length),_>0)for(;_--;m[u++]=0);for(_=Xe-1;d>h;){if(m[--d]<M[d]){for(u=d;u&&!m[--u];m[u]=_);--m[u],m[d]+=Xe}m[d]-=M[d]}for(;m[0]==0;m.splice(0,1),--P);return m[0]?z(a,m,P):(a.s=l==3?-1:1,a.c=[a.e=0],a)},i.modulo=i.mod=function(a,_){var u,d,w=this;return a=new b(a,_),!w.c||!a.s||a.c&&!a.c[0]?new b(NaN):!a.c||w.c&&!w.c[0]?new b(w):(U==9?(d=a.s,a.s=1,u=e(w,a,0,3),a.s=d,u.s*=d):u=e(w,a,0,U),a=w.minus(u.times(a)),!a.c[0]&&U==1&&(a.s=w.s),a)},i.multipliedBy=i.times=function(a,_){var u,d,w,f,N,h,S,P,m,M,E,j,V,W,ee,Q=this,le=Q.c,ue=(a=new b(a,_)).c;if(!le||!ue||!le[0]||!ue[0])return!Q.s||!a.s||le&&!le[0]&&!ue||ue&&!ue[0]&&!le?a.c=a.e=a.s=null:(a.s*=Q.s,!le||!ue?a.c=a.e=null:(a.c=[0],a.e=0)),a;for(d=Ge(Q.e/pe)+Ge(a.e/pe),a.s*=Q.s,S=le.length,M=ue.length,S<M&&(V=le,le=ue,ue=V,w=S,S=M,M=w),w=S+M,V=[];w--;V.push(0));for(W=Xe,ee=wt,w=M;--w>=0;){for(u=0,E=ue[w]%ee,j=ue[w]/ee|0,N=S,f=w+N;f>w;)P=le[--N]%ee,m=le[N]/ee|0,h=j*P+m*E,P=E*P+h%ee*ee+V[f]+u,u=(P/W|0)+(h/ee|0)+j*m,V[f--]=P%W;V[f]=u}return u?++d:V.splice(0,1),z(a,V,d)},i.negated=function(){var a=new b(this);return a.s=-a.s||null,a},i.plus=function(a,_){var u,d=this,w=d.s;if(a=new b(a,_),_=a.s,!w||!_)return new b(NaN);if(w!=_)return a.s=-_,d.minus(a);var f=d.e/pe,N=a.e/pe,h=d.c,S=a.c;if(!f||!N){if(!h||!S)return new b(w/0);if(!h[0]||!S[0])return S[0]?a:new b(h[0]?d:w*0)}if(f=Ge(f),N=Ge(N),h=h.slice(),w=f-N){for(w>0?(N=f,u=S):(w=-w,u=h),u.reverse();w--;u.push(0));u.reverse()}for(w=h.length,_=S.length,w-_<0&&(u=S,S=h,h=u,_=w),w=0;_;)w=(h[--_]=h[_]+S[_]+w)/Xe|0,h[_]=Xe===h[_]?0:h[_]%Xe;return w&&(h=[w].concat(h),++N),z(a,h,N)},i.precision=i.sd=function(a,_){var u,d,w,f=this;if(a!=null&&a!==!!a)return Re(a,1,Ne),_==null?_=l:Re(_,0,8),J(new b(f),a,_);if(!(u=f.c))return null;if(w=u.length-1,d=w*pe+1,w=u[w]){for(;w%10==0;w/=10,d--);for(w=u[0];w>=10;w/=10,d++);}return a&&f.e+1>d&&(d=f.e+1),d},i.shiftedBy=function(a){return Re(a,-Wn,Wn),this.times("1e"+a)},i.squareRoot=i.sqrt=function(){var a,_,u,d,w,f=this,N=f.c,h=f.s,S=f.e,P=o+4,m=new b("0.5");if(h!==1||!N||!N[0])return new b(!h||h<0&&(!N||N[0])?NaN:N?f:1/0);if(h=Math.sqrt(+X(f)),h==0||h==1/0?(_=He(N),(_.length+S)%2==0&&(_+="0"),h=Math.sqrt(+_),S=Ge((S+1)/2)-(S<0||S%2),h==1/0?_="5e"+S:(_=h.toExponential(),_=_.slice(0,_.indexOf("e")+1)+S),u=new b(_)):u=new b(h+""),u.c[0]){for(S=u.e,h=S+P,h<3&&(h=0);;)if(w=u,u=m.times(w.plus(e(f,w,P,1))),He(w.c).slice(0,h)===(_=He(u.c)).slice(0,h))if(u.e<S&&--h,_=_.slice(h-3,h+1),_=="9999"||!d&&_=="4999"){if(!d&&(J(w,w.e+o+2,0),w.times(w).eq(f))){u=w;break}P+=4,h+=4,d=1}else{(!+_||!+_.slice(1)&&_.charAt(0)=="5")&&(J(u,u.e+o+2,1),a=!u.times(u).eq(f));break}}return J(u,u.e+o+1,l,a)},i.toExponential=function(a,_){return a!=null&&(Re(a,0,Ne),a++),T(this,a,_,1)},i.toFixed=function(a,_){return a!=null&&(Re(a,0,Ne),a=a+this.e+1),T(this,a,_)},i.toFormat=function(a,_,u){var d,w=this;if(u==null)a!=null&&_&&typeof _=="object"?(u=_,_=null):a&&typeof a=="object"?(u=a,a=_=null):u=y;else if(typeof u!="object")throw Error(qe+"Argument not an object: "+u);if(d=w.toFixed(a,_),w.c){var f,N=d.split("."),h=+u.groupSize,S=+u.secondaryGroupSize,P=u.groupSeparator||"",m=N[0],M=N[1],E=w.s<0,j=E?m.slice(1):m,V=j.length;if(S&&(f=h,h=S,S=f,V-=f),h>0&&V>0){for(f=V%h||h,m=j.substr(0,f);f<V;f+=h)m+=P+j.substr(f,h);S>0&&(m+=P+j.slice(f)),E&&(m="-"+m)}d=M?m+(u.decimalSeparator||"")+((S=+u.fractionGroupSize)?M.replace(new RegExp("\\d{"+S+"}\\B","g"),"$&"+(u.fractionGroupSeparator||"")):M):m}return(u.prefix||"")+d+(u.suffix||"")},i.toFraction=function(a){var _,u,d,w,f,N,h,S,P,m,M,E,j=this,V=j.c;if(a!=null&&(h=new b(a),!h.isInteger()&&(h.c||h.s!==1)||h.lt(s)))throw Error(qe+"Argument "+(h.isInteger()?"out of range: ":"not an integer: ")+X(h));if(!V)return new b(j);for(_=new b(s),P=u=new b(s),d=S=new b(s),E=He(V),f=_.e=E.length-j.e-1,_.c[0]=Fn[(N=f%pe)<0?pe+N:N],a=!a||h.comparedTo(_)>0?f>0?_:P:h,N=x,x=1/0,h=new b(E),S.c[0]=0;m=e(h,_,0,1),w=u.plus(m.times(d)),w.comparedTo(a)!=1;)u=d,d=w,P=S.plus(m.times(w=P)),S=w,_=h.minus(m.times(w=_)),h=w;return w=e(a.minus(u),d,0,1),S=S.plus(w.times(P)),u=u.plus(w.times(d)),S.s=P.s=j.s,f=f*2,M=e(P,d,f,l).minus(j).abs().comparedTo(e(S,u,f,l).minus(j).abs())<1?[P,d]:[S,u],x=N,M},i.toNumber=function(){return+X(this)},i.toPrecision=function(a,_){return a!=null&&Re(a,1,Ne),T(this,a,_,2)},i.toString=function(a){var _,u=this,d=u.s,w=u.e;return w===null?d?(_="Infinity",d<0&&(_="-"+_)):_="NaN":(a==null?_=w<=c||w>=g?Tr(He(u.c),w):at(He(u.c),w,"0"):a===10&&R?(u=J(new b(u),o+w+1,l),_=at(He(u.c),u.e,"0")):(Re(a,2,p.length,"Base"),_=t(at(He(u.c),w,"0"),10,a,d,!0)),d<0&&u.c[0]&&(_="-"+_)),_},i.valueOf=i.toJSON=function(){return X(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,r!=null&&b.set(r),b}function Ge(r){var e=r|0;return r>0||r===e?e:e-1}function He(r){for(var e,t,n=1,i=r.length,s=r[0]+"";n<i;){for(e=r[n++]+"",t=pe-e.length;t--;e="0"+e);s+=e}for(i=s.length;s.charCodeAt(--i)===48;);return s.slice(0,i+1||1)}function vt(r,e){var t,n,i=r.c,s=e.c,o=r.s,l=e.s,c=r.e,g=e.e;if(!o||!l)return null;if(t=i&&!i[0],n=s&&!s[0],t||n)return t?n?0:-l:o;if(o!=l)return o;if(t=o<0,n=c==g,!i||!s)return n?0:!i^t?1:-1;if(!n)return c>g^t?1:-1;for(l=(c=i.length)<(g=s.length)?c:g,o=0;o<l;o++)if(i[o]!=s[o])return i[o]>s[o]^t?1:-1;return c==g?0:c>g^t?1:-1}function Re(r,e,t,n){if(r<e||r>t||r!==ze(r))throw Error(qe+(n||"Argument")+(typeof r=="number"?r<e||r>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(r))}function Ir(r){var e=r.c.length-1;return Ge(r.e/pe)==e&&r.c[e]%2!=0}function Tr(r,e){return(r.length>1?r.charAt(0)+"."+r.slice(1):r)+(e<0?"e":"e+")+e}function at(r,e,t){var n,i;if(e<0){for(i=t+".";++e;i+=t);r=i+r}else if(n=r.length,++e>n){for(i=t,e-=n;--e;i+=t);r+=i}else e<n&&(r=r.slice(0,e)+"."+r.slice(e));return r}hs();class kl extends Error{}kl.prototype.name="InvalidTokenError";const Or={IFRAME_STATUS:"iframe_status",CLOSE_WINDOW:"close_window",USER_LOGGED_IN:"user_logged_in",USER_LOGGED_OUT:"user_logged_out"},ft={LOGOUT:"logout",WALLET_INSTANCE_ID:"wallet_instance_id",USER_INFO:"user_info",SET_PROVIDER:"set_provider",TOPUP:"topup",IFRAME_STATUS:"iframe_status",CLOSED_WINDOW:"closed_window",WINDOW_BLOCKED:"window_blocked",GET_PROVIDER_STATE:"get_provider_state",LOGIN_WITH_PRIVATE_KEY:"login_with_private_key",SHOW_WALLET_CONNECT:"show_wallet_connect",SHOW_CHECKOUT:"show_checkout",SHOW_WALLET_UI:"show_wallet_ui",LOGIN_WITH_SESSION_ID:"login_with_session_id"},Ul={GET_PROVIDER_STATE:"wallet_get_provider_state"},$n={ACCOUNTS_CHANGED:"wallet_accounts_changed",CHAIN_CHANGED:"wallet_chain_changed",UNLOCK_STATE_CHANGED:"wallet_unlock_state_changed"};function ql(r){return function(t,n,i){i(s=>{n.error&&Pr.warn(`Error in RPC response:
3
3
  `,n),!t.isTorusInternal&&(Pr.info(`RPC (${r.origin}):`,t,"->",n),s())})}}var Hn={},At={},ko;function ci(){if(ko)return At;ko=1,Object.defineProperty(At,"__esModule",{value:!0}),At.EthereumProviderError=At.EthereumRpcError=void 0;const r=Zo();class e extends Error{constructor(o,l,c){if(!Number.isInteger(o))throw new Error('"code" must be an integer.');if(!l||typeof l!="string")throw new Error('"message" must be a nonempty string.');super(l),this.code=o,c!==void 0&&(this.data=c)}serialize(){const o={code:this.code,message:this.message};return this.data!==void 0&&(o.data=this.data),this.stack&&(o.stack=this.stack),o}toString(){return r.default(this.serialize(),i,2)}}At.EthereumRpcError=e;class t extends e{constructor(o,l,c){if(!n(o))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(o,l,c)}}At.EthereumProviderError=t;function n(s){return Number.isInteger(s)&&s>=1e3&&s<=4999}function i(s,o){if(o!=="[Circular]")return o}return At}var zn={},Rt={},Uo;function di(){return Uo||(Uo=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.errorValues=Rt.errorCodes=void 0,Rt.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},Rt.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}),Rt}var qo;function gs(){return qo||(qo=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=di(),t=ci(),n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(A,U=i){if(Number.isInteger(A)){const B=A.toString();if(x(e.errorValues,B))return e.errorValues[B].message;if(g(A))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return U}r.getMessageFromCode=o;function l(A){if(!Number.isInteger(A))return!1;const U=A.toString();return!!(e.errorValues[U]||g(A))}r.isValidCode=l;function c(A,{fallbackError:U=s,shouldIncludeStack:B=!1}={}){var y,p;if(!U||!Number.isInteger(U.code)||typeof U.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(A instanceof t.EthereumRpcError)return A.serialize();const R={};if(A&&typeof A=="object"&&!Array.isArray(A)&&x(A,"code")&&l(A.code)){const T=A;R.code=T.code,T.message&&typeof T.message=="string"?(R.message=T.message,x(T,"data")&&(R.data=T.data)):(R.message=o(R.code),R.data={originalError:C(A)})}else{R.code=U.code;const T=(y=A)===null||y===void 0?void 0:y.message;R.message=T&&typeof T=="string"?T:U.message,R.data={originalError:C(A)}}const b=(p=A)===null||p===void 0?void 0:p.stack;return B&&A&&b&&typeof b=="string"&&(R.stack=b),R}r.serializeError=c;function g(A){return A>=-32099&&A<=-32e3}function C(A){return A&&typeof A=="object"&&!Array.isArray(A)?Object.assign({},A):A}function x(A,U){return Object.prototype.hasOwnProperty.call(A,U)}}(zn)),zn}var Yt={},jo;function jl(){if(jo)return Yt;jo=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.ethErrors=void 0;const r=ci(),e=gs(),t=di();Yt.ethErrors={rpc:{parse:o=>n(t.errorCodes.rpc.parse,o),invalidRequest:o=>n(t.errorCodes.rpc.invalidRequest,o),invalidParams:o=>n(t.errorCodes.rpc.invalidParams,o),methodNotFound:o=>n(t.errorCodes.rpc.methodNotFound,o),internal:o=>n(t.errorCodes.rpc.internal,o),server:o=>{if(!o||typeof o!="object"||Array.isArray(o))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:l}=o;if(!Number.isInteger(l)||l>-32005||l<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return n(l,o)},invalidInput:o=>n(t.errorCodes.rpc.invalidInput,o),resourceNotFound:o=>n(t.errorCodes.rpc.resourceNotFound,o),resourceUnavailable:o=>n(t.errorCodes.rpc.resourceUnavailable,o),transactionRejected:o=>n(t.errorCodes.rpc.transactionRejected,o),methodNotSupported:o=>n(t.errorCodes.rpc.methodNotSupported,o),limitExceeded:o=>n(t.errorCodes.rpc.limitExceeded,o)},provider:{userRejectedRequest:o=>i(t.errorCodes.provider.userRejectedRequest,o),unauthorized:o=>i(t.errorCodes.provider.unauthorized,o),unsupportedMethod:o=>i(t.errorCodes.provider.unsupportedMethod,o),disconnected:o=>i(t.errorCodes.provider.disconnected,o),chainDisconnected:o=>i(t.errorCodes.provider.chainDisconnected,o),custom:o=>{if(!o||typeof o!="object"||Array.isArray(o))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:l,message:c,data:g}=o;if(!c||typeof c!="string")throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(l,c,g)}}};function n(o,l){const[c,g]=s(l);return new r.EthereumRpcError(o,c||e.getMessageFromCode(o),g)}function i(o,l){const[c,g]=s(l);return new r.EthereumProviderError(o,c||e.getMessageFromCode(o),g)}function s(o){if(o){if(typeof o=="string")return[o];if(typeof o=="object"&&!Array.isArray(o)){const{message:l,data:c}=o;if(l&&typeof l!="string")throw new Error("Must specify string message.");return[l||void 0,c]}}return[]}return Yt}var Wo;function Wl(){return Wo||(Wo=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMessageFromCode=r.serializeError=r.EthereumProviderError=r.EthereumRpcError=r.ethErrors=r.errorCodes=void 0;const e=ci();Object.defineProperty(r,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const t=gs();Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return t.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return t.getMessageFromCode}});const n=jl();Object.defineProperty(r,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=di();Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})}(Hn)),Hn}var yt=Wl(),Gn,Fo;function Fl(){return Fo||(Fo=1,Gn=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,i,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!r(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}),Gn}var $l=Fl();const Hl=Ut($l);var zl="2.1.0";function ps(r){return r!==null&&typeof r=="object"&&typeof r.pipe=="function"}function Gl(r){return ps(r)&&r.writable!==!1&&typeof r._write=="function"&&typeof r._writableState=="object"}function Vl(r){return ps(r)&&r.readable!==!1&&typeof r._read=="function"&&typeof r._readableState=="object"}function Kl(r){return Gl(r)&&Vl(r)}var rt={errors:{disconnected:()=>"Torus: Lost connection to Torus.",permanentlyDisconnected:()=>"Torus: Disconnected from iframe. Page reload required.",unsupportedSync:r=>`Torus: The Torus Ethereum provider does not support synchronous methods like ${r} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidOptions:r=>`Invalid options. Received: { maxEventListeners: ${r}}`,invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:r=>`'args.logger' must include required method '${r}'.`},info:{connected:r=>`Torus: Connected to chain with ID "${r}".`}};const Yl={PRODUCTION:"production"},Xt={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},Jl={en:{embed:{continue:"Continue",actionRequired:"Authorization required",pendingAction:"Click continue to proceed with your request in a popup",cookiesRequired:"Cookies Required",enableCookies:"Please enable cookies in your browser preferences to access Torus",clickHere:"More Info"}},de:{embed:{continue:"Fortsetzen",actionRequired:"Autorisierung erforderlich",pendingAction:"Klicken Sie in einem Popup auf Weiter, um mit Ihrer Anfrage fortzufahren",cookiesRequired:"Cookies benötigt",enableCookies:"Bitte aktivieren Sie Cookies in Ihren Browsereinstellungen, um auf Torus zuzugreifen",clickHere:"Mehr Info"}},ja:{embed:{continue:"継続する",actionRequired:"認証が必要です",pendingAction:"続行をクリックして、ポップアップでリクエストを続行します",cookiesRequired:"必要なクッキー",enableCookies:"Torusにアクセスするには、ブラウザの設定でCookieを有効にしてください。",clickHere:"詳しくは"}},ko:{embed:{continue:"계속하다",actionRequired:"승인 필요",pendingAction:"팝업에서 요청을 진행하려면 계속을 클릭하십시오.",cookiesRequired:"쿠키 필요",enableCookies:"브라우저 환경 설정에서 쿠키를 활성화하여 Torus에 액세스하십시오.",clickHere:"더 많은 정보"}},zh:{embed:{continue:"继续",actionRequired:"需要授权",pendingAction:"单击继续以在弹出窗口中继续您的请求",cookiesRequired:"必填Cookie",enableCookies:"请在您的浏览器首选项中启用cookie以访问Torus。",clickHere:"更多信息"}}};var hi={translations:Jl,localStorageKeyPrefix:"torus-"},Ee=Pr.getLogger("solana-embed");function Zl(){return(r,e,t)=>{(typeof r.method!="string"||!r.method)&&(e.error=yt.ethErrors.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:r})),t(n=>{const{error:i}=e;return i&&Ee.error(`Torus - RPC Error: ${i.message}`,i),n()})}}function Xl(r,e,t){let n=`Torus: Lost connection to "${r}".`;e?.stack&&(n+=`
4
4
  ${e.stack}`),Ee.warn(n),t&&t.listenerCount("error")>0&&t.emit("error",n)}const xr=()=>Math.random().toString(36).slice(2),ws=async r=>{let e,t;switch(r){case"testing":e="https://solana-testing.tor.us",t="debug";break;case"development":e="http://localhost:8080",t="debug";break;default:e="https://solana.tor.us",t="error";break}return{torusUrl:e,logLevel:t}},Ql=()=>{let r=window.navigator.language||"en-US";const e=r.split("-");return r=Object.prototype.hasOwnProperty.call(hi.translations,e[0])?e[0]:"en",r},eu={height:660,width:375},tu={height:740,width:1315},ru={height:700,width:1200},bs={height:600,width:400};function nu(r){let e;try{e=window[r];const t="__storage_test__";return e.setItem(t,t),e.removeItem(t),!0}catch(t){const n=t;return n&&(n.code===22||n.code===1014||n.name==="QuotaExceededError"||n.name==="NS_ERROR_DOM_QUOTA_REACHED")&&e&&e.length!==0}}function Qt(r){let{width:e,height:t}=r;const n=window.screenLeft!==void 0?window.screenLeft:window.screenX,i=window.screenTop!==void 0?window.screenTop:window.screenY,s=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,o=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,l=1,c=Math.abs((s-e)/2/l+n),g=Math.abs((o-t)/2/l+i);return`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=${t/l},width=${e/l},top=${g},left=${c}`}class ys extends qr{constructor(e,t){let{maxEventListeners:n=100,jsonRpcStreamName:i="provider"}=t;if(super(),ge(this,"isTorus",void 0),ge(this,"_rpcEngine",void 0),ge(this,"jsonRpcConnectionEvents",void 0),ge(this,"_state",void 0),!Kl(e))throw new Error(rt.errors.invalidDuplexStream());this.isTorus=!0,this.setMaxListeners(n),this._handleConnect=this._handleConnect.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this._initializeState=this._initializeState.bind(this),this.request=this.request.bind(this),this.sendAsync=this.sendAsync.bind(this);const s=new Ta;oo(e,s,e,this._handleStreamDisconnect.bind(this,"Torus")),s.ignoreStream("phishing");const o=Aa();oo(o.stream,s.createStream(i),o.stream,this._handleStreamDisconnect.bind(this,"Torus RpcProvider"));const l=new lt;l.push(Ra()),l.push(Zl()),l.push(ql({origin:location.origin})),l.push(o.middleware),this._rpcEngine=l,this.jsonRpcConnectionEvents=o.events}async request(e){if(!e||typeof e!="object"||Array.isArray(e))throw yt.ethErrors.rpc.invalidRequest({message:rt.errors.invalidRequestArgs(),data:e});const{method:t,params:n}=e;if(typeof t!="string"||t.length===0)throw yt.ethErrors.rpc.invalidRequest({message:rt.errors.invalidRequestMethod(),data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw yt.ethErrors.rpc.invalidRequest({message:rt.errors.invalidRequestParams(),data:e});return new Promise((i,s)=>{this._rpcRequest({method:t,params:n},Kn(i,s))})}send(e,t){this._rpcRequest(e,t)}sendAsync(e){return new Promise((t,n)=>{this._rpcRequest(e,Kn(t,n))})}_handleStreamDisconnect(e,t){Xl(e,t,this),this._handleDisconnect(!1,t?t.message:void 0)}}const Mt=r=>{const e=window.document.createElement("template"),t=r.trim();return e.innerHTML=t,e.content.firstChild};function Nr(r){return r.version===void 0}class _s extends qr{constructor(e){let{url:t,target:n,features:i,timeout:s=3e4}=e;super(),ge(this,"url",void 0),ge(this,"target",void 0),ge(this,"features",void 0),ge(this,"window",void 0),ge(this,"windowTimer",void 0),ge(this,"iClosedWindow",void 0),ge(this,"timeout",void 0),this.url=t,this.target=n||"_blank",this.features=i||Qt(ru),this.window=void 0,this.windowTimer=void 0,this.iClosedWindow=!1,this.timeout=s,this._setupTimer()}_setupTimer(){this.windowTimer=Number(setInterval(()=>{this.window&&this.window.closed&&(clearInterval(this.windowTimer),setTimeout(()=>{this.iClosedWindow||this.emit("close"),this.iClosedWindow=!1,this.window=void 0},this.timeout)),this.window===void 0&&clearInterval(this.windowTimer)},500))}open(){return this.window=window.open(this.url.href,this.target,this.features),this.window?.focus&&this.window.focus(),Promise.resolve()}close(){this.iClosedWindow=!0,this.window&&this.window.close()}redirect(e){e?window.location.replace(this.url.href):window.location.href=this.url.href}}class $r extends ys{constructor(e,t){let{maxEventListeners:n=100,jsonRpcStreamName:i="provider"}=t;super(e,{maxEventListeners:n,jsonRpcStreamName:i}),ge(this,"embedTranslations",void 0),ge(this,"torusUrl",void 0),ge(this,"dappStorageKey",void 0),ge(this,"windowRefs",void 0),ge(this,"tryWindowHandle",void 0),ge(this,"torusAlertContainer",void 0),ge(this,"torusIframe",void 0),this._state=Ke({},$r._defaultState),this.torusUrl="",this.dappStorageKey="";const s=hi.translations[Ql()];this.embedTranslations=s.embed,this.windowRefs={},this.on("connect",()=>{this._state.isConnected=!0});const o=l=>{const{method:c,params:g}=l;if(c===Or.IFRAME_STATUS){const{isFullScreen:C,rid:x}=g;this._displayIframe({isFull:C,rid:x})}else if(c==="create_window"){const{windowId:C,url:x}=g;this._createPopupBlockAlert(C,x)}else if(c===Or.CLOSE_WINDOW)this._handleCloseWindow(g);else if(c===Or.USER_LOGGED_IN){const{currentLoginProvider:C}=g;this._state.isLoggedIn=!0,this._state.currentLoginProvider=C}else c===Or.USER_LOGGED_OUT&&(this._state.isLoggedIn=!1,this._state.currentLoginProvider=null,this._displayIframe())};this.jsonRpcConnectionEvents.on("notification",o)}get isLoggedIn(){return this._state.isLoggedIn}get isIFrameFullScreen(){return this._state.isIFrameFullScreen}isConnected(){return this._state.isConnected}async _initializeState(e){try{const{torusUrl:t,dappStorageKey:n,torusAlertContainer:i,torusIframe:s}=e;this.torusUrl=t,this.dappStorageKey=n,this.torusAlertContainer=i,this.torusIframe=s,this.torusIframe.addEventListener("load",()=>{this._state.isIFrameFullScreen||this._displayIframe()});const{currentLoginProvider:o,isLoggedIn:l}=await this.request({method:ft.GET_PROVIDER_STATE,params:[]});this._handleConnect(o,l)}catch(t){Ee.error("Torus: Failed to get initial state. Please report this bug.",t)}finally{Ee.info("initialized communication state"),this._state.initialized=!0,this.emit("_initialized")}}_handleWindow(e){let{url:t,target:n,features:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=new URL(t||`${this.torusUrl}/redirect?windowId=${e}`);this.dappStorageKey&&(s.hash?s.hash+=`&dappStorageKey=${this.dappStorageKey}`:s.hash=`#dappStorageKey=${this.dappStorageKey}`);const o=new _s({url:s,target:n,features:i});if(o.open(),!o.window){this._createPopupBlockAlert(e,s.href);return}this.windowRefs[e]=o,this.request({method:"opened_window",params:{windowId:e}}),o.once("close",()=>{delete this.windowRefs[e],this.request({method:ft.CLOSED_WINDOW,params:{windowId:e}})})}_displayIframe(){let{isFull:e=!1,rid:t=""}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n={};if(e)n.display="block",n.width="100%",n.height="100%",n.top="0px",n.right="0px",n.left="0px",n.bottom="0px";else switch(n.display=this._state.torusWidgetVisibility?"block":"none",n.height="70px",n.width="70px",this._state.buttonPosition){case Xt.TOP_LEFT:n.top="0px",n.left="0px",n.right="auto",n.bottom="auto";break;case Xt.TOP_RIGHT:n.top="0px",n.right="0px",n.left="auto",n.bottom="auto";break;case Xt.BOTTOM_RIGHT:n.bottom="0px",n.right="0px",n.top="auto",n.left="auto";break;case Xt.BOTTOM_LEFT:default:n.bottom="0px",n.left="0px",n.top="auto",n.right="auto";break}Object.assign(this.torusIframe.style,n),this._state.isIFrameFullScreen=e,this.request({method:ft.IFRAME_STATUS,params:{isIFrameFullScreen:e,rid:t}})}hideTorusButton(){this._state.torusWidgetVisibility=!1,this._displayIframe()}showTorusButton(){this._state.torusWidgetVisibility=!0,this._displayIframe()}_rpcRequest(e,t){const n=t,i=e;Array.isArray(i)||i.jsonrpc||(i.jsonrpc="2.0"),this.tryWindowHandle(i,n)}_handleConnect(e,t){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{currentLoginProvider:e,isLoggedIn:t}),Ee.debug(rt.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){this._state.isConnected=!1;let n;e?(n=new yt.EthereumRpcError(1013,t||rt.errors.disconnected()),Ee.debug(n)):(n=new yt.EthereumRpcError(1011,t||rt.errors.permanentlyDisconnected()),Ee.error(n),this._state.currentLoginProvider=null,this._state.isLoggedIn=!1,this._state.torusWidgetVisibility=!1,this._state.isIFrameFullScreen=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",n)}}_handleCloseWindow(e){const{windowId:t}=e;this.windowRefs[t]&&(this.windowRefs[t].close(),delete this.windowRefs[t])}async _createPopupBlockAlert(e,t){const n=this.getLogoUrl(),i=Mt(`<div id="torusAlert" class="torus-alert--v2"><div id="torusAlert__logo"><img src="${n}" /></div><div><h1 id="torusAlert__title">${this.embedTranslations.actionRequired}</h1><p id="torusAlert__desc">${this.embedTranslations.pendingAction}</p></div></div>`),s=Mt(`<div><a id="torusAlert__btn">${this.embedTranslations.continue}</a></div>`),o=Mt('<div id="torusAlert__btn-container"></div>');o.appendChild(s),i.appendChild(o);const l=()=>{s.addEventListener("click",()=>{this._handleWindow(e,{url:t,target:"_blank",features:Qt(bs)}),i.remove(),this.torusAlertContainer.children.length===0&&(this.torusAlertContainer.style.display="none")})};(()=>{this.torusAlertContainer.appendChild(i)})(),l(),this.torusAlertContainer.style.display="block"}getLogoUrl(){return`${this.torusUrl}/images/torus_icon-blue.svg`}}ge($r,"_defaultState",{buttonPosition:"bottom-left",currentLoginProvider:null,isIFrameFullScreen:!1,hasEmittedConnection:!1,torusWidgetVisibility:!1,initialized:!1,isLoggedIn:!1,isPermanentlyDisconnected:!1,isConnected:!1});class Hr extends ys{constructor(e,t){let{maxEventListeners:n=100,jsonRpcStreamName:i="provider"}=t;super(e,{maxEventListeners:n,jsonRpcStreamName:i}),ge(this,"chainId",void 0),ge(this,"selectedAddress",void 0),ge(this,"tryWindowHandle",void 0),this._state=Ke({},Hr._defaultState),this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this.on("connect",()=>{this._state.isConnected=!0});const s=o=>{const{method:l,params:c}=o;l===$n.ACCOUNTS_CHANGED?this._handleAccountsChanged(c):l===$n.UNLOCK_STATE_CHANGED?this._handleUnlockStateChanged(c):l===$n.CHAIN_CHANGED&&this._handleChainChanged(c)};this.jsonRpcConnectionEvents.on("notification",s)}isConnected(){return this._state.isConnected}async _initializeState(){try{const{accounts:e,chainId:t,isUnlocked:n}=await this.request({method:Ul.GET_PROVIDER_STATE,params:[]});this.emit("connect",{chainId:t}),this._handleChainChanged({chainId:t}),this._handleUnlockStateChanged({accounts:e,isUnlocked:n}),this._handleAccountsChanged(e)}catch(e){Ee.error("Torus: Failed to get initial state. Please report this bug.",e)}finally{Ee.info("initialized provider state"),this._state.initialized=!0,this.emit("_initialized")}}_rpcRequest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=t;const s=e;if(!Array.isArray(s)){if(s.jsonrpc||(s.jsonrpc="2.0"),s.method==="solana_accounts"||s.method==="solana_requestAccounts")i=(o,l)=>{this._handleAccountsChanged(l.result||[],s.method==="solana_accounts",n),t(o,l)};else if(s.method==="wallet_getProviderState"){this._rpcEngine.handle(e,i);return}}this.tryWindowHandle(s,i)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),Ee.debug(rt.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){this._state.isConnected=!1;let n;e?(n=new yt.EthereumRpcError(1013,t||rt.errors.disconnected()),Ee.debug(n)):(n=new yt.EthereumRpcError(1011,t||rt.errors.permanentlyDisconnected()),Ee.error(n),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",n)}}_handleAccountsChanged(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=e;Array.isArray(i)||(Ee.error("Torus: Received non-array accounts parameter. Please report this bug.",i),i=[]);for(const s of e)if(typeof s!="string"){Ee.error("Torus: Received non-string account. Please report this bug.",e),i=[];break}Hl(this._state.accounts,i)||(t&&Array.isArray(this._state.accounts)&&this._state.accounts.length>0&&!n&&Ee.error('Torus: "solana_accounts" unexpectedly updated accounts. Please report this bug.',i),this._state.accounts=i,this.emit("accountsChanged",i)),this.selectedAddress!==i[0]&&(this.selectedAddress=i[0]||null)}_handleChainChanged(){let{chainId:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!e){Ee.error("Torus: Received invalid network parameters. Please report this bug.",{chainId:e});return}e==="loading"?this._handleDisconnect(!0):(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId)))}_handleUnlockStateChanged(){let{accounts:e,isUnlocked:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof t!="boolean"){Ee.error("Torus: Received invalid isUnlocked parameter. Please report this bug.",{isUnlocked:t});return}t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e||[]))}}ge(Hr,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});function $o(r){return new Promise((e,t)=>{try{const n=document.createElement("img");n.onload=()=>e(!0),n.onerror=()=>e(!1),n.src=r}catch(n){t(n)}})}const iu=r=>{const{document:e}=r,t=e.querySelector('head > meta[property="og:site_name"]');if(t)return t.content;const n=e.querySelector('head > meta[name="title"]');return n?n.content:e.title&&e.title.length>0?e.title:r.location.hostname};async function ou(r){try{const{document:e}=r;let t=e.querySelector('head > link[rel="shortcut icon"]');return t&&await $o(t.href)||(t=Array.from(e.querySelectorAll('head > link[rel="icon"]')).find(n=>!!n.href),t&&await $o(t.href))?t.href:""}catch{return""}}const su=async()=>({name:iu(window),icon:await ou(window)}),au=["send_transaction","sign_transaction","sign_all_transactions","sign_message","connect"],lu=[ft.SET_PROVIDER],uu=nu("localStorage");(async function(){try{if(typeof document>"u")return;const e=document.createElement("link"),{torusUrl:t}=await ws("production");e.href=`${t}/frame`,e.crossOrigin="anonymous",e.type="text/html",e.rel="prefetch",e.relList&&e.relList.supports&&e.relList.supports("prefetch")&&document.head.appendChild(e)}catch(e){Ee.warn(e)}})();class vu{constructor(){let{modalZIndex:e=99999}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ge(this,"isInitialized",void 0),ge(this,"torusAlert",void 0),ge(this,"modalZIndex",void 0),ge(this,"alertZIndex",void 0),ge(this,"requestedLoginProvider",void 0),ge(this,"provider",void 0),ge(this,"communicationProvider",void 0),ge(this,"dappStorageKey",void 0),ge(this,"isTopupHidden",!1),ge(this,"torusAlertContainer",void 0),ge(this,"torusUrl",void 0),ge(this,"torusIframe",void 0),ge(this,"styleLink",void 0),this.torusUrl="",this.isInitialized=!1,this.requestedLoginProvider=null,this.modalZIndex=e,this.alertZIndex=e+1e3,this.dappStorageKey=""}get isLoggedIn(){return this.communicationProvider?this.communicationProvider.isLoggedIn:!1}async init(){let{buildEnv:e=Yl.PRODUCTION,enableLogging:t=!1,network:n,showTorusButton:i=!1,useLocalStorage:s=!1,buttonPosition:o=Xt.BOTTOM_LEFT,apiKey:l="torus-default",extraParams:c={},whiteLabel:g}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.isInitialized)throw new Error("Already initialized");const{torusUrl:C,logLevel:x}=await ws(e);Ee.enableAll(),Ee.info(C,"url loaded"),Ee.info(`Solana Embed Version :${zl}`),this.torusUrl=C,Ee.setDefaultLevel(x),t?Ee.enableAll():Ee.disableAll();const A=this.handleDappStorageKey(s),U=new URL(C);U.pathname.endsWith("/")?U.pathname+="frame":U.pathname+="/frame";const B=new URLSearchParams;return A&&B.append("dappStorageKey",A),B.append("origin",window.location.origin),U.hash=B.toString(),this.torusIframe=Mt(`<iframe