@wormhole-foundation/wormhole-connect 5.2.0-beta.0-development → 5.2.0-beta.1-development

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 (362) hide show
  1. package/dist/main.mjs +1 -1
  2. package/lib/{add-Bk86euc7.mjs → add-BEf65R9W.mjs} +1 -1
  3. package/lib/{add-97pK9XEM.js → add-BfnfRWYd.js} +1 -1
  4. package/lib/{add-aiIIchuh.js → add-CiBQclh_.js} +1 -1
  5. package/lib/{add-D933OgYB.mjs → add-FlBFbmID.mjs} +1 -1
  6. package/lib/{all-wallets-BQRsMuoL.mjs → all-wallets-0d0F49_e.mjs} +1 -1
  7. package/lib/{all-wallets-DEdvco8E.js → all-wallets-BNdvPhp9.js} +1 -1
  8. package/lib/{all-wallets-BTvSiRPI.js → all-wallets-CGkgmWtX.js} +1 -1
  9. package/lib/{all-wallets-P7I2GUtT.mjs → all-wallets-srUUo70q.mjs} +1 -1
  10. package/lib/{app-store-hWgU_cp-.mjs → app-store-CImc6f5s.mjs} +1 -1
  11. package/lib/{app-store-Ccyl3JgX.js → app-store-CJ8FOJYx.js} +1 -1
  12. package/lib/{app-store-PKRc14_u.mjs → app-store-CyolaTwE.mjs} +1 -1
  13. package/lib/{app-store-J4rqIlQc.js → app-store-DhVoNqde.js} +1 -1
  14. package/lib/{apple-BXDArpi0.js → apple-86OXeSyJ.js} +1 -1
  15. package/lib/{apple-ChYiEhFV.js → apple-B7hoK4SW.js} +1 -1
  16. package/lib/{apple-CINOjLmM.mjs → apple-EatMtIc0.mjs} +1 -1
  17. package/lib/{apple-DNp3WspA.mjs → apple-tebbLLOI.mjs} +1 -1
  18. package/lib/{aptos-CXdv298G.js → aptos-B0625Vkk.js} +1 -1
  19. package/lib/{aptos-C1_xdEsg.mjs → aptos-C8LQMcii.mjs} +2 -2
  20. package/lib/{arrow-bottom-B8L0wWMn.js → arrow-bottom-BRHd31a5.js} +1 -1
  21. package/lib/{arrow-bottom-DcRkICnt.mjs → arrow-bottom-Bmf9qeKd.mjs} +1 -1
  22. package/lib/{arrow-bottom-ie6olxwk.js → arrow-bottom-D7KU41sS.js} +1 -1
  23. package/lib/{arrow-bottom-DOre80s_.mjs → arrow-bottom-DgI3vkHl.mjs} +1 -1
  24. package/lib/{arrow-bottom-circle-BuL2N_oX.js → arrow-bottom-circle-1_MXO-aE.js} +1 -1
  25. package/lib/{arrow-bottom-circle-D8u24ZEa.mjs → arrow-bottom-circle-BRl5lIFV.mjs} +1 -1
  26. package/lib/{arrow-bottom-circle-BV6cJiB3.mjs → arrow-bottom-circle-Ioaofxby.mjs} +1 -1
  27. package/lib/{arrow-bottom-circle-CfZspJKC.js → arrow-bottom-circle-dUItEBid.js} +1 -1
  28. package/lib/{arrow-left-C84MPyPi.mjs → arrow-left-B18SPbUr.mjs} +1 -1
  29. package/lib/{arrow-left-DhhbmAr7.js → arrow-left-B4VB8tQR.js} +1 -1
  30. package/lib/{arrow-left-DHcEpLcY.mjs → arrow-left-CeaRd5Vx.mjs} +1 -1
  31. package/lib/{arrow-left-BHDzDcxf.js → arrow-left-DRD62h5u.js} +1 -1
  32. package/lib/{arrow-right-DpXjSQ0c.mjs → arrow-right-BpXZlXh9.mjs} +1 -1
  33. package/lib/{arrow-right-DkR-9vfb.js → arrow-right-CI54SlzC.js} +1 -1
  34. package/lib/{arrow-right-CsXtQhBn.mjs → arrow-right-CzWLUAUO.mjs} +1 -1
  35. package/lib/{arrow-right-x2g1cqBz.js → arrow-right-Dd6A8iJC.js} +1 -1
  36. package/lib/{arrow-top-JFr4DWJC.js → arrow-top-BOP9Mx0U.js} +1 -1
  37. package/lib/{arrow-top-CiXPjp0l.js → arrow-top-TPGebFgG.js} +1 -1
  38. package/lib/{arrow-top-DWWBqjoA.mjs → arrow-top-c0RWLlO2.mjs} +1 -1
  39. package/lib/{arrow-top-BU-bRRci.mjs → arrow-top-oGu2iy6k.mjs} +1 -1
  40. package/lib/{bank-DmBobOMj.mjs → bank--z_wgCs2.mjs} +1 -1
  41. package/lib/{bank-DKdS2VCZ.mjs → bank-BSgi9PAk.mjs} +1 -1
  42. package/lib/{bank-CQl-oPnD.js → bank-CyILnlME.js} +1 -1
  43. package/lib/{bank-BhT6RPyg.js → bank-DDWUQfzS.js} +1 -1
  44. package/lib/{basic-BJb3ei_N.js → basic-BJyZdZ9-.js} +1 -1
  45. package/lib/{basic-BU5Z7yE0.mjs → basic-BYApoDKu.mjs} +2 -2
  46. package/lib/{basic-r93BHfDA.js → basic-C_NK3mGS.js} +1 -1
  47. package/lib/{basic-BvTuoRNI.mjs → basic-DFA9dkML.mjs} +2 -2
  48. package/lib/{browser-BEew_Uly.mjs → browser-BCF5N3KG.mjs} +1 -1
  49. package/lib/{browser-gnOPx-dW.mjs → browser-BloW4u4E.mjs} +1 -1
  50. package/lib/{browser-Zcx5baKN.js → browser-CCRCeieU.js} +1 -1
  51. package/lib/{browser-DFBCBTuC.js → browser-CvrEVIwv.js} +1 -1
  52. package/lib/{card-DkwY6orl.mjs → card-7rHQoEDL.mjs} +1 -1
  53. package/lib/{card-BVvKhU54.js → card-CglIhKSq.js} +1 -1
  54. package/lib/{card-CvhyzxFz.mjs → card-Ctp3kX-1.mjs} +1 -1
  55. package/lib/{card-Da6LlLKJ.js → card-fE2IIT1i.js} +1 -1
  56. package/lib/{checkmark-pTrffkn9.js → checkmark-BOxmV8Mo.js} +1 -1
  57. package/lib/{checkmark-C4b4JK_V.mjs → checkmark-BW1_81nx.mjs} +1 -1
  58. package/lib/{checkmark-BPev3geK.mjs → checkmark-CLHlN5To.mjs} +1 -1
  59. package/lib/{checkmark-C_MrkABo.js → checkmark-Xh1LmaXe.js} +1 -1
  60. package/lib/{checkmark-bold-DU2Ys96v.js → checkmark-bold-BC0jnANx.js} +1 -1
  61. package/lib/{checkmark-bold-24IAAOBU.js → checkmark-bold-CBr8ZyFy.js} +1 -1
  62. package/lib/{checkmark-bold-CNzoS5-K.mjs → checkmark-bold-DhAt_JOH.mjs} +1 -1
  63. package/lib/{checkmark-bold-d7sIsIhC.mjs → checkmark-bold-xYDW18M6.mjs} +1 -1
  64. package/lib/{chevron-bottom-d0mN_6fk.mjs → chevron-bottom-C-ilw2I8.mjs} +1 -1
  65. package/lib/{chevron-bottom-zdvXtD2j.mjs → chevron-bottom-Daxbr3Rx.mjs} +1 -1
  66. package/lib/{chevron-bottom-DI3dfXns.js → chevron-bottom-Didolf5t.js} +1 -1
  67. package/lib/{chevron-bottom-C8gro0Kz.js → chevron-bottom-y5gkyNtV.js} +1 -1
  68. package/lib/{chevron-left-DDqfGA8F.mjs → chevron-left-BNIGAhWk.mjs} +1 -1
  69. package/lib/{chevron-left-p6FO5KDX.js → chevron-left-Bj3XIxUw.js} +1 -1
  70. package/lib/{chevron-left-Bzq_gNUa.js → chevron-left-D6J8hdRo.js} +1 -1
  71. package/lib/{chevron-left-DANMl7rL.mjs → chevron-left-DqSA6E9z.mjs} +1 -1
  72. package/lib/{chevron-right-B_qqkmjC.js → chevron-right-BXl56y5C.js} +1 -1
  73. package/lib/{chevron-right-BR0_7iUL.mjs → chevron-right-DeT5P2q2.mjs} +1 -1
  74. package/lib/{chevron-right-xz6TmL5j.js → chevron-right-IBo1CiY2.js} +1 -1
  75. package/lib/{chevron-right-O1UkCV2Q.mjs → chevron-right-k8adpOIy.mjs} +1 -1
  76. package/lib/{chevron-top-CtMVRHg0.js → chevron-top-B1HrfXOo.js} +1 -1
  77. package/lib/{chevron-top-CIHODxwA.js → chevron-top-C-1fCeSU.js} +1 -1
  78. package/lib/{chevron-top-WroSANio.mjs → chevron-top-C34CbI0W.mjs} +1 -1
  79. package/lib/{chevron-top-vUGPtgYd.mjs → chevron-top-CNrQ2igu.mjs} +1 -1
  80. package/lib/{chrome-store-CPgKITck.js → chrome-store-DFTjCxuH.js} +1 -1
  81. package/lib/{chrome-store-Dseq-owD.mjs → chrome-store-DIzR2Dq1.mjs} +1 -1
  82. package/lib/{chrome-store-QAYF3oF_.mjs → chrome-store-DOoQVREZ.mjs} +1 -1
  83. package/lib/{chrome-store-BEJYIo9O.js → chrome-store-DtvL-QKw.js} +1 -1
  84. package/lib/{clock-Cqv12DGe.js → clock-C-Q57pEM.js} +1 -1
  85. package/lib/{clock-BRLal-tt.js → clock-C4xod9nJ.js} +1 -1
  86. package/lib/{clock-CgYyeM_w.mjs → clock-Cv1fuvau.mjs} +1 -1
  87. package/lib/{clock-Bsk_aDnw.mjs → clock-sTn1dfri.mjs} +1 -1
  88. package/lib/{close-DtK4vwQg.mjs → close-B0uyRg3N.mjs} +1 -1
  89. package/lib/{close-WYOtsYpc.js → close-B1b7Ptej.js} +1 -1
  90. package/lib/{close-Ch1yI0EA.mjs → close-CqPEBQBo.mjs} +1 -1
  91. package/lib/{close-OchiXtTe.js → close-Dfc_8zBq.js} +1 -1
  92. package/lib/{coinPlaceholder-DbsI02Af.mjs → coinPlaceholder-BoiiMs6L.mjs} +1 -1
  93. package/lib/{coinPlaceholder-xkgrfWI-.js → coinPlaceholder-DiW2_ozZ.js} +1 -1
  94. package/lib/{coinPlaceholder-xe-1dqKD.js → coinPlaceholder-DudKKK-9.js} +1 -1
  95. package/lib/{coinPlaceholder-BMvMfRBE.mjs → coinPlaceholder-nKeNJJKK.mjs} +1 -1
  96. package/lib/{compass-HTfh4eZi.mjs → compass-B0X-vi2r.mjs} +1 -1
  97. package/lib/{compass-Bi7B2PWo.js → compass-BZP8Ac-k.js} +1 -1
  98. package/lib/{compass-COTmQcOw.js → compass-DwHx2eWH.js} +1 -1
  99. package/lib/{compass-BePMLyDl.mjs → compass-gJFmkVKU.mjs} +1 -1
  100. package/lib/{constants-DGfLD4vt.js → constants-CZ1Cg3we.js} +1 -1
  101. package/lib/{constants-Dp6TwkwE.mjs → constants-CvYlmQON.mjs} +1 -1
  102. package/lib/{copy-C_zx4IY2.js → copy-BnBqHWHD.js} +1 -1
  103. package/lib/{copy-B-kaRfPD.mjs → copy-CCtC0O9D.mjs} +1 -1
  104. package/lib/{copy-CnGyA6GV.mjs → copy-DAbUkldO.mjs} +1 -1
  105. package/lib/{copy-Cj1h89Ke.js → copy-DO-PtwSL.js} +1 -1
  106. package/lib/{core-C-bE_KN6.js → core-B-drR9_7.js} +3 -3
  107. package/lib/{core-IZrQV2Qu.mjs → core-B_r-qOmo.mjs} +4 -4
  108. package/lib/{cursor-COWtX4qp.js → cursor-BBkU3FcH.js} +1 -1
  109. package/lib/{cursor-CYo5NSr5.js → cursor-BBzWvQHe.js} +1 -1
  110. package/lib/{cursor-BqTyYhSX.mjs → cursor-BxL72yqS.mjs} +1 -1
  111. package/lib/{cursor-kcpx1EXW.mjs → cursor-DYH9xEcp.mjs} +1 -1
  112. package/lib/{cursor-transparent-DS1K2i2e.js → cursor-transparent-56UaQ3Bn.js} +1 -1
  113. package/lib/{cursor-transparent-CfY_uwZk.js → cursor-transparent-BEJAwX5N.js} +1 -1
  114. package/lib/{cursor-transparent-97JW8Enk.mjs → cursor-transparent-BdZnO_wt.mjs} +1 -1
  115. package/lib/{cursor-transparent-IOBIgHsw.mjs → cursor-transparent-CtFV2CXJ.mjs} +1 -1
  116. package/lib/{desktop-BrMt6GS7.mjs → desktop-2v6QoLZE.mjs} +1 -1
  117. package/lib/{desktop-BcdZWHYb.js → desktop-3NUUpk4c.js} +1 -1
  118. package/lib/{desktop-CKJpmxK6.mjs → desktop-3yOLdhPI.mjs} +1 -1
  119. package/lib/{desktop-DFWKsjai.js → desktop-Pyfuvetn.js} +1 -1
  120. package/lib/{disconnect-CtjdEYQ-.js → disconnect-BaX_JURb.js} +1 -1
  121. package/lib/{disconnect-vLqW6M9O.js → disconnect-BfTUZAHR.js} +1 -1
  122. package/lib/{disconnect-BgfdJJVf.mjs → disconnect-Bv_Bim13.mjs} +1 -1
  123. package/lib/{disconnect-ZG9G-DHl.mjs → disconnect-cHTRr7Ec.mjs} +1 -1
  124. package/lib/{discord-DC940Urt.mjs → discord-C2VL_GWD.mjs} +1 -1
  125. package/lib/{discord-mwpOzt8L.mjs → discord-CKjUttdg.mjs} +1 -1
  126. package/lib/{discord-DkQXfpz6.js → discord-CSIF6CGN.js} +1 -1
  127. package/lib/{discord-BHswKhhZ.js → discord-D1ikT3b-.js} +1 -1
  128. package/lib/{etherscan-Dn1sDQFu.mjs → etherscan-BsljyTKF.mjs} +1 -1
  129. package/lib/{etherscan-B67ePaGv.js → etherscan-C4o1jcxp.js} +1 -1
  130. package/lib/{etherscan-Rf8mBFu1.mjs → etherscan-DNbmb9VE.mjs} +1 -1
  131. package/lib/{etherscan-Bn5vjO6j.js → etherscan-DgfkHroL.js} +1 -1
  132. package/lib/{evm-CdYu0zev.js → evm-BVhY4VIn.js} +2 -2
  133. package/lib/{evm-CNU3nm8Y.mjs → evm-C9PlJk_E.mjs} +3 -3
  134. package/lib/{evm-DAZuPeF5.mjs → evm-D6avkBIT.mjs} +3 -3
  135. package/lib/{evm-Dn0mVgjI.js → evm-DsYQcqsM.js} +1 -1
  136. package/lib/{exclamation-triangle-DvVRCFzL.mjs → exclamation-triangle-7sXeuvtw.mjs} +1 -1
  137. package/lib/{exclamation-triangle-CpaZlCyJ.mjs → exclamation-triangle-B5VkBuje.mjs} +1 -1
  138. package/lib/{exclamation-triangle-9I8CABeM.js → exclamation-triangle-BYOLGjLp.js} +1 -1
  139. package/lib/{exclamation-triangle-pqE-ucld.js → exclamation-triangle-C9ULgQJ_.js} +1 -1
  140. package/lib/{extension-pZFS9WoU.mjs → extension-DQxWqGMB.mjs} +1 -1
  141. package/lib/{extension-D7bW7OOD.mjs → extension-MYgCtDFH.mjs} +1 -1
  142. package/lib/{extension-CIeAycIs.js → extension-NsgFQY7m.js} +1 -1
  143. package/lib/{extension-Cn1fNZM2.js → extension-VaBFk192.js} +1 -1
  144. package/lib/{external-link-Cf6FDbnV.mjs → external-link-BJpDXZJf.mjs} +1 -1
  145. package/lib/{external-link-CxxBPRGW.js → external-link-B_MqtCKD.js} +1 -1
  146. package/lib/{external-link-D5-QPN4I.mjs → external-link-Cd0vLGIE.mjs} +1 -1
  147. package/lib/{external-link-DHZjpSQH.js → external-link-Dixa5654.js} +1 -1
  148. package/lib/{facebook-D7MA9djH.js → facebook-B5uxGSPx.js} +1 -1
  149. package/lib/{facebook-8iR_zZp9.mjs → facebook-BKr0sc8j.mjs} +1 -1
  150. package/lib/{facebook-C-E3U6O7.js → facebook-COEHDC_C.js} +1 -1
  151. package/lib/{facebook-D5N3SRkh.mjs → facebook-CW9qBsFQ.mjs} +1 -1
  152. package/lib/{farcaster-DbrJ_aQn.js → farcaster-CKtNojdp.js} +1 -1
  153. package/lib/{farcaster-lOXlLwtA.mjs → farcaster-Ds4f9Ltv.mjs} +1 -1
  154. package/lib/{farcaster-7r5cimcS.mjs → farcaster-YHCXqrrj.mjs} +1 -1
  155. package/lib/{farcaster-DdOFazmr.js → farcaster-m5MVs-aT.js} +1 -1
  156. package/lib/{filters-DCCnSUtl.js → filters-CDHyMrNp.js} +1 -1
  157. package/lib/{filters-DEwlKNNr.js → filters-CNHTPTvF.js} +1 -1
  158. package/lib/{filters-Cj5yX6NN.mjs → filters-C_fotjQ9.mjs} +1 -1
  159. package/lib/{filters-CoCF6gLm.mjs → filters-otxJEOs7.mjs} +1 -1
  160. package/lib/{github-C4yWxVDh.mjs → github-BNYDlQMz.mjs} +1 -1
  161. package/lib/{github-CaEinWU-.js → github-CEJ7ZdVF.js} +1 -1
  162. package/lib/{github-5sLZXyd5.js → github-CKZKwTIP.js} +1 -1
  163. package/lib/{github-D5MAuYPM.mjs → github-Dibydlav.mjs} +1 -1
  164. package/lib/{google-Dj6-oKVI.js → google-B21849VG.js} +1 -1
  165. package/lib/{google-a9RziYXe.mjs → google-BA66k4rL.mjs} +1 -1
  166. package/lib/{google-D5bcUgOU.mjs → google-Dx6T3HNH.mjs} +1 -1
  167. package/lib/{google-D3d0VPJL.js → google-y2naTeYr.js} +1 -1
  168. package/lib/{help-circle-CF5ABQc8.mjs → help-circle-B2i3-wGO.mjs} +1 -1
  169. package/lib/{help-circle-CIFo9ynr.js → help-circle-CPvN7YEE.js} +1 -1
  170. package/lib/{help-circle-DErEmy6B.mjs → help-circle-CimYq20b.mjs} +1 -1
  171. package/lib/{help-circle-CHzLMVpP.js → help-circle-cbP1i7bz.js} +1 -1
  172. package/lib/hosted.js +1 -1
  173. package/lib/hosted.mjs +1 -1
  174. package/lib/{hypercore-j2gTG79l.js → hypercore-CHTw8bic.js} +1 -1
  175. package/lib/{hypercore-DFWadWGd.mjs → hypercore-DXRD8m3E.mjs} +9 -9
  176. package/lib/{id-CLwA8Kux.mjs → id-B4jo17C5.mjs} +1 -1
  177. package/lib/{id-U-pH30u_.js → id-CPeIs5Fq.js} +1 -1
  178. package/lib/{id-CnZDmFwN.js → id-DSFow20F.js} +1 -1
  179. package/lib/{id-BU0BV530.mjs → id-DiVzvOfZ.mjs} +1 -1
  180. package/lib/{image-BR4koxKg.js → image-B6EzmhFU.js} +1 -1
  181. package/lib/{image--wME0li9.mjs → image-BVF33tR1.mjs} +1 -1
  182. package/lib/{image-dLUM0VDy.js → image-BhAe9DNs.js} +1 -1
  183. package/lib/{image-D_KZJUGe.mjs → image-apDrsEYS.mjs} +1 -1
  184. package/lib/{index-CL4gAJYS.js → index-BBSVPcAD.js} +1 -1
  185. package/lib/{index-KEK3qFIE.js → index-BGzNVaPV.js} +2 -2
  186. package/lib/{index-BjR_EisA.js → index-BHwMXTV2.js} +2 -2
  187. package/lib/{index-DUE9_pKC.mjs → index-CGmXt9G7.mjs} +1 -1
  188. package/lib/{index-D6Wxtq_q.mjs → index-CV_PfShb.mjs} +1 -1
  189. package/lib/{index-Bsuff962.mjs → index-CYFUlQL7.mjs} +3 -3
  190. package/lib/{index-ChQLvH1j.js → index-CltqjT6y.js} +1 -1
  191. package/lib/{index-Qtm35u93.mjs → index-CuufMtD7.mjs} +1 -1
  192. package/lib/{index-BSybO7hw.mjs → index-EOQIdj8y.mjs} +78 -78
  193. package/lib/{index-CFKAjTDz.mjs → index-FgK-pdrK.mjs} +78 -78
  194. package/lib/{index-Dj10OmNz.js → index-Kh39Gi5k.js} +1 -1
  195. package/lib/{index-DiCrhDSW.js → index-n-le376F.js} +2 -2
  196. package/lib/{index-BdboBJrC.js → index-pg8PO4KF.js} +1 -1
  197. package/lib/{index-GVBg1nW4.mjs → index-xvDlUtry.mjs} +1 -1
  198. package/lib/{index.es-BaPdiD6L.js → index.es-B1Hb17ux.js} +1 -1
  199. package/lib/{index.es-GRR3MC7p.mjs → index.es-D9dqjxA-.mjs} +3 -3
  200. package/lib/{index.es-BaB7YazU.mjs → index.es-OUX5OQzg.mjs} +2 -2
  201. package/lib/{index.es-fVqKroFx.js → index.es-lG9bYbuU.js} +3 -3
  202. package/lib/index.js +27 -72
  203. package/lib/index.mjs +1553 -1711
  204. package/lib/{info-DyXA2Rde.js → info-Boiui9f7.js} +1 -1
  205. package/lib/{info-IVaoMU5h.mjs → info-C9gVJcre.mjs} +1 -1
  206. package/lib/{info-CP6AYP0r.mjs → info-O1n15_1D.mjs} +1 -1
  207. package/lib/{info-circle-BrAhGxdr.mjs → info-circle-BFolIbkj.mjs} +1 -1
  208. package/lib/{info-circle-DLZBZmJA.js → info-circle-CMe56iw6.js} +1 -1
  209. package/lib/{info-circle-_RX3sEw0.mjs → info-circle-CUSrqyXO.mjs} +1 -1
  210. package/lib/{info-circle-DLvvWSso.js → info-circle-Cc7pM3j0.js} +1 -1
  211. package/lib/{info-DsDJ9PCj.js → info-lLJkbrKO.js} +1 -1
  212. package/lib/lifi.js +1 -1
  213. package/lib/lifi.mjs +2 -2
  214. package/lib/{lightbulb-ByzF21_6.mjs → lightbulb-C3PATB9z.mjs} +1 -1
  215. package/lib/{lightbulb-BthaBnif.mjs → lightbulb-CqdzQLC3.mjs} +1 -1
  216. package/lib/{lightbulb-BI1LAtBz.js → lightbulb-VYLU20z_.js} +1 -1
  217. package/lib/{lightbulb-CMukua6v.js → lightbulb-ftjHXSjH.js} +1 -1
  218. package/lib/{mail-DwnzyWxK.mjs → mail-Cbku7Uh4.mjs} +1 -1
  219. package/lib/{mail-C-wk-7Ix.js → mail-DFrUqNVg.js} +1 -1
  220. package/lib/{mail-CO-FJbD4.js → mail-DK7EnkPU.js} +1 -1
  221. package/lib/{mail-4nSLMLPv.mjs → mail-pAAtront.mjs} +1 -1
  222. package/lib/mayan.js +1 -1
  223. package/lib/mayan.mjs +2 -2
  224. package/lib/{mobile-sYUJ3_wv.js → mobile-BhxSbHuq.js} +1 -1
  225. package/lib/{mobile-BLoALBXq.js → mobile-DssA8Pv3.js} +1 -1
  226. package/lib/{mobile-Ckxm1bvv.mjs → mobile-OA7to7W8.mjs} +1 -1
  227. package/lib/{mobile-CsmFql-e.mjs → mobile-VGlrj4tw.mjs} +1 -1
  228. package/lib/{more-CKJE84tK.js → more-B2vO9WWk.js} +1 -1
  229. package/lib/{more-CCgU8azx.mjs → more-BN4Q6SUx.mjs} +1 -1
  230. package/lib/{more-CtJ9lyp8.mjs → more-Ch4Lqfvk.mjs} +1 -1
  231. package/lib/{more-ECvX119L.js → more-DHFKZx0b.js} +1 -1
  232. package/lib/{network-placeholder-CGr9IJpY.mjs → network-placeholder-BB4x45Tg.mjs} +1 -1
  233. package/lib/{network-placeholder-GGHKQlvF.js → network-placeholder-C9vBCfoS.js} +1 -1
  234. package/lib/{network-placeholder-dB9F7ppX.js → network-placeholder-DEjE8_cC.js} +1 -1
  235. package/lib/{network-placeholder-BDBBro30.mjs → network-placeholder-DabWxIRQ.mjs} +1 -1
  236. package/lib/{nftPlaceholder-oMt3XSVj.js → nftPlaceholder-C3mbGCd_.js} +1 -1
  237. package/lib/{nftPlaceholder-BuITp3pd.mjs → nftPlaceholder-DkQ8_eeY.mjs} +1 -1
  238. package/lib/{nftPlaceholder-sPby7kJU.js → nftPlaceholder-Dm0gJJff.js} +1 -1
  239. package/lib/{nftPlaceholder-CB3ngIY3.mjs → nftPlaceholder-HRZgFSge.mjs} +1 -1
  240. package/lib/{off-DTeZDvdH.js → off--Q32bGkI.js} +1 -1
  241. package/lib/{off-D-AAXhtB.js → off-CrU10ihl.js} +1 -1
  242. package/lib/{off-COhe1fTc.mjs → off-nA_OrJUe.mjs} +1 -1
  243. package/lib/{off-TfkIQXeB.mjs → off-wbTBMRhe.mjs} +1 -1
  244. package/lib/{play-store-DKQhW1gn.js → play-store-BHw33DCQ.js} +1 -1
  245. package/lib/{play-store-DzNvggFH.mjs → play-store-BVmr7Z4C.mjs} +1 -1
  246. package/lib/{play-store-C4xcHryf.js → play-store-CS0C9q5-.js} +1 -1
  247. package/lib/{play-store-BjYbtsE6.mjs → play-store-D9U-UFF5.mjs} +1 -1
  248. package/lib/{plus-BghwgfqX.js → plus-Bi6V8pNp.js} +1 -1
  249. package/lib/{plus-DxzPtYL0.mjs → plus-CW3w3sls.mjs} +1 -1
  250. package/lib/{plus-C7MKTgK7.mjs → plus-D3x4t8Ce.mjs} +1 -1
  251. package/lib/{plus-wMnOnwz3.js → plus-Dc8ywSwP.js} +1 -1
  252. package/lib/{qr-code-Dfyo_DBs.js → qr-code-BZDngjZY.js} +1 -1
  253. package/lib/{qr-code-Bx0AMx0M.mjs → qr-code-DgC6Fdg7.mjs} +1 -1
  254. package/lib/{qr-code-C35_cZkC.mjs → qr-code-OMVNklZX.mjs} +1 -1
  255. package/lib/{qr-code-8MQaIZZC.js → qr-code-ji9rZFGq.js} +1 -1
  256. package/lib/{recycle-horizontal-DAgiwwJ1.mjs → recycle-horizontal-B2I-zPCU.mjs} +1 -1
  257. package/lib/{recycle-horizontal-CTIgISfH.js → recycle-horizontal-Bt5GY9OR.js} +1 -1
  258. package/lib/{recycle-horizontal-B1A2LB8b.js → recycle-horizontal-D9hq32DZ.js} +1 -1
  259. package/lib/{recycle-horizontal-DY4vj3Rv.mjs → recycle-horizontal-DytoyBfI.mjs} +1 -1
  260. package/lib/{refresh-BnZQPsz5.js → refresh-BKK5da-L.js} +1 -1
  261. package/lib/{refresh-Cb6tVUdi.mjs → refresh-BSAssZBM.mjs} +1 -1
  262. package/lib/{refresh-DzN-ylL6.mjs → refresh-CjLexDSA.mjs} +1 -1
  263. package/lib/{refresh-DJMvIMS2.js → refresh-H6w6oM_A.js} +1 -1
  264. package/lib/{reown-logo-DkW-wu5O.js → reown-logo-B6Ov41nY.js} +1 -1
  265. package/lib/{reown-logo-Dx8QrTgS.mjs → reown-logo-C6FOwVYq.mjs} +1 -1
  266. package/lib/{reown-logo-CqWZKbtk.js → reown-logo-DLSNj3TE.js} +1 -1
  267. package/lib/{reown-logo-B3PfsCFy.mjs → reown-logo-DwXu5uNR.mjs} +1 -1
  268. package/lib/{search-Zxp1yZ-I.mjs → search-BOcgdRAL.mjs} +1 -1
  269. package/lib/{search-BiXmWWs6.js → search-Bb7bK2Uc.js} +1 -1
  270. package/lib/{search-SfO-_tu8.js → search-CAbVUgnN.js} +1 -1
  271. package/lib/{search-C5IsnJYj.mjs → search-Co9ezsvt.mjs} +1 -1
  272. package/lib/{secp256k1-BQTFpnzy.mjs → secp256k1-0A8Ewnv6.mjs} +1 -1
  273. package/lib/{secp256k1-D_Gn-jqQ.js → secp256k1-BnR7-XEW.js} +1 -1
  274. package/lib/{secp256k1-sVIcIy0c.mjs → secp256k1-BoJRjFfg.mjs} +1 -1
  275. package/lib/{secp256k1-C330P-og.mjs → secp256k1-C4MOK2TW.mjs} +1 -1
  276. package/lib/{secp256k1-CSiCK8mp.js → secp256k1-Cux0xw_z.js} +1 -1
  277. package/lib/{secp256k1-BEvvZ05v.js → secp256k1-DT9ulpgk.js} +1 -1
  278. package/lib/{secp256k1-C2Yei8lW.mjs → secp256k1-YadE7hrp.mjs} +1 -1
  279. package/lib/{secp256k1-BARTIWl8.js → secp256k1-jJLvhP5o.js} +1 -1
  280. package/lib/{send-Bf5YMSxJ.js → send-B44wmSUh.js} +1 -1
  281. package/lib/{send-QuB_6fVE.mjs → send-BpJl2Xn8.mjs} +1 -1
  282. package/lib/{send-n_oSfesi.js → send-CRsiv27V.js} +1 -1
  283. package/lib/{send-CfjifILw.mjs → send-DLjvhVAl.mjs} +1 -1
  284. package/lib/{solana-DE2kkwFm.js → solana-BGU37dz5.js} +4 -4
  285. package/lib/{solana-D5jguotU.mjs → solana-CiNUMNJ8.mjs} +8 -8
  286. package/lib/{solanaEmbed.esm-DcZi3RfD.js → solanaEmbed.esm-CQlwytxQ.js} +1 -1
  287. package/lib/{solanaEmbed.esm-DisZ7Nce.mjs → solanaEmbed.esm-DyqmLXfp.mjs} +2 -2
  288. package/lib/{sui-DPA4pds6.mjs → sui-Bib-iOCV.mjs} +2 -2
  289. package/lib/{sui-DKHLUOgB.js → sui-BjzF-Q-b.js} +1 -1
  290. package/lib/{swapHorizontal-Dgx2K3vn.mjs → swapHorizontal-B8qVmnu8.mjs} +1 -1
  291. package/lib/{swapHorizontal-C-_HtGEy.mjs → swapHorizontal-BRWRUIJB.mjs} +1 -1
  292. package/lib/{swapHorizontal-Dw5zhkPQ.js → swapHorizontal-BsTJkttx.js} +1 -1
  293. package/lib/{swapHorizontal-BFcauuvN.js → swapHorizontal-D-uqFVHs.js} +1 -1
  294. package/lib/{swapHorizontalBold-8c-d6K5o.mjs → swapHorizontalBold-BdNeqRi3.mjs} +1 -1
  295. package/lib/{swapHorizontalBold-C7J8iBLm.js → swapHorizontalBold-CYYFuggs.js} +1 -1
  296. package/lib/{swapHorizontalBold-BFaqLN1O.js → swapHorizontalBold-aLja8kkS.js} +1 -1
  297. package/lib/{swapHorizontalBold-Bhr2ebxy.mjs → swapHorizontalBold-nE-ChWuU.mjs} +1 -1
  298. package/lib/{swapHorizontalMedium-Cqky1zP_.mjs → swapHorizontalMedium-BI3ILASr.mjs} +1 -1
  299. package/lib/{swapHorizontalMedium-DN36AGSD.js → swapHorizontalMedium-BeZ1rL5X.js} +1 -1
  300. package/lib/{swapHorizontalMedium-DbhSl29t.mjs → swapHorizontalMedium-C6W9-JzO.mjs} +1 -1
  301. package/lib/{swapHorizontalMedium-KzsE-Nxz.js → swapHorizontalMedium-vhOD9TfP.js} +1 -1
  302. package/lib/{swapHorizontalRoundedBold-Cv-mTC_8.mjs → swapHorizontalRoundedBold-BAIOqirj.mjs} +1 -1
  303. package/lib/{swapHorizontalRoundedBold-Ds5xFvSn.js → swapHorizontalRoundedBold-BkFwOs0Y.js} +1 -1
  304. package/lib/{swapHorizontalRoundedBold-B5rbO9hU.mjs → swapHorizontalRoundedBold-CYpeP0Et.mjs} +1 -1
  305. package/lib/{swapHorizontalRoundedBold-CE4v1uqm.js → swapHorizontalRoundedBold-DP1Z5JQM.js} +1 -1
  306. package/lib/{swapVertical-DmP8q9T0.js → swapVertical-29kKOB66.js} +1 -1
  307. package/lib/{swapVertical-BNaDyBce.mjs → swapVertical-3zrfl1Xi.mjs} +1 -1
  308. package/lib/{swapVertical-BIde62-t.js → swapVertical-CFtauJeV.js} +1 -1
  309. package/lib/{swapVertical-UvstCFOe.mjs → swapVertical-Ci9CWSzV.mjs} +1 -1
  310. package/lib/{telegram-_UlrbcuL.mjs → telegram-CvywROv3.mjs} +1 -1
  311. package/lib/{telegram-B8DOK8LQ.js → telegram-Dr2j2upn.js} +1 -1
  312. package/lib/{telegram-DpxYicfc.mjs → telegram-DrrslbwQ.mjs} +1 -1
  313. package/lib/{telegram-DUZ1mhSy.js → telegram-Dwr-qPTP.js} +1 -1
  314. package/lib/{three-dots-Cz5fvhME.js → three-dots-BNuSEqpQ.js} +1 -1
  315. package/lib/{three-dots-BHL8D_Zg.mjs → three-dots-CS6LN5K6.mjs} +1 -1
  316. package/lib/{three-dots-DCZa3ccg.mjs → three-dots-CcmyKQwf.mjs} +1 -1
  317. package/lib/{three-dots-eLSxq0uy.js → three-dots-Ls5fYKC0.js} +1 -1
  318. package/lib/{tokenHelpers-DaXKXvMS.js → tokenHelpers-BWM8KMa6.js} +1 -1
  319. package/lib/{tokenHelpers-a1B-ORAA.mjs → tokenHelpers-DAwzvT17.mjs} +1 -1
  320. package/lib/{tokens-B113FI9J.js → tokens-D1ONPHia.js} +1 -1
  321. package/lib/{tokens-PXiNoKQV.mjs → tokens-DggD3cX7.mjs} +1 -1
  322. package/lib/{twitch-BUKpSNF3.js → twitch-Bd58rlGF.js} +1 -1
  323. package/lib/{twitch-BBMn8FzK.js → twitch-BnpIZdrn.js} +1 -1
  324. package/lib/{twitch-DULME7lx.mjs → twitch-C4Eo2_CN.mjs} +1 -1
  325. package/lib/{twitch-CUtpYc4R.mjs → twitch-C8SyvzoN.mjs} +1 -1
  326. package/lib/{twitterIcon-Blj3OB-w.js → twitterIcon-BEbzFMeP.js} +1 -1
  327. package/lib/{twitterIcon-YR7_nZMl.mjs → twitterIcon-BMzY5zmt.mjs} +1 -1
  328. package/lib/{twitterIcon-_TKDsIPY.mjs → twitterIcon-C-y4j0Tc.mjs} +1 -1
  329. package/lib/{twitterIcon-BN9ansTN.js → twitterIcon-DIykPyaS.js} +1 -1
  330. package/lib/{verify-x9oxN_9S.mjs → verify-CrMRxyWg.mjs} +1 -1
  331. package/lib/{verify-BCgymggd.js → verify-Crtvz15I.js} +1 -1
  332. package/lib/{verify-DYCo-SIH.js → verify-CwFpdYoH.js} +1 -1
  333. package/lib/{verify-B8aWF7Gd.mjs → verify-NthP_npu.mjs} +1 -1
  334. package/lib/{verify-filled-BwdAKqTz.js → verify-filled-BlrU9vQA.js} +1 -1
  335. package/lib/{verify-filled-BRds-xGX.js → verify-filled-CGCh-dVk.js} +1 -1
  336. package/lib/{verify-filled-i5Ro5Kmd.mjs → verify-filled-CjDyTxlc.mjs} +1 -1
  337. package/lib/{verify-filled-DWDmZ4fK.mjs → verify-filled-D9kdEJV2.mjs} +1 -1
  338. package/lib/{w3m-modal-DveKC-Y6.js → w3m-modal--0Rp9fNB.js} +1 -1
  339. package/lib/{w3m-modal-C-HyORJE.js → w3m-modal-1XXe-6js.js} +1 -1
  340. package/lib/{w3m-modal-DSnDVaJG.mjs → w3m-modal-CdkJJVqN.mjs} +2 -2
  341. package/lib/{w3m-modal-cG8zSQMG.mjs → w3m-modal-DM4Y_2h6.mjs} +2 -2
  342. package/lib/{wallet-Bt2WxOPa.js → wallet-C1IpUTIA.js} +1 -1
  343. package/lib/{wallet-AYipPwJz.mjs → wallet-CamNgIPw.mjs} +1 -1
  344. package/lib/{wallet-CmtyVlua.js → wallet-CkpI9kzj.js} +1 -1
  345. package/lib/{wallet-CuTms3TO.mjs → wallet-Cq98Nsz0.mjs} +1 -1
  346. package/lib/{wallet-placeholder-rVyGjFzG.mjs → wallet-placeholder-BNjSzhI7.mjs} +1 -1
  347. package/lib/{wallet-placeholder-CtXzlAiV.js → wallet-placeholder-CB7fUzRo.js} +1 -1
  348. package/lib/{wallet-placeholder-Dn06LVhc.mjs → wallet-placeholder-DA1MWd3N.mjs} +1 -1
  349. package/lib/{wallet-placeholder-Cs6XgbFk.js → wallet-placeholder-Dqi7ETT0.js} +1 -1
  350. package/lib/{walletconnect-B4dzE_Rv.mjs → walletconnect-BNEO7K5p.mjs} +1 -1
  351. package/lib/{walletconnect-CSwzK9gd.js → walletconnect-Bn6uzute.js} +1 -1
  352. package/lib/{walletconnect-BmvLBckC.mjs → walletconnect-CZpyRToX.mjs} +1 -1
  353. package/lib/{walletconnect-BkeRK6O2.js → walletconnect-nqXULWld.js} +1 -1
  354. package/lib/{warning-circle-DsN-kfbo.js → warning-circle--gP3MuWN.js} +1 -1
  355. package/lib/{warning-circle-LztOYzFY.mjs → warning-circle-BJa5UE7S.mjs} +1 -1
  356. package/lib/{warning-circle-GTQjQ3h1.mjs → warning-circle-CaIyIC07.mjs} +1 -1
  357. package/lib/{warning-circle-DYLyFPIa.js → warning-circle-bxxlNMW0.js} +1 -1
  358. package/lib/{x-GwL6d9Wb.js → x-CK85Brc3.js} +1 -1
  359. package/lib/{x-DMcJACHl.js → x-CNpeVFtn.js} +1 -1
  360. package/lib/{x-BCJR57go.mjs → x-CpgiFnfX.mjs} +1 -1
  361. package/lib/{x--ZenK7QD.mjs → x-aiX6h0m_.mjs} +1 -1
  362. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qe=require("./platform-DH1Olrgt.js"),xe=require("./unsignedTransaction-DPs4ICFO.js"),rr=require("./index-BjR_EisA.js"),na=require("./index.es-BaPdiD6L.js");require("./index-BxM99sFL.js");var ia=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,sn=Math.ceil,Ve=Math.floor,We="[BigNumber Error] ",Ri=We+"Number primitive has more than 15 significant digits: ",et=1e14,pe=14,an=9007199254740991,ln=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],wt=1e7,Ce=1e9;function Go(r){var e,t,n,i=c.prototype={constructor:c,toString:null,valueOf:null},s=new c(1),o=20,a=4,d=-7,w=21,N=-1e7,O=1e7,I=!1,U=1,B=0,y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},b="0123456789abcdefghijklmnopqrstuvwxyz",u=!0;function c(l,m){var f,g,_,h,C,p,A,P,E=this;if(!(E instanceof c))return new c(l,m);if(m==null){if(l&&l._isBigNumber===!0){E.s=l.s,!l.c||l.e>O?E.c=E.e=null:l.e<N?E.c=[E.e=0]:(E.e=l.e,E.c=l.c.slice());return}if((p=typeof l=="number")&&l*0==0){if(E.s=1/l<0?(l=-l,-1):1,l===~~l){for(h=0,C=l;C>=10;C/=10,h++);h>O?E.c=E.e=null:(E.e=h,E.c=[l]);return}P=String(l)}else{if(!ia.test(P=String(l)))return n(E,P,p);E.s=P.charCodeAt(0)==45?(P=P.slice(1),-1):1}(h=P.indexOf("."))>-1&&(P=P.replace(".","")),(C=P.search(/e/i))>0?(h<0&&(h=C),h+=+P.slice(C+1),P=P.substring(0,C)):h<0&&(h=P.length)}else{if(Re(m,2,b.length,"Base"),m==10&&u)return E=new c(l),J(E,o+E.e+1,a);if(P=String(l),p=typeof l=="number"){if(l*0!=0)return n(E,P,p,m);if(E.s=1/l<0?(P=P.slice(1),-1):1,c.DEBUG&&P.replace(/^0\.0*|\./,"").length>15)throw Error(Ri+l)}else E.s=P.charCodeAt(0)===45?(P=P.slice(1),-1):1;for(f=b.slice(0,m),h=C=0,A=P.length;C<A;C++)if(f.indexOf(g=P.charAt(C))<0){if(g=="."){if(C>h){h=A;continue}}else if(!_&&(P==P.toUpperCase()&&(P=P.toLowerCase())||P==P.toLowerCase()&&(P=P.toUpperCase()))){_=!0,C=-1,h=0;continue}return n(E,String(l),p,m)}p=!1,P=t(P,m,10,E.s),(h=P.indexOf("."))>-1?P=P.replace(".",""):h=P.length}for(C=0;P.charCodeAt(C)===48;C++);for(A=P.length;P.charCodeAt(--A)===48;);if(P=P.slice(C,++A)){if(A-=C,p&&c.DEBUG&&A>15&&(l>an||l!==Ve(l)))throw Error(Ri+E.s*l);if((h=h-C-1)>O)E.c=E.e=null;else if(h<N)E.c=[E.e=0];else{if(E.e=h,E.c=[],C=(h+1)%pe,h<0&&(C+=pe),C<A){for(C&&E.c.push(+P.slice(0,C)),A-=pe;C<A;)E.c.push(+P.slice(C,C+=pe));C=pe-(P=P.slice(C)).length}else C-=A;for(;C--;P+="0");E.c.push(+P)}}else E.c=[E.e=0]}c.clone=Go,c.ROUND_UP=0,c.ROUND_DOWN=1,c.ROUND_CEIL=2,c.ROUND_FLOOR=3,c.ROUND_HALF_UP=4,c.ROUND_HALF_DOWN=5,c.ROUND_HALF_EVEN=6,c.ROUND_HALF_CEIL=7,c.ROUND_HALF_FLOOR=8,c.EUCLID=9,c.config=c.set=function(l){var m,f;if(l!=null)if(typeof l=="object"){if(l.hasOwnProperty(m="DECIMAL_PLACES")&&(f=l[m],Re(f,0,Ce,m),o=f),l.hasOwnProperty(m="ROUNDING_MODE")&&(f=l[m],Re(f,0,8,m),a=f),l.hasOwnProperty(m="EXPONENTIAL_AT")&&(f=l[m],f&&f.pop?(Re(f[0],-Ce,0,m),Re(f[1],0,Ce,m),d=f[0],w=f[1]):(Re(f,-Ce,Ce,m),d=-(w=f<0?-f:f))),l.hasOwnProperty(m="RANGE"))if(f=l[m],f&&f.pop)Re(f[0],-Ce,-1,m),Re(f[1],1,Ce,m),N=f[0],O=f[1];else if(Re(f,-Ce,Ce,m),f)N=-(O=f<0?-f:f);else throw Error(We+m+" cannot be zero: "+f);if(l.hasOwnProperty(m="CRYPTO"))if(f=l[m],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))I=f;else throw I=!f,Error(We+"crypto unavailable");else I=f;else throw Error(We+m+" not true or false: "+f);if(l.hasOwnProperty(m="MODULO_MODE")&&(f=l[m],Re(f,0,9,m),U=f),l.hasOwnProperty(m="POW_PRECISION")&&(f=l[m],Re(f,0,Ce,m),B=f),l.hasOwnProperty(m="FORMAT"))if(f=l[m],typeof f=="object")y=f;else throw Error(We+m+" not an object: "+f);if(l.hasOwnProperty(m="ALPHABET"))if(f=l[m],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))u=f.slice(0,10)=="0123456789",b=f;else throw Error(We+m+" invalid: "+f)}else throw Error(We+"Object expected: "+l);return{DECIMAL_PLACES:o,ROUNDING_MODE:a,EXPONENTIAL_AT:[d,w],RANGE:[N,O],CRYPTO:I,MODULO_MODE:U,POW_PRECISION:B,FORMAT:y,ALPHABET:b}},c.isBigNumber=function(l){if(!l||l._isBigNumber!==!0)return!1;if(!c.DEBUG)return!0;var m,f,g=l.c,_=l.e,h=l.s;e:if({}.toString.call(g)=="[object Array]"){if((h===1||h===-1)&&_>=-Ce&&_<=Ce&&_===Ve(_)){if(g[0]===0){if(_===0&&g.length===1)return!0;break e}if(m=(_+1)%pe,m<1&&(m+=pe),String(g[0]).length==m){for(m=0;m<g.length;m++)if(f=g[m],f<0||f>=et||f!==Ve(f))break e;if(f!==0)return!0}}}else if(g===null&&_===null&&(h===null||h===1||h===-1))return!0;throw Error(We+"Invalid BigNumber: "+l)},c.maximum=c.max=function(){return G(arguments,-1)},c.minimum=c.min=function(){return G(arguments,1)},c.random=(function(){var l=9007199254740992,m=Math.random()*l&2097151?function(){return Ve(Math.random()*l)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var g,_,h,C,p,A=0,P=[],E=new c(s);if(f==null?f=o:Re(f,0,Ce),C=sn(f/pe),I)if(crypto.getRandomValues){for(g=crypto.getRandomValues(new Uint32Array(C*=2));A<C;)p=g[A]*131072+(g[A+1]>>>11),p>=9e15?(_=crypto.getRandomValues(new Uint32Array(2)),g[A]=_[0],g[A+1]=_[1]):(P.push(p%1e14),A+=2);A=C/2}else if(crypto.randomBytes){for(g=crypto.randomBytes(C*=7);A<C;)p=(g[A]&31)*281474976710656+g[A+1]*1099511627776+g[A+2]*4294967296+g[A+3]*16777216+(g[A+4]<<16)+(g[A+5]<<8)+g[A+6],p>=9e15?crypto.randomBytes(7).copy(g,A):(P.push(p%1e14),A+=7);A=C/7}else throw I=!1,Error(We+"crypto unavailable");if(!I)for(;A<C;)p=m(),p<9e15&&(P[A++]=p%1e14);for(C=P[--A],f%=pe,C&&f&&(p=ln[pe-f],P[A]=Ve(C/p)*p);P[A]===0;P.pop(),A--);if(A<0)P=[h=0];else{for(h=-1;P[0]===0;P.splice(0,1),h-=pe);for(A=1,p=P[0];p>=10;p/=10,A++);A<pe&&(h-=pe-A)}return E.e=h,E.c=P,E}})(),c.sum=function(){for(var l=1,m=arguments,f=new c(m[0]);l<m.length;)f=f.plus(m[l++]);return f},t=(function(){var l="0123456789";function m(f,g,_,h){for(var C,p=[0],A,P=0,E=f.length;P<E;){for(A=p.length;A--;p[A]*=g);for(p[0]+=h.indexOf(f.charAt(P++)),C=0;C<p.length;C++)p[C]>_-1&&(p[C+1]==null&&(p[C+1]=0),p[C+1]+=p[C]/_|0,p[C]%=_)}return p.reverse()}return function(f,g,_,h,C){var p,A,P,E,M,S,j,K,W=f.indexOf("."),ee=o,Q=a;for(W>=0&&(E=B,B=0,f=f.replace(".",""),K=new c(g),S=K.pow(f.length-W),B=E,K.c=m(lt(ze(S.c),S.e,"0"),10,_,l),K.e=K.c.length),j=m(f,g,_,C?(p=b,l):(p=l,b)),P=E=j.length;j[--E]==0;j.pop());if(!j[0])return p.charAt(0);if(W<0?--P:(S.c=j,S.e=P,S.s=h,S=e(S,K,ee,Q,_),j=S.c,M=S.r,P=S.e),A=P+ee+1,W=j[A],E=_/2,M=M||A<0||j[A+1]!=null,M=Q<4?(W!=null||M)&&(Q==0||Q==(S.s<0?3:2)):W>E||W==E&&(Q==4||M||Q==6&&j[A-1]&1||Q==(S.s<0?8:7)),A<1||!j[0])f=M?lt(p.charAt(1),-ee,p.charAt(0)):p.charAt(0);else{if(j.length=A,M)for(--_;++j[--A]>_;)j[A]=0,A||(++P,j=[1].concat(j));for(E=j.length;!j[--E];);for(W=0,f="";W<=E;f+=p.charAt(j[W++]));f=lt(f,P,p.charAt(0))}return f}})(),e=(function(){function l(g,_,h){var C,p,A,P,E=0,M=g.length,S=_%wt,j=_/wt|0;for(g=g.slice();M--;)A=g[M]%wt,P=g[M]/wt|0,C=j*A+P*S,p=S*A+C%wt*wt+E,E=(p/h|0)+(C/wt|0)+j*P,g[M]=p%h;return E&&(g=[E].concat(g)),g}function m(g,_,h,C){var p,A;if(h!=C)A=h>C?1:-1;else for(p=A=0;p<h;p++)if(g[p]!=_[p]){A=g[p]>_[p]?1:-1;break}return A}function f(g,_,h,C){for(var p=0;h--;)g[h]-=p,p=g[h]<_[h]?1:0,g[h]=p*C+g[h]-_[h];for(;!g[0]&&g.length>1;g.splice(0,1));}return function(g,_,h,C,p){var A,P,E,M,S,j,K,W,ee,Q,le,ue,z,V,oe,ce,fe,L=g.s==_.s?1:-1,D=g.c,F=_.c;if(!D||!D[0]||!F||!F[0])return new c(!g.s||!_.s||(D?F&&D[0]==F[0]:!F)?NaN:D&&D[0]==0||!F?L*0:L/0);for(W=new c(L),ee=W.c=[],P=g.e-_.e,L=h+P+1,p||(p=et,P=Ke(g.e/pe)-Ke(_.e/pe),L=L/pe|0),E=0;F[E]==(D[E]||0);E++);if(F[E]>(D[E]||0)&&P--,L<0)ee.push(1),M=!0;else{for(V=D.length,ce=F.length,E=0,L+=2,S=Ve(p/(F[0]+1)),S>1&&(F=l(F,S,p),D=l(D,S,p),ce=F.length,V=D.length),z=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]>=p/2&&oe++;do{if(S=0,A=m(F,Q,ce,le),A<0){if(ue=Q[0],ce!=le&&(ue=ue*p+(Q[1]||0)),S=Ve(ue/oe),S>1)for(S>=p&&(S=p-1),j=l(F,S,p),K=j.length,le=Q.length;m(j,Q,K,le)==1;)S--,f(j,ce<K?fe:F,K,p),K=j.length,A=1;else S==0&&(A=S=1),j=F.slice(),K=j.length;if(K<le&&(j=[0].concat(j)),f(Q,j,le,p),le=Q.length,A==-1)for(;m(F,Q,ce,le)<1;)S++,f(Q,ce<le?fe:F,le,p),le=Q.length}else A===0&&(S++,Q=[0]);ee[E++]=S,Q[0]?Q[le++]=D[z]||0:(Q=[D[z]],le=1)}while((z++<V||Q[0]!=null)&&L--);M=Q[0]!=null,ee[0]||ee.splice(0,1)}if(p==et){for(E=1,L=ee[0];L>=10;L/=10,E++);J(W,h+(W.e=E+P*pe-1)+1,C,M)}else W.e=P,W.r=+M;return W}})();function v(l,m,f,g){var _,h,C,p,A;if(f==null?f=a:Re(f,0,8),!l.c)return l.toString();if(_=l.c[0],C=l.e,m==null)A=ze(l.c),A=g==1||g==2&&(C<=d||C>=w)?Sr(A,C):lt(A,C,"0");else if(l=J(new c(l),m,f),h=l.e,A=ze(l.c),p=A.length,g==1||g==2&&(m<=h||h<=d)){for(;p<m;A+="0",p++);A=Sr(A,h)}else if(m-=C+(g===2&&h>C),A=lt(A,h,"0"),h+1>p){if(--m>0)for(A+=".";m--;A+="0");}else if(m+=h-p,m>0)for(h+1==p&&(A+=".");m--;A+="0");return l.s<0&&_?"-"+A:A}function G(l,m){for(var f,g,_=1,h=new c(l[0]);_<l.length;_++)g=new c(l[_]),(!g.s||(f=Rt(h,g))===m||f===0&&h.s===m)&&(h=g);return h}function $(l,m,f){for(var g=1,_=m.length;!m[--_];m.pop());for(_=m[0];_>=10;_/=10,g++);return(f=g+f*pe-1)>O?l.c=l.e=null:f<N?l.c=[l.e=0]:(l.e=f,l.c=m),l}n=(function(){var l=/^(-?)0([xbo])(?=\w[\w.]*$)/i,m=/^([^.]+)\.$/,f=/^\.([^.]+)$/,g=/^-?(Infinity|NaN)$/,_=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(h,C,p,A){var P,E=p?C:C.replace(_,"");if(g.test(E))h.s=isNaN(E)?null:E<0?-1:1;else{if(!p&&(E=E.replace(l,function(M,S,j){return P=(j=j.toLowerCase())=="x"?16:j=="b"?2:8,!A||A==P?S:M}),A&&(P=A,E=E.replace(m,"$1").replace(f,"0.$1")),C!=E))return new c(E,P);if(c.DEBUG)throw Error(We+"Not a"+(A?" base "+A:"")+" number: "+C);h.s=null}h.c=h.e=null}})();function J(l,m,f,g){var _,h,C,p,A,P,E,M=l.c,S=ln;if(M){e:{for(_=1,p=M[0];p>=10;p/=10,_++);if(h=m-_,h<0)h+=pe,C=m,A=M[P=0],E=Ve(A/S[_-C-1]%10);else if(P=sn((h+1)/pe),P>=M.length)if(g){for(;M.length<=P;M.push(0));A=E=0,_=1,h%=pe,C=h-pe+1}else break e;else{for(A=p=M[P],_=1;p>=10;p/=10,_++);h%=pe,C=h-pe+_,E=C<0?0:Ve(A/S[_-C-1]%10)}if(g=g||m<0||M[P+1]!=null||(C<0?A:A%S[_-C-1]),g=f<4?(E||g)&&(f==0||f==(l.s<0?3:2)):E>5||E==5&&(f==4||g||f==6&&(h>0?C>0?A/S[_-C]:0:M[P-1])%10&1||f==(l.s<0?8:7)),m<1||!M[0])return M.length=0,g?(m-=l.e+1,M[0]=S[(pe-m%pe)%pe],l.e=-m||0):M[0]=l.e=0,l;if(h==0?(M.length=P,p=1,P--):(M.length=P+1,p=S[pe-h],M[P]=C>0?Ve(A/S[_-C]%S[C])*p:0),g)for(;;)if(P==0){for(h=1,C=M[0];C>=10;C/=10,h++);for(C=M[0]+=p,p=1;C>=10;C/=10,p++);h!=p&&(l.e++,M[0]==et&&(M[0]=1));break}else{if(M[P]+=p,M[P]!=et)break;M[P--]=0,p=1}for(h=M.length;M[--h]===0;M.pop());}l.e>O?l.c=l.e=null:l.e<N&&(l.c=[l.e=0])}return l}function X(l){var m,f=l.e;return f===null?l.toString():(m=ze(l.c),m=f<=d||f>=w?Sr(m,f):lt(m,f,"0"),l.s<0?"-"+m:m)}return i.absoluteValue=i.abs=function(){var l=new c(this);return l.s<0&&(l.s=1),l},i.comparedTo=function(l,m){return Rt(this,new c(l,m))},i.decimalPlaces=i.dp=function(l,m){var f,g,_,h=this;if(l!=null)return Re(l,0,Ce),m==null?m=a:Re(m,0,8),J(new c(h),l+h.e+1,m);if(!(f=h.c))return null;if(g=((_=f.length-1)-Ke(this.e/pe))*pe,_=f[_])for(;_%10==0;_/=10,g--);return g<0&&(g=0),g},i.dividedBy=i.div=function(l,m){return e(this,new c(l,m),o,a)},i.dividedToIntegerBy=i.idiv=function(l,m){return e(this,new c(l,m),0,1)},i.exponentiatedBy=i.pow=function(l,m){var f,g,_,h,C,p,A,P,E,M=this;if(l=new c(l),l.c&&!l.isInteger())throw Error(We+"Exponent not an integer: "+X(l));if(m!=null&&(m=new c(m)),p=l.e>14,!M.c||!M.c[0]||M.c[0]==1&&!M.e&&M.c.length==1||!l.c||!l.c[0])return E=new c(Math.pow(+X(M),p?l.s*(2-Er(l)):+X(l))),m?E.mod(m):E;if(A=l.s<0,m){if(m.c?!m.c[0]:!m.s)return new c(NaN);g=!A&&M.isInteger()&&m.isInteger(),g&&(M=M.mod(m))}else{if(l.e>9&&(M.e>0||M.e<-1||(M.e==0?M.c[0]>1||p&&M.c[1]>=24e7:M.c[0]<8e13||p&&M.c[0]<=9999975e7)))return h=M.s<0&&Er(l)?-0:0,M.e>-1&&(h=1/h),new c(A?1/h:h);B&&(h=sn(B/pe+2))}for(p?(f=new c(.5),A&&(l.s=1),P=Er(l)):(_=Math.abs(+X(l)),P=_%2),E=new c(s);;){if(P){if(E=E.times(M),!E.c)break;h?E.c.length>h&&(E.c.length=h):g&&(E=E.mod(m))}if(_){if(_=Ve(_/2),_===0)break;P=_%2}else if(l=l.times(f),J(l,l.e+1,1),l.e>14)P=Er(l);else{if(_=+X(l),_===0)break;P=_%2}M=M.times(M),h?M.c&&M.c.length>h&&(M.c.length=h):g&&(M=M.mod(m))}return g?E:(A&&(E=s.div(E)),m?E.mod(m):h?J(E,B,a,C):E)},i.integerValue=function(l){var m=new c(this);return l==null?l=a:Re(l,0,8),J(m,m.e+1,l)},i.isEqualTo=i.eq=function(l,m){return Rt(this,new c(l,m))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(l,m){return Rt(this,new c(l,m))>0},i.isGreaterThanOrEqualTo=i.gte=function(l,m){return(m=Rt(this,new c(l,m)))===1||m===0},i.isInteger=function(){return!!this.c&&Ke(this.e/pe)>this.c.length-2},i.isLessThan=i.lt=function(l,m){return Rt(this,new c(l,m))<0},i.isLessThanOrEqualTo=i.lte=function(l,m){return(m=Rt(this,new c(l,m)))===-1||m===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(l,m){var f,g,_,h,C=this,p=C.s;if(l=new c(l,m),m=l.s,!p||!m)return new c(NaN);if(p!=m)return l.s=-m,C.plus(l);var A=C.e/pe,P=l.e/pe,E=C.c,M=l.c;if(!A||!P){if(!E||!M)return E?(l.s=-m,l):new c(M?C:NaN);if(!E[0]||!M[0])return M[0]?(l.s=-m,l):new c(E[0]?C:a==3?-0:0)}if(A=Ke(A),P=Ke(P),E=E.slice(),p=A-P){for((h=p<0)?(p=-p,_=E):(P=A,_=M),_.reverse(),m=p;m--;_.push(0));_.reverse()}else for(g=(h=(p=E.length)<(m=M.length))?p:m,p=m=0;m<g;m++)if(E[m]!=M[m]){h=E[m]<M[m];break}if(h&&(_=E,E=M,M=_,l.s=-l.s),m=(g=M.length)-(f=E.length),m>0)for(;m--;E[f++]=0);for(m=et-1;g>p;){if(E[--g]<M[g]){for(f=g;f&&!E[--f];E[f]=m);--E[f],E[g]+=et}E[g]-=M[g]}for(;E[0]==0;E.splice(0,1),--P);return E[0]?$(l,E,P):(l.s=a==3?-1:1,l.c=[l.e=0],l)},i.modulo=i.mod=function(l,m){var f,g,_=this;return l=new c(l,m),!_.c||!l.s||l.c&&!l.c[0]?new c(NaN):!l.c||_.c&&!_.c[0]?new c(_):(U==9?(g=l.s,l.s=1,f=e(_,l,0,3),l.s=g,f.s*=g):f=e(_,l,0,U),l=_.minus(f.times(l)),!l.c[0]&&U==1&&(l.s=_.s),l)},i.multipliedBy=i.times=function(l,m){var f,g,_,h,C,p,A,P,E,M,S,j,K,W,ee,Q=this,le=Q.c,ue=(l=new c(l,m)).c;if(!le||!ue||!le[0]||!ue[0])return!Q.s||!l.s||le&&!le[0]&&!ue||ue&&!ue[0]&&!le?l.c=l.e=l.s=null:(l.s*=Q.s,!le||!ue?l.c=l.e=null:(l.c=[0],l.e=0)),l;for(g=Ke(Q.e/pe)+Ke(l.e/pe),l.s*=Q.s,A=le.length,M=ue.length,A<M&&(K=le,le=ue,ue=K,_=A,A=M,M=_),_=A+M,K=[];_--;K.push(0));for(W=et,ee=wt,_=M;--_>=0;){for(f=0,S=ue[_]%ee,j=ue[_]/ee|0,C=A,h=_+C;h>_;)P=le[--C]%ee,E=le[C]/ee|0,p=j*P+E*S,P=S*P+p%ee*ee+K[h]+f,f=(P/W|0)+(p/ee|0)+j*E,K[h--]=P%W;K[h]=f}return f?++g:K.splice(0,1),$(l,K,g)},i.negated=function(){var l=new c(this);return l.s=-l.s||null,l},i.plus=function(l,m){var f,g=this,_=g.s;if(l=new c(l,m),m=l.s,!_||!m)return new c(NaN);if(_!=m)return l.s=-m,g.minus(l);var h=g.e/pe,C=l.e/pe,p=g.c,A=l.c;if(!h||!C){if(!p||!A)return new c(_/0);if(!p[0]||!A[0])return A[0]?l:new c(p[0]?g:_*0)}if(h=Ke(h),C=Ke(C),p=p.slice(),_=h-C){for(_>0?(C=h,f=A):(_=-_,f=p),f.reverse();_--;f.push(0));f.reverse()}for(_=p.length,m=A.length,_-m<0&&(f=A,A=p,p=f,m=_),_=0;m;)_=(p[--m]=p[m]+A[m]+_)/et|0,p[m]=et===p[m]?0:p[m]%et;return _&&(p=[_].concat(p),++C),$(l,p,C)},i.precision=i.sd=function(l,m){var f,g,_,h=this;if(l!=null&&l!==!!l)return Re(l,1,Ce),m==null?m=a:Re(m,0,8),J(new c(h),l,m);if(!(f=h.c))return null;if(_=f.length-1,g=_*pe+1,_=f[_]){for(;_%10==0;_/=10,g--);for(_=f[0];_>=10;_/=10,g++);}return l&&h.e+1>g&&(g=h.e+1),g},i.shiftedBy=function(l){return Re(l,-an,an),this.times("1e"+l)},i.squareRoot=i.sqrt=function(){var l,m,f,g,_,h=this,C=h.c,p=h.s,A=h.e,P=o+4,E=new c("0.5");if(p!==1||!C||!C[0])return new c(!p||p<0&&(!C||C[0])?NaN:C?h:1/0);if(p=Math.sqrt(+X(h)),p==0||p==1/0?(m=ze(C),(m.length+A)%2==0&&(m+="0"),p=Math.sqrt(+m),A=Ke((A+1)/2)-(A<0||A%2),p==1/0?m="5e"+A:(m=p.toExponential(),m=m.slice(0,m.indexOf("e")+1)+A),f=new c(m)):f=new c(p+""),f.c[0]){for(A=f.e,p=A+P,p<3&&(p=0);;)if(_=f,f=E.times(_.plus(e(h,_,P,1))),ze(_.c).slice(0,p)===(m=ze(f.c)).slice(0,p))if(f.e<A&&--p,m=m.slice(p-3,p+1),m=="9999"||!g&&m=="4999"){if(!g&&(J(_,_.e+o+2,0),_.times(_).eq(h))){f=_;break}P+=4,p+=4,g=1}else{(!+m||!+m.slice(1)&&m.charAt(0)=="5")&&(J(f,f.e+o+2,1),l=!f.times(f).eq(h));break}}return J(f,f.e+o+1,a,l)},i.toExponential=function(l,m){return l!=null&&(Re(l,0,Ce),l++),v(this,l,m,1)},i.toFixed=function(l,m){return l!=null&&(Re(l,0,Ce),l=l+this.e+1),v(this,l,m)},i.toFormat=function(l,m,f){var g,_=this;if(f==null)l!=null&&m&&typeof m=="object"?(f=m,m=null):l&&typeof l=="object"?(f=l,l=m=null):f=y;else if(typeof f!="object")throw Error(We+"Argument not an object: "+f);if(g=_.toFixed(l,m),_.c){var h,C=g.split("."),p=+f.groupSize,A=+f.secondaryGroupSize,P=f.groupSeparator||"",E=C[0],M=C[1],S=_.s<0,j=S?E.slice(1):E,K=j.length;if(A&&(h=p,p=A,A=h,K-=h),p>0&&K>0){for(h=K%p||p,E=j.substr(0,h);h<K;h+=p)E+=P+j.substr(h,p);A>0&&(E+=P+j.slice(h)),S&&(E="-"+E)}g=M?E+(f.decimalSeparator||"")+((A=+f.fractionGroupSize)?M.replace(new RegExp("\\d{"+A+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):M):E}return(f.prefix||"")+g+(f.suffix||"")},i.toFraction=function(l){var m,f,g,_,h,C,p,A,P,E,M,S,j=this,K=j.c;if(l!=null&&(p=new c(l),!p.isInteger()&&(p.c||p.s!==1)||p.lt(s)))throw Error(We+"Argument "+(p.isInteger()?"out of range: ":"not an integer: ")+X(p));if(!K)return new c(j);for(m=new c(s),P=f=new c(s),g=A=new c(s),S=ze(K),h=m.e=S.length-j.e-1,m.c[0]=ln[(C=h%pe)<0?pe+C:C],l=!l||p.comparedTo(m)>0?h>0?m:P:p,C=O,O=1/0,p=new c(S),A.c[0]=0;E=e(p,m,0,1),_=f.plus(E.times(g)),_.comparedTo(l)!=1;)f=g,g=_,P=A.plus(E.times(_=P)),A=_,m=p.minus(E.times(_=m)),p=_;return _=e(l.minus(f),g,0,1),A=A.plus(_.times(P)),f=f.plus(_.times(g)),A.s=P.s=j.s,h=h*2,M=e(P,g,h,a).minus(j).abs().comparedTo(e(A,f,h,a).minus(j).abs())<1?[P,g]:[A,f],O=C,M},i.toNumber=function(){return+X(this)},i.toPrecision=function(l,m){return l!=null&&Re(l,1,Ce),v(this,l,m,2)},i.toString=function(l){var m,f=this,g=f.s,_=f.e;return _===null?g?(m="Infinity",g<0&&(m="-"+m)):m="NaN":(l==null?m=_<=d||_>=w?Sr(ze(f.c),_):lt(ze(f.c),_,"0"):l===10&&u?(f=J(new c(f),o+_+1,a),m=lt(ze(f.c),f.e,"0")):(Re(l,2,b.length,"Base"),m=t(lt(ze(f.c),_,"0"),10,l,g,!0)),g<0&&f.c[0]&&(m="-"+m)),m},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&&c.set(r),c}function Ke(r){var e=r|0;return r>0||r===e?e:e-1}function ze(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 Rt(r,e){var t,n,i=r.c,s=e.c,o=r.s,a=e.s,d=r.e,w=e.e;if(!o||!a)return null;if(t=i&&!i[0],n=s&&!s[0],t||n)return t?n?0:-a:o;if(o!=a)return o;if(t=o<0,n=d==w,!i||!s)return n?0:!i^t?1:-1;if(!n)return d>w^t?1:-1;for(a=(d=i.length)<(w=s.length)?d:w,o=0;o<a;o++)if(i[o]!=s[o])return i[o]>s[o]^t?1:-1;return d==w?0:d>w^t?1:-1}function Re(r,e,t,n){if(r<e||r>t||r!==Ve(r))throw Error(We+(n||"Argument")+(typeof r=="number"?r<e||r>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(r))}function Er(r){var e=r.c.length-1;return Ke(r.e/pe)==e&&r.c[e]%2!=0}function Sr(r,e){return(r.length>1?r.charAt(0)+"."+r.slice(1):r)+(e<0?"e":"e+")+e}function lt(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}Go();var un={},It={},fn,Ii;function Vo(){if(Ii)return fn;Ii=1,fn=s,s.default=s,s.stable=w,s.stableStringify=w;var r="[...]",e="[Circular]",t=[],n=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(I,U,B,y){typeof y>"u"&&(y=i()),a(I,"",0,[],void 0,0,y);var b;try{n.length===0?b=JSON.stringify(I,U,B):b=JSON.stringify(I,O(U),B)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;t.length!==0;){var u=t.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return b}function o(I,U,B,y){var b=Object.getOwnPropertyDescriptor(y,B);b.get!==void 0?b.configurable?(Object.defineProperty(y,B,{value:I}),t.push([y,B,U,b])):n.push([U,B,I]):(y[B]=I,t.push([y,B,U]))}function a(I,U,B,y,b,u,c){u+=1;var v;if(typeof I=="object"&&I!==null){for(v=0;v<y.length;v++)if(y[v]===I){o(e,I,U,b);return}if(typeof c.depthLimit<"u"&&u>c.depthLimit){o(r,I,U,b);return}if(typeof c.edgesLimit<"u"&&B+1>c.edgesLimit){o(r,I,U,b);return}if(y.push(I),Array.isArray(I))for(v=0;v<I.length;v++)a(I[v],v,v,y,I,u,c);else{var G=Object.keys(I);for(v=0;v<G.length;v++){var $=G[v];a(I[$],$,v,y,I,u,c)}}y.pop()}}function d(I,U){return I<U?-1:I>U?1:0}function w(I,U,B,y){typeof y>"u"&&(y=i());var b=N(I,"",0,[],void 0,0,y)||I,u;try{n.length===0?u=JSON.stringify(b,U,B):u=JSON.stringify(b,O(U),B)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;t.length!==0;){var c=t.pop();c.length===4?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return u}function N(I,U,B,y,b,u,c){u+=1;var v;if(typeof I=="object"&&I!==null){for(v=0;v<y.length;v++)if(y[v]===I){o(e,I,U,b);return}try{if(typeof I.toJSON=="function")return}catch{return}if(typeof c.depthLimit<"u"&&u>c.depthLimit){o(r,I,U,b);return}if(typeof c.edgesLimit<"u"&&B+1>c.edgesLimit){o(r,I,U,b);return}if(y.push(I),Array.isArray(I))for(v=0;v<I.length;v++)N(I[v],v,v,y,I,u,c);else{var G={},$=Object.keys(I).sort(d);for(v=0;v<$.length;v++){var J=$[v];N(I[J],J,v,y,I,u,c),G[J]=I[J]}if(typeof b<"u")t.push([b,U,I]),b[U]=G;else return G}y.pop()}}function O(I){return I=typeof I<"u"?I:function(U,B){return B},function(U,B){if(n.length>0)for(var y=0;y<n.length;y++){var b=n[y];if(b[1]===U&&b[0]===B){B=b[2],n.splice(y,1);break}}return I.call(this,U,B)}}return fn}var Ti;function ri(){if(Ti)return It;Ti=1,Object.defineProperty(It,"__esModule",{value:!0}),It.EthereumProviderError=It.EthereumRpcError=void 0;const r=Vo();class e extends Error{constructor(o,a,d){if(!Number.isInteger(o))throw new Error('"code" must be an integer.');if(!a||typeof a!="string")throw new Error('"message" must be a nonempty string.');super(a),this.code=o,d!==void 0&&(this.data=d)}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)}}It.EthereumRpcError=e;class t extends e{constructor(o,a,d){if(!n(o))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(o,a,d)}}It.EthereumProviderError=t;function n(s){return Number.isInteger(s)&&s>=1e3&&s<=4999}function i(s,o){if(o!=="[Circular]")return o}return It}var cn={},Tt={},xi;function ni(){return xi||(xi=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.errorValues=Tt.errorCodes=void 0,Tt.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}},Tt.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."}}),Tt}var Oi;function Ko(){return Oi||(Oi=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=ni(),t=ri(),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(I,U=i){if(Number.isInteger(I)){const B=I.toString();if(O(e.errorValues,B))return e.errorValues[B].message;if(w(I))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return U}r.getMessageFromCode=o;function a(I){if(!Number.isInteger(I))return!1;const U=I.toString();return!!(e.errorValues[U]||w(I))}r.isValidCode=a;function d(I,{fallbackError:U=s,shouldIncludeStack:B=!1}={}){var y,b;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(I instanceof t.EthereumRpcError)return I.serialize();const u={};if(I&&typeof I=="object"&&!Array.isArray(I)&&O(I,"code")&&a(I.code)){const v=I;u.code=v.code,v.message&&typeof v.message=="string"?(u.message=v.message,O(v,"data")&&(u.data=v.data)):(u.message=o(u.code),u.data={originalError:N(I)})}else{u.code=U.code;const v=(y=I)===null||y===void 0?void 0:y.message;u.message=v&&typeof v=="string"?v:U.message,u.data={originalError:N(I)}}const c=(b=I)===null||b===void 0?void 0:b.stack;return B&&I&&c&&typeof c=="string"&&(u.stack=c),u}r.serializeError=d;function w(I){return I>=-32099&&I<=-32e3}function N(I){return I&&typeof I=="object"&&!Array.isArray(I)?Object.assign({},I):I}function O(I,U){return Object.prototype.hasOwnProperty.call(I,U)}})(cn)),cn}var Kt={},Ni;function oa(){if(Ni)return Kt;Ni=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.ethErrors=void 0;const r=ri(),e=Ko(),t=ni();Kt.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:a}=o;if(!Number.isInteger(a)||a>-32005||a<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return n(a,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:a,message:d,data:w}=o;if(!d||typeof d!="string")throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(a,d,w)}}};function n(o,a){const[d,w]=s(a);return new r.EthereumRpcError(o,d||e.getMessageFromCode(o),w)}function i(o,a){const[d,w]=s(a);return new r.EthereumProviderError(o,d||e.getMessageFromCode(o),w)}function s(o){if(o){if(typeof o=="string")return[o];if(typeof o=="object"&&!Array.isArray(o)){const{message:a,data:d}=o;if(a&&typeof a!="string")throw new Error("Must specify string message.");return[a||void 0,d]}}return[]}return Kt}var Ci;function sa(){return Ci||(Ci=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=ri();Object.defineProperty(r,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const t=Ko();Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return t.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return t.getMessageFromCode}});const n=oa();Object.defineProperty(r,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=ni();Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(un)),un}function Qt(r){"@babel/helpers - typeof";return Qt=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},Qt(r)}function aa(r,e){if(Qt(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function la(r){var e=aa(r,"string");return Qt(e)=="symbol"?e:e+""}function ge(r,e,t){return(e=la(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Pi(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 Je(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Pi(Object(t),!0).forEach(function(n){ge(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Pi(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}var dn={exports:{}},hn={exports:{}},gn,Li;function Ie(){if(Li)return gn;Li=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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qe=require("./platform-DH1Olrgt.js"),xe=require("./unsignedTransaction-DPs4ICFO.js"),rr=require("./index-BHwMXTV2.js"),na=require("./index.es-B1Hb17ux.js");require("./index-BxM99sFL.js");var ia=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,sn=Math.ceil,Ve=Math.floor,We="[BigNumber Error] ",Ri=We+"Number primitive has more than 15 significant digits: ",et=1e14,pe=14,an=9007199254740991,ln=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],wt=1e7,Ce=1e9;function Go(r){var e,t,n,i=c.prototype={constructor:c,toString:null,valueOf:null},s=new c(1),o=20,a=4,d=-7,w=21,N=-1e7,O=1e7,I=!1,U=1,B=0,y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},b="0123456789abcdefghijklmnopqrstuvwxyz",u=!0;function c(l,m){var f,g,_,h,C,p,A,P,E=this;if(!(E instanceof c))return new c(l,m);if(m==null){if(l&&l._isBigNumber===!0){E.s=l.s,!l.c||l.e>O?E.c=E.e=null:l.e<N?E.c=[E.e=0]:(E.e=l.e,E.c=l.c.slice());return}if((p=typeof l=="number")&&l*0==0){if(E.s=1/l<0?(l=-l,-1):1,l===~~l){for(h=0,C=l;C>=10;C/=10,h++);h>O?E.c=E.e=null:(E.e=h,E.c=[l]);return}P=String(l)}else{if(!ia.test(P=String(l)))return n(E,P,p);E.s=P.charCodeAt(0)==45?(P=P.slice(1),-1):1}(h=P.indexOf("."))>-1&&(P=P.replace(".","")),(C=P.search(/e/i))>0?(h<0&&(h=C),h+=+P.slice(C+1),P=P.substring(0,C)):h<0&&(h=P.length)}else{if(Re(m,2,b.length,"Base"),m==10&&u)return E=new c(l),J(E,o+E.e+1,a);if(P=String(l),p=typeof l=="number"){if(l*0!=0)return n(E,P,p,m);if(E.s=1/l<0?(P=P.slice(1),-1):1,c.DEBUG&&P.replace(/^0\.0*|\./,"").length>15)throw Error(Ri+l)}else E.s=P.charCodeAt(0)===45?(P=P.slice(1),-1):1;for(f=b.slice(0,m),h=C=0,A=P.length;C<A;C++)if(f.indexOf(g=P.charAt(C))<0){if(g=="."){if(C>h){h=A;continue}}else if(!_&&(P==P.toUpperCase()&&(P=P.toLowerCase())||P==P.toLowerCase()&&(P=P.toUpperCase()))){_=!0,C=-1,h=0;continue}return n(E,String(l),p,m)}p=!1,P=t(P,m,10,E.s),(h=P.indexOf("."))>-1?P=P.replace(".",""):h=P.length}for(C=0;P.charCodeAt(C)===48;C++);for(A=P.length;P.charCodeAt(--A)===48;);if(P=P.slice(C,++A)){if(A-=C,p&&c.DEBUG&&A>15&&(l>an||l!==Ve(l)))throw Error(Ri+E.s*l);if((h=h-C-1)>O)E.c=E.e=null;else if(h<N)E.c=[E.e=0];else{if(E.e=h,E.c=[],C=(h+1)%pe,h<0&&(C+=pe),C<A){for(C&&E.c.push(+P.slice(0,C)),A-=pe;C<A;)E.c.push(+P.slice(C,C+=pe));C=pe-(P=P.slice(C)).length}else C-=A;for(;C--;P+="0");E.c.push(+P)}}else E.c=[E.e=0]}c.clone=Go,c.ROUND_UP=0,c.ROUND_DOWN=1,c.ROUND_CEIL=2,c.ROUND_FLOOR=3,c.ROUND_HALF_UP=4,c.ROUND_HALF_DOWN=5,c.ROUND_HALF_EVEN=6,c.ROUND_HALF_CEIL=7,c.ROUND_HALF_FLOOR=8,c.EUCLID=9,c.config=c.set=function(l){var m,f;if(l!=null)if(typeof l=="object"){if(l.hasOwnProperty(m="DECIMAL_PLACES")&&(f=l[m],Re(f,0,Ce,m),o=f),l.hasOwnProperty(m="ROUNDING_MODE")&&(f=l[m],Re(f,0,8,m),a=f),l.hasOwnProperty(m="EXPONENTIAL_AT")&&(f=l[m],f&&f.pop?(Re(f[0],-Ce,0,m),Re(f[1],0,Ce,m),d=f[0],w=f[1]):(Re(f,-Ce,Ce,m),d=-(w=f<0?-f:f))),l.hasOwnProperty(m="RANGE"))if(f=l[m],f&&f.pop)Re(f[0],-Ce,-1,m),Re(f[1],1,Ce,m),N=f[0],O=f[1];else if(Re(f,-Ce,Ce,m),f)N=-(O=f<0?-f:f);else throw Error(We+m+" cannot be zero: "+f);if(l.hasOwnProperty(m="CRYPTO"))if(f=l[m],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))I=f;else throw I=!f,Error(We+"crypto unavailable");else I=f;else throw Error(We+m+" not true or false: "+f);if(l.hasOwnProperty(m="MODULO_MODE")&&(f=l[m],Re(f,0,9,m),U=f),l.hasOwnProperty(m="POW_PRECISION")&&(f=l[m],Re(f,0,Ce,m),B=f),l.hasOwnProperty(m="FORMAT"))if(f=l[m],typeof f=="object")y=f;else throw Error(We+m+" not an object: "+f);if(l.hasOwnProperty(m="ALPHABET"))if(f=l[m],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))u=f.slice(0,10)=="0123456789",b=f;else throw Error(We+m+" invalid: "+f)}else throw Error(We+"Object expected: "+l);return{DECIMAL_PLACES:o,ROUNDING_MODE:a,EXPONENTIAL_AT:[d,w],RANGE:[N,O],CRYPTO:I,MODULO_MODE:U,POW_PRECISION:B,FORMAT:y,ALPHABET:b}},c.isBigNumber=function(l){if(!l||l._isBigNumber!==!0)return!1;if(!c.DEBUG)return!0;var m,f,g=l.c,_=l.e,h=l.s;e:if({}.toString.call(g)=="[object Array]"){if((h===1||h===-1)&&_>=-Ce&&_<=Ce&&_===Ve(_)){if(g[0]===0){if(_===0&&g.length===1)return!0;break e}if(m=(_+1)%pe,m<1&&(m+=pe),String(g[0]).length==m){for(m=0;m<g.length;m++)if(f=g[m],f<0||f>=et||f!==Ve(f))break e;if(f!==0)return!0}}}else if(g===null&&_===null&&(h===null||h===1||h===-1))return!0;throw Error(We+"Invalid BigNumber: "+l)},c.maximum=c.max=function(){return G(arguments,-1)},c.minimum=c.min=function(){return G(arguments,1)},c.random=(function(){var l=9007199254740992,m=Math.random()*l&2097151?function(){return Ve(Math.random()*l)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var g,_,h,C,p,A=0,P=[],E=new c(s);if(f==null?f=o:Re(f,0,Ce),C=sn(f/pe),I)if(crypto.getRandomValues){for(g=crypto.getRandomValues(new Uint32Array(C*=2));A<C;)p=g[A]*131072+(g[A+1]>>>11),p>=9e15?(_=crypto.getRandomValues(new Uint32Array(2)),g[A]=_[0],g[A+1]=_[1]):(P.push(p%1e14),A+=2);A=C/2}else if(crypto.randomBytes){for(g=crypto.randomBytes(C*=7);A<C;)p=(g[A]&31)*281474976710656+g[A+1]*1099511627776+g[A+2]*4294967296+g[A+3]*16777216+(g[A+4]<<16)+(g[A+5]<<8)+g[A+6],p>=9e15?crypto.randomBytes(7).copy(g,A):(P.push(p%1e14),A+=7);A=C/7}else throw I=!1,Error(We+"crypto unavailable");if(!I)for(;A<C;)p=m(),p<9e15&&(P[A++]=p%1e14);for(C=P[--A],f%=pe,C&&f&&(p=ln[pe-f],P[A]=Ve(C/p)*p);P[A]===0;P.pop(),A--);if(A<0)P=[h=0];else{for(h=-1;P[0]===0;P.splice(0,1),h-=pe);for(A=1,p=P[0];p>=10;p/=10,A++);A<pe&&(h-=pe-A)}return E.e=h,E.c=P,E}})(),c.sum=function(){for(var l=1,m=arguments,f=new c(m[0]);l<m.length;)f=f.plus(m[l++]);return f},t=(function(){var l="0123456789";function m(f,g,_,h){for(var C,p=[0],A,P=0,E=f.length;P<E;){for(A=p.length;A--;p[A]*=g);for(p[0]+=h.indexOf(f.charAt(P++)),C=0;C<p.length;C++)p[C]>_-1&&(p[C+1]==null&&(p[C+1]=0),p[C+1]+=p[C]/_|0,p[C]%=_)}return p.reverse()}return function(f,g,_,h,C){var p,A,P,E,M,S,j,K,W=f.indexOf("."),ee=o,Q=a;for(W>=0&&(E=B,B=0,f=f.replace(".",""),K=new c(g),S=K.pow(f.length-W),B=E,K.c=m(lt(ze(S.c),S.e,"0"),10,_,l),K.e=K.c.length),j=m(f,g,_,C?(p=b,l):(p=l,b)),P=E=j.length;j[--E]==0;j.pop());if(!j[0])return p.charAt(0);if(W<0?--P:(S.c=j,S.e=P,S.s=h,S=e(S,K,ee,Q,_),j=S.c,M=S.r,P=S.e),A=P+ee+1,W=j[A],E=_/2,M=M||A<0||j[A+1]!=null,M=Q<4?(W!=null||M)&&(Q==0||Q==(S.s<0?3:2)):W>E||W==E&&(Q==4||M||Q==6&&j[A-1]&1||Q==(S.s<0?8:7)),A<1||!j[0])f=M?lt(p.charAt(1),-ee,p.charAt(0)):p.charAt(0);else{if(j.length=A,M)for(--_;++j[--A]>_;)j[A]=0,A||(++P,j=[1].concat(j));for(E=j.length;!j[--E];);for(W=0,f="";W<=E;f+=p.charAt(j[W++]));f=lt(f,P,p.charAt(0))}return f}})(),e=(function(){function l(g,_,h){var C,p,A,P,E=0,M=g.length,S=_%wt,j=_/wt|0;for(g=g.slice();M--;)A=g[M]%wt,P=g[M]/wt|0,C=j*A+P*S,p=S*A+C%wt*wt+E,E=(p/h|0)+(C/wt|0)+j*P,g[M]=p%h;return E&&(g=[E].concat(g)),g}function m(g,_,h,C){var p,A;if(h!=C)A=h>C?1:-1;else for(p=A=0;p<h;p++)if(g[p]!=_[p]){A=g[p]>_[p]?1:-1;break}return A}function f(g,_,h,C){for(var p=0;h--;)g[h]-=p,p=g[h]<_[h]?1:0,g[h]=p*C+g[h]-_[h];for(;!g[0]&&g.length>1;g.splice(0,1));}return function(g,_,h,C,p){var A,P,E,M,S,j,K,W,ee,Q,le,ue,z,V,oe,ce,fe,L=g.s==_.s?1:-1,D=g.c,F=_.c;if(!D||!D[0]||!F||!F[0])return new c(!g.s||!_.s||(D?F&&D[0]==F[0]:!F)?NaN:D&&D[0]==0||!F?L*0:L/0);for(W=new c(L),ee=W.c=[],P=g.e-_.e,L=h+P+1,p||(p=et,P=Ke(g.e/pe)-Ke(_.e/pe),L=L/pe|0),E=0;F[E]==(D[E]||0);E++);if(F[E]>(D[E]||0)&&P--,L<0)ee.push(1),M=!0;else{for(V=D.length,ce=F.length,E=0,L+=2,S=Ve(p/(F[0]+1)),S>1&&(F=l(F,S,p),D=l(D,S,p),ce=F.length,V=D.length),z=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]>=p/2&&oe++;do{if(S=0,A=m(F,Q,ce,le),A<0){if(ue=Q[0],ce!=le&&(ue=ue*p+(Q[1]||0)),S=Ve(ue/oe),S>1)for(S>=p&&(S=p-1),j=l(F,S,p),K=j.length,le=Q.length;m(j,Q,K,le)==1;)S--,f(j,ce<K?fe:F,K,p),K=j.length,A=1;else S==0&&(A=S=1),j=F.slice(),K=j.length;if(K<le&&(j=[0].concat(j)),f(Q,j,le,p),le=Q.length,A==-1)for(;m(F,Q,ce,le)<1;)S++,f(Q,ce<le?fe:F,le,p),le=Q.length}else A===0&&(S++,Q=[0]);ee[E++]=S,Q[0]?Q[le++]=D[z]||0:(Q=[D[z]],le=1)}while((z++<V||Q[0]!=null)&&L--);M=Q[0]!=null,ee[0]||ee.splice(0,1)}if(p==et){for(E=1,L=ee[0];L>=10;L/=10,E++);J(W,h+(W.e=E+P*pe-1)+1,C,M)}else W.e=P,W.r=+M;return W}})();function v(l,m,f,g){var _,h,C,p,A;if(f==null?f=a:Re(f,0,8),!l.c)return l.toString();if(_=l.c[0],C=l.e,m==null)A=ze(l.c),A=g==1||g==2&&(C<=d||C>=w)?Sr(A,C):lt(A,C,"0");else if(l=J(new c(l),m,f),h=l.e,A=ze(l.c),p=A.length,g==1||g==2&&(m<=h||h<=d)){for(;p<m;A+="0",p++);A=Sr(A,h)}else if(m-=C+(g===2&&h>C),A=lt(A,h,"0"),h+1>p){if(--m>0)for(A+=".";m--;A+="0");}else if(m+=h-p,m>0)for(h+1==p&&(A+=".");m--;A+="0");return l.s<0&&_?"-"+A:A}function G(l,m){for(var f,g,_=1,h=new c(l[0]);_<l.length;_++)g=new c(l[_]),(!g.s||(f=Rt(h,g))===m||f===0&&h.s===m)&&(h=g);return h}function $(l,m,f){for(var g=1,_=m.length;!m[--_];m.pop());for(_=m[0];_>=10;_/=10,g++);return(f=g+f*pe-1)>O?l.c=l.e=null:f<N?l.c=[l.e=0]:(l.e=f,l.c=m),l}n=(function(){var l=/^(-?)0([xbo])(?=\w[\w.]*$)/i,m=/^([^.]+)\.$/,f=/^\.([^.]+)$/,g=/^-?(Infinity|NaN)$/,_=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(h,C,p,A){var P,E=p?C:C.replace(_,"");if(g.test(E))h.s=isNaN(E)?null:E<0?-1:1;else{if(!p&&(E=E.replace(l,function(M,S,j){return P=(j=j.toLowerCase())=="x"?16:j=="b"?2:8,!A||A==P?S:M}),A&&(P=A,E=E.replace(m,"$1").replace(f,"0.$1")),C!=E))return new c(E,P);if(c.DEBUG)throw Error(We+"Not a"+(A?" base "+A:"")+" number: "+C);h.s=null}h.c=h.e=null}})();function J(l,m,f,g){var _,h,C,p,A,P,E,M=l.c,S=ln;if(M){e:{for(_=1,p=M[0];p>=10;p/=10,_++);if(h=m-_,h<0)h+=pe,C=m,A=M[P=0],E=Ve(A/S[_-C-1]%10);else if(P=sn((h+1)/pe),P>=M.length)if(g){for(;M.length<=P;M.push(0));A=E=0,_=1,h%=pe,C=h-pe+1}else break e;else{for(A=p=M[P],_=1;p>=10;p/=10,_++);h%=pe,C=h-pe+_,E=C<0?0:Ve(A/S[_-C-1]%10)}if(g=g||m<0||M[P+1]!=null||(C<0?A:A%S[_-C-1]),g=f<4?(E||g)&&(f==0||f==(l.s<0?3:2)):E>5||E==5&&(f==4||g||f==6&&(h>0?C>0?A/S[_-C]:0:M[P-1])%10&1||f==(l.s<0?8:7)),m<1||!M[0])return M.length=0,g?(m-=l.e+1,M[0]=S[(pe-m%pe)%pe],l.e=-m||0):M[0]=l.e=0,l;if(h==0?(M.length=P,p=1,P--):(M.length=P+1,p=S[pe-h],M[P]=C>0?Ve(A/S[_-C]%S[C])*p:0),g)for(;;)if(P==0){for(h=1,C=M[0];C>=10;C/=10,h++);for(C=M[0]+=p,p=1;C>=10;C/=10,p++);h!=p&&(l.e++,M[0]==et&&(M[0]=1));break}else{if(M[P]+=p,M[P]!=et)break;M[P--]=0,p=1}for(h=M.length;M[--h]===0;M.pop());}l.e>O?l.c=l.e=null:l.e<N&&(l.c=[l.e=0])}return l}function X(l){var m,f=l.e;return f===null?l.toString():(m=ze(l.c),m=f<=d||f>=w?Sr(m,f):lt(m,f,"0"),l.s<0?"-"+m:m)}return i.absoluteValue=i.abs=function(){var l=new c(this);return l.s<0&&(l.s=1),l},i.comparedTo=function(l,m){return Rt(this,new c(l,m))},i.decimalPlaces=i.dp=function(l,m){var f,g,_,h=this;if(l!=null)return Re(l,0,Ce),m==null?m=a:Re(m,0,8),J(new c(h),l+h.e+1,m);if(!(f=h.c))return null;if(g=((_=f.length-1)-Ke(this.e/pe))*pe,_=f[_])for(;_%10==0;_/=10,g--);return g<0&&(g=0),g},i.dividedBy=i.div=function(l,m){return e(this,new c(l,m),o,a)},i.dividedToIntegerBy=i.idiv=function(l,m){return e(this,new c(l,m),0,1)},i.exponentiatedBy=i.pow=function(l,m){var f,g,_,h,C,p,A,P,E,M=this;if(l=new c(l),l.c&&!l.isInteger())throw Error(We+"Exponent not an integer: "+X(l));if(m!=null&&(m=new c(m)),p=l.e>14,!M.c||!M.c[0]||M.c[0]==1&&!M.e&&M.c.length==1||!l.c||!l.c[0])return E=new c(Math.pow(+X(M),p?l.s*(2-Er(l)):+X(l))),m?E.mod(m):E;if(A=l.s<0,m){if(m.c?!m.c[0]:!m.s)return new c(NaN);g=!A&&M.isInteger()&&m.isInteger(),g&&(M=M.mod(m))}else{if(l.e>9&&(M.e>0||M.e<-1||(M.e==0?M.c[0]>1||p&&M.c[1]>=24e7:M.c[0]<8e13||p&&M.c[0]<=9999975e7)))return h=M.s<0&&Er(l)?-0:0,M.e>-1&&(h=1/h),new c(A?1/h:h);B&&(h=sn(B/pe+2))}for(p?(f=new c(.5),A&&(l.s=1),P=Er(l)):(_=Math.abs(+X(l)),P=_%2),E=new c(s);;){if(P){if(E=E.times(M),!E.c)break;h?E.c.length>h&&(E.c.length=h):g&&(E=E.mod(m))}if(_){if(_=Ve(_/2),_===0)break;P=_%2}else if(l=l.times(f),J(l,l.e+1,1),l.e>14)P=Er(l);else{if(_=+X(l),_===0)break;P=_%2}M=M.times(M),h?M.c&&M.c.length>h&&(M.c.length=h):g&&(M=M.mod(m))}return g?E:(A&&(E=s.div(E)),m?E.mod(m):h?J(E,B,a,C):E)},i.integerValue=function(l){var m=new c(this);return l==null?l=a:Re(l,0,8),J(m,m.e+1,l)},i.isEqualTo=i.eq=function(l,m){return Rt(this,new c(l,m))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(l,m){return Rt(this,new c(l,m))>0},i.isGreaterThanOrEqualTo=i.gte=function(l,m){return(m=Rt(this,new c(l,m)))===1||m===0},i.isInteger=function(){return!!this.c&&Ke(this.e/pe)>this.c.length-2},i.isLessThan=i.lt=function(l,m){return Rt(this,new c(l,m))<0},i.isLessThanOrEqualTo=i.lte=function(l,m){return(m=Rt(this,new c(l,m)))===-1||m===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(l,m){var f,g,_,h,C=this,p=C.s;if(l=new c(l,m),m=l.s,!p||!m)return new c(NaN);if(p!=m)return l.s=-m,C.plus(l);var A=C.e/pe,P=l.e/pe,E=C.c,M=l.c;if(!A||!P){if(!E||!M)return E?(l.s=-m,l):new c(M?C:NaN);if(!E[0]||!M[0])return M[0]?(l.s=-m,l):new c(E[0]?C:a==3?-0:0)}if(A=Ke(A),P=Ke(P),E=E.slice(),p=A-P){for((h=p<0)?(p=-p,_=E):(P=A,_=M),_.reverse(),m=p;m--;_.push(0));_.reverse()}else for(g=(h=(p=E.length)<(m=M.length))?p:m,p=m=0;m<g;m++)if(E[m]!=M[m]){h=E[m]<M[m];break}if(h&&(_=E,E=M,M=_,l.s=-l.s),m=(g=M.length)-(f=E.length),m>0)for(;m--;E[f++]=0);for(m=et-1;g>p;){if(E[--g]<M[g]){for(f=g;f&&!E[--f];E[f]=m);--E[f],E[g]+=et}E[g]-=M[g]}for(;E[0]==0;E.splice(0,1),--P);return E[0]?$(l,E,P):(l.s=a==3?-1:1,l.c=[l.e=0],l)},i.modulo=i.mod=function(l,m){var f,g,_=this;return l=new c(l,m),!_.c||!l.s||l.c&&!l.c[0]?new c(NaN):!l.c||_.c&&!_.c[0]?new c(_):(U==9?(g=l.s,l.s=1,f=e(_,l,0,3),l.s=g,f.s*=g):f=e(_,l,0,U),l=_.minus(f.times(l)),!l.c[0]&&U==1&&(l.s=_.s),l)},i.multipliedBy=i.times=function(l,m){var f,g,_,h,C,p,A,P,E,M,S,j,K,W,ee,Q=this,le=Q.c,ue=(l=new c(l,m)).c;if(!le||!ue||!le[0]||!ue[0])return!Q.s||!l.s||le&&!le[0]&&!ue||ue&&!ue[0]&&!le?l.c=l.e=l.s=null:(l.s*=Q.s,!le||!ue?l.c=l.e=null:(l.c=[0],l.e=0)),l;for(g=Ke(Q.e/pe)+Ke(l.e/pe),l.s*=Q.s,A=le.length,M=ue.length,A<M&&(K=le,le=ue,ue=K,_=A,A=M,M=_),_=A+M,K=[];_--;K.push(0));for(W=et,ee=wt,_=M;--_>=0;){for(f=0,S=ue[_]%ee,j=ue[_]/ee|0,C=A,h=_+C;h>_;)P=le[--C]%ee,E=le[C]/ee|0,p=j*P+E*S,P=S*P+p%ee*ee+K[h]+f,f=(P/W|0)+(p/ee|0)+j*E,K[h--]=P%W;K[h]=f}return f?++g:K.splice(0,1),$(l,K,g)},i.negated=function(){var l=new c(this);return l.s=-l.s||null,l},i.plus=function(l,m){var f,g=this,_=g.s;if(l=new c(l,m),m=l.s,!_||!m)return new c(NaN);if(_!=m)return l.s=-m,g.minus(l);var h=g.e/pe,C=l.e/pe,p=g.c,A=l.c;if(!h||!C){if(!p||!A)return new c(_/0);if(!p[0]||!A[0])return A[0]?l:new c(p[0]?g:_*0)}if(h=Ke(h),C=Ke(C),p=p.slice(),_=h-C){for(_>0?(C=h,f=A):(_=-_,f=p),f.reverse();_--;f.push(0));f.reverse()}for(_=p.length,m=A.length,_-m<0&&(f=A,A=p,p=f,m=_),_=0;m;)_=(p[--m]=p[m]+A[m]+_)/et|0,p[m]=et===p[m]?0:p[m]%et;return _&&(p=[_].concat(p),++C),$(l,p,C)},i.precision=i.sd=function(l,m){var f,g,_,h=this;if(l!=null&&l!==!!l)return Re(l,1,Ce),m==null?m=a:Re(m,0,8),J(new c(h),l,m);if(!(f=h.c))return null;if(_=f.length-1,g=_*pe+1,_=f[_]){for(;_%10==0;_/=10,g--);for(_=f[0];_>=10;_/=10,g++);}return l&&h.e+1>g&&(g=h.e+1),g},i.shiftedBy=function(l){return Re(l,-an,an),this.times("1e"+l)},i.squareRoot=i.sqrt=function(){var l,m,f,g,_,h=this,C=h.c,p=h.s,A=h.e,P=o+4,E=new c("0.5");if(p!==1||!C||!C[0])return new c(!p||p<0&&(!C||C[0])?NaN:C?h:1/0);if(p=Math.sqrt(+X(h)),p==0||p==1/0?(m=ze(C),(m.length+A)%2==0&&(m+="0"),p=Math.sqrt(+m),A=Ke((A+1)/2)-(A<0||A%2),p==1/0?m="5e"+A:(m=p.toExponential(),m=m.slice(0,m.indexOf("e")+1)+A),f=new c(m)):f=new c(p+""),f.c[0]){for(A=f.e,p=A+P,p<3&&(p=0);;)if(_=f,f=E.times(_.plus(e(h,_,P,1))),ze(_.c).slice(0,p)===(m=ze(f.c)).slice(0,p))if(f.e<A&&--p,m=m.slice(p-3,p+1),m=="9999"||!g&&m=="4999"){if(!g&&(J(_,_.e+o+2,0),_.times(_).eq(h))){f=_;break}P+=4,p+=4,g=1}else{(!+m||!+m.slice(1)&&m.charAt(0)=="5")&&(J(f,f.e+o+2,1),l=!f.times(f).eq(h));break}}return J(f,f.e+o+1,a,l)},i.toExponential=function(l,m){return l!=null&&(Re(l,0,Ce),l++),v(this,l,m,1)},i.toFixed=function(l,m){return l!=null&&(Re(l,0,Ce),l=l+this.e+1),v(this,l,m)},i.toFormat=function(l,m,f){var g,_=this;if(f==null)l!=null&&m&&typeof m=="object"?(f=m,m=null):l&&typeof l=="object"?(f=l,l=m=null):f=y;else if(typeof f!="object")throw Error(We+"Argument not an object: "+f);if(g=_.toFixed(l,m),_.c){var h,C=g.split("."),p=+f.groupSize,A=+f.secondaryGroupSize,P=f.groupSeparator||"",E=C[0],M=C[1],S=_.s<0,j=S?E.slice(1):E,K=j.length;if(A&&(h=p,p=A,A=h,K-=h),p>0&&K>0){for(h=K%p||p,E=j.substr(0,h);h<K;h+=p)E+=P+j.substr(h,p);A>0&&(E+=P+j.slice(h)),S&&(E="-"+E)}g=M?E+(f.decimalSeparator||"")+((A=+f.fractionGroupSize)?M.replace(new RegExp("\\d{"+A+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):M):E}return(f.prefix||"")+g+(f.suffix||"")},i.toFraction=function(l){var m,f,g,_,h,C,p,A,P,E,M,S,j=this,K=j.c;if(l!=null&&(p=new c(l),!p.isInteger()&&(p.c||p.s!==1)||p.lt(s)))throw Error(We+"Argument "+(p.isInteger()?"out of range: ":"not an integer: ")+X(p));if(!K)return new c(j);for(m=new c(s),P=f=new c(s),g=A=new c(s),S=ze(K),h=m.e=S.length-j.e-1,m.c[0]=ln[(C=h%pe)<0?pe+C:C],l=!l||p.comparedTo(m)>0?h>0?m:P:p,C=O,O=1/0,p=new c(S),A.c[0]=0;E=e(p,m,0,1),_=f.plus(E.times(g)),_.comparedTo(l)!=1;)f=g,g=_,P=A.plus(E.times(_=P)),A=_,m=p.minus(E.times(_=m)),p=_;return _=e(l.minus(f),g,0,1),A=A.plus(_.times(P)),f=f.plus(_.times(g)),A.s=P.s=j.s,h=h*2,M=e(P,g,h,a).minus(j).abs().comparedTo(e(A,f,h,a).minus(j).abs())<1?[P,g]:[A,f],O=C,M},i.toNumber=function(){return+X(this)},i.toPrecision=function(l,m){return l!=null&&Re(l,1,Ce),v(this,l,m,2)},i.toString=function(l){var m,f=this,g=f.s,_=f.e;return _===null?g?(m="Infinity",g<0&&(m="-"+m)):m="NaN":(l==null?m=_<=d||_>=w?Sr(ze(f.c),_):lt(ze(f.c),_,"0"):l===10&&u?(f=J(new c(f),o+_+1,a),m=lt(ze(f.c),f.e,"0")):(Re(l,2,b.length,"Base"),m=t(lt(ze(f.c),_,"0"),10,l,g,!0)),g<0&&f.c[0]&&(m="-"+m)),m},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&&c.set(r),c}function Ke(r){var e=r|0;return r>0||r===e?e:e-1}function ze(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 Rt(r,e){var t,n,i=r.c,s=e.c,o=r.s,a=e.s,d=r.e,w=e.e;if(!o||!a)return null;if(t=i&&!i[0],n=s&&!s[0],t||n)return t?n?0:-a:o;if(o!=a)return o;if(t=o<0,n=d==w,!i||!s)return n?0:!i^t?1:-1;if(!n)return d>w^t?1:-1;for(a=(d=i.length)<(w=s.length)?d:w,o=0;o<a;o++)if(i[o]!=s[o])return i[o]>s[o]^t?1:-1;return d==w?0:d>w^t?1:-1}function Re(r,e,t,n){if(r<e||r>t||r!==Ve(r))throw Error(We+(n||"Argument")+(typeof r=="number"?r<e||r>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(r))}function Er(r){var e=r.c.length-1;return Ke(r.e/pe)==e&&r.c[e]%2!=0}function Sr(r,e){return(r.length>1?r.charAt(0)+"."+r.slice(1):r)+(e<0?"e":"e+")+e}function lt(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}Go();var un={},It={},fn,Ii;function Vo(){if(Ii)return fn;Ii=1,fn=s,s.default=s,s.stable=w,s.stableStringify=w;var r="[...]",e="[Circular]",t=[],n=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(I,U,B,y){typeof y>"u"&&(y=i()),a(I,"",0,[],void 0,0,y);var b;try{n.length===0?b=JSON.stringify(I,U,B):b=JSON.stringify(I,O(U),B)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;t.length!==0;){var u=t.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return b}function o(I,U,B,y){var b=Object.getOwnPropertyDescriptor(y,B);b.get!==void 0?b.configurable?(Object.defineProperty(y,B,{value:I}),t.push([y,B,U,b])):n.push([U,B,I]):(y[B]=I,t.push([y,B,U]))}function a(I,U,B,y,b,u,c){u+=1;var v;if(typeof I=="object"&&I!==null){for(v=0;v<y.length;v++)if(y[v]===I){o(e,I,U,b);return}if(typeof c.depthLimit<"u"&&u>c.depthLimit){o(r,I,U,b);return}if(typeof c.edgesLimit<"u"&&B+1>c.edgesLimit){o(r,I,U,b);return}if(y.push(I),Array.isArray(I))for(v=0;v<I.length;v++)a(I[v],v,v,y,I,u,c);else{var G=Object.keys(I);for(v=0;v<G.length;v++){var $=G[v];a(I[$],$,v,y,I,u,c)}}y.pop()}}function d(I,U){return I<U?-1:I>U?1:0}function w(I,U,B,y){typeof y>"u"&&(y=i());var b=N(I,"",0,[],void 0,0,y)||I,u;try{n.length===0?u=JSON.stringify(b,U,B):u=JSON.stringify(b,O(U),B)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;t.length!==0;){var c=t.pop();c.length===4?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return u}function N(I,U,B,y,b,u,c){u+=1;var v;if(typeof I=="object"&&I!==null){for(v=0;v<y.length;v++)if(y[v]===I){o(e,I,U,b);return}try{if(typeof I.toJSON=="function")return}catch{return}if(typeof c.depthLimit<"u"&&u>c.depthLimit){o(r,I,U,b);return}if(typeof c.edgesLimit<"u"&&B+1>c.edgesLimit){o(r,I,U,b);return}if(y.push(I),Array.isArray(I))for(v=0;v<I.length;v++)N(I[v],v,v,y,I,u,c);else{var G={},$=Object.keys(I).sort(d);for(v=0;v<$.length;v++){var J=$[v];N(I[J],J,v,y,I,u,c),G[J]=I[J]}if(typeof b<"u")t.push([b,U,I]),b[U]=G;else return G}y.pop()}}function O(I){return I=typeof I<"u"?I:function(U,B){return B},function(U,B){if(n.length>0)for(var y=0;y<n.length;y++){var b=n[y];if(b[1]===U&&b[0]===B){B=b[2],n.splice(y,1);break}}return I.call(this,U,B)}}return fn}var Ti;function ri(){if(Ti)return It;Ti=1,Object.defineProperty(It,"__esModule",{value:!0}),It.EthereumProviderError=It.EthereumRpcError=void 0;const r=Vo();class e extends Error{constructor(o,a,d){if(!Number.isInteger(o))throw new Error('"code" must be an integer.');if(!a||typeof a!="string")throw new Error('"message" must be a nonempty string.');super(a),this.code=o,d!==void 0&&(this.data=d)}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)}}It.EthereumRpcError=e;class t extends e{constructor(o,a,d){if(!n(o))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(o,a,d)}}It.EthereumProviderError=t;function n(s){return Number.isInteger(s)&&s>=1e3&&s<=4999}function i(s,o){if(o!=="[Circular]")return o}return It}var cn={},Tt={},xi;function ni(){return xi||(xi=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.errorValues=Tt.errorCodes=void 0,Tt.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}},Tt.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."}}),Tt}var Oi;function Ko(){return Oi||(Oi=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=ni(),t=ri(),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(I,U=i){if(Number.isInteger(I)){const B=I.toString();if(O(e.errorValues,B))return e.errorValues[B].message;if(w(I))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return U}r.getMessageFromCode=o;function a(I){if(!Number.isInteger(I))return!1;const U=I.toString();return!!(e.errorValues[U]||w(I))}r.isValidCode=a;function d(I,{fallbackError:U=s,shouldIncludeStack:B=!1}={}){var y,b;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(I instanceof t.EthereumRpcError)return I.serialize();const u={};if(I&&typeof I=="object"&&!Array.isArray(I)&&O(I,"code")&&a(I.code)){const v=I;u.code=v.code,v.message&&typeof v.message=="string"?(u.message=v.message,O(v,"data")&&(u.data=v.data)):(u.message=o(u.code),u.data={originalError:N(I)})}else{u.code=U.code;const v=(y=I)===null||y===void 0?void 0:y.message;u.message=v&&typeof v=="string"?v:U.message,u.data={originalError:N(I)}}const c=(b=I)===null||b===void 0?void 0:b.stack;return B&&I&&c&&typeof c=="string"&&(u.stack=c),u}r.serializeError=d;function w(I){return I>=-32099&&I<=-32e3}function N(I){return I&&typeof I=="object"&&!Array.isArray(I)?Object.assign({},I):I}function O(I,U){return Object.prototype.hasOwnProperty.call(I,U)}})(cn)),cn}var Kt={},Ni;function oa(){if(Ni)return Kt;Ni=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.ethErrors=void 0;const r=ri(),e=Ko(),t=ni();Kt.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:a}=o;if(!Number.isInteger(a)||a>-32005||a<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return n(a,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:a,message:d,data:w}=o;if(!d||typeof d!="string")throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(a,d,w)}}};function n(o,a){const[d,w]=s(a);return new r.EthereumRpcError(o,d||e.getMessageFromCode(o),w)}function i(o,a){const[d,w]=s(a);return new r.EthereumProviderError(o,d||e.getMessageFromCode(o),w)}function s(o){if(o){if(typeof o=="string")return[o];if(typeof o=="object"&&!Array.isArray(o)){const{message:a,data:d}=o;if(a&&typeof a!="string")throw new Error("Must specify string message.");return[a||void 0,d]}}return[]}return Kt}var Ci;function sa(){return Ci||(Ci=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=ri();Object.defineProperty(r,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const t=Ko();Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return t.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return t.getMessageFromCode}});const n=oa();Object.defineProperty(r,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=ni();Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(un)),un}function Qt(r){"@babel/helpers - typeof";return Qt=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},Qt(r)}function aa(r,e){if(Qt(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function la(r){var e=aa(r,"string");return Qt(e)=="symbol"?e:e+""}function ge(r,e,t){return(e=la(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Pi(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 Je(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Pi(Object(t),!0).forEach(function(n){ge(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Pi(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}var dn={exports:{}},hn={exports:{}},gn,Li;function Ie(){if(Li)return gn;Li=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 gn={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},gn}var pn={exports:{}},wn,Bi;function Yo(){return Bi||(Bi=1,wn={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"{}"}}}),wn}var bn,Mi;function Ue(){if(Mi)return bn;Mi=1;const{format:r,inspect:e}=Yo(),{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]*)+$/,a="__node_internal_",d={};function w(b,u){if(!b)throw new d.ERR_INTERNAL_ASSERTION(u)}function N(b){let u="",c=b.length;const v=b[0]==="-"?1:0;for(;c>=v+4;c-=3)u=`_${b.slice(c-3,c)}${u}`;return`${b.slice(0,c)}${u}`}function O(b,u,c){if(typeof u=="function")return w(u.length<=c.length,`Code: ${b}; The provided arguments length (${c.length}) does not match the required ones (${u.length}).`),u(...c);const v=(u.match(/%[dfijoOs]/g)||[]).length;return w(v===c.length,`Code: ${b}; The provided arguments length (${c.length}) does not match the required ones (${v}).`),c.length===0?u:r(u,...c)}function I(b,u,c){c||(c=Error);class v extends c{constructor(...$){super(O(b,u,$))}toString(){return`${this.name} [${b}]: ${this.message}`}}Object.defineProperties(v.prototype,{name:{value:c.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${b}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),v.prototype.code=b,v.prototype[i]=!0,d[b]=v}function U(b){const u=a+b.name;return Object.defineProperty(b,"name",{value:u}),b}function B(b,u){if(b&&u&&b!==u){if(Array.isArray(u.errors))return u.errors.push(b),u;const c=new n([u,b],u.message);return c.code=u.code,c}return b||u}class y extends Error{constructor(u="The operation was aborted",c=void 0){if(c!==void 0&&typeof c!="object")throw new d.ERR_INVALID_ARG_TYPE("options","Object",c);super(u,c),this.code="ABORT_ERR",this.name="AbortError"}}return I("ERR_ASSERTION","%s",Error),I("ERR_INVALID_ARG_TYPE",(b,u,c)=>{w(typeof b=="string","'name' must be a string"),Array.isArray(u)||(u=[u]);let v="The ";b.endsWith(" argument")?v+=`${b} `:v+=`"${b}" ${b.includes(".")?"property":"argument"} `,v+="must be ";const G=[],$=[],J=[];for(const l of u)w(typeof l=="string","All expected entries have to be of type string"),s.includes(l)?G.push(l.toLowerCase()):o.test(l)?$.push(l):(w(l!=="object",'The value "object" should be written as "Object"'),J.push(l));if($.length>0){const l=G.indexOf("object");l!==-1&&(G.splice(G,l,1),$.push("Object"))}if(G.length>0){switch(G.length){case 1:v+=`of type ${G[0]}`;break;case 2:v+=`one of type ${G[0]} or ${G[1]}`;break;default:{const l=G.pop();v+=`one of type ${G.join(", ")}, or ${l}`}}($.length>0||J.length>0)&&(v+=" or ")}if($.length>0){switch($.length){case 1:v+=`an instance of ${$[0]}`;break;case 2:v+=`an instance of ${$[0]} or ${$[1]}`;break;default:{const l=$.pop();v+=`an instance of ${$.join(", ")}, or ${l}`}}J.length>0&&(v+=" or ")}switch(J.length){case 0:break;case 1:J[0].toLowerCase()!==J[0]&&(v+="an "),v+=`${J[0]}`;break;case 2:v+=`one of ${J[0]} or ${J[1]}`;break;default:{const l=J.pop();v+=`one of ${J.join(", ")}, or ${l}`}}if(c==null)v+=`. Received ${c}`;else if(typeof c=="function"&&c.name)v+=`. Received function ${c.name}`;else if(typeof c=="object"){var X;if((X=c.constructor)!==null&&X!==void 0&&X.name)v+=`. Received an instance of ${c.constructor.name}`;else{const l=e(c,{depth:-1});v+=`. Received ${l}`}}else{let l=e(c,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),v+=`. Received type ${typeof c} (${l})`}return v},TypeError),I("ERR_INVALID_ARG_VALUE",(b,u,c="is invalid")=>{let v=e(u);return v.length>128&&(v=v.slice(0,128)+"..."),`The ${b.includes(".")?"property":"argument"} '${b}' ${c}. Received ${v}`},TypeError),I("ERR_INVALID_RETURN_VALUE",(b,u,c)=>{var v;const G=c!=null&&(v=c.constructor)!==null&&v!==void 0&&v.name?`instance of ${c.constructor.name}`:`type ${typeof c}`;return`Expected ${b} to be returned from the "${u}" function but got ${G}.`},TypeError),I("ERR_MISSING_ARGS",(...b)=>{w(b.length>0,"At least one arg needs to be specified");let u;const c=b.length;switch(b=(Array.isArray(b)?b:[b]).map(v=>`"${v}"`).join(" or "),c){case 1:u+=`The ${b[0]} argument`;break;case 2:u+=`The ${b[0]} and ${b[1]} arguments`;break;default:{const v=b.pop();u+=`The ${b.join(", ")}, and ${v} arguments`}break}return`${u} must be specified`},TypeError),I("ERR_OUT_OF_RANGE",(b,u,c)=>{w(u,'Missing "range" argument');let v;if(Number.isInteger(c)&&Math.abs(c)>2**32)v=N(String(c));else if(typeof c=="bigint"){v=String(c);const G=BigInt(2)**BigInt(32);(c>G||c<-G)&&(v=N(v)),v+="n"}else v=e(c);return`The value of "${b}" is out of range. It must be ${u}. Received ${v}`},RangeError),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),I("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),I("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),I("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),I("ERR_STREAM_WRITE_AFTER_END","write after end",Error),I("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),bn={AbortError:y,aggregateTwoErrors:U(B),hideStackFrames:U,codes:d},bn}var Yt={exports:{}},Di;function er(){if(Di)return Yt.exports;Di=1;const{AbortController:r,AbortSignal:e}=typeof self<"u"?self:typeof window<"u"?window:void 0;return Yt.exports=r,Yt.exports.AbortSignal=e,Yt.exports.default=r,Yt.exports}var qi;function $e(){return qi||(qi=1,(function(r){const e=xe.requireDist(),{format:t,inspect:n}=Yo(),{codes:{ERR_INVALID_ARG_TYPE:i}}=Ue(),{kResistStopPropagation:s,AggregateError:o,SymbolDispose:a}=Ie(),d=globalThis.AbortSignal||er().AbortSignal,w=globalThis.AbortController||er().AbortController,N=Object.getPrototypeOf(async function(){}).constructor,O=globalThis.Blob||e.Blob,I=typeof O<"u"?function(b){return b instanceof O}:function(b){return!1},U=(y,b)=>{if(y!==void 0&&(y===null||typeof y!="object"||!("aborted"in y)))throw new i(b,"AbortSignal",y)},B=(y,b)=>{if(typeof y!="function")throw new i(b,"Function",y)};r.exports={AggregateError:o,kEmptyObject:Object.freeze({}),once(y){let b=!1;return function(...u){b||(b=!0,y.apply(this,u))}},createDeferredPromise:function(){let y,b;return{promise:new Promise((c,v)=>{y=c,b=v}),resolve:y,reject:b}},promisify(y){return new Promise((b,u)=>{y((c,...v)=>c?u(c):b(...v))})},debuglog(){return function(){}},format:t,inspect:n,types:{isAsyncFunction(y){return y instanceof N},isArrayBufferView(y){return ArrayBuffer.isView(y)}},isBlob:I,deprecate(y,b){return y},addAbortListener:rr.requireEvents().addAbortListener||function(b,u){if(b===void 0)throw new i("signal","AbortSignal",b);U(b,"signal"),B(u,"listener");let c;return b.aborted?queueMicrotask(()=>u()):(b.addEventListener("abort",u,{__proto__:null,once:!0,[s]:!0}),c=()=>{b.removeEventListener("abort",u)}),{__proto__:null,[a](){var v;(v=c)===null||v===void 0||v()}}},AbortSignalAny:d.any||function(b){if(b.length===1)return b[0];const u=new w,c=()=>u.abort();return b.forEach(v=>{U(v,"signals"),v.addEventListener("abort",c,{once:!0})}),u.signal.addEventListener("abort",()=>{b.forEach(v=>v.removeEventListener("abort",c))},{once:!0}),u.signal}},r.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(pn)),pn.exports}var vr={},yn,Ui;function nr(){if(Ui)return yn;Ui=1;const{ArrayIsArray:r,ArrayPrototypeIncludes:e,ArrayPrototypeJoin:t,ArrayPrototypeMap:n,NumberIsInteger:i,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:o,NumberMIN_SAFE_INTEGER:a,NumberParseInt:d,ObjectPrototypeHasOwnProperty:w,RegExpPrototypeExec:N,String:O,StringPrototypeToUpperCase:I,StringPrototypeTrim:U}=Ie(),{hideStackFrames:B,codes:{ERR_SOCKET_BAD_PORT:y,ERR_INVALID_ARG_TYPE:b,ERR_INVALID_ARG_VALUE:u,ERR_OUT_OF_RANGE:c,ERR_UNKNOWN_SIGNAL:v}}=Ue(),{normalizeEncoding:G}=$e(),{isAsyncFunction:$,isArrayBufferView:J}=$e().types,X={};function l(q){return q===(q|0)}function m(q){return q===q>>>0}const f=/^[0-7]+$/,g="must be a 32-bit unsigned integer or an octal string";function _(q,Z,re){if(typeof q>"u"&&(q=re),typeof q=="string"){if(N(f,q)===null)throw new u(Z,q,g);q=d(q,8)}return p(q,Z),q}const h=B((q,Z,re=a,Y=o)=>{if(typeof q!="number")throw new b(Z,"number",q);if(!i(q))throw new c(Z,"an integer",q);if(q<re||q>Y)throw new c(Z,`>= ${re} && <= ${Y}`,q)}),C=B((q,Z,re=-2147483648,Y=2147483647)=>{if(typeof q!="number")throw new b(Z,"number",q);if(!i(q))throw new c(Z,"an integer",q);if(q<re||q>Y)throw new c(Z,`>= ${re} && <= ${Y}`,q)}),p=B((q,Z,re=!1)=>{if(typeof q!="number")throw new b(Z,"number",q);if(!i(q))throw new c(Z,"an integer",q);const Y=re?1:0,we=4294967295;if(q<Y||q>we)throw new c(Z,`>= ${Y} && <= ${we}`,q)});function A(q,Z){if(typeof q!="string")throw new b(Z,"string",q)}function P(q,Z,re=void 0,Y){if(typeof q!="number")throw new b(Z,"number",q);if(re!=null&&q<re||Y!=null&&q>Y||(re!=null||Y!=null)&&s(q))throw new c(Z,`${re!=null?`>= ${re}`:""}${re!=null&&Y!=null?" && ":""}${Y!=null?`<= ${Y}`:""}`,q)}const E=B((q,Z,re)=>{if(!e(re,q)){const we="must be one of: "+t(n(re,Le=>typeof Le=="string"?`'${Le}'`:O(Le)),", ");throw new u(Z,q,we)}});function M(q,Z){if(typeof q!="boolean")throw new b(Z,"boolean",q)}function S(q,Z,re){return q==null||!w(q,Z)?re:q[Z]}const j=B((q,Z,re=null)=>{const Y=S(re,"allowArray",!1),we=S(re,"allowFunction",!1);if(!S(re,"nullable",!1)&&q===null||!Y&&r(q)||typeof q!="object"&&(!we||typeof q!="function"))throw new b(Z,"Object",q)}),K=B((q,Z)=>{if(q!=null&&typeof q!="object"&&typeof q!="function")throw new b(Z,"a dictionary",q)}),W=B((q,Z,re=0)=>{if(!r(q))throw new b(Z,"Array",q);if(q.length<re){const Y=`must be longer than ${re}`;throw new u(Z,q,Y)}});function ee(q,Z){W(q,Z);for(let re=0;re<q.length;re++)A(q[re],`${Z}[${re}]`)}function Q(q,Z){W(q,Z);for(let re=0;re<q.length;re++)M(q[re],`${Z}[${re}]`)}function le(q,Z){W(q,Z);for(let re=0;re<q.length;re++){const Y=q[re],we=`${Z}[${re}]`;if(Y==null)throw new b(we,"AbortSignal",Y);ce(Y,we)}}function ue(q,Z="signal"){if(A(q,Z),X[q]===void 0)throw X[I(q)]!==void 0?new v(q+" (signals must use all capital letters)"):new v(q)}const z=B((q,Z="buffer")=>{if(!J(q))throw new b(Z,["Buffer","TypedArray","DataView"],q)});function V(q,Z){const re=G(Z),Y=q.length;if(re==="hex"&&Y%2!==0)throw new u("encoding",Z,`is invalid for data of length ${Y}`)}function oe(q,Z="Port",re=!0){if(typeof q!="number"&&typeof q!="string"||typeof q=="string"&&U(q).length===0||+q!==+q>>>0||q>65535||q===0&&!re)throw new y(Z,q,re);return q|0}const ce=B((q,Z)=>{if(q!==void 0&&(q===null||typeof q!="object"||!("aborted"in q)))throw new b(Z,"AbortSignal",q)}),fe=B((q,Z)=>{if(typeof q!="function")throw new b(Z,"Function",q)}),L=B((q,Z)=>{if(typeof q!="function"||$(q))throw new b(Z,"Function",q)}),D=B((q,Z)=>{if(q!==void 0)throw new b(Z,"undefined",q)});function F(q,Z,re){if(!e(re,q))throw new b(Z,`('${t(re,"|")}')`,q)}const ne=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function se(q,Z){if(typeof q>"u"||!N(ne,q))throw new u(Z,q,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function ie(q){if(typeof q=="string")return se(q,"hints"),q;if(r(q)){const Z=q.length;let re="";if(Z===0)return re;for(let Y=0;Y<Z;Y++){const we=q[Y];se(we,"hints"),re+=we,Y!==Z-1&&(re+=", ")}return re}throw new u("hints",q,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return yn={isInt32:l,isUint32:m,parseFileMode:_,validateArray:W,validateStringArray:ee,validateBooleanArray:Q,validateAbortSignalArray:le,validateBoolean:M,validateBuffer:z,validateDictionary:K,validateEncoding:V,validateFunction:fe,validateInt32:C,validateInteger:h,validateNumber:P,validateObject:j,validateOneOf:E,validatePlainFunction:L,validatePort:oe,validateSignalName:ue,validateString:A,validateUint32:p,validateUndefined:D,validateUnion:F,validateAbortSignal:ce,validateLinkHeaderValue:ie},yn}var Ar={exports:{}},_n={exports:{}},ki;function Lt(){if(ki)return _n.exports;ki=1;var r=_n.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 a=[],d=!1,w,N=-1;function O(){!d||!w||(d=!1,w.length?a=w.concat(a):N=-1,a.length&&I())}function I(){if(!d){var y=s(O);d=!0;for(var b=a.length;b;){for(w=a,a=[];++N<b;)w&&w[N].run();N=-1,b=a.length}w=null,d=!1,o(y)}}r.nextTick=function(y){var b=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)b[u-1]=arguments[u];a.push(new U(y,b)),a.length===1&&!d&&s(I)};function U(y,b){this.fun=y,this.array=b}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},_n.exports}var mn,ji;function gt(){if(ji)return mn;ji=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"),a=t("nodejs.stream.disturbed"),d=t("nodejs.webstream.isClosedPromise"),w=t("nodejs.webstream.controllerErrorFunction");function N(S,j=!1){var K;return!!(S&&typeof S.pipe=="function"&&typeof S.on=="function"&&(!j||typeof S.pause=="function"&&typeof S.resume=="function")&&(!S._writableState||((K=S._readableState)===null||K===void 0?void 0:K.readable)!==!1)&&(!S._writableState||S._readableState))}function O(S){var j;return!!(S&&typeof S.write=="function"&&typeof S.on=="function"&&(!S._readableState||((j=S._writableState)===null||j===void 0?void 0:j.writable)!==!1))}function I(S){return!!(S&&typeof S.pipe=="function"&&S._readableState&&typeof S.on=="function"&&typeof S.write=="function")}function U(S){return S&&(S._readableState||S._writableState||typeof S.write=="function"&&typeof S.on=="function"||typeof S.pipe=="function"&&typeof S.on=="function")}function B(S){return!!(S&&!U(S)&&typeof S.pipeThrough=="function"&&typeof S.getReader=="function"&&typeof S.cancel=="function")}function y(S){return!!(S&&!U(S)&&typeof S.getWriter=="function"&&typeof S.abort=="function")}function b(S){return!!(S&&!U(S)&&typeof S.readable=="object"&&typeof S.writable=="object")}function u(S){return B(S)||y(S)||b(S)}function c(S,j){return S==null?!1:j===!0?typeof S[r]=="function":j===!1?typeof S[e]=="function":typeof S[r]=="function"||typeof S[e]=="function"}function v(S){if(!U(S))return null;const j=S._writableState,K=S._readableState,W=j||K;return!!(S.destroyed||S[n]||W!=null&&W.destroyed)}function G(S){if(!O(S))return null;if(S.writableEnded===!0)return!0;const j=S._writableState;return j!=null&&j.errored?!1:typeof j?.ended!="boolean"?null:j.ended}function $(S,j){if(!O(S))return null;if(S.writableFinished===!0)return!0;const K=S._writableState;return K!=null&&K.errored?!1:typeof K?.finished!="boolean"?null:!!(K.finished||j===!1&&K.ended===!0&&K.length===0)}function J(S){if(!N(S))return null;if(S.readableEnded===!0)return!0;const j=S._readableState;return!j||j.errored?!1:typeof j?.ended!="boolean"?null:j.ended}function X(S,j){if(!N(S))return null;const K=S._readableState;return K!=null&&K.errored?!1:typeof K?.endEmitted!="boolean"?null:!!(K.endEmitted||j===!1&&K.ended===!0&&K.length===0)}function l(S){return S&&S[s]!=null?S[s]:typeof S?.readable!="boolean"?null:v(S)?!1:N(S)&&S.readable&&!X(S)}function m(S){return S&&S[o]!=null?S[o]:typeof S?.writable!="boolean"?null:v(S)?!1:O(S)&&S.writable&&!G(S)}function f(S,j){return U(S)?v(S)?!0:!(j?.readable!==!1&&l(S)||j?.writable!==!1&&m(S)):null}function g(S){var j,K;return U(S)?S.writableErrored?S.writableErrored:(j=(K=S._writableState)===null||K===void 0?void 0:K.errored)!==null&&j!==void 0?j:null:null}function _(S){var j,K;return U(S)?S.readableErrored?S.readableErrored:(j=(K=S._readableState)===null||K===void 0?void 0:K.errored)!==null&&j!==void 0?j:null:null}function h(S){if(!U(S))return null;if(typeof S.closed=="boolean")return S.closed;const j=S._writableState,K=S._readableState;return typeof j?.closed=="boolean"||typeof K?.closed=="boolean"?j?.closed||K?.closed:typeof S._closed=="boolean"&&C(S)?S._closed:null}function C(S){return typeof S._closed=="boolean"&&typeof S._defaultKeepAlive=="boolean"&&typeof S._removedConnection=="boolean"&&typeof S._removedContLen=="boolean"}function p(S){return typeof S._sent100=="boolean"&&C(S)}function A(S){var j;return typeof S._consuming=="boolean"&&typeof S._dumped=="boolean"&&((j=S.req)===null||j===void 0?void 0:j.upgradeOrConnect)===void 0}function P(S){if(!U(S))return null;const j=S._writableState,K=S._readableState,W=j||K;return!W&&p(S)||!!(W&&W.autoDestroy&&W.emitClose&&W.closed===!1)}function E(S){var j;return!!(S&&((j=S[a])!==null&&j!==void 0?j:S.readableDidRead||S.readableAborted))}function M(S){var j,K,W,ee,Q,le,ue,z,V,oe;return!!(S&&((j=(K=(W=(ee=(Q=(le=S[i])!==null&&le!==void 0?le:S.readableErrored)!==null&&Q!==void 0?Q:S.writableErrored)!==null&&ee!==void 0?ee:(ue=S._readableState)===null||ue===void 0?void 0:ue.errorEmitted)!==null&&W!==void 0?W:(z=S._writableState)===null||z===void 0?void 0:z.errorEmitted)!==null&&K!==void 0?K:(V=S._readableState)===null||V===void 0?void 0:V.errored)!==null&&j!==void 0?j:!((oe=S._writableState)===null||oe===void 0)&&oe.errored))}return mn={isDestroyed:v,kIsDestroyed:n,isDisturbed:E,kIsDisturbed:a,isErrored:M,kIsErrored:i,isReadable:l,kIsReadable:s,kIsClosedPromise:d,kControllerErrorFunction:w,kIsWritable:o,isClosed:h,isDuplexNodeStream:I,isFinished:f,isIterable:c,isReadableNodeStream:N,isReadableStream:B,isReadableEnded:J,isReadableFinished:X,isReadableErrored:_,isNodeStream:U,isWebStream:u,isWritable:m,isWritableNodeStream:O,isWritableStream:y,isWritableEnded:G,isWritableFinished:$,isWritableErrored:g,isServerRequest:A,isServerResponse:p,willEmitClose:P,isTransformStream:b},mn}var Wi;function Et(){if(Wi)return Ar.exports;Wi=1;const r=Lt(),{AbortError:e,codes:t}=Ue(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:i}=t,{kEmptyObject:s,once:o}=$e(),{validateAbortSignal:a,validateFunction:d,validateObject:w,validateBoolean:N}=nr(),{Promise:O,PromisePrototypeThen:I,SymbolDispose:U}=Ie(),{isClosed:B,isReadable:y,isReadableNodeStream:b,isReadableStream:u,isReadableFinished:c,isReadableErrored:v,isWritable:G,isWritableNodeStream:$,isWritableStream:J,isWritableFinished:X,isWritableErrored:l,isNodeStream:m,willEmitClose:f,kIsClosedPromise:g}=gt();let _;function h(E){return E.setHeader&&typeof E.abort=="function"}const C=()=>{};function p(E,M,S){var j,K;if(arguments.length===2?(S=M,M=s):M==null?M=s:w(M,"options"),d(S,"callback"),a(M.signal,"options.signal"),S=o(S),u(E)||J(E))return A(E,M,S);if(!m(E))throw new n("stream",["ReadableStream","WritableStream","Stream"],E);const W=(j=M.readable)!==null&&j!==void 0?j:b(E),ee=(K=M.writable)!==null&&K!==void 0?K:$(E),Q=E._writableState,le=E._readableState,ue=()=>{E.writable||oe()};let z=f(E)&&b(E)===W&&$(E)===ee,V=X(E,!1);const oe=()=>{V=!0,E.destroyed&&(z=!1),!(z&&(!E.readable||W))&&(!W||ce)&&S.call(E)};let ce=c(E,!1);const fe=()=>{ce=!0,E.destroyed&&(z=!1),!(z&&(!E.writable||ee))&&(!ee||V)&&S.call(E)},L=q=>{S.call(E,q)};let D=B(E);const F=()=>{D=!0;const q=l(E)||v(E);if(q&&typeof q!="boolean")return S.call(E,q);if(W&&!ce&&b(E,!0)&&!c(E,!1))return S.call(E,new i);if(ee&&!V&&!X(E,!1))return S.call(E,new i);S.call(E)},ne=()=>{D=!0;const q=l(E)||v(E);if(q&&typeof q!="boolean")return S.call(E,q);S.call(E)},se=()=>{E.req.on("finish",oe)};h(E)?(E.on("complete",oe),z||E.on("abort",F),E.req?se():E.on("request",se)):ee&&!Q&&(E.on("end",ue),E.on("close",ue)),!z&&typeof E.aborted=="boolean"&&E.on("aborted",F),E.on("end",fe),E.on("finish",oe),M.error!==!1&&E.on("error",L),E.on("close",F),D?r.nextTick(F):Q!=null&&Q.errorEmitted||le!=null&&le.errorEmitted?z||r.nextTick(ne):(!W&&(!z||y(E))&&(V||G(E)===!1)||!ee&&(!z||G(E))&&(ce||y(E)===!1)||le&&E.req&&E.aborted)&&r.nextTick(ne);const ie=()=>{S=C,E.removeListener("aborted",F),E.removeListener("complete",oe),E.removeListener("abort",F),E.removeListener("request",se),E.req&&E.req.removeListener("finish",oe),E.removeListener("end",ue),E.removeListener("close",ue),E.removeListener("finish",oe),E.removeListener("end",fe),E.removeListener("error",L),E.removeListener("close",F)};if(M.signal&&!D){const q=()=>{const Z=S;ie(),Z.call(E,new e(void 0,{cause:M.signal.reason}))};if(M.signal.aborted)r.nextTick(q);else{_=_||$e().addAbortListener;const Z=_(M.signal,q),re=S;S=o((...Y)=>{Z[U](),re.apply(E,Y)})}}return ie}function A(E,M,S){let j=!1,K=C;if(M.signal)if(K=()=>{j=!0,S.call(E,new e(void 0,{cause:M.signal.reason}))},M.signal.aborted)r.nextTick(K);else{_=_||$e().addAbortListener;const ee=_(M.signal,K),Q=S;S=o((...le)=>{ee[U](),Q.apply(E,le)})}const W=(...ee)=>{j||r.nextTick(()=>S.apply(E,ee))};return I(E[g].promise,W,W),C}function P(E,M){var S;let j=!1;return M===null&&(M=s),(S=M)!==null&&S!==void 0&&S.cleanup&&(N(M.cleanup,"cleanup"),j=M.cleanup),new O((K,W)=>{const ee=p(E,M,Q=>{j&&ee(),Q?W(Q):K()})})}return Ar.exports=p,Ar.exports.finished=P,Ar.exports}var En,Fi;function jt(){if(Fi)return En;Fi=1;const r=Lt(),{aggregateTwoErrors:e,codes:{ERR_MULTIPLE_CALLBACK:t},AbortError:n}=Ue(),{Symbol:i}=Ie(),{kIsDestroyed:s,isDestroyed:o,isFinished:a,isServerRequest:d}=gt(),w=i("kDestroy"),N=i("kConstruct");function O(f,g,_){f&&(f.stack,g&&!g.errored&&(g.errored=f),_&&!_.errored&&(_.errored=f))}function I(f,g){const _=this._readableState,h=this._writableState,C=h||_;return h!=null&&h.destroyed||_!=null&&_.destroyed?(typeof g=="function"&&g(),this):(O(f,h,_),h&&(h.destroyed=!0),_&&(_.destroyed=!0),C.constructed?U(this,f,g):this.once(w,function(p){U(this,e(p,f),g)}),this)}function U(f,g,_){let h=!1;function C(p){if(h)return;h=!0;const A=f._readableState,P=f._writableState;O(p,P,A),P&&(P.closed=!0),A&&(A.closed=!0),typeof _=="function"&&_(p),p?r.nextTick(B,f,p):r.nextTick(y,f)}try{f._destroy(g||null,C)}catch(p){C(p)}}function B(f,g){b(f,g),y(f)}function y(f){const g=f._readableState,_=f._writableState;_&&(_.closeEmitted=!0),g&&(g.closeEmitted=!0),(_!=null&&_.emitClose||g!=null&&g.emitClose)&&f.emit("close")}function b(f,g){const _=f._readableState,h=f._writableState;h!=null&&h.errorEmitted||_!=null&&_.errorEmitted||(h&&(h.errorEmitted=!0),_&&(_.errorEmitted=!0),f.emit("error",g))}function u(){const f=this._readableState,g=this._writableState;f&&(f.constructed=!0,f.closed=!1,f.closeEmitted=!1,f.destroyed=!1,f.errored=null,f.errorEmitted=!1,f.reading=!1,f.ended=f.readable===!1,f.endEmitted=f.readable===!1),g&&(g.constructed=!0,g.destroyed=!1,g.closed=!1,g.closeEmitted=!1,g.errored=null,g.errorEmitted=!1,g.finalCalled=!1,g.prefinished=!1,g.ended=g.writable===!1,g.ending=g.writable===!1,g.finished=g.writable===!1)}function c(f,g,_){const h=f._readableState,C=f._writableState;if(C!=null&&C.destroyed||h!=null&&h.destroyed)return this;h!=null&&h.autoDestroy||C!=null&&C.autoDestroy?f.destroy(g):g&&(g.stack,C&&!C.errored&&(C.errored=g),h&&!h.errored&&(h.errored=g),_?r.nextTick(b,f,g):b(f,g))}function v(f,g){if(typeof f._construct!="function")return;const _=f._readableState,h=f._writableState;_&&(_.constructed=!1),h&&(h.constructed=!1),f.once(N,g),!(f.listenerCount(N)>1)&&r.nextTick(G,f)}function G(f){let g=!1;function _(h){if(g){c(f,h??new t);return}g=!0;const C=f._readableState,p=f._writableState,A=p||C;C&&(C.constructed=!0),p&&(p.constructed=!0),A.destroyed?f.emit(w,h):h?c(f,h,!0):r.nextTick($,f)}try{f._construct(h=>{r.nextTick(_,h)})}catch(h){r.nextTick(_,h)}}function $(f){f.emit(N)}function J(f){return f?.setHeader&&typeof f.abort=="function"}function X(f){f.emit("close")}function l(f,g){f.emit("error",g),r.nextTick(X,f)}function m(f,g){!f||o(f)||(!g&&!a(f)&&(g=new n),d(f)?(f.socket=null,f.destroy(g)):J(f)?f.abort():J(f.req)?f.req.abort():typeof f.destroy=="function"?f.destroy(g):typeof f.close=="function"?f.close():g?r.nextTick(l,f,g):r.nextTick(X,f),f.destroyed||(f[s]=!0))}return En={construct:v,destroyer:m,destroy:I,undestroy:u,errorOrDestroy:c},En}var Sn,$i;function ii(){if($i)return Sn;$i=1;const{ArrayIsArray:r,ObjectSetPrototypeOf:e}=Ie(),{EventEmitter:t}=rr.requireEvents();function n(s){t.call(this,s)}e(n.prototype,t.prototype),e(n,t),n.prototype.pipe=function(s,o){const a=this;function d(y){s.writable&&s.write(y)===!1&&a.pause&&a.pause()}a.on("data",d);function w(){a.readable&&a.resume&&a.resume()}s.on("drain",w),!s._isStdio&&(!o||o.end!==!1)&&(a.on("end",O),a.on("close",I));let N=!1;function O(){N||(N=!0,s.end())}function I(){N||(N=!0,typeof s.destroy=="function"&&s.destroy())}function U(y){B(),t.listenerCount(this,"error")===0&&this.emit("error",y)}i(a,"error",U),i(s,"error",U);function B(){a.removeListener("data",d),s.removeListener("drain",w),a.removeListener("end",O),a.removeListener("close",I),a.removeListener("error",U),s.removeListener("error",U),a.removeListener("end",B),a.removeListener("close",B),s.removeListener("close",B)}return a.on("end",B),a.on("close",B),s.on("close",B),s.emit("pipe",a),s};function i(s,o,a){if(typeof s.prependListener=="function")return s.prependListener(o,a);!s._events||!s._events[o]?s.on(o,a):r(s._events[o])?s._events[o].unshift(a):s._events[o]=[a,s._events[o]]}return Sn={Stream:n,prependListener:i},Sn}var vn={exports:{}},Hi;function Dr(){return Hi||(Hi=1,(function(r){const{SymbolDispose:e}=Ie(),{AbortError:t,codes:n}=Ue(),{isNodeStream:i,isWebStream:s,kControllerErrorFunction:o}=gt(),a=Et(),{ERR_INVALID_ARG_TYPE:d}=n;let w;const N=(O,I)=>{if(typeof O!="object"||!("aborted"in O))throw new d(I,"AbortSignal",O)};r.exports.addAbortSignal=function(I,U){if(N(I,"signal"),!i(U)&&!s(U))throw new d("stream",["ReadableStream","WritableStream","Stream"],U);return r.exports.addAbortSignalNoValidate(I,U)},r.exports.addAbortSignalNoValidate=function(O,I){if(typeof O!="object"||!("aborted"in O))return I;const U=i(I)?()=>{I.destroy(new t(void 0,{cause:O.reason}))}:()=>{I[o](new t(void 0,{cause:O.reason}))};if(O.aborted)U();else{w=w||$e().addAbortListener;const B=w(O,U);a(I,B[e])}return I}})(vn)),vn.exports}var An,zi;function ua(){if(zi)return An;zi=1;const{StringPrototypeSlice:r,SymbolIterator:e,TypedArrayPrototypeSet:t,Uint8Array:n}=Ie(),{Buffer:i}=xe.requireDist(),{inspect:s}=$e();return An=class{constructor(){this.head=null,this.tail=null,this.length=0}push(a){const d={data:a,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length}unshift(a){const d={data:a,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length}shift(){if(this.length===0)return;const a=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,a}clear(){this.head=this.tail=null,this.length=0}join(a){if(this.length===0)return"";let d=this.head,w=""+d.data;for(;(d=d.next)!==null;)w+=a+d.data;return w}concat(a){if(this.length===0)return i.alloc(0);const d=i.allocUnsafe(a>>>0);let w=this.head,N=0;for(;w;)t(d,w.data,N),N+=w.data.length,w=w.next;return d}consume(a,d){const w=this.head.data;if(a<w.length){const N=w.slice(0,a);return this.head.data=w.slice(a),N}return a===w.length?this.shift():d?this._getString(a):this._getBuffer(a)}first(){return this.head.data}*[e](){for(let a=this.head;a;a=a.next)yield a.data}_getString(a){let d="",w=this.head,N=0;do{const O=w.data;if(a>O.length)d+=O,a-=O.length;else{a===O.length?(d+=O,++N,w.next?this.head=w.next:this.head=this.tail=null):(d+=r(O,0,a),this.head=w,w.data=r(O,a));break}++N}while((w=w.next)!==null);return this.length-=N,d}_getBuffer(a){const d=i.allocUnsafe(a),w=a;let N=this.head,O=0;do{const I=N.data;if(a>I.length)t(d,I,w-a),a-=I.length;else{a===I.length?(t(d,I,w-a),++O,N.next?this.head=N.next:this.head=this.tail=null):(t(d,new n(I.buffer,I.byteOffset,a),w-a),this.head=N,N.data=I.slice(a));break}++O}while((N=N.next)!==null);return this.length-=O,d}[Symbol.for("nodejs.util.inspect.custom")](a,d){return s(this,{...d,depth:0,customInspect:!1})}},An}var Rn,Gi;function qr(){if(Gi)return Rn;Gi=1;const{MathFloor:r,NumberIsInteger:e}=Ie(),{validateInteger:t}=nr(),{ERR_INVALID_ARG_VALUE:n}=Ue().codes;let i=16*1024,s=16;function o(N,O,I){return N.highWaterMark!=null?N.highWaterMark:O?N[I]:null}function a(N){return N?s:i}function d(N,O){t(O,"value",0),N?s=O:i=O}function w(N,O,I,U){const B=o(O,U,I);if(B!=null){if(!e(B)||B<0){const y=U?`options.${I}`:"options.highWaterMark";throw new n(y,B)}return r(B)}return a(N.objectMode)}return Rn={getHighWaterMark:w,getDefaultHighWaterMark:a,setDefaultHighWaterMark:d},Rn}var In={},Rr={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Vi;function fa(){return Vi||(Vi=1,(function(r,e){var t=xe.requireDist(),n=t.Buffer;function i(o,a){for(var d in o)a[d]=o[d]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?r.exports=t:(i(t,e),e.Buffer=s);function s(o,a,d){return n(o,a,d)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,d){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,d)},s.alloc=function(o,a,d){if(typeof o!="number")throw new TypeError("Argument must be a number");var w=n(o);return a!==void 0?typeof d=="string"?w.fill(a,d):w.fill(a):w.fill(0),w},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(Rr,Rr.exports)),Rr.exports}var Ki;function ca(){if(Ki)return In;Ki=1;var r=fa().Buffer,e=r.isEncoding||function(u){switch(u=""+u,u&&u.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(u){if(!u)return"utf8";for(var c;;)switch(u){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return u;default:if(c)return;u=(""+u).toLowerCase(),c=!0}}function n(u){var c=t(u);if(typeof c!="string"&&(r.isEncoding===e||!e(u)))throw new Error("Unknown encoding: "+u);return c||u}In.StringDecoder=i;function i(u){this.encoding=n(u);var c;switch(this.encoding){case"utf16le":this.text=O,this.end=I,c=4;break;case"utf8":this.fillLast=d,c=4;break;case"base64":this.text=U,this.end=B,c=3;break;default:this.write=y,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(c)}i.prototype.write=function(u){if(u.length===0)return"";var c,v;if(this.lastNeed){if(c=this.fillLast(u),c===void 0)return"";v=this.lastNeed,this.lastNeed=0}else v=0;return v<u.length?c?c+this.text(u,v):this.text(u,v):c||""},i.prototype.end=N,i.prototype.text=w,i.prototype.fillLast=function(u){if(this.lastNeed<=u.length)return u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,u.length),this.lastNeed-=u.length};function s(u){return u<=127?0:u>>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function o(u,c,v){var G=c.length-1;if(G<v)return 0;var $=s(c[G]);return $>=0?($>0&&(u.lastNeed=$-1),$):--G<v||$===-2?0:($=s(c[G]),$>=0?($>0&&(u.lastNeed=$-2),$):--G<v||$===-2?0:($=s(c[G]),$>=0?($>0&&($===2?$=0:u.lastNeed=$-3),$):0))}function a(u,c,v){if((c[0]&192)!==128)return u.lastNeed=0,"�";if(u.lastNeed>1&&c.length>1){if((c[1]&192)!==128)return u.lastNeed=1,"�";if(u.lastNeed>2&&c.length>2&&(c[2]&192)!==128)return u.lastNeed=2,"�"}}function d(u){var c=this.lastTotal-this.lastNeed,v=a(this,u);if(v!==void 0)return v;if(this.lastNeed<=u.length)return u.copy(this.lastChar,c,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,c,0,u.length),this.lastNeed-=u.length}function w(u,c){var v=o(this,u,c);if(!this.lastNeed)return u.toString("utf8",c);this.lastTotal=v;var G=u.length-(v-this.lastNeed);return u.copy(this.lastChar,0,G),u.toString("utf8",c,G)}function N(u){var c=u&&u.length?this.write(u):"";return this.lastNeed?c+"�":c}function O(u,c){if((u.length-c)%2===0){var v=u.toString("utf16le",c);if(v){var G=v.charCodeAt(v.length-1);if(G>=55296&&G<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],v.slice(0,-1)}return v}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",c,u.length-1)}function I(u){var c=u&&u.length?this.write(u):"";if(this.lastNeed){var v=this.lastTotal-this.lastNeed;return c+this.lastChar.toString("utf16le",0,v)}return c}function U(u,c){var v=(u.length-c)%3;return v===0?u.toString("base64",c):(this.lastNeed=3-v,this.lastTotal=3,v===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",c,u.length-v))}function B(u){var c=u&&u.length?this.write(u):"";return this.lastNeed?c+this.lastChar.toString("base64",0,3-this.lastNeed):c}function y(u){return u.toString(this.encoding)}function b(u){return u&&u.length?this.write(u):""}return In}var Tn,Yi;function Jo(){if(Yi)return Tn;Yi=1;const r=Lt(),{PromisePrototypeThen:e,SymbolAsyncIterator:t,SymbolIterator:n}=Ie(),{Buffer:i}=xe.requireDist(),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:o}=Ue().codes;function a(d,w,N){let O;if(typeof w=="string"||w instanceof i)return new d({objectMode:!0,...N,read(){this.push(w),this.push(null)}});let I;if(w&&w[t])I=!0,O=w[t]();else if(w&&w[n])I=!1,O=w[n]();else throw new s("iterable",["Iterable"],w);const U=new d({objectMode:!0,highWaterMark:1,...N});let B=!1;U._read=function(){B||(B=!0,b())},U._destroy=function(u,c){e(y(u),()=>r.nextTick(c,u),v=>r.nextTick(c,v||u))};async function y(u){const c=u!=null,v=typeof O.throw=="function";if(c&&v){const{value:G,done:$}=await O.throw(u);if(await G,$)return}if(typeof O.return=="function"){const{value:G}=await O.return();await G}}async function b(){for(;;){try{const{value:u,done:c}=I?await O.next():O.next();if(c)U.push(null);else{const v=u&&typeof u.then=="function"?await u:u;if(v===null)throw B=!1,new o;if(U.push(v))continue;B=!1}}catch(u){U.destroy(u)}break}}return U}return Tn=a,Tn}var xn,Ji;function Ur(){if(Ji)return xn;Ji=1;const r=Lt(),{ArrayPrototypeIndexOf:e,NumberIsInteger:t,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:s,ObjectKeys:o,ObjectSetPrototypeOf:a,Promise:d,SafeSet:w,SymbolAsyncDispose:N,SymbolAsyncIterator:O,Symbol:I}=Ie();xn=Y,Y.ReadableState=re;const{EventEmitter:U}=rr.requireEvents(),{Stream:B,prependListener:y}=ii(),{Buffer:b}=xe.requireDist(),{addAbortSignal:u}=Dr(),c=Et();let v=$e().debuglog("stream",R=>{v=R});const G=ua(),$=jt(),{getHighWaterMark:J,getDefaultHighWaterMark:X}=qr(),{aggregateTwoErrors:l,codes:{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:f,ERR_OUT_OF_RANGE:g,ERR_STREAM_PUSH_AFTER_EOF:_,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:h},AbortError:C}=Ue(),{validateObject:p}=nr(),A=I("kPaused"),{StringDecoder:P}=ca(),E=Jo();a(Y.prototype,B.prototype),a(Y,B);const M=()=>{},{errorOrDestroy:S}=$,j=1,K=2,W=4,ee=8,Q=16,le=32,ue=64,z=128,V=256,oe=512,ce=1024,fe=2048,L=4096,D=8192,F=16384,ne=32768,se=65536,ie=1<<17,q=1<<18;function Z(R){return{enumerable:!1,get(){return(this.state&R)!==0},set(x){x?this.state|=R:this.state&=~R}}}s(re.prototype,{objectMode:Z(j),ended:Z(K),endEmitted:Z(W),reading:Z(ee),constructed:Z(Q),sync:Z(le),needReadable:Z(ue),emittedReadable:Z(z),readableListening:Z(V),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(q)});function re(R,x,te){typeof te!="boolean"&&(te=x instanceof ht()),this.state=fe|L|Q|le,R&&R.objectMode&&(this.state|=j),te&&R&&R.readableObjectMode&&(this.state|=j),this.highWaterMark=R?J(this,R,"readableHighWaterMark",te):X(!1),this.buffer=new G,this.length=0,this.pipes=[],this.flowing=null,this[A]=null,R&&R.emitClose===!1&&(this.state&=~fe),R&&R.autoDestroy===!1&&(this.state&=~L),this.errored=null,this.defaultEncoding=R&&R.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,R&&R.encoding&&(this.decoder=new P(R.encoding),this.encoding=R.encoding)}function Y(R){if(!(this instanceof Y))return new Y(R);const x=this instanceof ht();this._readableState=new re(R,this,x),R&&(typeof R.read=="function"&&(this._read=R.read),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.construct=="function"&&(this._construct=R.construct),R.signal&&!x&&u(R.signal,this)),B.call(this,R),$.construct(this,()=>{this._readableState.needReadable&&Me(this,this._readableState)})}Y.prototype.destroy=$.destroy,Y.prototype._undestroy=$.undestroy,Y.prototype._destroy=function(R,x){x(R)},Y.prototype[U.captureRejectionSymbol]=function(R){this.destroy(R)},Y.prototype[N]=function(){let R;return this.destroyed||(R=this.readableEnded?null:new C,this.destroy(R)),new d((x,te)=>c(this,ae=>ae&&ae!==R?te(ae):x(null)))},Y.prototype.push=function(R,x){return we(this,R,x,!1)},Y.prototype.unshift=function(R,x){return we(this,R,x,!0)};function we(R,x,te,ae){v("readableAddChunk",x);const de=R._readableState;let Ne;if((de.state&j)===0&&(typeof x=="string"?(te=te||de.defaultEncoding,de.encoding!==te&&(ae&&de.encoding?x=b.from(x,te).toString(de.encoding):(x=b.from(x,te),te=""))):x instanceof b?te="":B._isUint8Array(x)?(x=B._uint8ArrayToBuffer(x),te=""):x!=null&&(Ne=new m("chunk",["string","Buffer","Uint8Array"],x))),Ne)S(R,Ne);else if(x===null)de.state&=~ee,Be(R,de);else if((de.state&j)!==0||x&&x.length>0)if(ae)if((de.state&W)!==0)S(R,new h);else{if(de.destroyed||de.errored)return!1;Le(R,de,x,!0)}else if(de.ended)S(R,new _);else{if(de.destroyed||de.errored)return!1;de.state&=~ee,de.decoder&&!te?(x=de.decoder.write(x),de.objectMode||x.length!==0?Le(R,de,x,!1):Me(R,de)):Le(R,de,x,!1)}else ae||(de.state&=~ee,Me(R,de));return!de.ended&&(de.length<de.highWaterMark||de.length===0)}function Le(R,x,te,ae){x.flowing&&x.length===0&&!x.sync&&R.listenerCount("data")>0?((x.state&se)!==0?x.awaitDrainWriters.clear():x.awaitDrainWriters=null,x.dataEmitted=!0,R.emit("data",te)):(x.length+=x.objectMode?1:te.length,ae?x.buffer.unshift(te):x.buffer.push(te),(x.state&ue)!==0&&Ze(R)),Me(R,x)}Y.prototype.isPaused=function(){const R=this._readableState;return R[A]===!0||R.flowing===!1},Y.prototype.setEncoding=function(R){const x=new P(R);this._readableState.decoder=x,this._readableState.encoding=this._readableState.decoder.encoding;const te=this._readableState.buffer;let ae="";for(const de of te)ae+=x.write(de);return te.clear(),ae!==""&&te.push(ae),this._readableState.length=ae.length,this};const ye=1073741824;function De(R){if(R>ye)throw new g("size","<= 1GiB",R);return R--,R|=R>>>1,R|=R>>>2,R|=R>>>4,R|=R>>>8,R|=R>>>16,R++,R}function Oe(R,x){return R<=0||x.length===0&&x.ended?0:(x.state&j)!==0?1:n(R)?x.flowing&&x.length?x.buffer.first().length:x.length:R<=x.length?R:x.ended?x.length:0}Y.prototype.read=function(R){v("read",R),R===void 0?R=NaN:t(R)||(R=i(R,10));const x=this._readableState,te=R;if(R>x.highWaterMark&&(x.highWaterMark=De(R)),R!==0&&(x.state&=~z),R===0&&x.needReadable&&((x.highWaterMark!==0?x.length>=x.highWaterMark:x.length>0)||x.ended))return v("read: emitReadable",x.length,x.ended),x.length===0&&x.ended?Ft(this):Ze(this),null;if(R=Oe(R,x),R===0&&x.ended)return x.length===0&&Ft(this),null;let ae=(x.state&ue)!==0;if(v("need readable",ae),(x.length===0||x.length-R<x.highWaterMark)&&(ae=!0,v("length less than watermark",ae)),x.ended||x.reading||x.destroyed||x.errored||!x.constructed)ae=!1,v("reading, ended or constructing",ae);else if(ae){v("do read"),x.state|=ee|le,x.length===0&&(x.state|=ue);try{this._read(x.highWaterMark)}catch(Ne){S(this,Ne)}x.state&=~le,x.reading||(R=Oe(te,x))}let de;return R>0?de=pt(R,x):de=null,de===null?(x.needReadable=x.length<=x.highWaterMark,R=0):(x.length-=R,x.multiAwaitDrain?x.awaitDrainWriters.clear():x.awaitDrainWriters=null),x.length===0&&(x.ended||(x.needReadable=!0),te!==R&&x.ended&&Ft(this)),de!==null&&!x.errorEmitted&&!x.closeEmitted&&(x.dataEmitted=!0,this.emit("data",de)),de};function Be(R,x){if(v("onEofChunk"),!x.ended){if(x.decoder){const te=x.decoder.end();te&&te.length&&(x.buffer.push(te),x.length+=x.objectMode?1:te.length)}x.ended=!0,x.sync?Ze(R):(x.needReadable=!1,x.emittedReadable=!0,St(R))}}function Ze(R){const x=R._readableState;v("emitReadable",x.needReadable,x.emittedReadable),x.needReadable=!1,x.emittedReadable||(v("emitReadable",x.flowing),x.emittedReadable=!0,r.nextTick(St,R))}function St(R){const x=R._readableState;v("emitReadable_",x.destroyed,x.length,x.ended),!x.destroyed&&!x.errored&&(x.length||x.ended)&&(R.emit("readable"),x.emittedReadable=!1),x.needReadable=!x.flowing&&!x.ended&&x.length<=x.highWaterMark,Wt(R)}function Me(R,x){!x.readingMore&&x.constructed&&(x.readingMore=!0,r.nextTick(lr,R,x))}function lr(R,x){for(;!x.reading&&!x.ended&&(x.length<x.highWaterMark||x.flowing&&x.length===0);){const te=x.length;if(v("maybeReadMore read 0"),R.read(0),te===x.length)break}x.readingMore=!1}Y.prototype._read=function(R){throw new f("_read()")},Y.prototype.pipe=function(R,x){const te=this,ae=this._readableState;ae.pipes.length===1&&(ae.multiAwaitDrain||(ae.multiAwaitDrain=!0,ae.awaitDrainWriters=new w(ae.awaitDrainWriters?[ae.awaitDrainWriters]:[]))),ae.pipes.push(R),v("pipe count=%d opts=%j",ae.pipes.length,x);const Ne=(!x||x.end!==!1)&&R!==r.stdout&&R!==r.stderr?hr:vt;ae.endEmitted?r.nextTick(Ne):te.once("end",Ne),R.on("unpipe",ke);function ke(at,Xe){v("onunpipe"),at===te&&Xe&&Xe.hasUnpiped===!1&&(Xe.hasUnpiped=!0,Kr())}function hr(){v("onend"),R.end()}let je,gr=!1;function Kr(){v("cleanup"),R.removeListener("close",rt),R.removeListener("finish",zt),je&&R.removeListener("drain",je),R.removeListener("error",Ht),R.removeListener("unpipe",ke),te.removeListener("end",hr),te.removeListener("end",vt),te.removeListener("data",wr),gr=!0,je&&ae.awaitDrainWriters&&(!R._writableState||R._writableState.needDrain)&&je()}function pr(){gr||(ae.pipes.length===1&&ae.pipes[0]===R?(v("false write response, pause",0),ae.awaitDrainWriters=R,ae.multiAwaitDrain=!1):ae.pipes.length>1&&ae.pipes.includes(R)&&(v("false write response, pause",ae.awaitDrainWriters.size),ae.awaitDrainWriters.add(R)),te.pause()),je||(je=zr(te,R),R.on("drain",je))}te.on("data",wr);function wr(at){v("ondata");const Xe=R.write(at);v("dest.write",Xe),Xe===!1&&pr()}function Ht(at){if(v("onerror",at),vt(),R.removeListener("error",Ht),R.listenerCount("error")===0){const Xe=R._writableState||R._readableState;Xe&&!Xe.errorEmitted?S(R,at):R.emit("error",at)}}y(R,"error",Ht);function rt(){R.removeListener("finish",zt),vt()}R.once("close",rt);function zt(){v("onfinish"),R.removeListener("close",rt),vt()}R.once("finish",zt);function vt(){v("unpipe"),te.unpipe(R)}return R.emit("pipe",te),R.writableNeedDrain===!0?pr():ae.flowing||(v("pipe resume"),te.resume()),R};function zr(R,x){return function(){const ae=R._readableState;ae.awaitDrainWriters===x?(v("pipeOnDrain",1),ae.awaitDrainWriters=null):ae.multiAwaitDrain&&(v("pipeOnDrain",ae.awaitDrainWriters.size),ae.awaitDrainWriters.delete(x)),(!ae.awaitDrainWriters||ae.awaitDrainWriters.size===0)&&R.listenerCount("data")&&R.resume()}}Y.prototype.unpipe=function(R){const x=this._readableState,te={hasUnpiped:!1};if(x.pipes.length===0)return this;if(!R){const de=x.pipes;x.pipes=[],this.pause();for(let Ne=0;Ne<de.length;Ne++)de[Ne].emit("unpipe",this,{hasUnpiped:!1});return this}const ae=e(x.pipes,R);return ae===-1?this:(x.pipes.splice(ae,1),x.pipes.length===0&&this.pause(),R.emit("unpipe",this,te),this)},Y.prototype.on=function(R,x){const te=B.prototype.on.call(this,R,x),ae=this._readableState;return R==="data"?(ae.readableListening=this.listenerCount("readable")>0,ae.flowing!==!1&&this.resume()):R==="readable"&&!ae.endEmitted&&!ae.readableListening&&(ae.readableListening=ae.needReadable=!0,ae.flowing=!1,ae.emittedReadable=!1,v("on readable",ae.length,ae.reading),ae.length?Ze(this):ae.reading||r.nextTick(ot,this)),te},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(R,x){const te=B.prototype.removeListener.call(this,R,x);return R==="readable"&&r.nextTick(ur,this),te},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(R){const x=B.prototype.removeAllListeners.apply(this,arguments);return(R==="readable"||R===void 0)&&r.nextTick(ur,this),x};function ur(R){const x=R._readableState;x.readableListening=R.listenerCount("readable")>0,x.resumeScheduled&&x[A]===!1?x.flowing=!0:R.listenerCount("data")>0?R.resume():x.readableListening||(x.flowing=null)}function ot(R){v("readable nexttick read 0"),R.read(0)}Y.prototype.resume=function(){const R=this._readableState;return R.flowing||(v("resume"),R.flowing=!R.readableListening,Bt(this,R)),R[A]=!1,this};function Bt(R,x){x.resumeScheduled||(x.resumeScheduled=!0,r.nextTick(Gr,R,x))}function Gr(R,x){v("resume",x.reading),x.reading||R.read(0),x.resumeScheduled=!1,R.emit("resume"),Wt(R),x.flowing&&!x.reading&&R.read(0)}Y.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[A]=!0,this};function Wt(R){const x=R._readableState;for(v("flow",x.flowing);x.flowing&&R.read()!==null;);}Y.prototype.wrap=function(R){let x=!1;R.on("data",ae=>{!this.push(ae)&&R.pause&&(x=!0,R.pause())}),R.on("end",()=>{this.push(null)}),R.on("error",ae=>{S(this,ae)}),R.on("close",()=>{this.destroy()}),R.on("destroy",()=>{this.destroy()}),this._read=()=>{x&&R.resume&&(x=!1,R.resume())};const te=o(R);for(let ae=1;ae<te.length;ae++){const de=te[ae];this[de]===void 0&&typeof R[de]=="function"&&(this[de]=R[de].bind(R))}return this},Y.prototype[O]=function(){return fr(this)},Y.prototype.iterator=function(R){return R!==void 0&&p(R,"options"),fr(this,R)};function fr(R,x){typeof R.read!="function"&&(R=Y.wrap(R,{objectMode:!0}));const te=cr(R,x);return te.stream=R,te}async function*cr(R,x){let te=M;function ae(ke){this===R?(te(),te=M):te=ke}R.on("readable",ae);let de;const Ne=c(R,{writable:!1},ke=>{de=ke?l(de,ke):null,te(),te=M});try{for(;;){const ke=R.destroyed?null:R.read();if(ke!==null)yield ke;else{if(de)throw de;if(de===null)return;await new d(ae)}}}catch(ke){throw de=l(de,ke),de}finally{(de||x?.destroyOnReturn!==!1)&&(de===void 0||R._readableState.autoDestroy)?$.destroyer(R,null):(R.off("readable",ae),Ne())}}s(Y.prototype,{readable:{__proto__:null,get(){const R=this._readableState;return!!R&&R.readable!==!1&&!R.destroyed&&!R.errorEmitted&&!R.endEmitted},set(R){this._readableState&&(this._readableState.readable=!!R)}},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(R){this._readableState&&(this._readableState.flowing=R)}},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(R){this._readableState&&(this._readableState.destroyed=R)}},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[A]!==!1},set(R){this[A]=!!R}}}),Y._fromList=pt;function pt(R,x){if(x.length===0)return null;let te;return x.objectMode?te=x.buffer.shift():!R||R>=x.length?(x.decoder?te=x.buffer.join(""):x.buffer.length===1?te=x.buffer.first():te=x.buffer.concat(x.length),x.buffer.clear()):te=x.buffer.consume(R,x.decoder),te}function Ft(R){const x=R._readableState;v("endReadable",x.endEmitted),x.endEmitted||(x.ended=!0,r.nextTick(st,x,R))}function st(R,x){if(v("endReadableNT",R.endEmitted,R.length),!R.errored&&!R.closeEmitted&&!R.endEmitted&&R.length===0){if(R.endEmitted=!0,x.emit("end"),x.writable&&x.allowHalfOpen===!1)r.nextTick(Vr,x);else if(R.autoDestroy){const te=x._writableState;(!te||te.autoDestroy&&(te.finished||te.writable===!1))&&x.destroy()}}}function Vr(R){R.writable&&!R.writableEnded&&!R.destroyed&&R.end()}Y.from=function(R,x){return E(Y,R,x)};let $t;function dr(){return $t===void 0&&($t={}),$t}return Y.fromWeb=function(R,x){return dr().newStreamReadableFromReadableStream(R,x)},Y.toWeb=function(R,x){return dr().newReadableStreamFromStreamReadable(R,x)},Y.wrap=function(R,x){var te,ae;return new Y({objectMode:(te=(ae=R.readableObjectMode)!==null&&ae!==void 0?ae:R.objectMode)!==null&&te!==void 0?te:!0,...x,destroy(de,Ne){$.destroyer(R,de),Ne(de)}}).wrap(R)},xn}var On,Zi;function oi(){if(Zi)return On;Zi=1;const r=Lt(),{ArrayPrototypeSlice:e,Error:t,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:s,ObjectSetPrototypeOf:o,StringPrototypeToLowerCase:a,Symbol:d,SymbolHasInstance:w}=Ie();On=p,p.WritableState=h;const{EventEmitter:N}=rr.requireEvents(),O=ii().Stream,{Buffer:I}=xe.requireDist(),U=jt(),{addAbortSignal:B}=Dr(),{getHighWaterMark:y,getDefaultHighWaterMark:b}=qr(),{ERR_INVALID_ARG_TYPE:u,ERR_METHOD_NOT_IMPLEMENTED:c,ERR_MULTIPLE_CALLBACK:v,ERR_STREAM_CANNOT_PIPE:G,ERR_STREAM_DESTROYED:$,ERR_STREAM_ALREADY_FINISHED:J,ERR_STREAM_NULL_VALUES:X,ERR_STREAM_WRITE_AFTER_END:l,ERR_UNKNOWN_ENCODING:m}=Ue().codes,{errorOrDestroy:f}=U;o(p.prototype,O.prototype),o(p,O);function g(){}const _=d("kOnFinished");function h(L,D,F){typeof F!="boolean"&&(F=D instanceof ht()),this.objectMode=!!(L&&L.objectMode),F&&(this.objectMode=this.objectMode||!!(L&&L.writableObjectMode)),this.highWaterMark=L?y(this,L,"writableHighWaterMark",F):b(!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=S.bind(void 0,D),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,C(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[_]=[]}function C(L){L.buffered=[],L.bufferedIndex=0,L.allBuffers=!0,L.allNoop=!0}h.prototype.getBuffer=function(){return e(this.buffered,this.bufferedIndex)},i(h.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function p(L){const D=this instanceof ht();if(!D&&!n(p,this))return new p(L);this._writableState=new h(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)),O.call(this,L),U.construct(this,()=>{const F=this._writableState;F.writing||ee(this,F),z(this,F)})}i(p,w,{__proto__:null,value:function(L){return n(this,L)?!0:this!==p?!1:L&&L._writableState instanceof h}}),p.prototype.pipe=function(){f(this,new G)};function A(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"&&!I.isEncoding(F))throw new m(F);typeof ne!="function"&&(ne=g)}if(D===null)throw new X;if(!se.objectMode)if(typeof D=="string")se.decodeStrings!==!1&&(D=I.from(D,F),F="buffer");else if(D instanceof I)F="buffer";else if(O._isUint8Array(D))D=O._uint8ArrayToBuffer(D),F="buffer";else throw new u("chunk",["string","Buffer","Uint8Array"],D);let ie;return se.ending?ie=new l:se.destroyed&&(ie=new $("write")),ie?(r.nextTick(ne,ie),f(L,ie,!0),ie):(se.pendingcb++,P(L,se,D,F,ne))}p.prototype.write=function(L,D,F){return A(this,L,D,F)===!0},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){const L=this._writableState;L.corked&&(L.corked--,L.writing||ee(this,L))},p.prototype.setDefaultEncoding=function(D){if(typeof D=="string"&&(D=a(D)),!I.isEncoding(D))throw new m(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 q=D.length<D.highWaterMark;return q||(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!==g&&(D.allNoop=!1)):(D.writelen=ie,D.writecb=se,D.writing=!0,D.sync=!0,L._write(F,ne,D.onwrite),D.sync=!1),q&&!D.errored&&!D.destroyed}function E(L,D,F,ne,se,ie,q){D.writelen=ne,D.writecb=q,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new $("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),f(L,F)}function S(L,D){const F=L._writableState,ne=F.sync,se=F.writecb;if(typeof se!="function"){f(L,new v);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)):K(L,F,1,se))}function j({stream:L,state:D,count:F,cb:ne}){return D.afterWriteTickInfo=null,K(L,D,F,ne)}function K(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),z(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:q}=L.buffered[se],Z=L.objectMode?1:ie.length;L.length-=Z,q((D=L.errored)!==null&&D!==void 0?D:new $("write"))}const F=L[_].splice(0);for(let se=0;se<F.length;se++){var ne;F[se]((ne=L.errored)!==null&&ne!==void 0?ne:new $("end"))}C(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 q=ne;if(D.bufferProcessing=!0,ie>1&&L._writev){D.pendingcb-=ie-1;const Z=D.allNoop?g:Y=>{for(let we=q;we<F.length;++we)F[we].callback(Y)},re=D.allNoop&&q===0?F:e(F,q);re.allBuffers=D.allBuffers,E(L,D,!0,D.length,re,"",Z),C(D)}else{do{const{chunk:Z,encoding:re,callback:Y}=F[q];F[q++]=null;const we=se?1:Z.length;E(L,D,!1,we,Z,re,Y)}while(q<F.length&&!D.writing);q===F.length?C(D):q>256?(F.splice(0,q),D.bufferedIndex=0):D.bufferedIndex=q}D.bufferProcessing=!1}p.prototype._write=function(L,D,F){if(this._writev)this._writev([{chunk:L,encoding:D}],F);else throw new c("_write()")},p.prototype._writev=null,p.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=A(this,L,D);ie instanceof t&&(se=ie)}return ne.corked&&(ne.corked=1,this.uncork()),se||(!ne.errored&&!ne.ending?(ne.ending=!0,z(this,ne,!0),ne.ended=!0):ne.finished?se=new J("end"):ne.destroyed&&(se=new $("end"))),typeof F=="function"&&(se||ne.finished?r.nextTick(F,se):ne[_].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){f(L,se??v());return}if(F=!0,D.pendingcb--,se){const ie=D[_].splice(0);for(let q=0;q<ie.length;q++)ie[q](se);f(L,se,D.sync)}else Q(D)&&(D.prefinished=!0,L.emit("prefinish"),D.pendingcb++,r.nextTick(V,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 z(L,D,F){Q(D)&&(ue(L,D),D.pendingcb===0&&(F?(D.pendingcb++,r.nextTick((ne,se)=>{Q(se)?V(ne,se):se.pendingcb--},L,D)):Q(D)&&(D.pendingcb++,V(L,D))))}function V(L,D){D.pendingcb--,D.finished=!0;const F=D[_].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(p.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;p.prototype.destroy=function(L,D){const F=this._writableState;return!F.destroyed&&(F.bufferedIndex<F.buffered.length||F[_].length)&&r.nextTick(W,F),oe.call(this,L,D),this},p.prototype._undestroy=U.undestroy,p.prototype._destroy=function(L,D){D(L)},p.prototype[N.captureRejectionSymbol]=function(L){this.destroy(L)};let ce;function fe(){return ce===void 0&&(ce={}),ce}return p.fromWeb=function(L,D){return fe().newStreamWritableFromWritableStream(L,D)},p.toWeb=function(L){return fe().newWritableStreamFromStreamWritable(L)},On}var Nn,Xi;function da(){if(Xi)return Nn;Xi=1;const r=Lt(),e=xe.requireDist(),{isReadable:t,isWritable:n,isIterable:i,isNodeStream:s,isReadableNodeStream:o,isWritableNodeStream:a,isDuplexNodeStream:d,isReadableStream:w,isWritableStream:N}=gt(),O=Et(),{AbortError:I,codes:{ERR_INVALID_ARG_TYPE:U,ERR_INVALID_RETURN_VALUE:B}}=Ue(),{destroyer:y}=jt(),b=ht(),u=Ur(),c=oi(),{createDeferredPromise:v}=$e(),G=Jo(),$=globalThis.Blob||e.Blob,J=typeof $<"u"?function(h){return h instanceof $}:function(h){return!1},X=globalThis.AbortController||er().AbortController,{FunctionPrototypeCall:l}=Ie();class m extends b{constructor(h){super(h),h?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),h?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}Nn=function _(h,C){if(d(h))return h;if(o(h))return g({readable:h});if(a(h))return g({writable:h});if(s(h))return g({writable:!1,readable:!1});if(w(h))return g({readable:u.fromWeb(h)});if(N(h))return g({writable:c.fromWeb(h)});if(typeof h=="function"){const{value:A,write:P,final:E,destroy:M}=f(h);if(i(A))return G(m,A,{objectMode:!0,write:P,final:E,destroy:M});const S=A?.then;if(typeof S=="function"){let j;const K=l(S,A,W=>{if(W!=null)throw new B("nully","body",W)},W=>{y(j,W)});return j=new m({objectMode:!0,readable:!1,write:P,final(W){E(async()=>{try{await K,r.nextTick(W,null)}catch(ee){r.nextTick(W,ee)}})},destroy:M})}throw new B("Iterable, AsyncIterable or AsyncFunction",C,A)}if(J(h))return _(h.arrayBuffer());if(i(h))return G(m,h,{objectMode:!0,writable:!1});if(w(h?.readable)&&N(h?.writable))return m.fromWeb(h);if(typeof h?.writable=="object"||typeof h?.readable=="object"){const A=h!=null&&h.readable?o(h?.readable)?h?.readable:_(h.readable):void 0,P=h!=null&&h.writable?a(h?.writable)?h?.writable:_(h.writable):void 0;return g({readable:A,writable:P})}const p=h?.then;if(typeof p=="function"){let A;return l(p,h,P=>{P!=null&&A.push(P),A.push(null)},P=>{y(A,P)}),A=new m({objectMode:!0,writable:!1,read(){}})}throw new U(C,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],h)};function f(_){let{promise:h,resolve:C}=v();const p=new X,A=p.signal;return{value:_((async function*(){for(;;){const E=h;h=null;const{chunk:M,done:S,cb:j}=await E;if(r.nextTick(j),S)return;if(A.aborted)throw new I(void 0,{cause:A.reason});({promise:h,resolve:C}=v()),yield M}})(),{signal:A}),write(E,M,S){const j=C;C=null,j({chunk:E,done:!1,cb:S})},final(E){const M=C;C=null,M({done:!0,cb:E})},destroy(E,M){p.abort(),M(E)}}}function g(_){const h=_.readable&&typeof _.readable.read!="function"?u.wrap(_.readable):_.readable,C=_.writable;let p=!!t(h),A=!!n(C),P,E,M,S,j;function K(W){const ee=S;S=null,ee?ee(W):W&&j.destroy(W)}return j=new m({readableObjectMode:!!(h!=null&&h.readableObjectMode),writableObjectMode:!!(C!=null&&C.writableObjectMode),readable:p,writable:A}),A&&(O(C,W=>{A=!1,W&&y(h,W),K(W)}),j._write=function(W,ee,Q){C.write(W,ee)?Q():P=Q},j._final=function(W){C.end(),E=W},C.on("drain",function(){if(P){const W=P;P=null,W()}}),C.on("finish",function(){if(E){const W=E;E=null,W()}})),p&&(O(h,W=>{p=!1,W&&y(h,W),K(W)}),h.on("readable",function(){if(M){const W=M;M=null,W()}}),h.on("end",function(){j.push(null)}),j._read=function(){for(;;){const W=h.read();if(W===null){M=j._read;return}if(!j.push(W))return}}),j._destroy=function(W,ee){!W&&S!==null&&(W=new I),M=null,P=null,E=null,S===null?ee(W):(S=ee,y(C,W),y(h,W))},j}return Nn}var Cn,Qi;function ht(){if(Qi)return Cn;Qi=1;const{ObjectDefineProperties:r,ObjectGetOwnPropertyDescriptor:e,ObjectKeys:t,ObjectSetPrototypeOf:n}=Ie();Cn=o;const i=Ur(),s=oi();n(o.prototype,i.prototype),n(o,i);{const N=t(s.prototype);for(let O=0;O<N.length;O++){const I=N[O];o.prototype[I]||(o.prototype[I]=s.prototype[I])}}function o(N){if(!(this instanceof o))return new o(N);i.call(this,N),s.call(this,N),N?(this.allowHalfOpen=N.allowHalfOpen!==!1,N.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),N.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(N){this._readableState&&this._writableState&&(this._readableState.destroyed=N,this._writableState.destroyed=N)}}});let a;function d(){return a===void 0&&(a={}),a}o.fromWeb=function(N,O){return d().newStreamDuplexFromReadableWritablePair(N,O)},o.toWeb=function(N){return d().newReadableWritablePairFromDuplex(N)};let w;return o.from=function(N){return w||(w=da()),w(N,"body")},Cn}var Pn,eo;function Zo(){if(eo)return Pn;eo=1;const{ObjectSetPrototypeOf:r,Symbol:e}=Ie();Pn=o;const{ERR_METHOD_NOT_IMPLEMENTED:t}=Ue().codes,n=ht(),{getHighWaterMark:i}=qr();r(o.prototype,n.prototype),r(o,n);const s=e("kCallback");function o(w){if(!(this instanceof o))return new o(w);const N=w?i(this,w,"readableHighWaterMark",!0):null;N===0&&(w={...w,highWaterMark:null,readableHighWaterMark:N,writableHighWaterMark:w.writableHighWaterMark||0}),n.call(this,w),this._readableState.sync=!1,this[s]=null,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",d)}function a(w){typeof this._flush=="function"&&!this.destroyed?this._flush((N,O)=>{if(N){w?w(N):this.destroy(N);return}O!=null&&this.push(O),this.push(null),w&&w()}):(this.push(null),w&&w())}function d(){this._final!==a&&a.call(this)}return o.prototype._final=a,o.prototype._transform=function(w,N,O){throw new t("_transform()")},o.prototype._write=function(w,N,O){const I=this._readableState,U=this._writableState,B=I.length;this._transform(w,N,(y,b)=>{if(y){O(y);return}b!=null&&this.push(b),U.ended||B===I.length||I.length<I.highWaterMark?O():this[s]=O})},o.prototype._read=function(){if(this[s]){const w=this[s];this[s]=null,w()}},Pn}var Ln,to;function Xo(){if(to)return Ln;to=1;const{ObjectSetPrototypeOf:r}=Ie();Ln=t;const e=Zo();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)},Ln}var Bn,ro;function si(){if(ro)return Bn;ro=1;const r=Lt(),{ArrayIsArray:e,Promise:t,SymbolAsyncIterator:n,SymbolDispose:i}=Ie(),s=Et(),{once:o}=$e(),a=jt(),d=ht(),{aggregateTwoErrors:w,codes:{ERR_INVALID_ARG_TYPE:N,ERR_INVALID_RETURN_VALUE:O,ERR_MISSING_ARGS:I,ERR_STREAM_DESTROYED:U,ERR_STREAM_PREMATURE_CLOSE:B},AbortError:y}=Ue(),{validateFunction:b,validateAbortSignal:u}=nr(),{isIterable:c,isReadable:v,isReadableNodeStream:G,isNodeStream:$,isTransformStream:J,isWebStream:X,isReadableStream:l,isReadableFinished:m}=gt(),f=globalThis.AbortController||er().AbortController;let g,_,h;function C(W,ee,Q){let le=!1;W.on("close",()=>{le=!0});const ue=s(W,{readable:ee,writable:Q},z=>{le=!z});return{destroy:z=>{le||(le=!0,a.destroyer(W,z||new U("pipe")))},cleanup:ue}}function p(W){return b(W[W.length-1],"streams[stream.length - 1]"),W.pop()}function A(W){if(c(W))return W;if(G(W))return P(W);throw new N("val",["Readable","Iterable","AsyncIterable"],W)}async function*P(W){_||(_=Ur()),yield*_.prototype[n].call(W)}async function E(W,ee,Q,{end:le}){let ue,z=null;const V=fe=>{if(fe&&(ue=fe),z){const L=z;z=null,L()}},oe=()=>new t((fe,L)=>{ue?L(ue):z=()=>{ue?L(ue):fe()}});ee.on("drain",V);const ce=s(ee,{readable:!1},V);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?w(ue,fe):fe)}finally{ce(),ee.off("drain",V)}}async function M(W,ee,Q,{end:le}){J(ee)&&(ee=ee.writable);const ue=ee.getWriter();try{for await(const z of W)await ue.ready,ue.write(z).catch(()=>{});await ue.ready,le&&await ue.close(),Q()}catch(z){try{await ue.abort(z),Q(z)}catch(V){Q(V)}}}function S(...W){return j(W,o(p(W)))}function j(W,ee,Q){if(W.length===1&&e(W[0])&&(W=W[0]),W.length<2)throw new I("streams");const le=new f,ue=le.signal,z=Q?.signal,V=[];u(z,"options.signal");function oe(){se(new y)}h=h||$e().addAbortListener;let ce;z&&(ce=h(z,oe));let fe,L;const D=[];let F=0;function ne(re){se(re,--F===0)}function se(re,Y){var we;if(re&&(!fe||fe.code==="ERR_STREAM_PREMATURE_CLOSE")&&(fe=re),!(!fe&&!Y)){for(;D.length;)D.shift()(fe);(we=ce)===null||we===void 0||we[i](),le.abort(),Y&&(fe||V.forEach(Le=>Le()),r.nextTick(ee,fe,L))}}let ie;for(let re=0;re<W.length;re++){const Y=W[re],we=re<W.length-1,Le=re>0,ye=we||Q?.end!==!1,De=re===W.length-1;if($(Y)){let Oe=function(Be){Be&&Be.name!=="AbortError"&&Be.code!=="ERR_STREAM_PREMATURE_CLOSE"&&ne(Be)};if(ye){const{destroy:Be,cleanup:Ze}=C(Y,we,Le);D.push(Be),v(Y)&&De&&V.push(Ze)}Y.on("error",Oe),v(Y)&&De&&V.push(()=>{Y.removeListener("error",Oe)})}if(re===0)if(typeof Y=="function"){if(ie=Y({signal:ue}),!c(ie))throw new O("Iterable, AsyncIterable or Stream","source",ie)}else c(Y)||G(Y)||J(Y)?ie=Y:ie=d.from(Y);else if(typeof Y=="function"){if(J(ie)){var q;ie=A((q=ie)===null||q===void 0?void 0:q.readable)}else ie=A(ie);if(ie=Y(ie,{signal:ue}),we){if(!c(ie,!0))throw new O("AsyncIterable",`transform[${re-1}]`,ie)}else{var Z;g||(g=Xo());const Oe=new g({objectMode:!0}),Be=(Z=ie)===null||Z===void 0?void 0:Z.then;if(typeof Be=="function")F++,Be.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(c(ie,!0))F++,E(ie,Oe,ne,{end:ye});else if(l(ie)||J(ie)){const Me=ie.readable||ie;F++,E(Me,Oe,ne,{end:ye})}else throw new O("AsyncIterable or Promise","destination",ie);ie=Oe;const{destroy:Ze,cleanup:St}=C(ie,!1,!0);D.push(Ze),De&&V.push(St)}}else if($(Y)){if(G(ie)){F+=2;const Oe=K(ie,Y,ne,{end:ye});v(Y)&&De&&V.push(Oe)}else if(J(ie)||l(ie)){const Oe=ie.readable||ie;F++,E(Oe,Y,ne,{end:ye})}else if(c(ie))F++,E(ie,Y,ne,{end:ye});else throw new N("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=Y}else if(X(Y)){if(G(ie))F++,M(A(ie),Y,ne,{end:ye});else if(l(ie)||c(ie))F++,M(ie,Y,ne,{end:ye});else if(J(ie))F++,M(ie.readable,Y,ne,{end:ye});else throw new N("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=Y}else ie=d.from(Y)}return(ue!=null&&ue.aborted||z!=null&&z.aborted)&&r.nextTick(oe),ie}function K(W,ee,Q,{end:le}){let ue=!1;if(ee.on("close",()=>{ue||Q(new B)}),W.pipe(ee,{end:!1}),le){let z=function(){ue=!0,ee.end()};m(W)?r.nextTick(z):W.once("end",z)}else Q();return s(W,{readable:!0,writable:!1},z=>{const V=W._readableState;z&&z.code==="ERR_STREAM_PREMATURE_CLOSE"&&V&&V.ended&&!V.errored&&!V.errorEmitted?W.once("end",Q).once("error",Q):Q(z)}),s(ee,{readable:!1,writable:!0},Q)}return Bn={pipelineImpl:j,pipeline:S},Bn}var Mn,no;function Qo(){if(no)return Mn;no=1;const{pipeline:r}=si(),e=ht(),{destroyer:t}=jt(),{isNodeStream:n,isReadable:i,isWritable:s,isWebStream:o,isTransformStream:a,isWritableStream:d,isReadableStream:w}=gt(),{AbortError:N,codes:{ERR_INVALID_ARG_VALUE:O,ERR_MISSING_ARGS:I}}=Ue(),U=Et();return Mn=function(...y){if(y.length===0)throw new I("streams");if(y.length===1)return e.from(y[0]);const b=[...y];if(typeof y[0]=="function"&&(y[0]=e.from(y[0])),typeof y[y.length-1]=="function"){const g=y.length-1;y[g]=e.from(y[g])}for(let g=0;g<y.length;++g)if(!(!n(y[g])&&!o(y[g]))){if(g<y.length-1&&!(i(y[g])||w(y[g])||a(y[g])))throw new O(`streams[${g}]`,b[g],"must be readable");if(g>0&&!(s(y[g])||d(y[g])||a(y[g])))throw new O(`streams[${g}]`,b[g],"must be writable")}let u,c,v,G,$;function J(g){const _=G;G=null,_?_(g):g?$.destroy(g):!f&&!m&&$.destroy()}const X=y[0],l=r(y,J),m=!!(s(X)||d(X)||a(X)),f=!!(i(l)||w(l)||a(l));if($=new e({writableObjectMode:!!(X!=null&&X.writableObjectMode),readableObjectMode:!!(l!=null&&l.readableObjectMode),writable:m,readable:f}),m){if(n(X))$._write=function(_,h,C){X.write(_,h)?C():u=C},$._final=function(_){X.end(),c=_},X.on("drain",function(){if(u){const _=u;u=null,_()}});else if(o(X)){const h=(a(X)?X.writable:X).getWriter();$._write=async function(C,p,A){try{await h.ready,h.write(C).catch(()=>{}),A()}catch(P){A(P)}},$._final=async function(C){try{await h.ready,h.close().catch(()=>{}),c=C}catch(p){C(p)}}}const g=a(l)?l.readable:l;U(g,()=>{if(c){const _=c;c=null,_()}})}if(f){if(n(l))l.on("readable",function(){if(v){const g=v;v=null,g()}}),l.on("end",function(){$.push(null)}),$._read=function(){for(;;){const g=l.read();if(g===null){v=$._read;return}if(!$.push(g))return}};else if(o(l)){const _=(a(l)?l.readable:l).getReader();$._read=async function(){for(;;)try{const{value:h,done:C}=await _.read();if(!$.push(h))return;if(C){$.push(null);return}}catch{return}}}}return $._destroy=function(g,_){!g&&G!==null&&(g=new N),v=null,u=null,c=null,G===null?_(g):(G=_,n(l)&&t(l,g))},$},Mn}var io;function ha(){if(io)return vr;io=1;const r=globalThis.AbortController||er().AbortController,{codes:{ERR_INVALID_ARG_VALUE:e,ERR_INVALID_ARG_TYPE:t,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:i},AbortError:s}=Ue(),{validateAbortSignal:o,validateInteger:a,validateObject:d}=nr(),w=Ie().Symbol("kWeak"),N=Ie().Symbol("kResistStopPropagation"),{finished:O}=Et(),I=Qo(),{addAbortSignalNoValidate:U}=Dr(),{isWritable:B,isNodeStream:y}=gt(),{deprecate:b}=$e(),{ArrayPrototypePush:u,Boolean:c,MathFloor:v,Number:G,NumberIsNaN:$,Promise:J,PromiseReject:X,PromiseResolve:l,PromisePrototypeThen:m,Symbol:f}=Ie(),g=f("kEmpty"),_=f("kEof");function h(z,V){if(V!=null&&d(V,"options"),V?.signal!=null&&o(V.signal,"options.signal"),y(z)&&!B(z))throw new e("stream",z,"must be writable");const oe=I(this,z);return V!=null&&V.signal&&U(V.signal,oe),oe}function C(z,V){if(typeof z!="function")throw new t("fn",["Function","AsyncFunction"],z);V!=null&&d(V,"options"),V?.signal!=null&&o(V.signal,"options.signal");let oe=1;V?.concurrency!=null&&(oe=v(V.concurrency));let ce=oe-1;return V?.highWaterMark!=null&&(ce=v(V.highWaterMark)),a(oe,"options.concurrency",1),a(ce,"options.highWaterMark",0),ce+=oe,(async function*(){const L=$e().AbortSignalAny([V?.signal].filter(c)),D=this,F=[],ne={signal:L};let se,ie,q=!1,Z=0;function re(){q=!0,Y()}function Y(){Z-=1,we()}function we(){ie&&!q&&Z<oe&&F.length<ce&&(ie(),ie=null)}async function Le(){try{for await(let ye of D){if(q)return;if(L.aborted)throw new s;try{if(ye=z(ye,ne),ye===g)continue;ye=l(ye)}catch(De){ye=X(De)}Z+=1,m(ye,Y,re),F.push(ye),se&&(se(),se=null),!q&&(F.length>=ce||Z>=oe)&&await new J(De=>{ie=De})}F.push(_)}catch(ye){const De=X(ye);m(De,Y,re),F.push(De)}finally{q=!0,se&&(se(),se=null)}}Le();try{for(;;){for(;F.length>0;){const ye=await F[0];if(ye===_)return;if(L.aborted)throw new s;ye!==g&&(yield ye),F.shift(),we()}await new J(ye=>{se=ye})}}finally{q=!0,ie&&(ie(),ie=null)}}).call(this)}function p(z=void 0){return z!=null&&d(z,"options"),z?.signal!=null&&o(z.signal,"options.signal"),(async function*(){let oe=0;for await(const fe of this){var ce;if(z!=null&&(ce=z.signal)!==null&&ce!==void 0&&ce.aborted)throw new s({cause:z.signal.reason});yield[oe++,fe]}}).call(this)}async function A(z,V=void 0){for await(const oe of S.call(this,z,V))return!0;return!1}async function P(z,V=void 0){if(typeof z!="function")throw new t("fn",["Function","AsyncFunction"],z);return!await A.call(this,async(...oe)=>!await z(...oe),V)}async function E(z,V){for await(const oe of S.call(this,z,V))return oe}async function M(z,V){if(typeof z!="function")throw new t("fn",["Function","AsyncFunction"],z);async function oe(ce,fe){return await z(ce,fe),g}for await(const ce of C.call(this,oe,V));}function S(z,V){if(typeof z!="function")throw new t("fn",["Function","AsyncFunction"],z);async function oe(ce,fe){return await z(ce,fe)?ce:g}return C.call(this,oe,V)}class j extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function K(z,V,oe){var ce;if(typeof z!="function")throw new t("reducer",["Function","AsyncFunction"],z);oe!=null&&d(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 O(this.destroy(se)),se}const L=new r,D=L.signal;if(oe!=null&&oe.signal){const se={once:!0,[w]:this,[N]:!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?V=await z(V,se,{signal:D}):(V=se,fe=!0)}if(!F&&!fe)throw new j}finally{L.abort()}return V}async function W(z){z!=null&&d(z,"options"),z?.signal!=null&&o(z.signal,"options.signal");const V=[];for await(const ce of this){var oe;if(z!=null&&(oe=z.signal)!==null&&oe!==void 0&&oe.aborted)throw new s(void 0,{cause:z.signal.reason});u(V,ce)}return V}function ee(z,V){const oe=C.call(this,z,V);return(async function*(){for await(const fe of oe)yield*fe}).call(this)}function Q(z){if(z=G(z),$(z))return 0;if(z<0)throw new i("number",">= 0",z);return z}function le(z,V=void 0){return V!=null&&d(V,"options"),V?.signal!=null&&o(V.signal,"options.signal"),z=Q(z),(async function*(){var ce;if(V!=null&&(ce=V.signal)!==null&&ce!==void 0&&ce.aborted)throw new s;for await(const L of this){var fe;if(V!=null&&(fe=V.signal)!==null&&fe!==void 0&&fe.aborted)throw new s;z--<=0&&(yield L)}}).call(this)}function ue(z,V=void 0){return V!=null&&d(V,"options"),V?.signal!=null&&o(V.signal,"options.signal"),z=Q(z),(async function*(){var ce;if(V!=null&&(ce=V.signal)!==null&&ce!==void 0&&ce.aborted)throw new s;for await(const L of this){var fe;if(V!=null&&(fe=V.signal)!==null&&fe!==void 0&&fe.aborted)throw new s;if(z-- >0&&(yield L),z<=0)return}}).call(this)}return vr.streamReturningOperators={asIndexedPairs:b(p,"readable.asIndexedPairs will be removed in a future version."),drop:le,filter:S,flatMap:ee,map:C,take:ue,compose:h},vr.promiseReturningOperators={every:P,forEach:M,reduce:K,toArray:W,some:A,find:E},vr}var Dn,oo;function es(){if(oo)return Dn;oo=1;const{ArrayPrototypePop:r,Promise:e}=Ie(),{isIterable:t,isNodeStream:n,isWebStream:i}=gt(),{pipelineImpl:s}=si(),{finished:o}=Et();ts();function a(...d){return new e((w,N)=>{let O,I;const U=d[d.length-1];if(U&&typeof U=="object"&&!n(U)&&!t(U)&&!i(U)){const B=r(d);O=B.signal,I=B.end}s(d,(B,y)=>{B?N(B):w(y)},{signal:O,end:I})})}return Dn={finished:o,pipeline:a},Dn}var so;function ts(){if(so)return hn.exports;so=1;const{Buffer:r}=xe.requireDist(),{ObjectDefineProperty:e,ObjectKeys:t,ReflectApply:n}=Ie(),{promisify:{custom:i}}=$e(),{streamReturningOperators:s,promiseReturningOperators:o}=ha(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:a}}=Ue(),d=Qo(),{setDefaultHighWaterMark:w,getDefaultHighWaterMark:N}=qr(),{pipeline:O}=si(),{destroyer:I}=jt(),U=Et(),B=es(),y=gt(),b=hn.exports=ii().Stream;b.isDestroyed=y.isDestroyed,b.isDisturbed=y.isDisturbed,b.isErrored=y.isErrored,b.isReadable=y.isReadable,b.isWritable=y.isWritable,b.Readable=Ur();for(const c of t(s)){let G=function(...$){if(new.target)throw a();return b.Readable.from(n(v,this,$))};const v=s[c];e(G,"name",{__proto__:null,value:v.name}),e(G,"length",{__proto__:null,value:v.length}),e(b.Readable.prototype,c,{__proto__:null,value:G,enumerable:!1,configurable:!0,writable:!0})}for(const c of t(o)){let G=function(...$){if(new.target)throw a();return n(v,this,$)};const v=o[c];e(G,"name",{__proto__:null,value:v.name}),e(G,"length",{__proto__:null,value:v.length}),e(b.Readable.prototype,c,{__proto__:null,value:G,enumerable:!1,configurable:!0,writable:!0})}b.Writable=oi(),b.Duplex=ht(),b.Transform=Zo(),b.PassThrough=Xo(),b.pipeline=O;const{addAbortSignal:u}=Dr();return b.addAbortSignal=u,b.finished=U,b.destroy=I,b.compose=d,b.setDefaultHighWaterMark=w,b.getDefaultHighWaterMark=N,e(b,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return B}}),e(O,i,{__proto__:null,enumerable:!0,get(){return B.pipeline}}),e(U,i,{__proto__:null,enumerable:!0,get(){return B.finished}}),b.Stream=b,b._isUint8Array=function(v){return v instanceof Uint8Array},b._uint8ArrayToBuffer=function(v){return r.from(v.buffer,v.byteOffset,v.byteLength)},hn.exports}var ao;function ga(){return ao||(ao=1,(function(r){const e=ts(),t=es(),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})(dn)),dn.exports}var kr=ga(),pa=Vo();const wa=xe.getDefaultExportFromCjs(pa);var Ir={exports:{}},qn,lo;function ba(){if(lo)return qn;lo=1,qn=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),a=i[i.length-1];return typeof o=="function"&&o!==a&&Object.keys(a).forEach(function(d){o[d]=a[d]}),o}}return qn}var uo;function ai(){if(uo)return Ir.exports;uo=1;var r=ba();Ir.exports=r(e),Ir.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 Ir.exports}var Un,fo;function rs(){if(fo)return Un;fo=1;var r=ai(),e=function(){},t=xe.commonjsGlobal.Bare?queueMicrotask:qe.process$1.nextTick.bind(qe.process$1),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,a,d){if(typeof a=="function")return s(o,null,a);a||(a={}),d=r(d||e);var w=o._writableState,N=o._readableState,O=a.readable||a.readable!==!1&&o.readable,I=a.writable||a.writable!==!1&&o.writable,U=!1,B=function(){o.writable||y()},y=function(){I=!1,O||d.call(o)},b=function(){O=!1,I||d.call(o)},u=function(J){d.call(o,J?new Error("exited with error code: "+J):null)},c=function(J){d.call(o,J)},v=function(){t(G)},G=function(){if(!U){if(O&&!(N&&N.ended&&!N.destroyed))return d.call(o,new Error("premature close"));if(I&&!(w&&w.ended&&!w.destroyed))return d.call(o,new Error("premature close"))}},$=function(){o.req.on("finish",y)};return n(o)?(o.on("complete",y),o.on("abort",v),o.req?$():o.on("request",$)):I&&!w&&(o.on("end",B),o.on("close",B)),i(o)&&o.on("exit",u),o.on("end",b),o.on("finish",y),a.error!==!1&&o.on("error",c),o.on("close",v),function(){U=!0,o.removeListener("complete",y),o.removeListener("abort",v),o.removeListener("request",$),o.req&&o.req.removeListener("finish",y),o.removeListener("end",B),o.removeListener("close",B),o.removeListener("finish",y),o.removeListener("exit",u),o.removeListener("end",b),o.removeListener("error",c),o.removeListener("close",v)}};return Un=s,Un}var ya=rs();const co=xe.getDefaultExportFromCjs(ya);var _a=ai();const ma=xe.getDefaultExportFromCjs(_a);var kn,ho;function Ea(){if(ho)return kn;ho=1;var r=ai(),e=rs(),t;try{t=rr.require$$2}catch{}var n=function(){},i=typeof qe.process$1>"u"?!1:/^v?\.0/.test(qe.process$1.version),s=function(I){return typeof I=="function"},o=function(I){return!i||!t?!1:(I instanceof(t.ReadStream||n)||I instanceof(t.WriteStream||n))&&s(I.close)},a=function(I){return I.setHeader&&s(I.abort)},d=function(I,U,B,y){y=r(y);var b=!1;I.on("close",function(){b=!0}),e(I,{readable:U,writable:B},function(c){if(c)return y(c);b=!0,y()});var u=!1;return function(c){if(!b&&!u){if(u=!0,o(I))return I.close(n);if(a(I))return I.abort();if(s(I.destroy))return I.destroy();y(c||new Error("stream was destroyed"))}}},w=function(I){I()},N=function(I,U){return I.pipe(U)},O=function(){var I=Array.prototype.slice.call(arguments),U=s(I[I.length-1]||n)&&I.pop()||n;if(Array.isArray(I[0])&&(I=I[0]),I.length<2)throw new Error("pump requires two streams per minimum");var B,y=I.map(function(b,u){var c=u<I.length-1,v=u>0;return d(b,c,v,function(G){B||(B=G),G&&y.forEach(w),!c&&(y.forEach(w),U(B))})});return I.reduce(N)};return kn=O,kn}var Sa=Ea();const go=xe.getDefaultExportFromCjs(Sa);function Tr(){}const po="SYN",jn="ACK",wo="BRK";class bo extends kr.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(wo,null,Tr),this._haveSyn=!1,this._init=!1}_handShake(){this._write(po,null,Tr),this.cork()}_onData(e){if(!this._init)e===po?(this._haveSyn=!0,this._write(jn,null,Tr)):e===jn&&(this._init=!0,this._haveSyn||this._write(jn,null,Tr),this.uncork());else if(e===wo)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 va={rpc:{internal:-32603}},yo={"-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."}},_o=va.rpc.internal,Aa="Unspecified error message. This is a bug, please report it.";function ns(r){return Number.isInteger(r)}function mo(r){return typeof r=="string"&&r.length>0}function Eo(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}function is(r){const e=r;return!(!e||!ns(e.code)||!mo(e.message)||e.stack&&!mo(e.stack))}function Ra(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Aa;if(ns(r)){const t=r.toString();if(Object.hasOwn(yo,t))return yo[t].message}return e}const Ia={code:_o,message:Ra(_o)};function Kn(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 So(r){return Object.getOwnPropertyNames(r).reduce((e,t)=>{const n=r[t];return Kn(n)&&(e[t]=n),e},{})}function Ta(r){return Array.isArray(r)?r.map(e=>Kn(e)?e:Eo(e)?So(e):null):Eo(r)?So(r):Kn(r)?r:null}function xa(r,e){if(r&&typeof r=="object"&&"serialize"in r&&typeof r.serialize=="function")return r.serialize();if(is(r))return r;const t=Ta(r);return Je(Je({},e),{},{data:{cause:t}})}function vo(r){let{fallbackError:e=Ia,shouldIncludeStack:t=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!is(e))throw new Error("Must provide fallback error with integer number code and string message.");const n=xa(r,e);return t||delete n.stack,n}function Ao(r,e,t){try{Reflect.apply(r,e,t)}catch(n){setTimeout(()=>{throw n})}}function Oa(r){const e=r.length,t=new Array(e);for(let n=0;n<e;n+=1)t[n]=r[n];return t}class jr extends na.eventsExports.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 d;if(s.length>0&&([d]=s),d instanceof Error)throw d;const w=new Error(`Unhandled error.${d?` (${d.message})`:""}`);throw w.context=d,w}const a=n[e];if(a===void 0)return!1;if(typeof a=="function")Ao(a,this,s);else{const d=a.length,w=Oa(a);for(let N=0;N<d;N+=1)Ao(w[N],this,s)}return!0}}class Jt 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 wa({code:this.code,message:this.message,data:this.data,stack:this.stack})}}const Yn=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 Na(){const r={};function e(){return!1}const t=new jr;function n(d){const w=r[d.id];if(!w)throw new Error(`StreamMiddleware - Unknown response id "${d.id}"`);delete r[d.id],Object.assign(w.res,d),setTimeout(w.end)}function i(d){t.emit("notification",d)}function s(d,w,N){let O;try{!d.id?i(d):n(d)}catch(I){O=I}N(O)}const o=new kr.Duplex({objectMode:!0,read:e,write:s});return{events:t,middleware:(d,w,N,O)=>{o.push(d),r[d.id]={req:d,res:w,next:N,end:O}},stream:o}}function Ca(){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 ft extends jr{constructor(){super(),ge(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,n){const i=[];let s=null,o=!1;for(const a of n)if([s,o]=await ft._runMiddleware(e,t,a,i),o)break;return[s,o,i.reverse()]}static _runMiddleware(e,t,n,i){return new Promise(s=>{const o=d=>{const w=d||t.error;w&&(typeof w=="object"&&Object.keys(w).includes("stack")===!1&&(w.stack="Stack trace is not available."),t.error=vo(w,{shouldIncludeStack:!0,fallbackError:{message:w?.message||w?.toString(),code:w?.code||-32603,stack:w?.stack||"Stack trace is not available.",data:w?.data||w?.message||w?.toString()}})),s([w,!0])},a=d=>{t.error?o(t.error):(d&&(typeof d!="function"&&o(new Jt({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),i.push(d)),s([null,!1]))};try{n(e,t,a,o)}catch(d){o(d)}})}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 Jt({code:-32603,message:"Response has no error or result for request"});if(!n)throw new Jt({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,a]=await ft._runAllMiddleware(e,t,this._middleware);return o?(await ft._runReturnHandlers(a),i(s)):n(async d=>{try{await ft._runReturnHandlers(a)}catch(w){return d(w)}return d()})}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 Jt({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 Jt({code:-32603,message:"method must be string"});return t(U,{id:e.id,jsonrpc:"2.0",error:U})}const n=Je({},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,a,d,w,N,O,I;typeof s=="object"&&Object.keys(s).includes("stack")===!1&&(s.stack="Stack trace is not available."),i.error=vo(s,{shouldIncludeStack:!0,fallbackError:{message:((o=s)===null||o===void 0?void 0:o.message)||((a=s)===null||a===void 0?void 0:a.toString()),code:((d=s)===null||d===void 0?void 0:d.code)||-32603,stack:((w=s)===null||w===void 0?void 0:w.stack)||"Stack trace is not available.",data:((N=s)===null||N===void 0?void 0:N.data)||((O=s)===null||O===void 0?void 0:O.message)||((I=s)===null||I===void 0?void 0:I.toString())}})}return t(s,i)}async _processRequest(e,t){const[n,i,s]=await ft._runAllMiddleware(e,t,this._middleware);if(ft._checkForCompletion(e,t,i),await ft._runReturnHandlers(s),n)throw n}}class Pa extends kr.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 Ro=Symbol("IGNORE_SUBSTREAM");class La extends kr.Duplex{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(Je(Je({},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 Pa({parent:this,name:e});return this._substreams[e]=t,Ba(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]=Ro}_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!==Ro&&o.push(s),n()):(window.console.warn(`ObjectMultiplex - orphaned data for stream "${i}"`),n())}}function Ba(r,e){const t=ma(e);co(r,{readable:!1},t),co(r,{writable:!1},t)}var Zt={exports:{}};Zt.exports;var Io;function Ma(){return Io||(Io=1,(function(r,e){var t=200,n="__lodash_hash_undefined__",i=800,s=16,o=9007199254740991,a="[object Arguments]",d="[object Array]",w="[object AsyncFunction]",N="[object Boolean]",O="[object Date]",I="[object Error]",U="[object Function]",B="[object GeneratorFunction]",y="[object Map]",b="[object Number]",u="[object Null]",c="[object Object]",v="[object Proxy]",G="[object RegExp]",$="[object Set]",J="[object String]",X="[object Undefined]",l="[object WeakMap]",m="[object ArrayBuffer]",f="[object DataView]",g="[object Float32Array]",_="[object Float64Array]",h="[object Int8Array]",C="[object Int16Array]",p="[object Int32Array]",A="[object Uint8Array]",P="[object Uint8ClampedArray]",E="[object Uint16Array]",M="[object Uint32Array]",S=/[\\^$.*+?()[\]{}|]/g,j=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,W={};W[g]=W[_]=W[h]=W[C]=W[p]=W[A]=W[P]=W[E]=W[M]=!0,W[a]=W[d]=W[m]=W[N]=W[f]=W[O]=W[I]=W[U]=W[y]=W[b]=W[c]=W[G]=W[$]=W[J]=W[l]=!1;var ee=typeof xe.commonjsGlobal=="object"&&xe.commonjsGlobal&&xe.commonjsGlobal.Object===Object&&xe.commonjsGlobal,Q=typeof self=="object"&&self&&self.Object===Object&&self,le=ee||Q||Function("return this")(),ue=e&&!e.nodeType&&e,z=ue&&!0&&r&&!r.nodeType&&r,V=z&&z.exports===ue,oe=V&&ee.process,ce=(function(){try{var T=z&&z.require&&z.require("util").types;return T||oe&&oe.binding&&oe.binding("util")}catch{}})(),fe=ce&&ce.isTypedArray;function L(T,k,H){switch(H.length){case 0:return T.call(k);case 1:return T.call(k,H[0]);case 2:return T.call(k,H[0],H[1]);case 3:return T.call(k,H[0],H[1],H[2])}return T.apply(k,H)}function D(T,k){for(var H=-1,he=Array(T);++H<T;)he[H]=k(H);return he}function F(T){return function(k){return T(k)}}function ne(T,k){return T?.[k]}function se(T,k){return function(H){return T(k(H))}}var ie=Array.prototype,q=Function.prototype,Z=Object.prototype,re=le["__core-js_shared__"],Y=q.toString,we=Z.hasOwnProperty,Le=(function(){var T=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""})(),ye=Z.toString,De=Y.call(Object),Oe=RegExp("^"+Y.call(we).replace(S,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=V?le.Buffer:void 0,Ze=le.Symbol,St=le.Uint8Array;Be&&Be.allocUnsafe;var Me=se(Object.getPrototypeOf,Object),lr=Object.create,zr=Z.propertyIsEnumerable,ur=ie.splice,ot=Ze?Ze.toStringTag:void 0,Bt=(function(){try{var T=Zr(Object,"defineProperty");return T({},"",{}),T}catch{}})(),Gr=Be?Be.isBuffer:void 0,Wt=Math.max,fr=Date.now,cr=Zr(le,"Map"),pt=Zr(Object,"create"),Ft=(function(){function T(){}return function(k){if(!At(k))return{};if(lr)return lr(k);T.prototype=k;var H=new T;return T.prototype=void 0,H}})();function st(T){var k=-1,H=T==null?0:T.length;for(this.clear();++k<H;){var he=T[k];this.set(he[0],he[1])}}function Vr(){this.__data__=pt?pt(null):{},this.size=0}function $t(T){var k=this.has(T)&&delete this.__data__[T];return this.size-=k?1:0,k}function dr(T){var k=this.__data__;if(pt){var H=k[T];return H===n?void 0:H}return we.call(k,T)?k[T]:void 0}function R(T){var k=this.__data__;return pt?k[T]!==void 0:we.call(k,T)}function x(T,k){var H=this.__data__;return this.size+=this.has(T)?0:1,H[T]=pt&&k===void 0?n:k,this}st.prototype.clear=Vr,st.prototype.delete=$t,st.prototype.get=dr,st.prototype.has=R,st.prototype.set=x;function te(T){var k=-1,H=T==null?0:T.length;for(this.clear();++k<H;){var he=T[k];this.set(he[0],he[1])}}function ae(){this.__data__=[],this.size=0}function de(T){var k=this.__data__,H=br(k,T);if(H<0)return!1;var he=k.length-1;return H==he?k.pop():ur.call(k,H,1),--this.size,!0}function Ne(T){var k=this.__data__,H=br(k,T);return H<0?void 0:k[H][1]}function ke(T){return br(this.__data__,T)>-1}function hr(T,k){var H=this.__data__,he=br(H,T);return he<0?(++this.size,H.push([T,k])):H[he][1]=k,this}te.prototype.clear=ae,te.prototype.delete=de,te.prototype.get=Ne,te.prototype.has=ke,te.prototype.set=hr;function je(T){var k=-1,H=T==null?0:T.length;for(this.clear();++k<H;){var he=T[k];this.set(he[0],he[1])}}function gr(){this.size=0,this.__data__={hash:new st,map:new(cr||te),string:new st}}function Kr(T){var k=_r(this,T).delete(T);return this.size-=k?1:0,k}function pr(T){return _r(this,T).get(T)}function wr(T){return _r(this,T).has(T)}function Ht(T,k){var H=_r(this,T),he=H.size;return H.set(T,k),this.size+=H.size==he?0:1,this}je.prototype.clear=gr,je.prototype.delete=Kr,je.prototype.get=pr,je.prototype.has=wr,je.prototype.set=Ht;function rt(T){var k=this.__data__=new te(T);this.size=k.size}function zt(){this.__data__=new te,this.size=0}function vt(T){var k=this.__data__,H=k.delete(T);return this.size=k.size,H}function at(T){return this.__data__.get(T)}function Xe(T){return this.__data__.has(T)}function vs(T,k){var H=this.__data__;if(H instanceof te){var he=H.__data__;if(!cr||he.length<t-1)return he.push([T,k]),this.size=++H.size,this;H=this.__data__=new je(he)}return H.set(T,k),this.size=H.size,this}rt.prototype.clear=zt,rt.prototype.delete=vt,rt.prototype.get=at,rt.prototype.has=Xe,rt.prototype.set=vs;function As(T,k){var H=en(T),he=!H&&Qr(T),be=!H&&!he&&_i(T),me=!H&&!he&&!be&&Ei(T),ve=H||he||be||me,_e=ve?D(T.length,String):[],Ae=_e.length;for(var Qe in T)ve&&(Qe=="length"||be&&(Qe=="offset"||Qe=="parent")||me&&(Qe=="buffer"||Qe=="byteLength"||Qe=="byteOffset")||bi(Qe,Ae))||_e.push(Qe);return _e}function Yr(T,k,H){(H!==void 0&&!mr(T[k],H)||H===void 0&&!(k in T))&&Jr(T,k,H)}function Rs(T,k,H){var he=T[k];(!(we.call(T,k)&&mr(he,H))||H===void 0&&!(k in T))&&Jr(T,k,H)}function br(T,k){for(var H=T.length;H--;)if(mr(T[H][0],k))return H;return-1}function Jr(T,k,H){k=="__proto__"&&Bt?Bt(T,k,{configurable:!0,enumerable:!0,value:H,writable:!0}):T[k]=H}var Is=ks();function yr(T){return T==null?T===void 0?X:u:ot&&ot in Object(T)?js(T):Gs(T)}function pi(T){return Gt(T)&&yr(T)==a}function Ts(T){if(!At(T)||Hs(T))return!1;var k=rn(T)?Oe:j;return k.test(Js(T))}function xs(T){return Gt(T)&&mi(T.length)&&!!W[yr(T)]}function Os(T){if(!At(T))return zs(T);var k=yi(T),H=[];for(var he in T)he=="constructor"&&(k||!we.call(T,he))||H.push(he);return H}function wi(T,k,H,he,be){T!==k&&Is(k,function(me,ve){if(be||(be=new rt),At(me))Ns(T,k,ve,H,wi,he,be);else{var _e=he?he(Xr(T,ve),me,ve+"",T,k,be):void 0;_e===void 0&&(_e=me),Yr(T,ve,_e)}},Si)}function Ns(T,k,H,he,be,me,ve){var _e=Xr(T,H),Ae=Xr(k,H),Qe=ve.get(Ae);if(Qe){Yr(T,H,Qe);return}var He=me?me(_e,Ae,H+"",T,k,ve):void 0,Vt=He===void 0;if(Vt){var nn=en(Ae),on=!nn&&_i(Ae),Ai=!nn&&!on&&Ei(Ae);He=Ae,nn||on||Ai?en(_e)?He=_e:Zs(_e)?He=Ds(_e):on?(Vt=!1,He=Ls(Ae)):Ai?(Vt=!1,He=Ms(Ae)):He=[]:Xs(Ae)||Qr(Ae)?(He=_e,Qr(_e)?He=Qs(_e):(!At(_e)||rn(_e))&&(He=Ws(Ae))):Vt=!1}Vt&&(ve.set(Ae,He),be(He,Ae,he,me,ve),ve.delete(Ae)),Yr(T,H,He)}function Cs(T,k){return Ks(Vs(T,k,vi),T+"")}var Ps=Bt?function(T,k){return Bt(T,"toString",{configurable:!0,enumerable:!1,value:ta(k),writable:!0})}:vi;function Ls(T,k){return T.slice()}function Bs(T){var k=new T.constructor(T.byteLength);return new St(k).set(new St(T)),k}function Ms(T,k){var H=Bs(T.buffer);return new T.constructor(H,T.byteOffset,T.length)}function Ds(T,k){var H=-1,he=T.length;for(k||(k=Array(he));++H<he;)k[H]=T[H];return k}function qs(T,k,H,he){var be=!H;H||(H={});for(var me=-1,ve=k.length;++me<ve;){var _e=k[me],Ae=void 0;Ae===void 0&&(Ae=T[_e]),be?Jr(H,_e,Ae):Rs(H,_e,Ae)}return H}function Us(T){return Cs(function(k,H){var he=-1,be=H.length,me=be>1?H[be-1]:void 0,ve=be>2?H[2]:void 0;for(me=T.length>3&&typeof me=="function"?(be--,me):void 0,ve&&Fs(H[0],H[1],ve)&&(me=be<3?void 0:me,be=1),k=Object(k);++he<be;){var _e=H[he];_e&&T(k,_e,he,me)}return k})}function ks(T){return function(k,H,he){for(var be=-1,me=Object(k),ve=he(k),_e=ve.length;_e--;){var Ae=ve[++be];if(H(me[Ae],Ae,me)===!1)break}return k}}function _r(T,k){var H=T.__data__;return $s(k)?H[typeof k=="string"?"string":"hash"]:H.map}function Zr(T,k){var H=ne(T,k);return Ts(H)?H:void 0}function js(T){var k=we.call(T,ot),H=T[ot];try{T[ot]=void 0;var he=!0}catch{}var be=ye.call(T);return he&&(k?T[ot]=H:delete T[ot]),be}function Ws(T){return typeof T.constructor=="function"&&!yi(T)?Ft(Me(T)):{}}function bi(T,k){var H=typeof T;return k=k??o,!!k&&(H=="number"||H!="symbol"&&K.test(T))&&T>-1&&T%1==0&&T<k}function Fs(T,k,H){if(!At(H))return!1;var he=typeof k;return(he=="number"?tn(H)&&bi(k,H.length):he=="string"&&k in H)?mr(H[k],T):!1}function $s(T){var k=typeof T;return k=="string"||k=="number"||k=="symbol"||k=="boolean"?T!=="__proto__":T===null}function Hs(T){return!!Le&&Le in T}function yi(T){var k=T&&T.constructor,H=typeof k=="function"&&k.prototype||Z;return T===H}function zs(T){var k=[];if(T!=null)for(var H in Object(T))k.push(H);return k}function Gs(T){return ye.call(T)}function Vs(T,k,H){return k=Wt(k===void 0?T.length-1:k,0),function(){for(var he=arguments,be=-1,me=Wt(he.length-k,0),ve=Array(me);++be<me;)ve[be]=he[k+be];be=-1;for(var _e=Array(k+1);++be<k;)_e[be]=he[be];return _e[k]=H(ve),L(T,this,_e)}}function Xr(T,k){if(!(k==="constructor"&&typeof T[k]=="function")&&k!="__proto__")return T[k]}var Ks=Ys(Ps);function Ys(T){var k=0,H=0;return function(){var he=fr(),be=s-(he-H);if(H=he,be>0){if(++k>=i)return arguments[0]}else k=0;return T.apply(void 0,arguments)}}function Js(T){if(T!=null){try{return Y.call(T)}catch{}try{return T+""}catch{}}return""}function mr(T,k){return T===k||T!==T&&k!==k}var Qr=pi((function(){return arguments})())?pi:function(T){return Gt(T)&&we.call(T,"callee")&&!zr.call(T,"callee")},en=Array.isArray;function tn(T){return T!=null&&mi(T.length)&&!rn(T)}function Zs(T){return Gt(T)&&tn(T)}var _i=Gr||ra;function rn(T){if(!At(T))return!1;var k=yr(T);return k==U||k==B||k==w||k==v}function mi(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=o}function At(T){var k=typeof T;return T!=null&&(k=="object"||k=="function")}function Gt(T){return T!=null&&typeof T=="object"}function Xs(T){if(!Gt(T)||yr(T)!=c)return!1;var k=Me(T);if(k===null)return!0;var H=we.call(k,"constructor")&&k.constructor;return typeof H=="function"&&H instanceof H&&Y.call(H)==De}var Ei=fe?F(fe):xs;function Qs(T){return qs(T,Si(T))}function Si(T){return tn(T)?As(T):Os(T)}var ea=Us(function(T,k,H){wi(T,k,H)});function ta(T){return function(){return T}}function vi(T){return T}function ra(){return!1}r.exports=ea})(Zt,Zt.exports)),Zt.exports}Ma();var Lr={exports:{}},Da=Lr.exports,To;function qa(){return To||(To=1,(function(r){(function(e,t){r.exports?r.exports=t():e.log=t()})(Da,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 a(y,b){var u=y[b];if(typeof u.bind=="function")return u.bind(y);try{return Function.prototype.bind.call(u,y)}catch{return function(){return Function.prototype.apply.apply(u,[y,arguments])}}}function d(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function w(y){return y==="debug"&&(y="log"),typeof console===t?!1:y==="trace"&&n?d:console[y]!==void 0?a(console,y):console.log!==void 0?a(console,"log"):e}function N(){for(var y=this.getLevel(),b=0;b<i.length;b++){var u=i[b];this[u]=b<y?e:this.methodFactory(u,y,this.name)}if(this.log=this.debug,typeof console===t&&y<this.levels.SILENT)return"No console available for logging"}function O(y){return function(){typeof console!==t&&(N.call(this),this[y].apply(this,arguments))}}function I(y,b,u){return w(y)||O.apply(this,arguments)}function U(y,b){var u=this,c,v,G,$="loglevel";typeof y=="string"?$+=":"+y:typeof y=="symbol"&&($=void 0);function J(g){var _=(i[g]||"silent").toUpperCase();if(!(typeof window===t||!$)){try{window.localStorage[$]=_;return}catch{}try{window.document.cookie=encodeURIComponent($)+"="+_+";"}catch{}}}function X(){var g;if(!(typeof window===t||!$)){try{g=window.localStorage[$]}catch{}if(typeof g===t)try{var _=window.document.cookie,h=encodeURIComponent($),C=_.indexOf(h+"=");C!==-1&&(g=/^([^;]+)/.exec(_.slice(C+h.length+1))[1])}catch{}return u.levels[g]===void 0&&(g=void 0),g}}function l(){if(!(typeof window===t||!$)){try{window.localStorage.removeItem($)}catch{}try{window.document.cookie=encodeURIComponent($)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function m(g){var _=g;if(typeof _=="string"&&u.levels[_.toUpperCase()]!==void 0&&(_=u.levels[_.toUpperCase()]),typeof _=="number"&&_>=0&&_<=u.levels.SILENT)return _;throw new TypeError("log.setLevel() called with invalid level: "+g)}u.name=y,u.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},u.methodFactory=b||I,u.getLevel=function(){return G??v??c},u.setLevel=function(g,_){return G=m(g),_!==!1&&J(G),N.call(u)},u.setDefaultLevel=function(g){v=m(g),X()||u.setLevel(g,!1)},u.resetLevel=function(){G=null,l(),N.call(u)},u.enableAll=function(g){u.setLevel(u.levels.TRACE,g)},u.disableAll=function(g){u.setLevel(u.levels.SILENT,g)},u.rebuild=function(){if(o!==u&&(c=m(o.getLevel())),N.call(u),o===u)for(var g in s)s[g].rebuild()},c=m(o?o.getLevel():"WARN");var f=X();f!=null&&(G=m(f)),N.call(u)}o=new U,o.getLogger=function(b){if(typeof b!="symbol"&&typeof b!="string"||b==="")throw new TypeError("You must supply a name when creating a logger.");var u=s[b];return u||(u=s[b]=new U(b,o.methodFactory)),u};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})})(Lr)),Lr.exports}var os=qa();const Br=xe.getDefaultExportFromCjs(os),Ua=Br.getLogger("http-helpers");Ua.setLevel(os.levels.INFO);function xo(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`positive integer expected, not ${r}`)}function ka(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}function Wr(r,...e){if(!ka(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 ja(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");xo(r.outputLen),xo(r.blockLen)}function Mr(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 Wa(r,e){Wr(r);const t=e.outputLen;if(r.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}const Wn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Fn=r=>new DataView(r.buffer,r.byteOffset,r.byteLength),nt=(r,e)=>r<<32-e|r>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function Fa(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function li(r){return typeof r=="string"&&(r=Fa(r)),Wr(r),r}function $a(...r){let e=0;for(let n=0;n<r.length;n++){const i=r[n];Wr(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 ss{clone(){return this._cloneInto()}}function Ha(r){const e=n=>r().update(li(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function za(r=32){if(Wn&&typeof Wn.getRandomValues=="function")return Wn.getRandomValues(new Uint8Array(r));throw new Error("crypto.getRandomValues must be defined")}function Ga(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),a=Number(t&s),d=n?4:0,w=n?0:4;r.setUint32(e+d,o,n),r.setUint32(e+w,a,n)}const Va=(r,e,t)=>r&e^~r&t,Ka=(r,e,t)=>r&e^r&t^e&t;class Ya extends ss{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=Fn(this.buffer)}update(e){Mr(this);const{view:t,buffer:n,blockLen:i}=this;e=li(e);const s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const d=Fn(e);for(;i<=s-o;o+=i)this.process(d,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Mr(this),Wa(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 O=o;O<i;O++)t[O]=0;Ga(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=Fn(e),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const w=d/4,N=this.get();if(w>N.length)throw new Error("_sha2: outputLen bigger than state");for(let O=0;O<w;O++)a.setUint32(4*O,N[O],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:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%t&&e.buffer.set(n),e}}const Ja=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]),bt=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),yt=new Uint32Array(64);class Za extends Ya{constructor(){super(64,32,8,!1),this.A=bt[0]|0,this.B=bt[1]|0,this.C=bt[2]|0,this.D=bt[3]|0,this.E=bt[4]|0,this.F=bt[5]|0,this.G=bt[6]|0,this.H=bt[7]|0}get(){const{A:e,B:t,C:n,D:i,E:s,F:o,G:a,H:d}=this;return[e,t,n,i,s,o,a,d]}set(e,t,n,i,s,o,a,d){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=a|0,this.H=d|0}process(e,t){for(let O=0;O<16;O++,t+=4)yt[O]=e.getUint32(t,!1);for(let O=16;O<64;O++){const I=yt[O-15],U=yt[O-2],B=nt(I,7)^nt(I,18)^I>>>3,y=nt(U,17)^nt(U,19)^U>>>10;yt[O]=y+yt[O-7]+B+yt[O-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:d,G:w,H:N}=this;for(let O=0;O<64;O++){const I=nt(a,6)^nt(a,11)^nt(a,25),U=N+I+Va(a,d,w)+Ja[O]+yt[O]|0,y=(nt(n,2)^nt(n,13)^nt(n,22))+Ka(n,i,s)|0;N=w,w=d,d=a,a=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,a=a+this.E|0,d=d+this.F|0,w=w+this.G|0,N=N+this.H|0,this.set(n,i,s,o,a,d,w,N)}roundClean(){yt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Xa=Ha(()=>new Za);class as extends ss{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,ja(e);const n=li(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 Mr(this),this.iHash.update(e),this}digestInto(e){Mr(this),Wr(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:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ls=(r,e,t)=>new as(r,e).update(t).digest();ls.create=(r,e)=>new as(r,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const us=BigInt(0),Fr=BigInt(1),Qa=BigInt(2);function Ct(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}function ir(r){if(!Ct(r))throw new Error("Uint8Array expected")}const el=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function qt(r){ir(r);let e="";for(let t=0;t<r.length;t++)e+=el[r[t]];return e}function fs(r){const e=r.toString(16);return e.length&1?`0${e}`:e}function ui(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);return BigInt(r===""?"0":`0x${r}`)}const ut={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Oo(r){if(r>=ut._0&&r<=ut._9)return r-ut._0;if(r>=ut._A&&r<=ut._F)return r-(ut._A-10);if(r>=ut._a&&r<=ut._f)return r-(ut._a-10)}function Ut(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=Oo(r.charCodeAt(s)),a=Oo(r.charCodeAt(s+1));if(o===void 0||a===void 0){const d=r[s]+r[s+1];throw new Error('hex string expected, got non-hex character "'+d+'" at index '+s)}n[i]=o*16+a}return n}function Nt(r){return ui(qt(r))}function fi(r){return ir(r),ui(qt(Uint8Array.from(r).reverse()))}function kt(r,e){return Ut(r.toString(16).padStart(e*2,"0"))}function ci(r,e){return kt(r,e).reverse()}function tl(r){return Ut(fs(r))}function tt(r,e,t){let n;if(typeof e=="string")try{n=Ut(e)}catch(s){throw new Error(`${r} must be valid hex string, got "${e}". Cause: ${s}`)}else if(Ct(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 tr(...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 rl(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 nl(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function il(r){let e;for(e=0;r>us;r>>=Fr,e+=1);return e}function ol(r,e){return r>>BigInt(e)&Fr}function sl(r,e,t){return r|(t?Fr:us)<<BigInt(e)}const di=r=>(Qa<<BigInt(r-1))-Fr,$n=r=>new Uint8Array(r),No=r=>Uint8Array.from(r);function cs(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=$n(r),i=$n(r),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...O)=>t(i,n,...O),d=(O=$n())=>{i=a(No([0]),O),n=a(),O.length!==0&&(i=a(No([1]),O),n=a())},w=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let O=0;const I=[];for(;O<e;){n=a();const U=n.slice();I.push(U),O+=n.length}return tr(...I)};return(O,I)=>{o(),d(O);let U;for(;!(U=I(w()));)d();return o(),U}}const al={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"||Ct(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 a=al[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);const d=r[i];if(!(o&&d===void 0)&&!a(d,r))throw new Error(`Invalid param ${String(i)}=${d} (${typeof d}), 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 ll=Object.freeze(Object.defineProperty({__proto__:null,abytes:ir,bitGet:ol,bitLen:il,bitMask:di,bitSet:sl,bytesToHex:qt,bytesToNumberBE:Nt,bytesToNumberLE:fi,concatBytes:tr,createHmacDrbg:cs,ensureBytes:tt,equalBytes:rl,hexToBytes:Ut,hexToNumber:ui,isBytes:Ct,numberToBytesBE:kt,numberToBytesLE:ci,numberToHexUnpadded:fs,numberToVarBytesBE:tl,utf8ToBytes:nl,validateObject:or},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Pe=BigInt(0),Te=BigInt(1),xt=BigInt(2),ul=BigInt(3),Jn=BigInt(4),Co=BigInt(5),Po=BigInt(8);BigInt(9);BigInt(16);function Fe(r,e){const t=r%e;return t>=Pe?t:e+t}function fl(r,e,t){if(t<=Pe||e<Pe)throw new Error("Expected power/modulo > 0");if(t===Te)return Pe;let n=Te;for(;e>Pe;)e&Te&&(n=n*r%t),r=r*r%t,e>>=Te;return n}function Ge(r,e,t){let n=r;for(;e-- >Pe;)n*=n,n%=t;return n}function Zn(r,e){if(r===Pe||e<=Pe)throw new Error(`invert: expected positive integers, got n=${r} mod=${e}`);let t=Fe(r,e),n=e,i=Pe,s=Te;for(;t!==Pe;){const a=n/t,d=n%t,w=i-s*a;n=t,t=d,i=s,s=w}if(n!==Te)throw new Error("invert: does not exist");return Fe(i,e)}function cl(r){const e=(r-Te)/xt;let t,n,i;for(t=r-Te,n=0;t%xt===Pe;t/=xt,n++);for(i=xt;i<r&&fl(i,e,r)!==r-Te;i++);if(n===1){const o=(r+Te)/Jn;return function(d,w){const N=d.pow(w,o);if(!d.eql(d.sqr(N),w))throw new Error("Cannot find square root");return N}}const s=(t+Te)/xt;return function(a,d){if(a.pow(d,e)===a.neg(a.ONE))throw new Error("Cannot find square root");let w=n,N=a.pow(a.mul(a.ONE,i),t),O=a.pow(d,s),I=a.pow(d,t);for(;!a.eql(I,a.ONE);){if(a.eql(I,a.ZERO))return a.ZERO;let U=1;for(let y=a.sqr(I);U<w&&!a.eql(y,a.ONE);U++)y=a.sqr(y);const B=a.pow(N,Te<<BigInt(w-U-1));N=a.sqr(B),O=a.mul(O,B),I=a.mul(I,N),w=U}return O}}function dl(r){if(r%Jn===ul){const e=(r+Te)/Jn;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%Po===Co){const e=(r-Co)/Po;return function(n,i){const s=n.mul(i,xt),o=n.pow(s,e),a=n.mul(i,o),d=n.mul(n.mul(a,xt),o),w=n.mul(a,n.sub(d,n.ONE));if(!n.eql(n.sqr(w),i))throw new Error("Cannot find square root");return w}}return cl(r)}const hl=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function gl(r){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},t=hl.reduce((n,i)=>(n[i]="function",n),e);return or(r,t)}function pl(r,e,t){if(t<Pe)throw new Error("Expected power > 0");if(t===Pe)return r.ONE;if(t===Te)return e;let n=r.ONE,i=e;for(;t>Pe;)t&Te&&(n=r.mul(n,i)),i=r.sqr(i),t>>=Te;return n}function wl(r,e){const t=new Array(e.length),n=e.reduce((s,o,a)=>r.is0(o)?s:(t[a]=s,r.mul(s,o)),r.ONE),i=r.inv(n);return e.reduceRight((s,o,a)=>r.is0(o)?s:(t[a]=r.mul(s,t[a]),r.mul(s,o)),i),t}function ds(r,e){const t=e!==void 0?e:r.toString(2).length,n=Math.ceil(t/8);return{nBitLength:t,nByteLength:n}}function bl(r,e,t=!1,n={}){if(r<=Pe)throw new Error(`Expected Field ORDER > 0, got ${r}`);const{nBitLength:i,nByteLength:s}=ds(r,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=dl(r),a=Object.freeze({ORDER:r,BITS:i,BYTES:s,MASK:di(i),ZERO:Pe,ONE:Te,create:d=>Fe(d,r),isValid:d=>{if(typeof d!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof d}`);return Pe<=d&&d<r},is0:d=>d===Pe,isOdd:d=>(d&Te)===Te,neg:d=>Fe(-d,r),eql:(d,w)=>d===w,sqr:d=>Fe(d*d,r),add:(d,w)=>Fe(d+w,r),sub:(d,w)=>Fe(d-w,r),mul:(d,w)=>Fe(d*w,r),pow:(d,w)=>pl(a,d,w),div:(d,w)=>Fe(d*Zn(w,r),r),sqrN:d=>d*d,addN:(d,w)=>d+w,subN:(d,w)=>d-w,mulN:(d,w)=>d*w,inv:d=>Zn(d,r),sqrt:n.sqrt||(d=>o(a,d)),invertBatch:d=>wl(a,d),cmov:(d,w,N)=>N?w:d,toBytes:d=>t?ci(d,s):kt(d,s),fromBytes:d=>{if(d.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${d.length}`);return t?fi(d):Nt(d)}});return Object.freeze(a)}function hs(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 gs(r){const e=hs(r);return e+Math.ceil(e/2)}function yl(r,e,t=!1){const n=r.length,i=hs(e),s=gs(e);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const o=t?Nt(r):fi(r),a=Fe(o,e-Te)+Te;return t?ci(a,i):kt(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _l=BigInt(0),Hn=BigInt(1);function ml(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,a=i;for(;s>_l;)s&Hn&&(o=o.add(a)),a=a.double(),s>>=Hn;return o},precomputeWindow(i,s){const{windows:o,windowSize:a}=n(s),d=[];let w=i,N=w;for(let O=0;O<o;O++){N=w,d.push(N);for(let I=1;I<a;I++)N=N.add(w),d.push(N);w=N.double()}return d},wNAF(i,s,o){const{windows:a,windowSize:d}=n(i);let w=r.ZERO,N=r.BASE;const O=BigInt(2**i-1),I=2**i,U=BigInt(i);for(let B=0;B<a;B++){const y=B*d;let b=Number(o&O);o>>=U,b>d&&(b-=I,o+=Hn);const u=y,c=y+Math.abs(b)-1,v=B%2!==0,G=b<0;b===0?N=N.add(t(v,s[u])):w=w.add(t(G,s[c]))}return{p:w,f:N}},wNAFCached(i,s,o,a){const d=i._WINDOW_SIZE||1;let w=s.get(i);return w||(w=this.precomputeWindow(i,d),d!==1&&s.set(i,a(w))),this.wNAF(d,w,o)}}}function ps(r){return gl(r.Fp),or(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ds(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function El(r){const e=ps(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:Sl,hexToBytes:vl}=ll,Ot={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(r){const{Err:e}=Ot;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:Sl(n),l:r.subarray(t+2)}},toSig(r){const{Err:e}=Ot,t=typeof r=="string"?vl(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}=Ot._parseInt(t.subarray(2)),{d:o,l:a}=Ot._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(r){const e=w=>Number.parseInt(w[0],16)&8?"00"+w:w,t=w=>{const N=w.toString(16);return N.length&1?`0${N}`:N},n=e(t(r.s)),i=e(t(r.r)),s=n.length/2,o=i.length/2,a=t(s),d=t(o);return`30${t(o+s+4)}02${d}${i}02${a}${n}`}},ct=BigInt(0),Ye=BigInt(1);BigInt(2);const Lo=BigInt(3);BigInt(4);function Al(r){const e=El(r),{Fp:t}=e,n=e.toBytes||((B,y,b)=>{const u=y.toAffine();return tr(Uint8Array.from([4]),t.toBytes(u.x),t.toBytes(u.y))}),i=e.fromBytes||(B=>{const y=B.subarray(1),b=t.fromBytes(y.subarray(0,t.BYTES)),u=t.fromBytes(y.subarray(t.BYTES,2*t.BYTES));return{x:b,y:u}});function s(B){const{a:y,b}=e,u=t.sqr(B),c=t.mul(u,B);return t.add(t.add(c,t.mul(B,y)),b)}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"&&ct<B&&B<e.n}function a(B){if(!o(B))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function d(B){const{allowedPrivateKeyLengths:y,nByteLength:b,wrapPrivateKey:u,n:c}=e;if(y&&typeof B!="bigint"){if(Ct(B)&&(B=qt(B)),typeof B!="string"||!y.includes(B.length))throw new Error("Invalid key");B=B.padStart(b*2,"0")}let v;try{v=typeof B=="bigint"?B:Nt(tt("private key",B,b))}catch{throw new Error(`private key must be ${b} bytes, hex or bigint, not ${typeof B}`)}return u&&(v=Fe(v,c)),a(v),v}const w=new Map;function N(B){if(!(B instanceof O))throw new Error("ProjectivePoint expected")}class O{constructor(y,b,u){if(this.px=y,this.py=b,this.pz=u,y==null||!t.isValid(y))throw new Error("x required");if(b==null||!t.isValid(b))throw new Error("y required");if(u==null||!t.isValid(u))throw new Error("z required")}static fromAffine(y){const{x:b,y:u}=y||{};if(!y||!t.isValid(b)||!t.isValid(u))throw new Error("invalid affine point");if(y instanceof O)throw new Error("projective point not allowed");const c=v=>t.eql(v,t.ZERO);return c(b)&&c(u)?O.ZERO:new O(b,u,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){const b=t.invertBatch(y.map(u=>u.pz));return y.map((u,c)=>u.toAffine(b[c])).map(O.fromAffine)}static fromHex(y){const b=O.fromAffine(i(tt("pointHex",y)));return b.assertValidity(),b}static fromPrivateKey(y){return O.BASE.multiply(d(y))}_setWindowSize(y){this._WINDOW_SIZE=y,w.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:y,y:b}=this.toAffine();if(!t.isValid(y)||!t.isValid(b))throw new Error("bad point: x or y not FE");const u=t.sqr(b),c=s(y);if(!t.eql(u,c))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){N(y);const{px:b,py:u,pz:c}=this,{px:v,py:G,pz:$}=y,J=t.eql(t.mul(b,$),t.mul(v,c)),X=t.eql(t.mul(u,$),t.mul(G,c));return J&&X}negate(){return new O(this.px,t.neg(this.py),this.pz)}double(){const{a:y,b}=e,u=t.mul(b,Lo),{px:c,py:v,pz:G}=this;let $=t.ZERO,J=t.ZERO,X=t.ZERO,l=t.mul(c,c),m=t.mul(v,v),f=t.mul(G,G),g=t.mul(c,v);return g=t.add(g,g),X=t.mul(c,G),X=t.add(X,X),$=t.mul(y,X),J=t.mul(u,f),J=t.add($,J),$=t.sub(m,J),J=t.add(m,J),J=t.mul($,J),$=t.mul(g,$),X=t.mul(u,X),f=t.mul(y,f),g=t.sub(l,f),g=t.mul(y,g),g=t.add(g,X),X=t.add(l,l),l=t.add(X,l),l=t.add(l,f),l=t.mul(l,g),J=t.add(J,l),f=t.mul(v,G),f=t.add(f,f),l=t.mul(f,g),$=t.sub($,l),X=t.mul(f,m),X=t.add(X,X),X=t.add(X,X),new O($,J,X)}add(y){N(y);const{px:b,py:u,pz:c}=this,{px:v,py:G,pz:$}=y;let J=t.ZERO,X=t.ZERO,l=t.ZERO;const m=e.a,f=t.mul(e.b,Lo);let g=t.mul(b,v),_=t.mul(u,G),h=t.mul(c,$),C=t.add(b,u),p=t.add(v,G);C=t.mul(C,p),p=t.add(g,_),C=t.sub(C,p),p=t.add(b,c);let A=t.add(v,$);return p=t.mul(p,A),A=t.add(g,h),p=t.sub(p,A),A=t.add(u,c),J=t.add(G,$),A=t.mul(A,J),J=t.add(_,h),A=t.sub(A,J),l=t.mul(m,p),J=t.mul(f,h),l=t.add(J,l),J=t.sub(_,l),l=t.add(_,l),X=t.mul(J,l),_=t.add(g,g),_=t.add(_,g),h=t.mul(m,h),p=t.mul(f,p),_=t.add(_,h),h=t.sub(g,h),h=t.mul(m,h),p=t.add(p,h),g=t.mul(_,p),X=t.add(X,g),g=t.mul(A,p),J=t.mul(C,J),J=t.sub(J,g),g=t.mul(C,_),l=t.mul(A,l),l=t.add(l,g),new O(J,X,l)}subtract(y){return this.add(y.negate())}is0(){return this.equals(O.ZERO)}wNAF(y){return U.wNAFCached(this,w,y,b=>{const u=t.invertBatch(b.map(c=>c.pz));return b.map((c,v)=>c.toAffine(u[v])).map(O.fromAffine)})}multiplyUnsafe(y){const b=O.ZERO;if(y===ct)return b;if(a(y),y===Ye)return this;const{endo:u}=e;if(!u)return U.unsafeLadder(this,y);let{k1neg:c,k1:v,k2neg:G,k2:$}=u.splitScalar(y),J=b,X=b,l=this;for(;v>ct||$>ct;)v&Ye&&(J=J.add(l)),$&Ye&&(X=X.add(l)),l=l.double(),v>>=Ye,$>>=Ye;return c&&(J=J.negate()),G&&(X=X.negate()),X=new O(t.mul(X.px,u.beta),X.py,X.pz),J.add(X)}multiply(y){a(y);let b=y,u,c;const{endo:v}=e;if(v){const{k1neg:G,k1:$,k2neg:J,k2:X}=v.splitScalar(b);let{p:l,f:m}=this.wNAF($),{p:f,f:g}=this.wNAF(X);l=U.constTimeNegate(G,l),f=U.constTimeNegate(J,f),f=new O(t.mul(f.px,v.beta),f.py,f.pz),u=l.add(f),c=m.add(g)}else{const{p:G,f:$}=this.wNAF(b);u=G,c=$}return O.normalizeZ([u,c])[0]}multiplyAndAddUnsafe(y,b,u){const c=O.BASE,v=($,J)=>J===ct||J===Ye||!$.equals(c)?$.multiplyUnsafe(J):$.multiply(J),G=v(this,b).add(v(y,u));return G.is0()?void 0:G}toAffine(y){const{px:b,py:u,pz:c}=this,v=this.is0();y==null&&(y=v?t.ONE:t.inv(c));const G=t.mul(b,y),$=t.mul(u,y),J=t.mul(c,y);if(v)return{x:t.ZERO,y:t.ZERO};if(!t.eql(J,t.ONE))throw new Error("invZ was invalid");return{x:G,y:$}}isTorsionFree(){const{h:y,isTorsionFree:b}=e;if(y===Ye)return!0;if(b)return b(O,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:y,clearCofactor:b}=e;return y===Ye?this:b?b(O,this):this.multiplyUnsafe(e.h)}toRawBytes(y=!0){return this.assertValidity(),n(O,this,y)}toHex(y=!0){return qt(this.toRawBytes(y))}}O.BASE=new O(e.Gx,e.Gy,t.ONE),O.ZERO=new O(t.ZERO,t.ONE,t.ZERO);const I=e.nBitLength,U=ml(O,e.endo?Math.ceil(I/2):I);return{CURVE:e,ProjectivePoint:O,normPrivateKeyToScalar:d,weierstrassEquation:s,isWithinCurveOrder:o}}function Rl(r){const e=ps(r);return or(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function Il(r){const e=Rl(r),{Fp:t,n}=e,i=t.BYTES+1,s=2*t.BYTES+1;function o(p){return ct<p&&p<t.ORDER}function a(p){return Fe(p,n)}function d(p){return Zn(p,n)}const{ProjectivePoint:w,normPrivateKeyToScalar:N,weierstrassEquation:O,isWithinCurveOrder:I}=Al({...e,toBytes(p,A,P){const E=A.toAffine(),M=t.toBytes(E.x),S=tr;return P?S(Uint8Array.from([A.hasEvenY()?2:3]),M):S(Uint8Array.from([4]),M,t.toBytes(E.y))},fromBytes(p){const A=p.length,P=p[0],E=p.subarray(1);if(A===i&&(P===2||P===3)){const M=Nt(E);if(!o(M))throw new Error("Point is not on curve");const S=O(M);let j;try{j=t.sqrt(S)}catch(ee){const Q=ee instanceof Error?": "+ee.message:"";throw new Error("Point is not on curve"+Q)}const K=(j&Ye)===Ye;return(P&1)===1!==K&&(j=t.neg(j)),{x:M,y:j}}else if(A===s&&P===4){const M=t.fromBytes(E.subarray(0,t.BYTES)),S=t.fromBytes(E.subarray(t.BYTES,2*t.BYTES));return{x:M,y:S}}else throw new Error(`Point of length ${A} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}}),U=p=>qt(kt(p,e.nByteLength));function B(p){const A=n>>Ye;return p>A}function y(p){return B(p)?a(-p):p}const b=(p,A,P)=>Nt(p.slice(A,P));class u{constructor(A,P,E){this.r=A,this.s=P,this.recovery=E,this.assertValidity()}static fromCompact(A){const P=e.nByteLength;return A=tt("compactSignature",A,P*2),new u(b(A,0,P),b(A,P,2*P))}static fromDER(A){const{r:P,s:E}=Ot.toSig(tt("DER",A));return new u(P,E)}assertValidity(){if(!I(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!I(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(A){return new u(this.r,this.s,A)}recoverPublicKey(A){const{r:P,s:E,recovery:M}=this,S=X(tt("msgHash",A));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 K=(M&1)===0?"02":"03",W=w.fromHex(K+U(j)),ee=d(j),Q=a(-S*ee),le=a(E*ee),ue=w.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 u(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Ut(this.toDERHex())}toDERHex(){return Ot.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Ut(this.toCompactHex())}toCompactHex(){return U(this.r)+U(this.s)}}const c={isValidPrivateKey(p){try{return N(p),!0}catch{return!1}},normPrivateKeyToScalar:N,randomPrivateKey:()=>{const p=gs(e.n);return yl(e.randomBytes(p),e.n)},precompute(p=8,A=w.BASE){return A._setWindowSize(p),A.multiply(BigInt(3)),A}};function v(p,A=!0){return w.fromPrivateKey(p).toRawBytes(A)}function G(p){const A=Ct(p),P=typeof p=="string",E=(A||P)&&p.length;return A?E===i||E===s:P?E===2*i||E===2*s:p instanceof w}function $(p,A,P=!0){if(G(p))throw new Error("first arg must be private key");if(!G(A))throw new Error("second arg must be public key");return w.fromHex(A).multiply(N(p)).toRawBytes(P)}const J=e.bits2int||function(p){const A=Nt(p),P=p.length*8-e.nBitLength;return P>0?A>>BigInt(P):A},X=e.bits2int_modN||function(p){return a(J(p))},l=di(e.nBitLength);function m(p){if(typeof p!="bigint")throw new Error("bigint expected");if(!(ct<=p&&p<l))throw new Error(`bigint expected < 2^${e.nBitLength}`);return kt(p,e.nByteLength)}function f(p,A,P=g){if(["recovered","canonical"].some(V=>V in P))throw new Error("sign() legacy options not supported");const{hash:E,randomBytes:M}=e;let{lowS:S,prehash:j,extraEntropy:K}=P;S==null&&(S=!0),p=tt("msgHash",p),j&&(p=tt("prehashed msgHash",E(p)));const W=X(p),ee=N(A),Q=[m(ee),m(W)];if(K!=null&&K!==!1){const V=K===!0?M(t.BYTES):K;Q.push(tt("extraEntropy",V))}const le=tr(...Q),ue=W;function z(V){const oe=J(V);if(!I(oe))return;const ce=d(oe),fe=w.BASE.multiply(oe).toAffine(),L=a(fe.x);if(L===ct)return;const D=a(ce*a(ue+L*ee));if(D===ct)return;let F=(fe.x===L?0:2)|Number(fe.y&Ye),ne=D;return S&&B(D)&&(ne=y(D),F^=1),new u(L,ne,F)}return{seed:le,k2sig:z}}const g={lowS:e.lowS,prehash:!1},_={lowS:e.lowS,prehash:!1};function h(p,A,P=g){const{seed:E,k2sig:M}=f(p,A,P),S=e;return cs(S.hash.outputLen,S.nByteLength,S.hmac)(E,M)}w.BASE._setWindowSize(8);function C(p,A,P,E=_){const M=p;if(A=tt("msgHash",A),P=tt("publicKey",P),"strict"in E)throw new Error("options.strict was renamed to lowS");const{lowS:S,prehash:j}=E;let K,W;try{if(typeof M=="string"||Ct(M))try{K=u.fromDER(M)}catch(fe){if(!(fe instanceof Ot.Err))throw fe;K=u.fromCompact(M)}else if(typeof M=="object"&&typeof M.r=="bigint"&&typeof M.s=="bigint"){const{r:fe,s:L}=M;K=new u(fe,L)}else throw new Error("PARSE");W=w.fromHex(P)}catch(fe){if(fe.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(S&&K.hasHighS())return!1;j&&(A=e.hash(A));const{r:ee,s:Q}=K,le=X(A),ue=d(Q),z=a(le*ue),V=a(ee*ue),oe=w.BASE.multiplyAndAddUnsafe(W,z,V)?.toAffine();return oe?a(oe.x)===ee:!1}return{CURVE:e,getPublicKey:v,getSharedSecret:$,sign:h,verify:C,ProjectivePoint:w,Signature:u,utils:c}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Tl(r){return{hash:r,hmac:(e,...t)=>ls(r,e,$a(...t)),randomBytes:za}}function xl(r,e){const t=n=>Il({...r,...Tl(n)});return Object.freeze({...t(e),create:t})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ws=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Bo=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Ol=BigInt(1),Xn=BigInt(2),Mo=(r,e)=>(r+e/Xn)/e;function Nl(r){const e=ws,t=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),d=BigInt(88),w=r*r*r%e,N=w*w*r%e,O=Ge(N,t,e)*N%e,I=Ge(O,t,e)*N%e,U=Ge(I,Xn,e)*w%e,B=Ge(U,i,e)*U%e,y=Ge(B,s,e)*B%e,b=Ge(y,a,e)*y%e,u=Ge(b,d,e)*b%e,c=Ge(u,a,e)*y%e,v=Ge(c,t,e)*N%e,G=Ge(v,o,e)*B%e,$=Ge(G,n,e)*w%e,J=Ge($,Xn,e);if(!Qn.eql(Qn.sqr(J),r))throw new Error("Cannot find square root");return J}const Qn=bl(ws,void 0,void 0,{sqrt:Nl}),hi=xl({a:BigInt(0),b:BigInt(7),Fp:Qn,n:Bo,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{const e=Bo,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Ol*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=t,o=BigInt("0x100000000000000000000000000000000"),a=Mo(s*r,e),d=Mo(-n*r,e);let w=Fe(r-a*t-d*i,e),N=Fe(-a*n-d*s,e);const O=w>o,I=N>o;if(O&&(w=e-w),I&&(N=e-N),w>o||N>o)throw new Error("splitScalar: Endomorphism failed, k="+r);return{k1neg:O,k1:w,k2neg:I,k2:N}}}},Xa);BigInt(0);hi.ProjectivePoint;function Cl(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 ei={},ti={};for(let r=0;r<16;r++){const e=r,t=r*16,n=r.toString(16).toLowerCase();ti[n]=e,ti[n.toUpperCase()]=e,ei[n]=t,ei[n.toUpperCase()]=t}function Pl(r){const e=r.length,t=new Uint8Array(e/2);for(let n=0;n<e;n+=2)t[n/2]=ei[r[n]]+ti[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 $r=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 Pl(e.length%2===0?e:Cl(e))},Ll=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=Ll(r);return $r(e)};BigInt("0xffffffffffffffff");BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935");hi.CURVE.n;hi.CURVE.n/BigInt(2);BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");const Bl="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470";$r(Bl);const Ml="0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347";$r(Ml);const Dl="0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421";$r(Dl);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 Do;(function(r){r.String="string",r.Bytes="view",r.Number="number"})(Do||(Do={}));var qo;(function(r){r.String="string",r.Bytes="view",r.JSON="json"})(qo||(qo={}));var Uo;(function(r){r[r.Number=0]="Number",r[r.BigInt=1]="BigInt",r[r.Uint8Array=2]="Uint8Array",r[r.PrefixedHexString=3]="PrefixedHexString"})(Uo||(Uo={}));var ko;(function(r){r[r.Deposit=0]="Deposit",r[r.Withdrawal=1]="Withdrawal",r[r.Consolidation=2]="Consolidation"})(ko||(ko={}));var Pt;(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"})(Pt||(Pt={}));sr(Pt.Version);sr(Pt.Balance);sr(Pt.Nonce);sr(Pt.CodeHash);sr(Pt.CodeSize);BigInt(256)**BigInt(31);var zn={exports:{}},xr={},Or={},jo;function ql(){if(jo)return Or;jo=1,Object.defineProperty(Or,"__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,a=n+o,d=qe.Buffer.alloc(a);for(d.write(e);o--;)d.write("=",s++);return d.toString()}return Or.default=r,Or}var Wo;function Ul(){if(Wo)return xr;Wo=1,Object.defineProperty(xr,"__esModule",{value:!0});var r=ql();function e(a,d){return d===void 0&&(d="utf8"),qe.Buffer.isBuffer(a)?i(a.toString("base64")):i(qe.Buffer.from(a,d).toString("base64"))}function t(a,d){return d===void 0&&(d="utf8"),qe.Buffer.from(n(a),"base64").toString(d)}function n(a){return a=a.toString(),r.default(a).replace(/\-/g,"+").replace(/_/g,"/")}function i(a){return a.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function s(a){return qe.Buffer.from(n(a),"base64")}var o=e;return o.encode=e,o.decode=t,o.toBase64=n,o.fromBase64=i,o.toBuffer=s,xr.default=o,xr}var Fo;function kl(){return Fo||(Fo=1,(function(r){r.exports=Ul().default,r.exports.default=r.exports})(zn)),zn.exports}kl();const Se={MAINNET:"mainnet",TESTNET:"testnet",CYAN:"cyan",AQUA:"aqua",CELESTE:"celeste"},_t={SAPPHIRE_DEVNET:"sapphire_devnet",SAPPHIRE_MAINNET:"sapphire_mainnet"};Se.MAINNET+"",Se.TESTNET+"",Se.CYAN+"",Se.AQUA+"",Se.CELESTE+"";Se.AQUA+"",_t.SAPPHIRE_MAINNET,Se.CELESTE+"",_t.SAPPHIRE_MAINNET,Se.CYAN+"",_t.SAPPHIRE_MAINNET,Se.MAINNET+"",_t.SAPPHIRE_MAINNET,Se.TESTNET+"",_t.SAPPHIRE_DEVNET;Se.MAINNET+"",Se.TESTNET+"",Se.CYAN+"",Se.AQUA+"",Se.CELESTE+"";_t.SAPPHIRE_MAINNET+"",_t.SAPPHIRE_DEVNET+"",Se.MAINNET+"",Se.TESTNET+"",Se.CYAN+"",Se.AQUA+"",Se.CELESTE+"";Se.MAINNET+"",Se.TESTNET+"",Se.CYAN+"",Se.AQUA+"",Se.CELESTE+"";function $o(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 jl{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 Wl{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"&&$o("localStorage")?n=window.localStorage:t==="session"&&$o("sessionStorage")?n=window.sessionStorage:n=new jl,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(Wl,"instanceMap",new Map);Je(Je({},_t),Se);const Nr={IFRAME_STATUS:"iframe_status",CLOSE_WINDOW:"close_window",USER_LOGGED_IN:"user_logged_in",USER_LOGGED_OUT:"user_logged_out"},dt={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"},Fl={GET_PROVIDER_STATE:"wallet_get_provider_state"},Gn={ACCOUNTS_CHANGED:"wallet_accounts_changed",CHAIN_CHANGED:"wallet_chain_changed",UNLOCK_STATE_CHANGED:"wallet_unlock_state_changed"};function $l(r){return function(t,n,i){i(s=>{n.error&&Br.warn(`Error in RPC response:
3
3
  `,n),!t.isTorusInternal&&(Br.info(`RPC (${r.origin}):`,t,"->",n),s())})}}var mt=sa(),Vn,Ho;function Hl(){return Ho||(Ho=1,Vn=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}),Vn}var zl=Hl();const Gl=xe.getDefaultExportFromCjs(zl);var Vl="2.1.0";function bs(r){return r!==null&&typeof r=="object"&&typeof r.pipe=="function"}function Kl(r){return bs(r)&&r.writable!==!1&&typeof r._write=="function"&&typeof r._writableState=="object"}function Yl(r){return bs(r)&&r.readable!==!1&&typeof r._read=="function"&&typeof r._readableState=="object"}function Jl(r){return Kl(r)&&Yl(r)}var it={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 ys={PRODUCTION:"production"},Mt={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},Zl={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 gi={translations:Zl,localStorageKeyPrefix:"torus-"},Ee=Br.getLogger("solana-embed");function Xl(){return(r,e,t)=>{(typeof r.method!="string"||!r.method)&&(e.error=mt.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 Ql(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 Cr=()=>Math.random().toString(36).slice(2),_s=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}},eu=()=>{let r=window.navigator.language||"en-US";const e=r.split("-");return r=Object.prototype.hasOwnProperty.call(gi.translations,e[0])?e[0]:"en",r},tu={height:660,width:375},ru={height:740,width:1315},nu={height:700,width:1200},ms={height:600,width:400};function iu(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 Xt(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,a=1,d=Math.abs((s-e)/2/a+n),w=Math.abs((o-t)/2/a+i);return`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=${t/a},width=${e/a},top=${w},left=${d}`}class Es extends jr{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),!Jl(e))throw new Error(it.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 La;go(e,s,e,this._handleStreamDisconnect.bind(this,"Torus")),s.ignoreStream("phishing");const o=Na();go(o.stream,s.createStream(i),o.stream,this._handleStreamDisconnect.bind(this,"Torus RpcProvider"));const a=new ft;a.push(Ca()),a.push(Xl()),a.push($l({origin:location.origin})),a.push(o.middleware),this._rpcEngine=a,this.jsonRpcConnectionEvents=o.events}async request(e){if(!e||typeof e!="object"||Array.isArray(e))throw mt.ethErrors.rpc.invalidRequest({message:it.errors.invalidRequestArgs(),data:e});const{method:t,params:n}=e;if(typeof t!="string"||t.length===0)throw mt.ethErrors.rpc.invalidRequest({message:it.errors.invalidRequestMethod(),data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw mt.ethErrors.rpc.invalidRequest({message:it.errors.invalidRequestParams(),data:e});return new Promise((i,s)=>{this._rpcRequest({method:t,params:n},Yn(i,s))})}send(e,t){this._rpcRequest(e,t)}sendAsync(e){return new Promise((t,n)=>{this._rpcRequest(e,Yn(t,n))})}_handleStreamDisconnect(e,t){Ql(e,t,this),this._handleDisconnect(!1,t?t.message:void 0)}}const Dt=r=>{const e=window.document.createElement("template"),t=r.trim();return e.innerHTML=t,e.content.firstChild};function Pr(r){return r.version===void 0}class Ss extends jr{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||Xt(nu),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 Hr extends Es{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=Je({},Hr._defaultState),this.torusUrl="",this.dappStorageKey="";const s=gi.translations[eu()];this.embedTranslations=s.embed,this.windowRefs={},this.on("connect",()=>{this._state.isConnected=!0});const o=a=>{const{method:d,params:w}=a;if(d===Nr.IFRAME_STATUS){const{isFullScreen:N,rid:O}=w;this._displayIframe({isFull:N,rid:O})}else if(d==="create_window"){const{windowId:N,url:O}=w;this._createPopupBlockAlert(N,O)}else if(d===Nr.CLOSE_WINDOW)this._handleCloseWindow(w);else if(d===Nr.USER_LOGGED_IN){const{currentLoginProvider:N}=w;this._state.isLoggedIn=!0,this._state.currentLoginProvider=N}else d===Nr.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:a}=await this.request({method:dt.GET_PROVIDER_STATE,params:[]});this._handleConnect(o,a)}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 Ss({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:dt.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 Mt.TOP_LEFT:n.top="0px",n.left="0px",n.right="auto",n.bottom="auto";break;case Mt.TOP_RIGHT:n.top="0px",n.right="0px",n.left="auto",n.bottom="auto";break;case Mt.BOTTOM_RIGHT:n.bottom="0px",n.right="0px",n.top="auto",n.left="auto";break;case Mt.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:dt.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(it.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){this._state.isConnected=!1;let n;e?(n=new mt.EthereumRpcError(1013,t||it.errors.disconnected()),Ee.debug(n)):(n=new mt.EthereumRpcError(1011,t||it.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=Dt(`<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=Dt(`<div><a id="torusAlert__btn">${this.embedTranslations.continue}</a></div>`),o=Dt('<div id="torusAlert__btn-container"></div>');o.appendChild(s),i.appendChild(o);const a=()=>{s.addEventListener("click",()=>{this._handleWindow(e,{url:t,target:"_blank",features:Xt(ms)}),i.remove(),this.torusAlertContainer.children.length===0&&(this.torusAlertContainer.style.display="none")})};(()=>{this.torusAlertContainer.appendChild(i)})(),a(),this.torusAlertContainer.style.display="block"}getLogoUrl(){return`${this.torusUrl}/images/torus_icon-blue.svg`}}ge(Hr,"_defaultState",{buttonPosition:"bottom-left",currentLoginProvider:null,isIFrameFullScreen:!1,hasEmittedConnection:!1,torusWidgetVisibility:!1,initialized:!1,isLoggedIn:!1,isPermanentlyDisconnected:!1,isConnected:!1});class ar extends Es{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=Je({},ar._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:a,params:d}=o;a===Gn.ACCOUNTS_CHANGED?this._handleAccountsChanged(d):a===Gn.UNLOCK_STATE_CHANGED?this._handleUnlockStateChanged(d):a===Gn.CHAIN_CHANGED&&this._handleChainChanged(d)};this.jsonRpcConnectionEvents.on("notification",s)}isConnected(){return this._state.isConnected}async _initializeState(){try{const{accounts:e,chainId:t,isUnlocked:n}=await this.request({method:Fl.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,a)=>{this._handleAccountsChanged(a.result||[],s.method==="solana_accounts",n),t(o,a)};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(it.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){this._state.isConnected=!1;let n;e?(n=new mt.EthereumRpcError(1013,t||it.errors.disconnected()),Ee.debug(n)):(n=new mt.EthereumRpcError(1011,t||it.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}Gl(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(ar,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});function zo(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 ou=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 su(r){try{const{document:e}=r;let t=e.querySelector('head > link[rel="shortcut icon"]');return t&&await zo(t.href)||(t=Array.from(e.querySelectorAll('head > link[rel="icon"]')).find(n=>!!n.href),t&&await zo(t.href))?t.href:""}catch{return""}}const au=async()=>({name:ou(window),icon:await su(window)}),lu=["send_transaction","sign_transaction","sign_all_transactions","sign_message","connect"],uu=[dt.SET_PROVIDER],fu=iu("localStorage");(async function(){try{if(typeof document>"u")return;const e=document.createElement("link"),{torusUrl:t}=await _s("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 cu{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=ys.PRODUCTION,enableLogging:t=!1,network:n,showTorusButton:i=!1,useLocalStorage:s=!1,buttonPosition:o=Mt.BOTTOM_LEFT,apiKey:a="torus-default",extraParams:d={},whiteLabel:w}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.isInitialized)throw new Error("Already initialized");const{torusUrl:N,logLevel:O}=await _s(e);Ee.enableAll(),Ee.info(N,"url loaded"),Ee.info(`Solana Embed Version :${Vl}`),this.torusUrl=N,Ee.setDefaultLevel(O),t?Ee.enableAll():Ee.disableAll();const I=this.handleDappStorageKey(s),U=new URL(N);U.pathname.endsWith("/")?U.pathname+="frame":U.pathname+="/frame";const B=new URLSearchParams;return I&&B.append("dappStorageKey",I),B.append("origin",window.location.origin),U.hash=B.toString(),this.torusIframe=Dt(`<iframe