@acedatacloud/nexior 3.26.0 → 3.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/dist/assets/{Auth-C4N-kn3P.js → Auth-DcpGIqwi.js} +1 -1
  2. package/dist/assets/{BotPlaceholder-BU17vEUy.js → BotPlaceholder-Drm6xiuT.js} +1 -1
  3. package/dist/assets/{Callback-CgCHMBvT.js → Callback-REiOMkuD.js} +1 -1
  4. package/dist/assets/{Console-BuuIvyQI.js → Console-BrjF9_It.js} +1 -1
  5. package/dist/assets/{Conversation-Bd-g7wEx.js → Conversation-Clf-3NQi.js} +2 -2
  6. package/dist/assets/{CopyToClipboard-Ab4hHs26.js → CopyToClipboard-CBliPgeP.js} +1 -1
  7. package/dist/assets/{Detail-B0bGFPcr.js → Detail-Dnd4Nd0T.js} +2 -2
  8. package/dist/assets/{EditArray-BO1VlAtC.js → EditArray-KYrcEW6W.js} +1 -1
  9. package/dist/assets/{Extra-BWQZ0rxR.css → Extra-Bqh2sys8.css} +1 -1
  10. package/dist/assets/Extra-y_XywERF.js +1 -0
  11. package/dist/assets/{FilePreview-DzYn5dam.js → FilePreview-Bz-RkJBC.js} +1 -1
  12. package/dist/assets/{History-A_7LOfGN.js → History-CeaaKZfy.js} +1 -1
  13. package/dist/assets/{ImagePreview-hdi2mrdI.js → ImagePreview-BnQhS1sy.js} +1 -1
  14. package/dist/assets/{ImageWrapper-D9v7ltO5.js → ImageWrapper-LkV6h7vR.js} +1 -1
  15. package/dist/assets/{Index-CucfTPS_.js → Index-6xzU8HJN.js} +1 -1
  16. package/dist/assets/{Index-CJv4wGmX.js → Index-B17LFoFo.js} +1 -1
  17. package/dist/assets/{Index-B4Oy-w03.js → Index-BPs_CTLK.js} +1 -1
  18. package/dist/assets/{Index-y1E2fHPZ.js → Index-BWPDDqlj.js} +1 -1
  19. package/dist/assets/{Index-CFq2w4hh.js → Index-CLBa1eAb.js} +1 -1
  20. package/dist/assets/{Index--9DaVBY2.js → Index-CLEC89Jo.js} +1 -1
  21. package/dist/assets/{Index-Co3cnanu.js → Index-CRTcv7xy.js} +1 -1
  22. package/dist/assets/{Index-BggomWsw.js → Index-CaI6zBZ3.js} +1 -1
  23. package/dist/assets/{Index-C1jYhkOD.js → Index-CqoL0s33.js} +1 -1
  24. package/dist/assets/{Index-CEaJNUQF.js → Index-DC_YoIhM.js} +1 -1
  25. package/dist/assets/{Index-ym69MOSH.js → Index-DcyyV6Sz.js} +1 -1
  26. package/dist/assets/{Index-ZsIbmaS2.js → Index-DhUCvaCi.js} +1 -1
  27. package/dist/assets/{Index-qjyre1DA.js → Index-DjI-ZL96.js} +1 -1
  28. package/dist/assets/{Index-BQLNTE0F.js → Index-E1wsWno5.js} +1 -1
  29. package/dist/assets/{Index-DDch_lJc.js → Index-VAxSP8lV.js} +1 -1
  30. package/dist/assets/{Index-DKlMjuCB.js → Index-xa7bNKA9.js} +1 -1
  31. package/dist/assets/{Invitees-X4GRTkxt.js → Invitees-BdKbK4gL.js} +1 -1
  32. package/dist/assets/{List-DMjesxby.js → List-4_OW5KaJ.js} +1 -1
  33. package/dist/assets/List-B9hq6lUq.js +1 -0
  34. package/dist/assets/{List-BENZw7xg.css → List-B9sT18--.css} +1 -1
  35. package/dist/assets/List-Cc5KKfCM.css +1 -0
  36. package/dist/assets/List-DURh04Gf.js +1 -0
  37. package/dist/assets/Main-F_4zsEk0.js +1 -0
  38. package/dist/assets/{Navigator-BfaRng3e.js → Navigator-CGT5cZ47.js} +1 -1
  39. package/dist/assets/{NoTasks-CgXSnfeV.js → NoTasks-3Z1b05wG.js} +1 -1
  40. package/dist/assets/{Pagination-CtENlxBI.js → Pagination-DXYXr-Qm.js} +1 -1
  41. package/dist/assets/{ScrollList-hBjgRYV4.js → ScrollList-BkRXLc_a.js} +1 -1
  42. package/dist/assets/Status-D-2VRcqL.js +1 -0
  43. package/dist/assets/Status-wRPeglNe.css +1 -0
  44. package/dist/assets/Subscribe-B5VcnrBh.js +1 -0
  45. package/dist/assets/{VideoPlayer-CsVaulnP.js → VideoPlayer-Ci_7fcAo.js} +1 -1
  46. package/dist/assets/application-4sCLHc8H.js +1 -0
  47. package/dist/assets/application-B3aCFTSw.js +1 -0
  48. package/dist/assets/application-BEYmfFJz.js +1 -0
  49. package/dist/assets/application-BIKcbaVW.js +1 -0
  50. package/dist/assets/application-BeoSDqMh.js +1 -0
  51. package/dist/assets/application-Bis14xw7.js +1 -0
  52. package/dist/assets/application-CUkYQyol.js +1 -0
  53. package/dist/assets/application-CobHPXFx.js +1 -0
  54. package/dist/assets/application-Cx03xyWX.js +1 -0
  55. package/dist/assets/application-D9f2k0Z7.js +1 -0
  56. package/dist/assets/application-DDCXm6fP.js +1 -0
  57. package/dist/assets/application-F1iqle9v.js +1 -0
  58. package/dist/assets/application-IPq1e_Il.js +1 -0
  59. package/dist/assets/application-KyKnYbJy.js +1 -0
  60. package/dist/assets/application-OKlUcxSS.js +1 -0
  61. package/dist/assets/application-QJ9ZEQYt.js +1 -0
  62. package/dist/assets/application-m4x26hDG.js +1 -0
  63. package/dist/assets/application-rjK39_oK.js +1 -0
  64. package/dist/assets/coin---jmV5d3.js +1 -0
  65. package/dist/assets/coin-BhOL0L82.js +1 -0
  66. package/dist/assets/coin-BplV0rp3.js +1 -0
  67. package/dist/assets/coin-CevLkt3x.js +1 -0
  68. package/dist/assets/coin-D1xK6HrR.js +1 -0
  69. package/dist/assets/coin-D4A1zhD3.js +1 -0
  70. package/dist/assets/coin-D68hXR13.js +1 -0
  71. package/dist/assets/coin-D9UJDO64.js +1 -0
  72. package/dist/assets/coin-DB8LitKm.js +1 -0
  73. package/dist/assets/coin-DD1bmkS2.js +1 -0
  74. package/dist/assets/coin-DmW3AlDt.js +1 -0
  75. package/dist/assets/coin-DqoEQDC8.js +1 -0
  76. package/dist/assets/coin-DwbnfqVd.js +1 -0
  77. package/dist/assets/coin-ZbWiLVH3.js +1 -0
  78. package/dist/assets/coin-kUzHncYu.js +1 -0
  79. package/dist/assets/coin-njK3etEa.js +1 -0
  80. package/dist/assets/coin-vTvlgRXc.js +1 -0
  81. package/dist/assets/common-B-EGiyep.js +1 -0
  82. package/dist/assets/common-B_8azNNB.js +1 -0
  83. package/dist/assets/common-Bj1QcGsP.js +1 -0
  84. package/dist/assets/common-BjCDdbb-.js +1 -0
  85. package/dist/assets/common-BkT5tE0t.js +1 -0
  86. package/dist/assets/common-C-IzjSKC.js +1 -0
  87. package/dist/assets/common-C9eXfUEo.js +1 -0
  88. package/dist/assets/common-CRr8UPV-.js +1 -0
  89. package/dist/assets/common-CSbTh7Es.js +1 -0
  90. package/dist/assets/common-CnDyLF8c.js +1 -0
  91. package/dist/assets/common-CpvsNb6Z.js +1 -0
  92. package/dist/assets/common-DCBdMh4C.js +1 -0
  93. package/dist/assets/common-DEzGcp3u.js +1 -0
  94. package/dist/assets/common-Dfjl8VXX.js +1 -0
  95. package/dist/assets/common-DgsCAY9A.js +1 -0
  96. package/dist/assets/common-giBfYpVG.js +1 -0
  97. package/dist/assets/common-ifG7Jngn.js +1 -0
  98. package/dist/assets/common-oJuxEHvM.js +1 -0
  99. package/dist/assets/console-B3eP-WO_.js +1 -0
  100. package/dist/assets/console-B6WpNFZR.js +1 -0
  101. package/dist/assets/console-BSA-nQut.js +1 -0
  102. package/dist/assets/console-BfVdppQq.js +1 -0
  103. package/dist/assets/console-BqANz1qU.js +1 -0
  104. package/dist/assets/console-C0jNAT2v.js +1 -0
  105. package/dist/assets/console-C8SjjSMs.js +1 -0
  106. package/dist/assets/console-CQDVZ5kW.js +1 -0
  107. package/dist/assets/console-CbryeCQt.js +1 -0
  108. package/dist/assets/console-CdExu4-O.js +1 -0
  109. package/dist/assets/console-CkF3DYko.js +1 -0
  110. package/dist/assets/console-D-9NxLjR.js +1 -0
  111. package/dist/assets/console-D5rJzc1E.js +1 -0
  112. package/dist/assets/console-DMTF96hK.js +1 -0
  113. package/dist/assets/console-DMlew7iX.js +1 -0
  114. package/dist/assets/console-EbWSW-Fu.js +1 -0
  115. package/dist/assets/console-dlCwwK2t.js +1 -0
  116. package/dist/assets/console-fIqOWY6V.js +1 -0
  117. package/dist/assets/{distribution-ahsMBsrL.js → distribution-zXeAGkCu.js} +1 -1
  118. package/dist/assets/index-Cn_0hZFW.css +1 -0
  119. package/dist/assets/index-Dn72Szn0.js +3 -0
  120. package/dist/assets/order-2938TXeL.js +1 -0
  121. package/dist/assets/order-691hfcVo.js +1 -0
  122. package/dist/assets/order-7yDEF-wE.js +1 -0
  123. package/dist/assets/order-BDWVwDAn.js +1 -0
  124. package/dist/assets/order-Bqc53rmv.js +1 -0
  125. package/dist/assets/{order-Bu5wjTFd.js → order-CCQxecEz.js} +1 -1
  126. package/dist/assets/order-CESPqprA.js +1 -0
  127. package/dist/assets/order-CH4FTZdz.js +1 -0
  128. package/dist/assets/order-CL6RqSCE.js +1 -0
  129. package/dist/assets/order-C_9poK2b.js +1 -0
  130. package/dist/assets/order-CfKXYzuo.js +1 -0
  131. package/dist/assets/order-CjpgvCGB.js +1 -0
  132. package/dist/assets/order-Cx9acmu9.js +1 -0
  133. package/dist/assets/order-DQmJSByk.js +1 -0
  134. package/dist/assets/order-DdMK7tK_.js +1 -0
  135. package/dist/assets/order-DqKzccXP.js +1 -0
  136. package/dist/assets/order-DxbjGnCv.js +1 -0
  137. package/dist/assets/order-sPPLdLb3.js +1 -0
  138. package/dist/assets/order-yEiwj_v2.js +1 -0
  139. package/dist/assets/{price-DsQ2XKBW.js → price-7kPhVK1M.js} +1 -1
  140. package/dist/assets/usage-03lq5UJ3.js +1 -0
  141. package/dist/assets/usage-B11bMhMu.js +1 -0
  142. package/dist/assets/usage-BKq6wop8.js +1 -0
  143. package/dist/assets/usage-Bmfw2Wfu.js +1 -0
  144. package/dist/assets/usage-Bzj3lxYU.js +1 -0
  145. package/dist/assets/usage-CHOeMSGZ.js +1 -0
  146. package/dist/assets/usage-CXILxQmB.js +1 -0
  147. package/dist/assets/usage-Cs8IIsUQ.js +1 -0
  148. package/dist/assets/usage-CuISlf-m.js +1 -0
  149. package/dist/assets/usage-D-hJR3BT.js +1 -0
  150. package/dist/assets/usage-D1OnFGRV.js +1 -0
  151. package/dist/assets/usage-D28S0Rr_.js +1 -0
  152. package/dist/assets/usage-DGU-d7c5.js +1 -0
  153. package/dist/assets/usage-DT49JIvm.js +1 -0
  154. package/dist/assets/usage-DyZHxchW.js +1 -0
  155. package/dist/assets/usage-Nsqhxc9s.js +1 -0
  156. package/dist/assets/usage-jdUmayn9.js +1 -0
  157. package/dist/assets/usage-oJCiUJ8P.js +1 -0
  158. package/dist/assets/{vendor-BG5lCpoe.js → vendor-BVnhgPs4.js} +10 -10
  159. package/dist/assets/{vendor-chart-DlegxWjs.js → vendor-chart-BdX85Ip7.js} +1 -1
  160. package/dist/assets/{vendor-dayjs-BRrJyY8K.js → vendor-dayjs-C40ROiFS.js} +1 -1
  161. package/dist/assets/{vendor-element-plus-7rF3khck.js → vendor-element-plus-BUOzLm6W.js} +1 -1
  162. package/dist/assets/{vendor-highlight-xfJzRjy2.js → vendor-highlight-6BASrUTN.js} +1 -1
  163. package/dist/index.html +110 -11
  164. package/package.json +1 -1
  165. package/dist/assets/Extra-D3ij_ylf.js +0 -1
  166. package/dist/assets/List-CBmU0M9l.js +0 -1
  167. package/dist/assets/List-CmRxS8VC.js +0 -1
  168. package/dist/assets/List-JGRPVsQo.css +0 -1
  169. package/dist/assets/Main-DFmVXhIL.js +0 -1
  170. package/dist/assets/Status-61u7CQ2x.css +0 -1
  171. package/dist/assets/Status-e-4FVvMB.js +0 -1
  172. package/dist/assets/Subscribe-P6oarsUJ.js +0 -1
  173. package/dist/assets/application--jxRGPwL.js +0 -1
  174. package/dist/assets/application-63ZiZRBB.js +0 -1
  175. package/dist/assets/application-B7A9D2Ax.js +0 -1
  176. package/dist/assets/application-BGGNys47.js +0 -1
  177. package/dist/assets/application-BLbSQe1x.js +0 -1
  178. package/dist/assets/application-BWqsz75E.js +0 -1
  179. package/dist/assets/application-Bcyo2WXC.js +0 -1
  180. package/dist/assets/application-BdF5iGG1.js +0 -1
  181. package/dist/assets/application-BhrWZHF4.js +0 -1
  182. package/dist/assets/application-C1Y9RY2-.js +0 -1
  183. package/dist/assets/application-C8B9SWDS.js +0 -1
  184. package/dist/assets/application-C8VAI6jj.js +0 -1
  185. package/dist/assets/application-CgCvwGUU.js +0 -1
  186. package/dist/assets/application-D6bGTmT3.js +0 -1
  187. package/dist/assets/application-DJ4ufpSX.js +0 -1
  188. package/dist/assets/application-DR2dsacC.js +0 -1
  189. package/dist/assets/application-DVJ0RjBC.js +0 -1
  190. package/dist/assets/application-Xl_V7Vvw.js +0 -1
  191. package/dist/assets/coin-BEmGht_E.js +0 -1
  192. package/dist/assets/coin-BTZicwhr.js +0 -1
  193. package/dist/assets/coin-BY1f2AGt.js +0 -1
  194. package/dist/assets/coin-BfOIeDbl.js +0 -1
  195. package/dist/assets/coin-BpqbFO16.js +0 -1
  196. package/dist/assets/coin-BsuV_YeV.js +0 -1
  197. package/dist/assets/coin-C0soSeyR.js +0 -1
  198. package/dist/assets/coin-C1vThE7K.js +0 -1
  199. package/dist/assets/coin-CIHIAMWv.js +0 -1
  200. package/dist/assets/coin-COhdbXyd.js +0 -1
  201. package/dist/assets/coin-Cbnm3Xy-.js +0 -1
  202. package/dist/assets/coin-CuoluQSV.js +0 -1
  203. package/dist/assets/coin-DCvKQ0Nc.js +0 -1
  204. package/dist/assets/coin-DESNZPRB.js +0 -1
  205. package/dist/assets/coin-F--7ubaN.js +0 -1
  206. package/dist/assets/coin-ashRjWk0.js +0 -1
  207. package/dist/assets/coin-jcPx8ZMO.js +0 -1
  208. package/dist/assets/common-6FZ_tYpg.js +0 -1
  209. package/dist/assets/common-B3cVuyFv.js +0 -1
  210. package/dist/assets/common-BAxUV6og.js +0 -1
  211. package/dist/assets/common-BHnqpgOQ.js +0 -1
  212. package/dist/assets/common-BUld6hJq.js +0 -1
  213. package/dist/assets/common-CpryBlSq.js +0 -1
  214. package/dist/assets/common-D3mNlW6b.js +0 -1
  215. package/dist/assets/common-D4Zudk-z.js +0 -1
  216. package/dist/assets/common-DQXIhRdJ.js +0 -1
  217. package/dist/assets/common-DUw9A690.js +0 -1
  218. package/dist/assets/common-DbQuScSb.js +0 -1
  219. package/dist/assets/common-DetSPGk0.js +0 -1
  220. package/dist/assets/common-Dx88pxYN.js +0 -1
  221. package/dist/assets/common-Fo438SS-.js +0 -1
  222. package/dist/assets/common-PAx8Dvpp.js +0 -1
  223. package/dist/assets/common-x75KDjU8.js +0 -1
  224. package/dist/assets/common-xme8KErb.js +0 -1
  225. package/dist/assets/common-ymT_ZIQ8.js +0 -1
  226. package/dist/assets/console-95XEcGOc.js +0 -1
  227. package/dist/assets/console-Ac28oQWd.js +0 -1
  228. package/dist/assets/console-BFILeQRi.js +0 -1
  229. package/dist/assets/console-BQ8StUHq.js +0 -1
  230. package/dist/assets/console-B_2GqCeq.js +0 -1
  231. package/dist/assets/console-BjsFThUG.js +0 -1
  232. package/dist/assets/console-BoXqkLTB.js +0 -1
  233. package/dist/assets/console-ByMS0Q8v.js +0 -1
  234. package/dist/assets/console-C1KVS7Xx.js +0 -1
  235. package/dist/assets/console-C9UrVX_Y.js +0 -1
  236. package/dist/assets/console-CFvURZbu.js +0 -1
  237. package/dist/assets/console-CQbV4qXo.js +0 -1
  238. package/dist/assets/console-Ck3VbmRo.js +0 -1
  239. package/dist/assets/console-CpYR4Dzu.js +0 -1
  240. package/dist/assets/console-D7I3jGvJ.js +0 -1
  241. package/dist/assets/console-DDvFCAU_.js +0 -1
  242. package/dist/assets/console-Nww9cLdQ.js +0 -1
  243. package/dist/assets/console-mBmajUaf.js +0 -1
  244. package/dist/assets/index-BWdK6S1P.js +0 -3
  245. package/dist/assets/index-C42HKz1r.css +0 -1
  246. package/dist/assets/order-5Q2NSU5A.js +0 -1
  247. package/dist/assets/order-7sVfWX_m.js +0 -1
  248. package/dist/assets/order-BspD8oHa.js +0 -1
  249. package/dist/assets/order-CGebGmiZ.js +0 -1
  250. package/dist/assets/order-Cg6Z4GIW.js +0 -1
  251. package/dist/assets/order-ChIfVdAa.js +0 -1
  252. package/dist/assets/order-CmN2xY-p.js +0 -1
  253. package/dist/assets/order-D1keYPzu.js +0 -1
  254. package/dist/assets/order-DAOBmqsZ.js +0 -1
  255. package/dist/assets/order-DF-Nyswd.js +0 -1
  256. package/dist/assets/order-DNG0G59-.js +0 -1
  257. package/dist/assets/order-DVTAHRL7.js +0 -1
  258. package/dist/assets/order-DlAFUU9_.js +0 -1
  259. package/dist/assets/order-DszuiA3J.js +0 -1
  260. package/dist/assets/order-P2ML4NX3.js +0 -1
  261. package/dist/assets/order-eMd8F_I4.js +0 -1
  262. package/dist/assets/order-ip3zUjH0.js +0 -1
  263. package/dist/assets/order-lRxQRPUo.js +0 -1
  264. package/dist/assets/usage-BEYQuDdt.js +0 -1
  265. package/dist/assets/usage-Bc1XOPF0.js +0 -1
  266. package/dist/assets/usage-BgEAkK9i.js +0 -1
  267. package/dist/assets/usage-Bn7KY8lM.js +0 -1
  268. package/dist/assets/usage-Bsq1Hk5A.js +0 -1
  269. package/dist/assets/usage-C35-QblK.js +0 -1
  270. package/dist/assets/usage-C41JZQ8E.js +0 -1
  271. package/dist/assets/usage-CBK2Oe1h.js +0 -1
  272. package/dist/assets/usage-CFUYH65J.js +0 -1
  273. package/dist/assets/usage-Caq4CTU6.js +0 -1
  274. package/dist/assets/usage-CaqYASGL.js +0 -1
  275. package/dist/assets/usage-Ceev41EX.js +0 -1
  276. package/dist/assets/usage-D2XEeyQ_.js +0 -1
  277. package/dist/assets/usage-DiPV0e2o.js +0 -1
  278. package/dist/assets/usage-MdFcPMEh.js +0 -1
  279. package/dist/assets/usage-crXxi3jO.js +0 -1
  280. package/dist/assets/usage-p7rPGs92.js +0 -1
  281. package/dist/assets/usage-t6jUbAuV.js +0 -1
@@ -1,4 +1,4 @@
1
- import{d as Dt,c as Vt,a as Pt,o as Kt,e as gH,r as An,s as xf,b as ir,w as dn,i as xne,h as g1,F as AS,g as bf,f as W3,j as SS,k as mH,l as ia,T as Ene,m as P2,n as kne,p as bH,q as yH,t as Ane,u as Sne,v as wH,x as vH,y as qa,z as Ef,A as rh,B as _H,C as xH}from"./vendor-vue-Bb02XvLT.js";import"./vendor-dayjs-BRrJyY8K.js";import{r as EH,P as kH}from"./vendor-katex-DHBGsivc.js";function Cne(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Ine="modulepreload",Mne=function(e){return"/"+e},u$={},Le=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let c=function(u){return Promise.all(u.map(l=>Promise.resolve(l).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");i=c(r.map(u=>{if(u=Mne(u),u in u$)return;u$[u]=!0;const l=u.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=l?"stylesheet":Ine,l||(h.as="script"),h.crossOrigin="",h.href=u,a&&h.setAttribute("nonce",a),document.head.appendChild(h),l)return new Promise((g,m)=>{h.addEventListener("load",g),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};var AH=typeof global=="object"&&global&&global.Object===Object&&global,$ne=typeof self=="object"&&self&&self.Object===Object&&self,Za=AH||$ne||Function("return this")(),oa=Za.Symbol,SH=Object.prototype,Tne=SH.hasOwnProperty,Nne=SH.toString,B1=oa?oa.toStringTag:void 0;function One(e){var t=Tne.call(e,B1),r=e[B1];try{e[B1]=void 0;var n=!0}catch{}var i=Nne.call(e);return n&&(t?e[B1]=r:delete e[B1]),i}var jne=Object.prototype,Pne=jne.toString;function Dne(e){return Pne.call(e)}var Rne="[object Null]",Lne="[object Undefined]",l$=oa?oa.toStringTag:void 0;function nh(e){return e==null?e===void 0?Lne:Rne:l$&&l$ in Object(e)?One(e):Dne(e)}function zc(e){return e!=null&&typeof e=="object"}var zne="[object Symbol]";function V3(e){return typeof e=="symbol"||zc(e)&&nh(e)==zne}function CS(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Es=Array.isArray,f$=oa?oa.prototype:void 0,d$=f$?f$.toString:void 0;function CH(e){if(typeof e=="string")return e;if(Es(e))return CS(e,CH)+"";if(V3(e))return d$?d$.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Bne=/\s/;function Fne(e){for(var t=e.length;t--&&Bne.test(e.charAt(t)););return t}var Une=/^\s+/;function qne(e){return e&&e.slice(0,Fne(e)+1).replace(Une,"")}function ks(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var h$=NaN,Hne=/^[-+]0x[0-9a-f]+$/i,Wne=/^0b[01]+$/i,Vne=/^0o[0-7]+$/i,Kne=parseInt;function p$(e){if(typeof e=="number")return e;if(V3(e))return h$;if(ks(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ks(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qne(e);var r=Wne.test(e);return r||Vne.test(e)?Kne(e.slice(2),r?2:8):Hne.test(e)?h$:+e}function IS(e){return e}var Gne="[object AsyncFunction]",Zne="[object Function]",Yne="[object GeneratorFunction]",Jne="[object Proxy]";function MS(e){if(!ks(e))return!1;var t=nh(e);return t==Zne||t==Yne||t==Gne||t==Jne}var T6=Za["__core-js_shared__"],g$=function(){var e=/[^.]+$/.exec(T6&&T6.keys&&T6.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xne(e){return!!g$&&g$ in e}var Qne=Function.prototype,eie=Qne.toString;function ih(e){if(e!=null){try{return eie.call(e)}catch{}try{return e+""}catch{}}return""}var tie=/[\\^$.*+?()[\]{}|]/g,rie=/^\[object .+?Constructor\]$/,nie=Function.prototype,iie=Object.prototype,sie=nie.toString,oie=iie.hasOwnProperty,aie=RegExp("^"+sie.call(oie).replace(tie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cie(e){if(!ks(e)||Xne(e))return!1;var t=MS(e)?aie:rie;return t.test(ih(e))}function uie(e,t){return e?.[t]}function sh(e,t){var r=uie(e,t);return cie(r)?r:void 0}var Ux=sh(Za,"WeakMap"),m$=Object.create,lie=function(){function e(){}return function(t){if(!ks(t))return{};if(m$)return m$(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function fie(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function IH(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var die=800,hie=16,pie=Date.now;function gie(e){var t=0,r=0;return function(){var n=pie(),i=hie-(n-r);if(r=n,i>0){if(++t>=die)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function mie(e){return function(){return e}}var wv=function(){try{var e=sh(Object,"defineProperty");return e({},"",{}),e}catch{}}(),bie=wv?function(e,t){return wv(e,"toString",{configurable:!0,enumerable:!1,value:mie(t),writable:!0})}:IS,MH=gie(bie);function yie(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function wie(e,t,r,n){e.length;for(var i=r+1;i--;)if(t(e[i],i,e))return i;return-1}var vie=9007199254740991,_ie=/^(?:0|[1-9]\d*)$/;function K3(e,t){var r=typeof e;return t=t??vie,!!t&&(r=="number"||r!="symbol"&&_ie.test(e))&&e>-1&&e%1==0&&e<t}function $S(e,t,r){t=="__proto__"&&wv?wv(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function D2(e,t){return e===t||e!==e&&t!==t}var xie=Object.prototype,Eie=xie.hasOwnProperty;function TS(e,t,r){var n=e[t];(!(Eie.call(e,t)&&D2(n,r))||r===void 0&&!(t in e))&&$S(e,t,r)}function m1(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var a=t[s],c=void 0;c===void 0&&(c=e[a]),i?$S(r,a,c):TS(r,a,c)}return r}var b$=Math.max;function $H(e,t,r){return t=b$(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=b$(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),fie(e,this,a)}}function kie(e,t){return MH($H(e,t,IS),e+"")}var Aie=9007199254740991;function NS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Aie}function b1(e){return e!=null&&NS(e.length)&&!MS(e)}function Sie(e,t,r){if(!ks(r))return!1;var n=typeof t;return(n=="number"?b1(r)&&K3(t,r.length):n=="string"&&t in r)?D2(r[t],e):!1}function Cie(e){return kie(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&Sie(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var a=r[n];a&&e(t,a,n,s)}return t})}var Iie=Object.prototype;function OS(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Iie;return e===r}function Mie(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var $ie="[object Arguments]";function y$(e){return zc(e)&&nh(e)==$ie}var TH=Object.prototype,Tie=TH.hasOwnProperty,Nie=TH.propertyIsEnumerable,gm=y$(function(){return arguments}())?y$:function(e){return zc(e)&&Tie.call(e,"callee")&&!Nie.call(e,"callee")};function Oie(){return!1}var NH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,w$=NH&&typeof module=="object"&&module&&!module.nodeType&&module,jie=w$&&w$.exports===NH,v$=jie?Za.Buffer:void 0,Pie=v$?v$.isBuffer:void 0,mm=Pie||Oie,Die="[object Arguments]",Rie="[object Array]",Lie="[object Boolean]",zie="[object Date]",Bie="[object Error]",Fie="[object Function]",Uie="[object Map]",qie="[object Number]",Hie="[object Object]",Wie="[object RegExp]",Vie="[object Set]",Kie="[object String]",Gie="[object WeakMap]",Zie="[object ArrayBuffer]",Yie="[object DataView]",Jie="[object Float32Array]",Xie="[object Float64Array]",Qie="[object Int8Array]",ese="[object Int16Array]",tse="[object Int32Array]",rse="[object Uint8Array]",nse="[object Uint8ClampedArray]",ise="[object Uint16Array]",sse="[object Uint32Array]",an={};an[Jie]=an[Xie]=an[Qie]=an[ese]=an[tse]=an[rse]=an[nse]=an[ise]=an[sse]=!0;an[Die]=an[Rie]=an[Zie]=an[Lie]=an[Yie]=an[zie]=an[Bie]=an[Fie]=an[Uie]=an[qie]=an[Hie]=an[Wie]=an[Vie]=an[Kie]=an[Gie]=!1;function ose(e){return zc(e)&&NS(e.length)&&!!an[nh(e)]}function jS(e){return function(t){return e(t)}}var OH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ug=OH&&typeof module=="object"&&module&&!module.nodeType&&module,ase=Ug&&Ug.exports===OH,N6=ase&&AH.process,_p=function(){try{var e=Ug&&Ug.require&&Ug.require("util").types;return e||N6&&N6.binding&&N6.binding("util")}catch{}}(),_$=_p&&_p.isTypedArray,PS=_$?jS(_$):ose,cse=Object.prototype,use=cse.hasOwnProperty;function jH(e,t){var r=Es(e),n=!r&&gm(e),i=!r&&!n&&mm(e),s=!r&&!n&&!i&&PS(e),o=r||n||i||s,a=o?Mie(e.length,String):[],c=a.length;for(var u in e)(t||use.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||K3(u,c)))&&a.push(u);return a}function PH(e,t){return function(r){return e(t(r))}}var lse=PH(Object.keys,Object),fse=Object.prototype,dse=fse.hasOwnProperty;function hse(e){if(!OS(e))return lse(e);var t=[];for(var r in Object(e))dse.call(e,r)&&r!="constructor"&&t.push(r);return t}function R2(e){return b1(e)?jH(e):hse(e)}function pse(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var gse=Object.prototype,mse=gse.hasOwnProperty;function bse(e){if(!ks(e))return pse(e);var t=OS(e),r=[];for(var n in e)n=="constructor"&&(t||!mse.call(e,n))||r.push(n);return r}function L2(e){return b1(e)?jH(e,!0):bse(e)}var yse=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wse=/^\w*$/;function DS(e,t){if(Es(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||V3(e)?!0:wse.test(e)||!yse.test(e)||t!=null&&e in Object(t)}var bm=sh(Object,"create");function vse(){this.__data__=bm?bm(null):{},this.size=0}function _se(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xse="__lodash_hash_undefined__",Ese=Object.prototype,kse=Ese.hasOwnProperty;function Ase(e){var t=this.__data__;if(bm){var r=t[e];return r===xse?void 0:r}return kse.call(t,e)?t[e]:void 0}var Sse=Object.prototype,Cse=Sse.hasOwnProperty;function Ise(e){var t=this.__data__;return bm?t[e]!==void 0:Cse.call(t,e)}var Mse="__lodash_hash_undefined__";function $se(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bm&&t===void 0?Mse:t,this}function Td(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Td.prototype.clear=vse;Td.prototype.delete=_se;Td.prototype.get=Ase;Td.prototype.has=Ise;Td.prototype.set=$se;function Tse(){this.__data__=[],this.size=0}function G3(e,t){for(var r=e.length;r--;)if(D2(e[r][0],t))return r;return-1}var Nse=Array.prototype,Ose=Nse.splice;function jse(e){var t=this.__data__,r=G3(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ose.call(t,r,1),--this.size,!0}function Pse(e){var t=this.__data__,r=G3(t,e);return r<0?void 0:t[r][1]}function Dse(e){return G3(this.__data__,e)>-1}function Rse(e,t){var r=this.__data__,n=G3(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function rl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}rl.prototype.clear=Tse;rl.prototype.delete=jse;rl.prototype.get=Pse;rl.prototype.has=Dse;rl.prototype.set=Rse;var ym=sh(Za,"Map");function Lse(){this.size=0,this.__data__={hash:new Td,map:new(ym||rl),string:new Td}}function zse(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Z3(e,t){var r=e.__data__;return zse(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Bse(e){var t=Z3(this,e).delete(e);return this.size-=t?1:0,t}function Fse(e){return Z3(this,e).get(e)}function Use(e){return Z3(this,e).has(e)}function qse(e,t){var r=Z3(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function nl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nl.prototype.clear=Lse;nl.prototype.delete=Bse;nl.prototype.get=Fse;nl.prototype.has=Use;nl.prototype.set=qse;var Hse="Expected a function";function RS(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Hse);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(RS.Cache||nl),r}RS.Cache=nl;var Wse=500;function Vse(e){var t=RS(e,function(n){return r.size===Wse&&r.clear(),n}),r=t.cache;return t}var Kse=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gse=/\\(\\)?/g,Zse=Vse(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Kse,function(r,n,i,s){t.push(i?s.replace(Gse,"$1"):n||r)}),t});function Yse(e){return e==null?"":CH(e)}function y1(e,t){return Es(e)?e:DS(e,t)?[e]:Zse(Yse(e))}function w1(e){if(typeof e=="string"||V3(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Y3(e,t){t=y1(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[w1(t[r++])];return r&&r==n?e:void 0}function Jse(e,t,r){var n=e==null?void 0:Y3(e,t);return n===void 0?r:n}function LS(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var x$=oa?oa.isConcatSpreadable:void 0;function Xse(e){return Es(e)||gm(e)||!!(x$&&e&&e[x$])}function DH(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=Xse),i||(i=[]);++s<o;){var a=e[s];r(a)?LS(i,a):i[i.length]=a}return i}function Qse(e){var t=e==null?0:e.length;return t?DH(e):[]}function RH(e){return MH($H(e,void 0,Qse),e+"")}var zS=PH(Object.getPrototypeOf,Object),eoe="[object Object]",toe=Function.prototype,roe=Object.prototype,LH=toe.toString,noe=roe.hasOwnProperty,ioe=LH.call(Object);function zH(e){if(!zc(e)||nh(e)!=eoe)return!1;var t=zS(e);if(t===null)return!0;var r=noe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&LH.call(r)==ioe}function soe(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}function oht(){if(!arguments.length)return[];var e=arguments[0];return Es(e)?e:[e]}function ooe(){this.__data__=new rl,this.size=0}function aoe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function coe(e){return this.__data__.get(e)}function uoe(e){return this.__data__.has(e)}var loe=200;function foe(e,t){var r=this.__data__;if(r instanceof rl){var n=r.__data__;if(!ym||n.length<loe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new nl(n)}return r.set(e,t),this.size=r.size,this}function Ha(e){var t=this.__data__=new rl(e);this.size=t.size}Ha.prototype.clear=ooe;Ha.prototype.delete=aoe;Ha.prototype.get=coe;Ha.prototype.has=uoe;Ha.prototype.set=foe;function doe(e,t){return e&&m1(t,R2(t),e)}function hoe(e,t){return e&&m1(t,L2(t),e)}var BH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,E$=BH&&typeof module=="object"&&module&&!module.nodeType&&module,poe=E$&&E$.exports===BH,k$=poe?Za.Buffer:void 0,A$=k$?k$.allocUnsafe:void 0;function FH(e,t){if(t)return e.slice();var r=e.length,n=A$?A$(r):new e.constructor(r);return e.copy(n),n}function goe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}function UH(){return[]}var moe=Object.prototype,boe=moe.propertyIsEnumerable,S$=Object.getOwnPropertySymbols,BS=S$?function(e){return e==null?[]:(e=Object(e),goe(S$(e),function(t){return boe.call(e,t)}))}:UH;function yoe(e,t){return m1(e,BS(e),t)}var woe=Object.getOwnPropertySymbols,qH=woe?function(e){for(var t=[];e;)LS(t,BS(e)),e=zS(e);return t}:UH;function voe(e,t){return m1(e,qH(e),t)}function HH(e,t,r){var n=t(e);return Es(e)?n:LS(n,r(e))}function qx(e){return HH(e,R2,BS)}function WH(e){return HH(e,L2,qH)}var Hx=sh(Za,"DataView"),Wx=sh(Za,"Promise"),Vx=sh(Za,"Set"),C$="[object Map]",_oe="[object Object]",I$="[object Promise]",M$="[object Set]",$$="[object WeakMap]",T$="[object DataView]",xoe=ih(Hx),Eoe=ih(ym),koe=ih(Wx),Aoe=ih(Vx),Soe=ih(Ux),La=nh;(Hx&&La(new Hx(new ArrayBuffer(1)))!=T$||ym&&La(new ym)!=C$||Wx&&La(Wx.resolve())!=I$||Vx&&La(new Vx)!=M$||Ux&&La(new Ux)!=$$)&&(La=function(e){var t=nh(e),r=t==_oe?e.constructor:void 0,n=r?ih(r):"";if(n)switch(n){case xoe:return T$;case Eoe:return C$;case koe:return I$;case Aoe:return M$;case Soe:return $$}return t});var Coe=Object.prototype,Ioe=Coe.hasOwnProperty;function Moe(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Ioe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var vv=Za.Uint8Array;function FS(e){var t=new e.constructor(e.byteLength);return new vv(t).set(new vv(e)),t}function $oe(e,t){var r=t?FS(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Toe=/\w*$/;function Noe(e){var t=new e.constructor(e.source,Toe.exec(e));return t.lastIndex=e.lastIndex,t}var N$=oa?oa.prototype:void 0,O$=N$?N$.valueOf:void 0;function Ooe(e){return O$?Object(O$.call(e)):{}}function VH(e,t){var r=t?FS(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var joe="[object Boolean]",Poe="[object Date]",Doe="[object Map]",Roe="[object Number]",Loe="[object RegExp]",zoe="[object Set]",Boe="[object String]",Foe="[object Symbol]",Uoe="[object ArrayBuffer]",qoe="[object DataView]",Hoe="[object Float32Array]",Woe="[object Float64Array]",Voe="[object Int8Array]",Koe="[object Int16Array]",Goe="[object Int32Array]",Zoe="[object Uint8Array]",Yoe="[object Uint8ClampedArray]",Joe="[object Uint16Array]",Xoe="[object Uint32Array]";function Qoe(e,t,r){var n=e.constructor;switch(t){case Uoe:return FS(e);case joe:case Poe:return new n(+e);case qoe:return $oe(e,r);case Hoe:case Woe:case Voe:case Koe:case Goe:case Zoe:case Yoe:case Joe:case Xoe:return VH(e,r);case Doe:return new n;case Roe:case Boe:return new n(e);case Loe:return Noe(e);case zoe:return new n;case Foe:return Ooe(e)}}function KH(e){return typeof e.constructor=="function"&&!OS(e)?lie(zS(e)):{}}var eae="[object Map]";function tae(e){return zc(e)&&La(e)==eae}var j$=_p&&_p.isMap,rae=j$?jS(j$):tae,nae="[object Set]";function iae(e){return zc(e)&&La(e)==nae}var P$=_p&&_p.isSet,sae=P$?jS(P$):iae,oae=1,aae=2,cae=4,GH="[object Arguments]",uae="[object Array]",lae="[object Boolean]",fae="[object Date]",dae="[object Error]",ZH="[object Function]",hae="[object GeneratorFunction]",pae="[object Map]",gae="[object Number]",YH="[object Object]",mae="[object RegExp]",bae="[object Set]",yae="[object String]",wae="[object Symbol]",vae="[object WeakMap]",_ae="[object ArrayBuffer]",xae="[object DataView]",Eae="[object Float32Array]",kae="[object Float64Array]",Aae="[object Int8Array]",Sae="[object Int16Array]",Cae="[object Int32Array]",Iae="[object Uint8Array]",Mae="[object Uint8ClampedArray]",$ae="[object Uint16Array]",Tae="[object Uint32Array]",Qr={};Qr[GH]=Qr[uae]=Qr[_ae]=Qr[xae]=Qr[lae]=Qr[fae]=Qr[Eae]=Qr[kae]=Qr[Aae]=Qr[Sae]=Qr[Cae]=Qr[pae]=Qr[gae]=Qr[YH]=Qr[mae]=Qr[bae]=Qr[yae]=Qr[wae]=Qr[Iae]=Qr[Mae]=Qr[$ae]=Qr[Tae]=!0;Qr[dae]=Qr[ZH]=Qr[vae]=!1;function dp(e,t,r,n,i,s){var o,a=t&oae,c=t&aae,u=t&cae;if(r&&(o=i?r(e,n,i,s):r(e)),o!==void 0)return o;if(!ks(e))return e;var l=Es(e);if(l){if(o=Moe(e),!a)return IH(e,o)}else{var d=La(e),h=d==ZH||d==hae;if(mm(e))return FH(e,a);if(d==YH||d==GH||h&&!i){if(o=c||h?{}:KH(e),!a)return c?voe(e,hoe(o,e)):yoe(e,doe(o,e))}else{if(!Qr[d])return i?e:{};o=Qoe(e,d,a)}}s||(s=new Ha);var g=s.get(e);if(g)return g;s.set(e,o),sae(e)?e.forEach(function(k){o.add(dp(k,t,r,k,e,s))}):rae(e)&&e.forEach(function(k,w){o.set(w,dp(k,t,r,w,e,s))});var m=u?c?WH:qx:c?L2:R2,b=l?void 0:m(e);return yie(b||e,function(k,w){b&&(w=k,k=e[w]),TS(o,w,dp(k,t,r,w,e,s))}),o}var Nae=4;function aht(e){return dp(e,Nae)}var Oae=1,jae=4;function cht(e){return dp(e,Oae|jae)}var Pae="__lodash_hash_undefined__";function Dae(e){return this.__data__.set(e,Pae),this}function Rae(e){return this.__data__.has(e)}function _v(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new nl;++t<r;)this.add(e[t])}_v.prototype.add=_v.prototype.push=Dae;_v.prototype.has=Rae;function Lae(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function zae(e,t){return e.has(t)}var Bae=1,Fae=2;function JH(e,t,r,n,i,s){var o=r&Bae,a=e.length,c=t.length;if(a!=c&&!(o&&c>a))return!1;var u=s.get(e),l=s.get(t);if(u&&l)return u==t&&l==e;var d=-1,h=!0,g=r&Fae?new _v:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var m=e[d],b=t[d];if(n)var k=o?n(b,m,d,t,e,s):n(m,b,d,e,t,s);if(k!==void 0){if(k)continue;h=!1;break}if(g){if(!Lae(t,function(w,E){if(!zae(g,E)&&(m===w||i(m,w,r,n,s)))return g.push(E)})){h=!1;break}}else if(!(m===b||i(m,b,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function Uae(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function qae(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Hae=1,Wae=2,Vae="[object Boolean]",Kae="[object Date]",Gae="[object Error]",Zae="[object Map]",Yae="[object Number]",Jae="[object RegExp]",Xae="[object Set]",Qae="[object String]",ece="[object Symbol]",tce="[object ArrayBuffer]",rce="[object DataView]",D$=oa?oa.prototype:void 0,O6=D$?D$.valueOf:void 0;function nce(e,t,r,n,i,s,o){switch(r){case rce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tce:return!(e.byteLength!=t.byteLength||!s(new vv(e),new vv(t)));case Vae:case Kae:case Yae:return D2(+e,+t);case Gae:return e.name==t.name&&e.message==t.message;case Jae:case Qae:return e==t+"";case Zae:var a=Uae;case Xae:var c=n&Hae;if(a||(a=qae),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;n|=Wae,o.set(e,t);var l=JH(a(e),a(t),n,i,s,o);return o.delete(e),l;case ece:if(O6)return O6.call(e)==O6.call(t)}return!1}var ice=1,sce=Object.prototype,oce=sce.hasOwnProperty;function ace(e,t,r,n,i,s){var o=r&ice,a=qx(e),c=a.length,u=qx(t),l=u.length;if(c!=l&&!o)return!1;for(var d=c;d--;){var h=a[d];if(!(o?h in t:oce.call(t,h)))return!1}var g=s.get(e),m=s.get(t);if(g&&m)return g==t&&m==e;var b=!0;s.set(e,t),s.set(t,e);for(var k=o;++d<c;){h=a[d];var w=e[h],E=t[h];if(n)var A=o?n(E,w,h,t,e,s):n(w,E,h,e,t,s);if(!(A===void 0?w===E||i(w,E,r,n,s):A)){b=!1;break}k||(k=h=="constructor")}if(b&&!k){var M=e.constructor,R=t.constructor;M!=R&&"constructor"in e&&"constructor"in t&&!(typeof M=="function"&&M instanceof M&&typeof R=="function"&&R instanceof R)&&(b=!1)}return s.delete(e),s.delete(t),b}var cce=1,R$="[object Arguments]",L$="[object Array]",ty="[object Object]",uce=Object.prototype,z$=uce.hasOwnProperty;function lce(e,t,r,n,i,s){var o=Es(e),a=Es(t),c=o?L$:La(e),u=a?L$:La(t);c=c==R$?ty:c,u=u==R$?ty:u;var l=c==ty,d=u==ty,h=c==u;if(h&&mm(e)){if(!mm(t))return!1;o=!0,l=!1}if(h&&!l)return s||(s=new Ha),o||PS(e)?JH(e,t,r,n,i,s):nce(e,t,c,r,n,i,s);if(!(r&cce)){var g=l&&z$.call(e,"__wrapped__"),m=d&&z$.call(t,"__wrapped__");if(g||m){var b=g?e.value():e,k=m?t.value():t;return s||(s=new Ha),i(b,k,r,n,s)}}return h?(s||(s=new Ha),ace(e,t,r,n,i,s)):!1}function J3(e,t,r,n,i){return e===t?!0:e==null||t==null||!zc(e)&&!zc(t)?e!==e&&t!==t:lce(e,t,r,n,J3,i)}var fce=1,dce=2;function hce(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=r[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=r[i];var a=o[0],c=e[a],u=o[1];if(o[2]){if(c===void 0&&!(a in e))return!1}else{var l=new Ha,d;if(!(d===void 0?J3(u,c,fce|dce,n,l):d))return!1}}return!0}function XH(e){return e===e&&!ks(e)}function pce(e){for(var t=R2(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,XH(i)]}return t}function QH(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function gce(e){var t=pce(e);return t.length==1&&t[0][2]?QH(t[0][0],t[0][1]):function(r){return r===e||hce(r,e,t)}}function mce(e,t){return e!=null&&t in Object(e)}function bce(e,t,r){t=y1(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=w1(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&NS(i)&&K3(o,i)&&(Es(e)||gm(e)))}function eW(e,t){return e!=null&&bce(e,t,mce)}var yce=1,wce=2;function vce(e,t){return DS(e)&&XH(t)?QH(w1(e),t):function(r){var n=Jse(r,e);return n===void 0&&n===t?eW(r,e):J3(t,n,yce|wce)}}function _ce(e){return function(t){return t?.[e]}}function xce(e){return function(t){return Y3(t,e)}}function Ece(e){return DS(e)?_ce(w1(e)):xce(e)}function tW(e){return typeof e=="function"?e:e==null?IS:typeof e=="object"?Es(e)?vce(e[0],e[1]):gce(e):Ece(e)}function kce(e){return function(t,r,n){for(var i=-1,s=Object(t),o=n(t),a=o.length;a--;){var c=o[++i];if(r(s[c],c,s)===!1)break}return t}}var rW=kce();function Ace(e,t){return e&&rW(e,t,R2)}function Sce(e,t){return function(r,n){if(r==null)return r;if(!b1(r))return e(r,n);for(var i=r.length,s=-1,o=Object(r);++s<i&&n(o[s],s,o)!==!1;);return r}}var Cce=Sce(Ace),j6=function(){return Za.Date.now()},Ice="Expected a function",Mce=Math.max,$ce=Math.min;function Tce(e,t,r){var n,i,s,o,a,c,u=0,l=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Ice);t=p$(t)||0,ks(r)&&(l=!!r.leading,d="maxWait"in r,s=d?Mce(p$(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function g(N){var z=n,F=i;return n=i=void 0,u=N,o=e.apply(F,z),o}function m(N){return u=N,a=setTimeout(w,t),l?g(N):o}function b(N){var z=N-c,F=N-u,L=t-z;return d?$ce(L,s-F):L}function k(N){var z=N-c,F=N-u;return c===void 0||z>=t||z<0||d&&F>=s}function w(){var N=j6();if(k(N))return E(N);a=setTimeout(w,b(N))}function E(N){return a=void 0,h&&n?g(N):(n=i=void 0,o)}function A(){a!==void 0&&clearTimeout(a),u=0,n=c=i=a=void 0}function M(){return a===void 0?o:E(j6())}function R(){var N=j6(),z=k(N);if(n=arguments,i=this,c=N,z){if(a===void 0)return m(c);if(d)return clearTimeout(a),a=setTimeout(w,t),g(c)}return a===void 0&&(a=setTimeout(w,t)),o}return R.cancel=A,R.flush=M,R}function Kx(e,t,r){(r!==void 0&&!D2(e[t],r)||r===void 0&&!(t in e))&&$S(e,t,r)}function Nce(e){return zc(e)&&b1(e)}function Gx(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Oce(e){return m1(e,L2(e))}function jce(e,t,r,n,i,s,o){var a=Gx(e,r),c=Gx(t,r),u=o.get(c);if(u){Kx(e,r,u);return}var l=s?s(a,c,r+"",e,t,o):void 0,d=l===void 0;if(d){var h=Es(c),g=!h&&mm(c),m=!h&&!g&&PS(c);l=c,h||g||m?Es(a)?l=a:Nce(a)?l=IH(a):g?(d=!1,l=FH(c,!0)):m?(d=!1,l=VH(c,!0)):l=[]:zH(c)||gm(c)?(l=a,gm(a)?l=Oce(a):(!ks(a)||MS(a))&&(l=KH(c))):d=!1}d&&(o.set(c,l),i(l,c,n,s,o),o.delete(c)),Kx(e,r,l)}function nW(e,t,r,n,i){e!==t&&rW(t,function(s,o){if(i||(i=new Ha),ks(s))jce(e,t,o,r,nW,n,i);else{var a=n?n(Gx(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),Kx(e,o,a)}},L2)}function Pce(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function uht(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=n-1;return wie(e,tW(t),i)}function Dce(e,t){var r=-1,n=b1(e)?Array(e.length):[];return Cce(e,function(i,s,o){n[++r]=t(i,s,o)}),n}function Rce(e,t){var r=Es(e)?CS:Dce;return r(e,tW(t))}function lht(e,t){return DH(Rce(e,t))}function fht(e){for(var t=-1,r=e==null?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n}function Lce(e,t){return t.length<2?e:Y3(e,soe(t,0,-1))}function dht(e,t){return J3(e,t)}function hht(e){return e==null}function pht(e){return e===null}function ght(e){return e===void 0}var mht=Cie(function(e,t,r){nW(e,t,r)});function zce(e,t){return t=y1(t,e),e=Lce(e,t),e==null||delete e[w1(Pce(t))]}function Bce(e){return zH(e)?void 0:e}var Fce=1,Uce=2,qce=4,bht=RH(function(e,t){var r={};if(e==null)return r;var n=!1;t=CS(t,function(s){return s=y1(s,e),n||(n=s.length>1),s}),m1(e,WH(e),r),n&&(r=dp(r,Fce|Uce|qce,Bce));for(var i=t.length;i--;)zce(r,t[i]);return r});function iW(e,t,r,n){if(!ks(e))return e;t=y1(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var c=w1(t[i]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var l=a[c];u=void 0,u===void 0&&(u=ks(l)?l:K3(t[i+1])?[]:{})}TS(a,c,u),a=a[c]}return e}function Hce(e,t,r){for(var n=-1,i=t.length,s={};++n<i;){var o=t[n],a=Y3(e,o);r(a,o)&&iW(s,y1(o,e),a)}return s}function Wce(e,t){return Hce(e,t,function(r,n){return eW(e,n)})}var yht=RH(function(e,t){return e==null?{}:Wce(e,t)});function wht(e,t,r){return e==null?e:iW(e,t,r)}var Vce="Expected a function";function vht(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(Vce);return ks(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Tce(e,t,{leading:n,maxWait:t,trailing:i})}/*! Element Plus Icons Vue v2.3.1 */var Kce=Dt({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),_ht=Kce,Gce=Dt({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),xht=Gce,Zce=Dt({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),Eht=Zce,Yce=Dt({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),kht=Yce,Jce=Dt({name:"Calendar",__name:"calendar",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),Aht=Jce,Xce=Dt({name:"Check",__name:"check",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Sht=Xce,Qce=Dt({name:"CircleCheck",__name:"circle-check",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),Pt("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),Cht=Qce,eue=Dt({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Iht=eue,tue=Dt({name:"CircleClose",__name:"circle-close",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),Pt("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Mht=tue,rue=Dt({name:"Clock",__name:"clock",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),Pt("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),Pt("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),$ht=rue,nue=Dt({name:"Close",__name:"close",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Tht=nue,iue=Dt({name:"CreditCard",__name:"credit-card",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M896 324.096c0-42.368-2.496-55.296-9.536-68.48a52.352 52.352 0 0 0-22.144-22.08c-13.12-7.04-26.048-9.536-68.416-9.536H228.096c-42.368 0-55.296 2.496-68.48 9.536a52.352 52.352 0 0 0-22.08 22.144c-7.04 13.12-9.536 26.048-9.536 68.416v375.808c0 42.368 2.496 55.296 9.536 68.48a52.352 52.352 0 0 0 22.144 22.08c13.12 7.04 26.048 9.536 68.416 9.536h567.808c42.368 0 55.296-2.496 68.48-9.536a52.352 52.352 0 0 0 22.08-22.144c7.04-13.12 9.536-26.048 9.536-68.416zm64 0v375.808c0 57.088-5.952 77.76-17.088 98.56-11.136 20.928-27.52 37.312-48.384 48.448-20.864 11.136-41.6 17.088-98.56 17.088H228.032c-57.088 0-77.76-5.952-98.56-17.088a116.288 116.288 0 0 1-48.448-48.384c-11.136-20.864-17.088-41.6-17.088-98.56V324.032c0-57.088 5.952-77.76 17.088-98.56 11.136-20.928 27.52-37.312 48.384-48.448 20.864-11.136 41.6-17.088 98.56-17.088H795.84c57.088 0 77.76 5.952 98.56 17.088 20.928 11.136 37.312 27.52 48.448 48.384 11.136 20.864 17.088 41.6 17.088 98.56z"}),Pt("path",{fill:"currentColor",d:"M64 320h896v64H64zm0 128h896v64H64zm128 192h256v64H192z"})]))}}),Nht=iue,sue=Dt({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Oht=sue,oue=Dt({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),jht=oue,aue=Dt({name:"Delete",__name:"delete",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Pht=aue,cue=Dt({name:"Document",__name:"document",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),Dht=cue,uue=Dt({name:"Edit",__name:"edit",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),Pt("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),Rht=uue,lue=Dt({name:"FullScreen",__name:"full-screen",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),Lht=lue,fue=Dt({name:"Hide",__name:"hide",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),Pt("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),zht=fue,due=Dt({name:"InfoFilled",__name:"info-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Bht=due,hue=Dt({name:"Loading",__name:"loading",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),Fht=hue,pue=Dt({name:"Minus",__name:"minus",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),Uht=pue,gue=Dt({name:"MoreFilled",__name:"more-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),qht=gue,mue=Dt({name:"More",__name:"more",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),Hht=mue,bue=Dt({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),Wht=bue,yue=Dt({name:"Picture",__name:"picture",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),Pt("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),Vht=yue,wue=Dt({name:"Plus",__name:"plus",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),Kht=wue,vue=Dt({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),Ght=vue,_ue=Dt({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),Zht=_ue,xue=Dt({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),Yht=xue,Eue=Dt({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Jht=Eue,kue=Dt({name:"VideoPause",__name:"video-pause",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),Xht=kue,Aue=Dt({name:"VideoPlay",__name:"video-play",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),Qht=Aue,Sue=Dt({name:"View",__name:"view",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),e0t=Sue,Cue=Dt({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),t0t=Cue,Iue=Dt({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),r0t=Iue,Mue=Dt({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),n0t=Mue,Vs="top",aa="bottom",ca="right",Ks="left",US="auto",z2=[Vs,aa,ca,Ks],xp="start",wm="end",$ue="clippingParents",sW="viewport",F1="popper",Tue="reference",B$=z2.reduce(function(e,t){return e.concat([t+"-"+xp,t+"-"+wm])},[]),oW=[].concat(z2,[US]).reduce(function(e,t){return e.concat([t,t+"-"+xp,t+"-"+wm])},[]),Nue="beforeRead",Oue="read",jue="afterRead",Pue="beforeMain",Due="main",Rue="afterMain",Lue="beforeWrite",zue="write",Bue="afterWrite",Fue=[Nue,Oue,jue,Pue,Due,Rue,Lue,zue,Bue];function Bc(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ep(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function sa(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function qS(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Uue(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},s=t.elements[r];!sa(s)||!Bc(s)||(Object.assign(s.style,n),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function que(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],s=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),a=o.reduce(function(c,u){return c[u]="",c},{});!sa(i)||!Bc(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(c){i.removeAttribute(c)}))})}}var aW={name:"applyStyles",enabled:!0,phase:"write",fn:Uue,effect:que,requires:["computeStyles"]};function Pc(e){return e.split("-")[0]}var xd=Math.max,xv=Math.min,kp=Math.round;function Ap(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,i=1;if(sa(e)&&t){var s=e.offsetHeight,o=e.offsetWidth;o>0&&(n=kp(r.width)/o||1),s>0&&(i=kp(r.height)/s||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function HS(e){var t=Ap(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function cW(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&qS(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Wu(e){return Ya(e).getComputedStyle(e)}function Hue(e){return["table","td","th"].indexOf(Bc(e))>=0}function kf(e){return((Ep(e)?e.ownerDocument:e.document)||window.document).documentElement}function X3(e){return Bc(e)==="html"?e:e.assignedSlot||e.parentNode||(qS(e)?e.host:null)||kf(e)}function F$(e){return!sa(e)||Wu(e).position==="fixed"?null:e.offsetParent}function Wue(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&sa(e)){var n=Wu(e);if(n.position==="fixed")return null}var i=X3(e);for(qS(i)&&(i=i.host);sa(i)&&["html","body"].indexOf(Bc(i))<0;){var s=Wu(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function B2(e){for(var t=Ya(e),r=F$(e);r&&Hue(r)&&Wu(r).position==="static";)r=F$(r);return r&&(Bc(r)==="html"||Bc(r)==="body"&&Wu(r).position==="static")?t:r||Wue(e)||t}function WS(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function qg(e,t,r){return xd(e,xv(t,r))}function Vue(e,t,r){var n=qg(e,t,r);return n>r?r:n}function uW(){return{top:0,right:0,bottom:0,left:0}}function lW(e){return Object.assign({},uW(),e)}function fW(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Kue=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,lW(typeof e!="number"?e:fW(e,z2))};function Gue(e){var t,r=e.state,n=e.name,i=e.options,s=r.elements.arrow,o=r.modifiersData.popperOffsets,a=Pc(r.placement),c=WS(a),u=[Ks,ca].indexOf(a)>=0,l=u?"height":"width";if(!(!s||!o)){var d=Kue(i.padding,r),h=HS(s),g=c==="y"?Vs:Ks,m=c==="y"?aa:ca,b=r.rects.reference[l]+r.rects.reference[c]-o[c]-r.rects.popper[l],k=o[c]-r.rects.reference[c],w=B2(s),E=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,A=b/2-k/2,M=d[g],R=E-h[l]-d[m],N=E/2-h[l]/2+A,z=qg(M,N,R),F=c;r.modifiersData[n]=(t={},t[F]=z,t.centerOffset=z-N,t)}}function Zue(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!cW(t.elements.popper,i)||(t.elements.arrow=i))}var Yue={name:"arrow",enabled:!0,phase:"main",fn:Gue,effect:Zue,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Sp(e){return e.split("-")[1]}var Jue={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xue(e){var t=e.x,r=e.y,n=window,i=n.devicePixelRatio||1;return{x:kp(t*i)/i||0,y:kp(r*i)/i||0}}function U$(e){var t,r=e.popper,n=e.popperRect,i=e.placement,s=e.variation,o=e.offsets,a=e.position,c=e.gpuAcceleration,u=e.adaptive,l=e.roundOffsets,d=e.isFixed,h=o.x,g=h===void 0?0:h,m=o.y,b=m===void 0?0:m,k=typeof l=="function"?l({x:g,y:b}):{x:g,y:b};g=k.x,b=k.y;var w=o.hasOwnProperty("x"),E=o.hasOwnProperty("y"),A=Ks,M=Vs,R=window;if(u){var N=B2(r),z="clientHeight",F="clientWidth";if(N===Ya(r)&&(N=kf(r),Wu(N).position!=="static"&&a==="absolute"&&(z="scrollHeight",F="scrollWidth")),N=N,i===Vs||(i===Ks||i===ca)&&s===wm){M=aa;var L=d&&N===R&&R.visualViewport?R.visualViewport.height:N[z];b-=L-n.height,b*=c?1:-1}if(i===Ks||(i===Vs||i===aa)&&s===wm){A=ca;var B=d&&N===R&&R.visualViewport?R.visualViewport.width:N[F];g-=B-n.width,g*=c?1:-1}}var D=Object.assign({position:a},u&&Jue),x=l===!0?Xue({x:g,y:b}):{x:g,y:b};if(g=x.x,b=x.y,c){var y;return Object.assign({},D,(y={},y[M]=E?"0":"",y[A]=w?"0":"",y.transform=(R.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",y))}return Object.assign({},D,(t={},t[M]=E?b+"px":"",t[A]=w?g+"px":"",t.transform="",t))}function Que(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,s=r.adaptive,o=s===void 0?!0:s,a=r.roundOffsets,c=a===void 0?!0:a,u={placement:Pc(t.placement),variation:Sp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,U$(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,U$(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var dW={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Que,data:{}},ry={passive:!0};function ele(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,s=i===void 0?!0:i,o=n.resize,a=o===void 0?!0:o,c=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(l){l.addEventListener("scroll",r.update,ry)}),a&&c.addEventListener("resize",r.update,ry),function(){s&&u.forEach(function(l){l.removeEventListener("scroll",r.update,ry)}),a&&c.removeEventListener("resize",r.update,ry)}}var hW={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ele,data:{}},tle={left:"right",right:"left",bottom:"top",top:"bottom"};function Mw(e){return e.replace(/left|right|bottom|top/g,function(t){return tle[t]})}var rle={start:"end",end:"start"};function q$(e){return e.replace(/start|end/g,function(t){return rle[t]})}function VS(e){var t=Ya(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function KS(e){return Ap(kf(e)).left+VS(e).scrollLeft}function nle(e){var t=Ya(e),r=kf(e),n=t.visualViewport,i=r.clientWidth,s=r.clientHeight,o=0,a=0;return n&&(i=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=n.offsetLeft,a=n.offsetTop)),{width:i,height:s,x:o+KS(e),y:a}}function ile(e){var t,r=kf(e),n=VS(e),i=(t=e.ownerDocument)==null?void 0:t.body,s=xd(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=xd(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-n.scrollLeft+KS(e),c=-n.scrollTop;return Wu(i||r).direction==="rtl"&&(a+=xd(r.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}function GS(e){var t=Wu(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function pW(e){return["html","body","#document"].indexOf(Bc(e))>=0?e.ownerDocument.body:sa(e)&&GS(e)?e:pW(X3(e))}function Hg(e,t){var r;t===void 0&&(t=[]);var n=pW(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),s=Ya(n),o=i?[s].concat(s.visualViewport||[],GS(n)?n:[]):n,a=t.concat(o);return i?a:a.concat(Hg(X3(o)))}function Zx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function sle(e){var t=Ap(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function H$(e,t){return t===sW?Zx(nle(e)):Ep(t)?sle(t):Zx(ile(kf(e)))}function ole(e){var t=Hg(X3(e)),r=["absolute","fixed"].indexOf(Wu(e).position)>=0,n=r&&sa(e)?B2(e):e;return Ep(n)?t.filter(function(i){return Ep(i)&&cW(i,n)&&Bc(i)!=="body"}):[]}function ale(e,t,r){var n=t==="clippingParents"?ole(e):[].concat(t),i=[].concat(n,[r]),s=i[0],o=i.reduce(function(a,c){var u=H$(e,c);return a.top=xd(u.top,a.top),a.right=xv(u.right,a.right),a.bottom=xv(u.bottom,a.bottom),a.left=xd(u.left,a.left),a},H$(e,s));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function gW(e){var t=e.reference,r=e.element,n=e.placement,i=n?Pc(n):null,s=n?Sp(n):null,o=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,c;switch(i){case Vs:c={x:o,y:t.y-r.height};break;case aa:c={x:o,y:t.y+t.height};break;case ca:c={x:t.x+t.width,y:a};break;case Ks:c={x:t.x-r.width,y:a};break;default:c={x:t.x,y:t.y}}var u=i?WS(i):null;if(u!=null){var l=u==="y"?"height":"width";switch(s){case xp:c[u]=c[u]-(t[l]/2-r[l]/2);break;case wm:c[u]=c[u]+(t[l]/2-r[l]/2);break}}return c}function vm(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,s=r.boundary,o=s===void 0?$ue:s,a=r.rootBoundary,c=a===void 0?sW:a,u=r.elementContext,l=u===void 0?F1:u,d=r.altBoundary,h=d===void 0?!1:d,g=r.padding,m=g===void 0?0:g,b=lW(typeof m!="number"?m:fW(m,z2)),k=l===F1?Tue:F1,w=e.rects.popper,E=e.elements[h?k:l],A=ale(Ep(E)?E:E.contextElement||kf(e.elements.popper),o,c),M=Ap(e.elements.reference),R=gW({reference:M,element:w,placement:i}),N=Zx(Object.assign({},w,R)),z=l===F1?N:M,F={top:A.top-z.top+b.top,bottom:z.bottom-A.bottom+b.bottom,left:A.left-z.left+b.left,right:z.right-A.right+b.right},L=e.modifiersData.offset;if(l===F1&&L){var B=L[i];Object.keys(F).forEach(function(D){var x=[ca,aa].indexOf(D)>=0?1:-1,y=[Vs,aa].indexOf(D)>=0?"y":"x";F[D]+=B[y]*x})}return F}function cle(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,s=r.rootBoundary,o=r.padding,a=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?oW:c,l=Sp(n),d=l?a?B$:B$.filter(function(m){return Sp(m)===l}):z2,h=d.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=d);var g=h.reduce(function(m,b){return m[b]=vm(e,{placement:b,boundary:i,rootBoundary:s,padding:o})[Pc(b)],m},{});return Object.keys(g).sort(function(m,b){return g[m]-g[b]})}function ule(e){if(Pc(e)===US)return[];var t=Mw(e);return[q$(e),t,q$(t)]}function lle(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,s=i===void 0?!0:i,o=r.altAxis,a=o===void 0?!0:o,c=r.fallbackPlacements,u=r.padding,l=r.boundary,d=r.rootBoundary,h=r.altBoundary,g=r.flipVariations,m=g===void 0?!0:g,b=r.allowedAutoPlacements,k=t.options.placement,w=Pc(k),E=w===k,A=c||(E||!m?[Mw(k)]:ule(k)),M=[k].concat(A).reduce(function(q,W){return q.concat(Pc(W)===US?cle(t,{placement:W,boundary:l,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:b}):W)},[]),R=t.rects.reference,N=t.rects.popper,z=new Map,F=!0,L=M[0],B=0;B<M.length;B++){var D=M[B],x=Pc(D),y=Sp(D)===xp,f=[Vs,aa].indexOf(x)>=0,p=f?"width":"height",v=vm(t,{placement:D,boundary:l,rootBoundary:d,altBoundary:h,padding:u}),I=f?y?ca:Ks:y?aa:Vs;R[p]>N[p]&&(I=Mw(I));var j=Mw(I),$=[];if(s&&$.push(v[x]<=0),a&&$.push(v[I]<=0,v[j]<=0),$.every(function(q){return q})){L=D,F=!1;break}z.set(D,$)}if(F)for(var C=m?3:1,O=function(q){var W=M.find(function(K){var Y=z.get(K);if(Y)return Y.slice(0,q).every(function(te){return te})});if(W)return L=W,"break"},_=C;_>0;_--){var P=O(_);if(P==="break")break}t.placement!==L&&(t.modifiersData[n]._skip=!0,t.placement=L,t.reset=!0)}}var fle={name:"flip",enabled:!0,phase:"main",fn:lle,requiresIfExists:["offset"],data:{_skip:!1}};function W$(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function V$(e){return[Vs,ca,aa,Ks].some(function(t){return e[t]>=0})}function dle(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,o=vm(t,{elementContext:"reference"}),a=vm(t,{altBoundary:!0}),c=W$(o,n),u=W$(a,i,s),l=V$(c),d=V$(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":d})}var hle={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dle};function ple(e,t,r){var n=Pc(e),i=[Ks,Vs].indexOf(n)>=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[Ks,ca].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function gle(e){var t=e.state,r=e.options,n=e.name,i=r.offset,s=i===void 0?[0,0]:i,o=oW.reduce(function(l,d){return l[d]=ple(d,t.rects,s),l},{}),a=o[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}var mle={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gle};function ble(e){var t=e.state,r=e.name;t.modifiersData[r]=gW({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var mW={name:"popperOffsets",enabled:!0,phase:"read",fn:ble,data:{}};function yle(e){return e==="x"?"y":"x"}function wle(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,s=i===void 0?!0:i,o=r.altAxis,a=o===void 0?!1:o,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,d=r.padding,h=r.tether,g=h===void 0?!0:h,m=r.tetherOffset,b=m===void 0?0:m,k=vm(t,{boundary:c,rootBoundary:u,padding:d,altBoundary:l}),w=Pc(t.placement),E=Sp(t.placement),A=!E,M=WS(w),R=yle(M),N=t.modifiersData.popperOffsets,z=t.rects.reference,F=t.rects.popper,L=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,B=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,x={x:0,y:0};if(N){if(s){var y,f=M==="y"?Vs:Ks,p=M==="y"?aa:ca,v=M==="y"?"height":"width",I=N[M],j=I+k[f],$=I-k[p],C=g?-F[v]/2:0,O=E===xp?z[v]:F[v],_=E===xp?-F[v]:-z[v],P=t.elements.arrow,q=g&&P?HS(P):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uW(),K=W[f],Y=W[p],te=qg(0,z[v],q[v]),re=A?z[v]/2-C-te-K-B.mainAxis:O-te-K-B.mainAxis,be=A?-z[v]/2+C+te+Y+B.mainAxis:_+te+Y+B.mainAxis,ve=t.elements.arrow&&B2(t.elements.arrow),ye=ve?M==="y"?ve.clientTop||0:ve.clientLeft||0:0,Se=(y=D?.[M])!=null?y:0,_e=I+re-Se-ye,ke=I+be-Se,it=qg(g?xv(j,_e):j,I,g?xd($,ke):$);N[M]=it,x[M]=it-I}if(a){var Re,J=M==="x"?Vs:Ks,ne=M==="x"?aa:ca,le=N[R],he=R==="y"?"height":"width",Pe=le+k[J],xe=le-k[ne],oe=[Vs,Ks].indexOf(w)!==-1,me=(Re=D?.[R])!=null?Re:0,je=oe?Pe:le-z[he]-F[he]-me+B.altAxis,U=oe?le+z[he]+F[he]-me-B.altAxis:xe,S=g&&oe?Vue(je,le,U):qg(g?je:Pe,le,g?U:xe);N[R]=S,x[R]=S-le}t.modifiersData[n]=x}}var vle={name:"preventOverflow",enabled:!0,phase:"main",fn:wle,requiresIfExists:["offset"]};function _le(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function xle(e){return e===Ya(e)||!sa(e)?VS(e):_le(e)}function Ele(e){var t=e.getBoundingClientRect(),r=kp(t.width)/e.offsetWidth||1,n=kp(t.height)/e.offsetHeight||1;return r!==1||n!==1}function kle(e,t,r){r===void 0&&(r=!1);var n=sa(t),i=sa(t)&&Ele(t),s=kf(t),o=Ap(e,i),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Bc(t)!=="body"||GS(s))&&(a=xle(t)),sa(t)?(c=Ap(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=KS(s))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function Ale(e){var t=new Map,r=new Set,n=[];e.forEach(function(s){t.set(s.name,s)});function i(s){r.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!r.has(a)){var c=t.get(a);c&&i(c)}}),n.push(s)}return e.forEach(function(s){r.has(s.name)||i(s)}),n}function Sle(e){var t=Ale(e);return Fue.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function Cle(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Ile(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var K$={placement:"bottom",modifiers:[],strategy:"absolute"};function G$(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function ZS(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,s=i===void 0?K$:i;return function(o,a,c){c===void 0&&(c=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},K$,s),modifiersData:{},elements:{reference:o,popper:a},attributes:{},styles:{}},l=[],d=!1,h={state:u,setOptions:function(b){var k=typeof b=="function"?b(u.options):b;m(),u.options=Object.assign({},s,u.options,k),u.scrollParents={reference:Ep(o)?Hg(o):o.contextElement?Hg(o.contextElement):[],popper:Hg(a)};var w=Sle(Ile([].concat(n,u.options.modifiers)));return u.orderedModifiers=w.filter(function(E){return E.enabled}),g(),h.update()},forceUpdate:function(){if(!d){var b=u.elements,k=b.reference,w=b.popper;if(G$(k,w)){u.rects={reference:kle(k,B2(w),u.options.strategy==="fixed"),popper:HS(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(F){return u.modifiersData[F.name]=Object.assign({},F.data)});for(var E=0;E<u.orderedModifiers.length;E++){if(u.reset===!0){u.reset=!1,E=-1;continue}var A=u.orderedModifiers[E],M=A.fn,R=A.options,N=R===void 0?{}:R,z=A.name;typeof M=="function"&&(u=M({state:u,options:N,name:z,instance:h})||u)}}}},update:Cle(function(){return new Promise(function(b){h.forceUpdate(),b(u)})}),destroy:function(){m(),d=!0}};if(!G$(o,a))return h;h.setOptions(c).then(function(b){!d&&c.onFirstUpdate&&c.onFirstUpdate(b)});function g(){u.orderedModifiers.forEach(function(b){var k=b.name,w=b.options,E=w===void 0?{}:w,A=b.effect;if(typeof A=="function"){var M=A({state:u,name:k,instance:h,options:E}),R=function(){};l.push(M||R)}})}function m(){l.forEach(function(b){return b()}),l=[]}return h}}ZS();var Mle=[hW,mW,dW,aW];ZS({defaultModifiers:Mle});var $le=[hW,mW,dW,aW,mle,fle,vle,Yue,hle],i0t=ZS({defaultModifiers:$le});function qi(e,t){Tle(e)&&(e="100%");var r=Nle(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ny(e){return Math.min(1,Math.max(0,e))}function Tle(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Nle(e){return typeof e=="string"&&e.indexOf("%")!==-1}function bW(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function iy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function id(e){return e.length===1?"0"+e:String(e)}function Ole(e,t,r){return{r:qi(e,255)*255,g:qi(t,255)*255,b:qi(r,255)*255}}function Z$(e,t,r){e=qi(e,255),t=qi(t,255),r=qi(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s=0,o=0,a=(n+i)/2;if(n===i)o=0,s=0;else{var c=n-i;switch(o=a>.5?c/(2-n-i):c/(n+i),n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:o,l:a}}function P6(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function jle(e,t,r){var n,i,s;if(e=qi(e,360),t=qi(t,100),r=qi(r,100),t===0)i=r,s=r,n=r;else{var o=r<.5?r*(1+t):r+t-r*t,a=2*r-o;n=P6(a,o,e+1/3),i=P6(a,o,e),s=P6(a,o,e-1/3)}return{r:n*255,g:i*255,b:s*255}}function Y$(e,t,r){e=qi(e,255),t=qi(t,255),r=qi(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s=0,o=n,a=n-i,c=n===0?0:a/n;if(n===i)s=0;else{switch(n){case e:s=(t-r)/a+(t<r?6:0);break;case t:s=(r-e)/a+2;break;case r:s=(e-t)/a+4;break}s/=6}return{h:s,s:c,v:o}}function Ple(e,t,r){e=qi(e,360)*6,t=qi(t,100),r=qi(r,100);var n=Math.floor(e),i=e-n,s=r*(1-t),o=r*(1-i*t),a=r*(1-(1-i)*t),c=n%6,u=[r,o,s,s,a,r][c],l=[a,r,r,o,s,s][c],d=[s,s,a,r,r,o][c];return{r:u*255,g:l*255,b:d*255}}function J$(e,t,r,n){var i=[id(Math.round(e).toString(16)),id(Math.round(t).toString(16)),id(Math.round(r).toString(16))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Dle(e,t,r,n,i){var s=[id(Math.round(e).toString(16)),id(Math.round(t).toString(16)),id(Math.round(r).toString(16)),id(Rle(n))];return i&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Rle(e){return Math.round(parseFloat(e)*255).toString(16)}function X$(e){return yo(e)/255}function yo(e){return parseInt(e,16)}function Lle(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Yx={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function zle(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,s=null,o=!1,a=!1;return typeof e=="string"&&(e=Ule(e)),typeof e=="object"&&(su(e.r)&&su(e.g)&&su(e.b)?(t=Ole(e.r,e.g,e.b),o=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):su(e.h)&&su(e.s)&&su(e.v)?(n=iy(e.s),i=iy(e.v),t=Ple(e.h,n,i),o=!0,a="hsv"):su(e.h)&&su(e.s)&&su(e.l)&&(n=iy(e.s),s=iy(e.l),t=jle(e.h,n,s),o=!0,a="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=bW(r),{ok:o,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var Ble="[-\\+]?\\d+%?",Fle="[-\\+]?\\d*\\.\\d+%?",Gl="(?:".concat(Fle,")|(?:").concat(Ble,")"),D6="[\\s|\\(]+(".concat(Gl,")[,|\\s]+(").concat(Gl,")[,|\\s]+(").concat(Gl,")\\s*\\)?"),R6="[\\s|\\(]+(".concat(Gl,")[,|\\s]+(").concat(Gl,")[,|\\s]+(").concat(Gl,")[,|\\s]+(").concat(Gl,")\\s*\\)?"),Ma={CSS_UNIT:new RegExp(Gl),rgb:new RegExp("rgb"+D6),rgba:new RegExp("rgba"+R6),hsl:new RegExp("hsl"+D6),hsla:new RegExp("hsla"+R6),hsv:new RegExp("hsv"+D6),hsva:new RegExp("hsva"+R6),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Ule(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Yx[e])e=Yx[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=Ma.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=Ma.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Ma.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=Ma.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Ma.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=Ma.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Ma.hex8.exec(e),r?{r:yo(r[1]),g:yo(r[2]),b:yo(r[3]),a:X$(r[4]),format:t?"name":"hex8"}:(r=Ma.hex6.exec(e),r?{r:yo(r[1]),g:yo(r[2]),b:yo(r[3]),format:t?"name":"hex"}:(r=Ma.hex4.exec(e),r?{r:yo(r[1]+r[1]),g:yo(r[2]+r[2]),b:yo(r[3]+r[3]),a:X$(r[4]+r[4]),format:t?"name":"hex8"}:(r=Ma.hex3.exec(e),r?{r:yo(r[1]+r[1]),g:yo(r[2]+r[2]),b:yo(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function su(e){return!!Ma.CSS_UNIT.exec(String(e))}var s0t=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=Lle(t)),this.originalInput=t;var i=zle(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,s=t.r/255,o=t.g/255,a=t.b/255;return s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=bW(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Y$(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Y$(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Z$(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Z$(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),J$(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Dle(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(qi(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(qi(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+J$(this.r,this.g,this.b,!1),r=0,n=Object.entries(Yx);r<n.length;r++){var i=n[r],s=i[0],o=i[1];if(t===o)return s}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,i=this.a<1&&this.a>=0,s=!r&&i&&(t.startsWith("hex")||t==="name");return s?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=ny(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=ny(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=ny(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=ny(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),s=r/100,o={r:(i.r-n.r)*s+n.r,g:(i.g-n.g)*s+n.g,b:(i.b-n.b)*s+n.b,a:(i.a-n.a)*s+n.a};return new e(o)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,s=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,s.push(new e(n));return s},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,s=r.v,o=[],a=1/t;t--;)o.push(new e({h:n,s:i,v:s})),s=(s+a)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],s=360/t,o=1;o<t;o++)i.push(new e({h:(n+o*s)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Js(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function F2(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sd.apply(this,arguments)}function qle(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_m(e,t)}function Jx(e){return Jx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jx(e)}function _m(e,t){return _m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},_m(e,t)}function Hle(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $w(e,t,r){return Hle()?$w=Reflect.construct.bind():$w=function(i,s,o){var a=[null];a.push.apply(a,s);var c=Function.bind.apply(i,a),u=new c;return o&&_m(u,o.prototype),u},$w.apply(null,arguments)}function Wle(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Xx(e){var t=typeof Map=="function"?new Map:void 0;return Xx=function(n){if(n===null||!Wle(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return $w(n,arguments,Jx(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_m(i,n)},Xx(e)}var Vle=/%[sdj%]/g,Kle=function(){};function Qx(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function Mo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0,s=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var o=e.replace(Vle,function(a){if(a==="%%")return"%";if(i>=s)return a;switch(a){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return a}});return o}return e}function Gle(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function ni(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Gle(t)&&typeof e=="string"&&!e)}function Zle(e,t,r){var n=[],i=0,s=e.length;function o(a){n.push.apply(n,a||[]),i++,i===s&&r(n)}e.forEach(function(a){t(a,o)})}function Q$(e,t,r){var n=0,i=e.length;function s(o){if(o&&o.length){r(o);return}var a=n;n=n+1,a<i?t(e[a],s):r([])}s([])}function Yle(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,e[r]||[])}),t}var eT=function(e){qle(t,e);function t(r,n){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=r,i.fields=n,i}return t}(Xx(Error));function Jle(e,t,r,n,i){if(t.first){var s=new Promise(function(h,g){var m=function(w){return n(w),w.length?g(new eT(w,Qx(w))):h(i)},b=Yle(e);Q$(b,r,m)});return s.catch(function(h){return h}),s}var o=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),c=a.length,u=0,l=[],d=new Promise(function(h,g){var m=function(k){if(l.push.apply(l,k),u++,u===c)return n(l),l.length?g(new eT(l,Qx(l))):h(i)};a.length||(n(l),h(i)),a.forEach(function(b){var k=e[b];o.indexOf(b)!==-1?Q$(k,r,m):Zle(k,r,m)})});return d.catch(function(h){return h}),d}function Xle(e){return!!(e&&e.message!==void 0)}function Qle(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function tT(e,t){return function(r){var n;return e.fullFields?n=Qle(t,e.fullFields):n=t[r.field||e.fullField],Xle(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function rT(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]=sd({},e[r],n):e[r]=n}}return e}var yW=function(t,r,n,i,s,o){t.required&&(!n.hasOwnProperty(t.field)||ni(r,o||t.type))&&i.push(Mo(s.messages.required,t.fullField))},efe=function(t,r,n,i,s){(/^\s+$/.test(r)||r==="")&&i.push(Mo(s.messages.whitespace,t.fullField))},sy,tfe=function(){if(sy)return sy;var e="[a-fA-F\\d:]",t=function(M){return M&&M.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",i=(`
1
+ import{d as Dt,c as Vt,a as Pt,o as Kt,e as gH,r as An,s as xf,b as ir,w as dn,i as xne,h as g1,F as AS,g as bf,f as W3,j as SS,k as mH,l as ia,T as Ene,m as P2,n as kne,p as bH,q as yH,t as Ane,u as Sne,v as wH,x as vH,y as qa,z as Ef,A as rh,B as _H,C as xH}from"./vendor-vue-Bb02XvLT.js";import"./vendor-dayjs-C40ROiFS.js";import{r as EH,P as kH}from"./vendor-katex-DHBGsivc.js";function Cne(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Ine="modulepreload",Mne=function(e){return"/"+e},u$={},Le=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let c=function(u){return Promise.all(u.map(l=>Promise.resolve(l).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");i=c(r.map(u=>{if(u=Mne(u),u in u$)return;u$[u]=!0;const l=u.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=l?"stylesheet":Ine,l||(h.as="script"),h.crossOrigin="",h.href=u,a&&h.setAttribute("nonce",a),document.head.appendChild(h),l)return new Promise((g,m)=>{h.addEventListener("load",g),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};var AH=typeof global=="object"&&global&&global.Object===Object&&global,$ne=typeof self=="object"&&self&&self.Object===Object&&self,Za=AH||$ne||Function("return this")(),oa=Za.Symbol,SH=Object.prototype,Tne=SH.hasOwnProperty,Nne=SH.toString,B1=oa?oa.toStringTag:void 0;function One(e){var t=Tne.call(e,B1),r=e[B1];try{e[B1]=void 0;var n=!0}catch{}var i=Nne.call(e);return n&&(t?e[B1]=r:delete e[B1]),i}var jne=Object.prototype,Pne=jne.toString;function Dne(e){return Pne.call(e)}var Rne="[object Null]",Lne="[object Undefined]",l$=oa?oa.toStringTag:void 0;function nh(e){return e==null?e===void 0?Lne:Rne:l$&&l$ in Object(e)?One(e):Dne(e)}function zc(e){return e!=null&&typeof e=="object"}var zne="[object Symbol]";function V3(e){return typeof e=="symbol"||zc(e)&&nh(e)==zne}function CS(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Es=Array.isArray,f$=oa?oa.prototype:void 0,d$=f$?f$.toString:void 0;function CH(e){if(typeof e=="string")return e;if(Es(e))return CS(e,CH)+"";if(V3(e))return d$?d$.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Bne=/\s/;function Fne(e){for(var t=e.length;t--&&Bne.test(e.charAt(t)););return t}var Une=/^\s+/;function qne(e){return e&&e.slice(0,Fne(e)+1).replace(Une,"")}function ks(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var h$=NaN,Hne=/^[-+]0x[0-9a-f]+$/i,Wne=/^0b[01]+$/i,Vne=/^0o[0-7]+$/i,Kne=parseInt;function p$(e){if(typeof e=="number")return e;if(V3(e))return h$;if(ks(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ks(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qne(e);var r=Wne.test(e);return r||Vne.test(e)?Kne(e.slice(2),r?2:8):Hne.test(e)?h$:+e}function IS(e){return e}var Gne="[object AsyncFunction]",Zne="[object Function]",Yne="[object GeneratorFunction]",Jne="[object Proxy]";function MS(e){if(!ks(e))return!1;var t=nh(e);return t==Zne||t==Yne||t==Gne||t==Jne}var T6=Za["__core-js_shared__"],g$=function(){var e=/[^.]+$/.exec(T6&&T6.keys&&T6.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xne(e){return!!g$&&g$ in e}var Qne=Function.prototype,eie=Qne.toString;function ih(e){if(e!=null){try{return eie.call(e)}catch{}try{return e+""}catch{}}return""}var tie=/[\\^$.*+?()[\]{}|]/g,rie=/^\[object .+?Constructor\]$/,nie=Function.prototype,iie=Object.prototype,sie=nie.toString,oie=iie.hasOwnProperty,aie=RegExp("^"+sie.call(oie).replace(tie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cie(e){if(!ks(e)||Xne(e))return!1;var t=MS(e)?aie:rie;return t.test(ih(e))}function uie(e,t){return e?.[t]}function sh(e,t){var r=uie(e,t);return cie(r)?r:void 0}var Ux=sh(Za,"WeakMap"),m$=Object.create,lie=function(){function e(){}return function(t){if(!ks(t))return{};if(m$)return m$(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function fie(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function IH(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var die=800,hie=16,pie=Date.now;function gie(e){var t=0,r=0;return function(){var n=pie(),i=hie-(n-r);if(r=n,i>0){if(++t>=die)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function mie(e){return function(){return e}}var wv=function(){try{var e=sh(Object,"defineProperty");return e({},"",{}),e}catch{}}(),bie=wv?function(e,t){return wv(e,"toString",{configurable:!0,enumerable:!1,value:mie(t),writable:!0})}:IS,MH=gie(bie);function yie(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function wie(e,t,r,n){e.length;for(var i=r+1;i--;)if(t(e[i],i,e))return i;return-1}var vie=9007199254740991,_ie=/^(?:0|[1-9]\d*)$/;function K3(e,t){var r=typeof e;return t=t??vie,!!t&&(r=="number"||r!="symbol"&&_ie.test(e))&&e>-1&&e%1==0&&e<t}function $S(e,t,r){t=="__proto__"&&wv?wv(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function D2(e,t){return e===t||e!==e&&t!==t}var xie=Object.prototype,Eie=xie.hasOwnProperty;function TS(e,t,r){var n=e[t];(!(Eie.call(e,t)&&D2(n,r))||r===void 0&&!(t in e))&&$S(e,t,r)}function m1(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var a=t[s],c=void 0;c===void 0&&(c=e[a]),i?$S(r,a,c):TS(r,a,c)}return r}var b$=Math.max;function $H(e,t,r){return t=b$(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=b$(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),fie(e,this,a)}}function kie(e,t){return MH($H(e,t,IS),e+"")}var Aie=9007199254740991;function NS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Aie}function b1(e){return e!=null&&NS(e.length)&&!MS(e)}function Sie(e,t,r){if(!ks(r))return!1;var n=typeof t;return(n=="number"?b1(r)&&K3(t,r.length):n=="string"&&t in r)?D2(r[t],e):!1}function Cie(e){return kie(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&Sie(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var a=r[n];a&&e(t,a,n,s)}return t})}var Iie=Object.prototype;function OS(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Iie;return e===r}function Mie(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var $ie="[object Arguments]";function y$(e){return zc(e)&&nh(e)==$ie}var TH=Object.prototype,Tie=TH.hasOwnProperty,Nie=TH.propertyIsEnumerable,gm=y$(function(){return arguments}())?y$:function(e){return zc(e)&&Tie.call(e,"callee")&&!Nie.call(e,"callee")};function Oie(){return!1}var NH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,w$=NH&&typeof module=="object"&&module&&!module.nodeType&&module,jie=w$&&w$.exports===NH,v$=jie?Za.Buffer:void 0,Pie=v$?v$.isBuffer:void 0,mm=Pie||Oie,Die="[object Arguments]",Rie="[object Array]",Lie="[object Boolean]",zie="[object Date]",Bie="[object Error]",Fie="[object Function]",Uie="[object Map]",qie="[object Number]",Hie="[object Object]",Wie="[object RegExp]",Vie="[object Set]",Kie="[object String]",Gie="[object WeakMap]",Zie="[object ArrayBuffer]",Yie="[object DataView]",Jie="[object Float32Array]",Xie="[object Float64Array]",Qie="[object Int8Array]",ese="[object Int16Array]",tse="[object Int32Array]",rse="[object Uint8Array]",nse="[object Uint8ClampedArray]",ise="[object Uint16Array]",sse="[object Uint32Array]",an={};an[Jie]=an[Xie]=an[Qie]=an[ese]=an[tse]=an[rse]=an[nse]=an[ise]=an[sse]=!0;an[Die]=an[Rie]=an[Zie]=an[Lie]=an[Yie]=an[zie]=an[Bie]=an[Fie]=an[Uie]=an[qie]=an[Hie]=an[Wie]=an[Vie]=an[Kie]=an[Gie]=!1;function ose(e){return zc(e)&&NS(e.length)&&!!an[nh(e)]}function jS(e){return function(t){return e(t)}}var OH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ug=OH&&typeof module=="object"&&module&&!module.nodeType&&module,ase=Ug&&Ug.exports===OH,N6=ase&&AH.process,_p=function(){try{var e=Ug&&Ug.require&&Ug.require("util").types;return e||N6&&N6.binding&&N6.binding("util")}catch{}}(),_$=_p&&_p.isTypedArray,PS=_$?jS(_$):ose,cse=Object.prototype,use=cse.hasOwnProperty;function jH(e,t){var r=Es(e),n=!r&&gm(e),i=!r&&!n&&mm(e),s=!r&&!n&&!i&&PS(e),o=r||n||i||s,a=o?Mie(e.length,String):[],c=a.length;for(var u in e)(t||use.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||K3(u,c)))&&a.push(u);return a}function PH(e,t){return function(r){return e(t(r))}}var lse=PH(Object.keys,Object),fse=Object.prototype,dse=fse.hasOwnProperty;function hse(e){if(!OS(e))return lse(e);var t=[];for(var r in Object(e))dse.call(e,r)&&r!="constructor"&&t.push(r);return t}function R2(e){return b1(e)?jH(e):hse(e)}function pse(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var gse=Object.prototype,mse=gse.hasOwnProperty;function bse(e){if(!ks(e))return pse(e);var t=OS(e),r=[];for(var n in e)n=="constructor"&&(t||!mse.call(e,n))||r.push(n);return r}function L2(e){return b1(e)?jH(e,!0):bse(e)}var yse=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wse=/^\w*$/;function DS(e,t){if(Es(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||V3(e)?!0:wse.test(e)||!yse.test(e)||t!=null&&e in Object(t)}var bm=sh(Object,"create");function vse(){this.__data__=bm?bm(null):{},this.size=0}function _se(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xse="__lodash_hash_undefined__",Ese=Object.prototype,kse=Ese.hasOwnProperty;function Ase(e){var t=this.__data__;if(bm){var r=t[e];return r===xse?void 0:r}return kse.call(t,e)?t[e]:void 0}var Sse=Object.prototype,Cse=Sse.hasOwnProperty;function Ise(e){var t=this.__data__;return bm?t[e]!==void 0:Cse.call(t,e)}var Mse="__lodash_hash_undefined__";function $se(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bm&&t===void 0?Mse:t,this}function Td(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Td.prototype.clear=vse;Td.prototype.delete=_se;Td.prototype.get=Ase;Td.prototype.has=Ise;Td.prototype.set=$se;function Tse(){this.__data__=[],this.size=0}function G3(e,t){for(var r=e.length;r--;)if(D2(e[r][0],t))return r;return-1}var Nse=Array.prototype,Ose=Nse.splice;function jse(e){var t=this.__data__,r=G3(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ose.call(t,r,1),--this.size,!0}function Pse(e){var t=this.__data__,r=G3(t,e);return r<0?void 0:t[r][1]}function Dse(e){return G3(this.__data__,e)>-1}function Rse(e,t){var r=this.__data__,n=G3(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function rl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}rl.prototype.clear=Tse;rl.prototype.delete=jse;rl.prototype.get=Pse;rl.prototype.has=Dse;rl.prototype.set=Rse;var ym=sh(Za,"Map");function Lse(){this.size=0,this.__data__={hash:new Td,map:new(ym||rl),string:new Td}}function zse(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Z3(e,t){var r=e.__data__;return zse(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Bse(e){var t=Z3(this,e).delete(e);return this.size-=t?1:0,t}function Fse(e){return Z3(this,e).get(e)}function Use(e){return Z3(this,e).has(e)}function qse(e,t){var r=Z3(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function nl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nl.prototype.clear=Lse;nl.prototype.delete=Bse;nl.prototype.get=Fse;nl.prototype.has=Use;nl.prototype.set=qse;var Hse="Expected a function";function RS(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Hse);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(RS.Cache||nl),r}RS.Cache=nl;var Wse=500;function Vse(e){var t=RS(e,function(n){return r.size===Wse&&r.clear(),n}),r=t.cache;return t}var Kse=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gse=/\\(\\)?/g,Zse=Vse(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Kse,function(r,n,i,s){t.push(i?s.replace(Gse,"$1"):n||r)}),t});function Yse(e){return e==null?"":CH(e)}function y1(e,t){return Es(e)?e:DS(e,t)?[e]:Zse(Yse(e))}function w1(e){if(typeof e=="string"||V3(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Y3(e,t){t=y1(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[w1(t[r++])];return r&&r==n?e:void 0}function Jse(e,t,r){var n=e==null?void 0:Y3(e,t);return n===void 0?r:n}function LS(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var x$=oa?oa.isConcatSpreadable:void 0;function Xse(e){return Es(e)||gm(e)||!!(x$&&e&&e[x$])}function DH(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=Xse),i||(i=[]);++s<o;){var a=e[s];r(a)?LS(i,a):i[i.length]=a}return i}function Qse(e){var t=e==null?0:e.length;return t?DH(e):[]}function RH(e){return MH($H(e,void 0,Qse),e+"")}var zS=PH(Object.getPrototypeOf,Object),eoe="[object Object]",toe=Function.prototype,roe=Object.prototype,LH=toe.toString,noe=roe.hasOwnProperty,ioe=LH.call(Object);function zH(e){if(!zc(e)||nh(e)!=eoe)return!1;var t=zS(e);if(t===null)return!0;var r=noe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&LH.call(r)==ioe}function soe(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}function oht(){if(!arguments.length)return[];var e=arguments[0];return Es(e)?e:[e]}function ooe(){this.__data__=new rl,this.size=0}function aoe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function coe(e){return this.__data__.get(e)}function uoe(e){return this.__data__.has(e)}var loe=200;function foe(e,t){var r=this.__data__;if(r instanceof rl){var n=r.__data__;if(!ym||n.length<loe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new nl(n)}return r.set(e,t),this.size=r.size,this}function Ha(e){var t=this.__data__=new rl(e);this.size=t.size}Ha.prototype.clear=ooe;Ha.prototype.delete=aoe;Ha.prototype.get=coe;Ha.prototype.has=uoe;Ha.prototype.set=foe;function doe(e,t){return e&&m1(t,R2(t),e)}function hoe(e,t){return e&&m1(t,L2(t),e)}var BH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,E$=BH&&typeof module=="object"&&module&&!module.nodeType&&module,poe=E$&&E$.exports===BH,k$=poe?Za.Buffer:void 0,A$=k$?k$.allocUnsafe:void 0;function FH(e,t){if(t)return e.slice();var r=e.length,n=A$?A$(r):new e.constructor(r);return e.copy(n),n}function goe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}function UH(){return[]}var moe=Object.prototype,boe=moe.propertyIsEnumerable,S$=Object.getOwnPropertySymbols,BS=S$?function(e){return e==null?[]:(e=Object(e),goe(S$(e),function(t){return boe.call(e,t)}))}:UH;function yoe(e,t){return m1(e,BS(e),t)}var woe=Object.getOwnPropertySymbols,qH=woe?function(e){for(var t=[];e;)LS(t,BS(e)),e=zS(e);return t}:UH;function voe(e,t){return m1(e,qH(e),t)}function HH(e,t,r){var n=t(e);return Es(e)?n:LS(n,r(e))}function qx(e){return HH(e,R2,BS)}function WH(e){return HH(e,L2,qH)}var Hx=sh(Za,"DataView"),Wx=sh(Za,"Promise"),Vx=sh(Za,"Set"),C$="[object Map]",_oe="[object Object]",I$="[object Promise]",M$="[object Set]",$$="[object WeakMap]",T$="[object DataView]",xoe=ih(Hx),Eoe=ih(ym),koe=ih(Wx),Aoe=ih(Vx),Soe=ih(Ux),La=nh;(Hx&&La(new Hx(new ArrayBuffer(1)))!=T$||ym&&La(new ym)!=C$||Wx&&La(Wx.resolve())!=I$||Vx&&La(new Vx)!=M$||Ux&&La(new Ux)!=$$)&&(La=function(e){var t=nh(e),r=t==_oe?e.constructor:void 0,n=r?ih(r):"";if(n)switch(n){case xoe:return T$;case Eoe:return C$;case koe:return I$;case Aoe:return M$;case Soe:return $$}return t});var Coe=Object.prototype,Ioe=Coe.hasOwnProperty;function Moe(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Ioe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var vv=Za.Uint8Array;function FS(e){var t=new e.constructor(e.byteLength);return new vv(t).set(new vv(e)),t}function $oe(e,t){var r=t?FS(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Toe=/\w*$/;function Noe(e){var t=new e.constructor(e.source,Toe.exec(e));return t.lastIndex=e.lastIndex,t}var N$=oa?oa.prototype:void 0,O$=N$?N$.valueOf:void 0;function Ooe(e){return O$?Object(O$.call(e)):{}}function VH(e,t){var r=t?FS(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var joe="[object Boolean]",Poe="[object Date]",Doe="[object Map]",Roe="[object Number]",Loe="[object RegExp]",zoe="[object Set]",Boe="[object String]",Foe="[object Symbol]",Uoe="[object ArrayBuffer]",qoe="[object DataView]",Hoe="[object Float32Array]",Woe="[object Float64Array]",Voe="[object Int8Array]",Koe="[object Int16Array]",Goe="[object Int32Array]",Zoe="[object Uint8Array]",Yoe="[object Uint8ClampedArray]",Joe="[object Uint16Array]",Xoe="[object Uint32Array]";function Qoe(e,t,r){var n=e.constructor;switch(t){case Uoe:return FS(e);case joe:case Poe:return new n(+e);case qoe:return $oe(e,r);case Hoe:case Woe:case Voe:case Koe:case Goe:case Zoe:case Yoe:case Joe:case Xoe:return VH(e,r);case Doe:return new n;case Roe:case Boe:return new n(e);case Loe:return Noe(e);case zoe:return new n;case Foe:return Ooe(e)}}function KH(e){return typeof e.constructor=="function"&&!OS(e)?lie(zS(e)):{}}var eae="[object Map]";function tae(e){return zc(e)&&La(e)==eae}var j$=_p&&_p.isMap,rae=j$?jS(j$):tae,nae="[object Set]";function iae(e){return zc(e)&&La(e)==nae}var P$=_p&&_p.isSet,sae=P$?jS(P$):iae,oae=1,aae=2,cae=4,GH="[object Arguments]",uae="[object Array]",lae="[object Boolean]",fae="[object Date]",dae="[object Error]",ZH="[object Function]",hae="[object GeneratorFunction]",pae="[object Map]",gae="[object Number]",YH="[object Object]",mae="[object RegExp]",bae="[object Set]",yae="[object String]",wae="[object Symbol]",vae="[object WeakMap]",_ae="[object ArrayBuffer]",xae="[object DataView]",Eae="[object Float32Array]",kae="[object Float64Array]",Aae="[object Int8Array]",Sae="[object Int16Array]",Cae="[object Int32Array]",Iae="[object Uint8Array]",Mae="[object Uint8ClampedArray]",$ae="[object Uint16Array]",Tae="[object Uint32Array]",Qr={};Qr[GH]=Qr[uae]=Qr[_ae]=Qr[xae]=Qr[lae]=Qr[fae]=Qr[Eae]=Qr[kae]=Qr[Aae]=Qr[Sae]=Qr[Cae]=Qr[pae]=Qr[gae]=Qr[YH]=Qr[mae]=Qr[bae]=Qr[yae]=Qr[wae]=Qr[Iae]=Qr[Mae]=Qr[$ae]=Qr[Tae]=!0;Qr[dae]=Qr[ZH]=Qr[vae]=!1;function dp(e,t,r,n,i,s){var o,a=t&oae,c=t&aae,u=t&cae;if(r&&(o=i?r(e,n,i,s):r(e)),o!==void 0)return o;if(!ks(e))return e;var l=Es(e);if(l){if(o=Moe(e),!a)return IH(e,o)}else{var d=La(e),h=d==ZH||d==hae;if(mm(e))return FH(e,a);if(d==YH||d==GH||h&&!i){if(o=c||h?{}:KH(e),!a)return c?voe(e,hoe(o,e)):yoe(e,doe(o,e))}else{if(!Qr[d])return i?e:{};o=Qoe(e,d,a)}}s||(s=new Ha);var g=s.get(e);if(g)return g;s.set(e,o),sae(e)?e.forEach(function(k){o.add(dp(k,t,r,k,e,s))}):rae(e)&&e.forEach(function(k,w){o.set(w,dp(k,t,r,w,e,s))});var m=u?c?WH:qx:c?L2:R2,b=l?void 0:m(e);return yie(b||e,function(k,w){b&&(w=k,k=e[w]),TS(o,w,dp(k,t,r,w,e,s))}),o}var Nae=4;function aht(e){return dp(e,Nae)}var Oae=1,jae=4;function cht(e){return dp(e,Oae|jae)}var Pae="__lodash_hash_undefined__";function Dae(e){return this.__data__.set(e,Pae),this}function Rae(e){return this.__data__.has(e)}function _v(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new nl;++t<r;)this.add(e[t])}_v.prototype.add=_v.prototype.push=Dae;_v.prototype.has=Rae;function Lae(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function zae(e,t){return e.has(t)}var Bae=1,Fae=2;function JH(e,t,r,n,i,s){var o=r&Bae,a=e.length,c=t.length;if(a!=c&&!(o&&c>a))return!1;var u=s.get(e),l=s.get(t);if(u&&l)return u==t&&l==e;var d=-1,h=!0,g=r&Fae?new _v:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var m=e[d],b=t[d];if(n)var k=o?n(b,m,d,t,e,s):n(m,b,d,e,t,s);if(k!==void 0){if(k)continue;h=!1;break}if(g){if(!Lae(t,function(w,E){if(!zae(g,E)&&(m===w||i(m,w,r,n,s)))return g.push(E)})){h=!1;break}}else if(!(m===b||i(m,b,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function Uae(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function qae(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Hae=1,Wae=2,Vae="[object Boolean]",Kae="[object Date]",Gae="[object Error]",Zae="[object Map]",Yae="[object Number]",Jae="[object RegExp]",Xae="[object Set]",Qae="[object String]",ece="[object Symbol]",tce="[object ArrayBuffer]",rce="[object DataView]",D$=oa?oa.prototype:void 0,O6=D$?D$.valueOf:void 0;function nce(e,t,r,n,i,s,o){switch(r){case rce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tce:return!(e.byteLength!=t.byteLength||!s(new vv(e),new vv(t)));case Vae:case Kae:case Yae:return D2(+e,+t);case Gae:return e.name==t.name&&e.message==t.message;case Jae:case Qae:return e==t+"";case Zae:var a=Uae;case Xae:var c=n&Hae;if(a||(a=qae),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;n|=Wae,o.set(e,t);var l=JH(a(e),a(t),n,i,s,o);return o.delete(e),l;case ece:if(O6)return O6.call(e)==O6.call(t)}return!1}var ice=1,sce=Object.prototype,oce=sce.hasOwnProperty;function ace(e,t,r,n,i,s){var o=r&ice,a=qx(e),c=a.length,u=qx(t),l=u.length;if(c!=l&&!o)return!1;for(var d=c;d--;){var h=a[d];if(!(o?h in t:oce.call(t,h)))return!1}var g=s.get(e),m=s.get(t);if(g&&m)return g==t&&m==e;var b=!0;s.set(e,t),s.set(t,e);for(var k=o;++d<c;){h=a[d];var w=e[h],E=t[h];if(n)var A=o?n(E,w,h,t,e,s):n(w,E,h,e,t,s);if(!(A===void 0?w===E||i(w,E,r,n,s):A)){b=!1;break}k||(k=h=="constructor")}if(b&&!k){var M=e.constructor,R=t.constructor;M!=R&&"constructor"in e&&"constructor"in t&&!(typeof M=="function"&&M instanceof M&&typeof R=="function"&&R instanceof R)&&(b=!1)}return s.delete(e),s.delete(t),b}var cce=1,R$="[object Arguments]",L$="[object Array]",ty="[object Object]",uce=Object.prototype,z$=uce.hasOwnProperty;function lce(e,t,r,n,i,s){var o=Es(e),a=Es(t),c=o?L$:La(e),u=a?L$:La(t);c=c==R$?ty:c,u=u==R$?ty:u;var l=c==ty,d=u==ty,h=c==u;if(h&&mm(e)){if(!mm(t))return!1;o=!0,l=!1}if(h&&!l)return s||(s=new Ha),o||PS(e)?JH(e,t,r,n,i,s):nce(e,t,c,r,n,i,s);if(!(r&cce)){var g=l&&z$.call(e,"__wrapped__"),m=d&&z$.call(t,"__wrapped__");if(g||m){var b=g?e.value():e,k=m?t.value():t;return s||(s=new Ha),i(b,k,r,n,s)}}return h?(s||(s=new Ha),ace(e,t,r,n,i,s)):!1}function J3(e,t,r,n,i){return e===t?!0:e==null||t==null||!zc(e)&&!zc(t)?e!==e&&t!==t:lce(e,t,r,n,J3,i)}var fce=1,dce=2;function hce(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=r[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=r[i];var a=o[0],c=e[a],u=o[1];if(o[2]){if(c===void 0&&!(a in e))return!1}else{var l=new Ha,d;if(!(d===void 0?J3(u,c,fce|dce,n,l):d))return!1}}return!0}function XH(e){return e===e&&!ks(e)}function pce(e){for(var t=R2(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,XH(i)]}return t}function QH(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function gce(e){var t=pce(e);return t.length==1&&t[0][2]?QH(t[0][0],t[0][1]):function(r){return r===e||hce(r,e,t)}}function mce(e,t){return e!=null&&t in Object(e)}function bce(e,t,r){t=y1(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=w1(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&NS(i)&&K3(o,i)&&(Es(e)||gm(e)))}function eW(e,t){return e!=null&&bce(e,t,mce)}var yce=1,wce=2;function vce(e,t){return DS(e)&&XH(t)?QH(w1(e),t):function(r){var n=Jse(r,e);return n===void 0&&n===t?eW(r,e):J3(t,n,yce|wce)}}function _ce(e){return function(t){return t?.[e]}}function xce(e){return function(t){return Y3(t,e)}}function Ece(e){return DS(e)?_ce(w1(e)):xce(e)}function tW(e){return typeof e=="function"?e:e==null?IS:typeof e=="object"?Es(e)?vce(e[0],e[1]):gce(e):Ece(e)}function kce(e){return function(t,r,n){for(var i=-1,s=Object(t),o=n(t),a=o.length;a--;){var c=o[++i];if(r(s[c],c,s)===!1)break}return t}}var rW=kce();function Ace(e,t){return e&&rW(e,t,R2)}function Sce(e,t){return function(r,n){if(r==null)return r;if(!b1(r))return e(r,n);for(var i=r.length,s=-1,o=Object(r);++s<i&&n(o[s],s,o)!==!1;);return r}}var Cce=Sce(Ace),j6=function(){return Za.Date.now()},Ice="Expected a function",Mce=Math.max,$ce=Math.min;function Tce(e,t,r){var n,i,s,o,a,c,u=0,l=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Ice);t=p$(t)||0,ks(r)&&(l=!!r.leading,d="maxWait"in r,s=d?Mce(p$(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function g(N){var z=n,F=i;return n=i=void 0,u=N,o=e.apply(F,z),o}function m(N){return u=N,a=setTimeout(w,t),l?g(N):o}function b(N){var z=N-c,F=N-u,L=t-z;return d?$ce(L,s-F):L}function k(N){var z=N-c,F=N-u;return c===void 0||z>=t||z<0||d&&F>=s}function w(){var N=j6();if(k(N))return E(N);a=setTimeout(w,b(N))}function E(N){return a=void 0,h&&n?g(N):(n=i=void 0,o)}function A(){a!==void 0&&clearTimeout(a),u=0,n=c=i=a=void 0}function M(){return a===void 0?o:E(j6())}function R(){var N=j6(),z=k(N);if(n=arguments,i=this,c=N,z){if(a===void 0)return m(c);if(d)return clearTimeout(a),a=setTimeout(w,t),g(c)}return a===void 0&&(a=setTimeout(w,t)),o}return R.cancel=A,R.flush=M,R}function Kx(e,t,r){(r!==void 0&&!D2(e[t],r)||r===void 0&&!(t in e))&&$S(e,t,r)}function Nce(e){return zc(e)&&b1(e)}function Gx(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Oce(e){return m1(e,L2(e))}function jce(e,t,r,n,i,s,o){var a=Gx(e,r),c=Gx(t,r),u=o.get(c);if(u){Kx(e,r,u);return}var l=s?s(a,c,r+"",e,t,o):void 0,d=l===void 0;if(d){var h=Es(c),g=!h&&mm(c),m=!h&&!g&&PS(c);l=c,h||g||m?Es(a)?l=a:Nce(a)?l=IH(a):g?(d=!1,l=FH(c,!0)):m?(d=!1,l=VH(c,!0)):l=[]:zH(c)||gm(c)?(l=a,gm(a)?l=Oce(a):(!ks(a)||MS(a))&&(l=KH(c))):d=!1}d&&(o.set(c,l),i(l,c,n,s,o),o.delete(c)),Kx(e,r,l)}function nW(e,t,r,n,i){e!==t&&rW(t,function(s,o){if(i||(i=new Ha),ks(s))jce(e,t,o,r,nW,n,i);else{var a=n?n(Gx(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),Kx(e,o,a)}},L2)}function Pce(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function uht(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=n-1;return wie(e,tW(t),i)}function Dce(e,t){var r=-1,n=b1(e)?Array(e.length):[];return Cce(e,function(i,s,o){n[++r]=t(i,s,o)}),n}function Rce(e,t){var r=Es(e)?CS:Dce;return r(e,tW(t))}function lht(e,t){return DH(Rce(e,t))}function fht(e){for(var t=-1,r=e==null?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n}function Lce(e,t){return t.length<2?e:Y3(e,soe(t,0,-1))}function dht(e,t){return J3(e,t)}function hht(e){return e==null}function pht(e){return e===null}function ght(e){return e===void 0}var mht=Cie(function(e,t,r){nW(e,t,r)});function zce(e,t){return t=y1(t,e),e=Lce(e,t),e==null||delete e[w1(Pce(t))]}function Bce(e){return zH(e)?void 0:e}var Fce=1,Uce=2,qce=4,bht=RH(function(e,t){var r={};if(e==null)return r;var n=!1;t=CS(t,function(s){return s=y1(s,e),n||(n=s.length>1),s}),m1(e,WH(e),r),n&&(r=dp(r,Fce|Uce|qce,Bce));for(var i=t.length;i--;)zce(r,t[i]);return r});function iW(e,t,r,n){if(!ks(e))return e;t=y1(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var c=w1(t[i]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var l=a[c];u=void 0,u===void 0&&(u=ks(l)?l:K3(t[i+1])?[]:{})}TS(a,c,u),a=a[c]}return e}function Hce(e,t,r){for(var n=-1,i=t.length,s={};++n<i;){var o=t[n],a=Y3(e,o);r(a,o)&&iW(s,y1(o,e),a)}return s}function Wce(e,t){return Hce(e,t,function(r,n){return eW(e,n)})}var yht=RH(function(e,t){return e==null?{}:Wce(e,t)});function wht(e,t,r){return e==null?e:iW(e,t,r)}var Vce="Expected a function";function vht(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(Vce);return ks(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Tce(e,t,{leading:n,maxWait:t,trailing:i})}/*! Element Plus Icons Vue v2.3.1 */var Kce=Dt({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),_ht=Kce,Gce=Dt({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),xht=Gce,Zce=Dt({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),Eht=Zce,Yce=Dt({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),kht=Yce,Jce=Dt({name:"Calendar",__name:"calendar",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),Aht=Jce,Xce=Dt({name:"Check",__name:"check",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Sht=Xce,Qce=Dt({name:"CircleCheck",__name:"circle-check",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),Pt("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),Cht=Qce,eue=Dt({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Iht=eue,tue=Dt({name:"CircleClose",__name:"circle-close",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),Pt("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Mht=tue,rue=Dt({name:"Clock",__name:"clock",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),Pt("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),Pt("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),$ht=rue,nue=Dt({name:"Close",__name:"close",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Tht=nue,iue=Dt({name:"CreditCard",__name:"credit-card",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M896 324.096c0-42.368-2.496-55.296-9.536-68.48a52.352 52.352 0 0 0-22.144-22.08c-13.12-7.04-26.048-9.536-68.416-9.536H228.096c-42.368 0-55.296 2.496-68.48 9.536a52.352 52.352 0 0 0-22.08 22.144c-7.04 13.12-9.536 26.048-9.536 68.416v375.808c0 42.368 2.496 55.296 9.536 68.48a52.352 52.352 0 0 0 22.144 22.08c13.12 7.04 26.048 9.536 68.416 9.536h567.808c42.368 0 55.296-2.496 68.48-9.536a52.352 52.352 0 0 0 22.08-22.144c7.04-13.12 9.536-26.048 9.536-68.416zm64 0v375.808c0 57.088-5.952 77.76-17.088 98.56-11.136 20.928-27.52 37.312-48.384 48.448-20.864 11.136-41.6 17.088-98.56 17.088H228.032c-57.088 0-77.76-5.952-98.56-17.088a116.288 116.288 0 0 1-48.448-48.384c-11.136-20.864-17.088-41.6-17.088-98.56V324.032c0-57.088 5.952-77.76 17.088-98.56 11.136-20.928 27.52-37.312 48.384-48.448 20.864-11.136 41.6-17.088 98.56-17.088H795.84c57.088 0 77.76 5.952 98.56 17.088 20.928 11.136 37.312 27.52 48.448 48.384 11.136 20.864 17.088 41.6 17.088 98.56z"}),Pt("path",{fill:"currentColor",d:"M64 320h896v64H64zm0 128h896v64H64zm128 192h256v64H192z"})]))}}),Nht=iue,sue=Dt({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Oht=sue,oue=Dt({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),jht=oue,aue=Dt({name:"Delete",__name:"delete",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Pht=aue,cue=Dt({name:"Document",__name:"document",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),Dht=cue,uue=Dt({name:"Edit",__name:"edit",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),Pt("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),Rht=uue,lue=Dt({name:"FullScreen",__name:"full-screen",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),Lht=lue,fue=Dt({name:"Hide",__name:"hide",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),Pt("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),zht=fue,due=Dt({name:"InfoFilled",__name:"info-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Bht=due,hue=Dt({name:"Loading",__name:"loading",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),Fht=hue,pue=Dt({name:"Minus",__name:"minus",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),Uht=pue,gue=Dt({name:"MoreFilled",__name:"more-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),qht=gue,mue=Dt({name:"More",__name:"more",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),Hht=mue,bue=Dt({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),Wht=bue,yue=Dt({name:"Picture",__name:"picture",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),Pt("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),Vht=yue,wue=Dt({name:"Plus",__name:"plus",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),Kht=wue,vue=Dt({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),Ght=vue,_ue=Dt({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),Zht=_ue,xue=Dt({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),Yht=xue,Eue=Dt({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Jht=Eue,kue=Dt({name:"VideoPause",__name:"video-pause",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),Xht=kue,Aue=Dt({name:"VideoPlay",__name:"video-play",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),Qht=Aue,Sue=Dt({name:"View",__name:"view",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),e0t=Sue,Cue=Dt({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),t0t=Cue,Iue=Dt({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),r0t=Iue,Mue=Dt({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,r)=>(Kt(),Vt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[Pt("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),n0t=Mue,Vs="top",aa="bottom",ca="right",Ks="left",US="auto",z2=[Vs,aa,ca,Ks],xp="start",wm="end",$ue="clippingParents",sW="viewport",F1="popper",Tue="reference",B$=z2.reduce(function(e,t){return e.concat([t+"-"+xp,t+"-"+wm])},[]),oW=[].concat(z2,[US]).reduce(function(e,t){return e.concat([t,t+"-"+xp,t+"-"+wm])},[]),Nue="beforeRead",Oue="read",jue="afterRead",Pue="beforeMain",Due="main",Rue="afterMain",Lue="beforeWrite",zue="write",Bue="afterWrite",Fue=[Nue,Oue,jue,Pue,Due,Rue,Lue,zue,Bue];function Bc(e){return e?(e.nodeName||"").toLowerCase():null}function Ya(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ep(e){var t=Ya(e).Element;return e instanceof t||e instanceof Element}function sa(e){var t=Ya(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function qS(e){if(typeof ShadowRoot>"u")return!1;var t=Ya(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Uue(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},s=t.elements[r];!sa(s)||!Bc(s)||(Object.assign(s.style,n),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function que(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],s=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),a=o.reduce(function(c,u){return c[u]="",c},{});!sa(i)||!Bc(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(c){i.removeAttribute(c)}))})}}var aW={name:"applyStyles",enabled:!0,phase:"write",fn:Uue,effect:que,requires:["computeStyles"]};function Pc(e){return e.split("-")[0]}var xd=Math.max,xv=Math.min,kp=Math.round;function Ap(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,i=1;if(sa(e)&&t){var s=e.offsetHeight,o=e.offsetWidth;o>0&&(n=kp(r.width)/o||1),s>0&&(i=kp(r.height)/s||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function HS(e){var t=Ap(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function cW(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&qS(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Wu(e){return Ya(e).getComputedStyle(e)}function Hue(e){return["table","td","th"].indexOf(Bc(e))>=0}function kf(e){return((Ep(e)?e.ownerDocument:e.document)||window.document).documentElement}function X3(e){return Bc(e)==="html"?e:e.assignedSlot||e.parentNode||(qS(e)?e.host:null)||kf(e)}function F$(e){return!sa(e)||Wu(e).position==="fixed"?null:e.offsetParent}function Wue(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&sa(e)){var n=Wu(e);if(n.position==="fixed")return null}var i=X3(e);for(qS(i)&&(i=i.host);sa(i)&&["html","body"].indexOf(Bc(i))<0;){var s=Wu(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function B2(e){for(var t=Ya(e),r=F$(e);r&&Hue(r)&&Wu(r).position==="static";)r=F$(r);return r&&(Bc(r)==="html"||Bc(r)==="body"&&Wu(r).position==="static")?t:r||Wue(e)||t}function WS(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function qg(e,t,r){return xd(e,xv(t,r))}function Vue(e,t,r){var n=qg(e,t,r);return n>r?r:n}function uW(){return{top:0,right:0,bottom:0,left:0}}function lW(e){return Object.assign({},uW(),e)}function fW(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Kue=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,lW(typeof e!="number"?e:fW(e,z2))};function Gue(e){var t,r=e.state,n=e.name,i=e.options,s=r.elements.arrow,o=r.modifiersData.popperOffsets,a=Pc(r.placement),c=WS(a),u=[Ks,ca].indexOf(a)>=0,l=u?"height":"width";if(!(!s||!o)){var d=Kue(i.padding,r),h=HS(s),g=c==="y"?Vs:Ks,m=c==="y"?aa:ca,b=r.rects.reference[l]+r.rects.reference[c]-o[c]-r.rects.popper[l],k=o[c]-r.rects.reference[c],w=B2(s),E=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,A=b/2-k/2,M=d[g],R=E-h[l]-d[m],N=E/2-h[l]/2+A,z=qg(M,N,R),F=c;r.modifiersData[n]=(t={},t[F]=z,t.centerOffset=z-N,t)}}function Zue(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!cW(t.elements.popper,i)||(t.elements.arrow=i))}var Yue={name:"arrow",enabled:!0,phase:"main",fn:Gue,effect:Zue,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Sp(e){return e.split("-")[1]}var Jue={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xue(e){var t=e.x,r=e.y,n=window,i=n.devicePixelRatio||1;return{x:kp(t*i)/i||0,y:kp(r*i)/i||0}}function U$(e){var t,r=e.popper,n=e.popperRect,i=e.placement,s=e.variation,o=e.offsets,a=e.position,c=e.gpuAcceleration,u=e.adaptive,l=e.roundOffsets,d=e.isFixed,h=o.x,g=h===void 0?0:h,m=o.y,b=m===void 0?0:m,k=typeof l=="function"?l({x:g,y:b}):{x:g,y:b};g=k.x,b=k.y;var w=o.hasOwnProperty("x"),E=o.hasOwnProperty("y"),A=Ks,M=Vs,R=window;if(u){var N=B2(r),z="clientHeight",F="clientWidth";if(N===Ya(r)&&(N=kf(r),Wu(N).position!=="static"&&a==="absolute"&&(z="scrollHeight",F="scrollWidth")),N=N,i===Vs||(i===Ks||i===ca)&&s===wm){M=aa;var L=d&&N===R&&R.visualViewport?R.visualViewport.height:N[z];b-=L-n.height,b*=c?1:-1}if(i===Ks||(i===Vs||i===aa)&&s===wm){A=ca;var B=d&&N===R&&R.visualViewport?R.visualViewport.width:N[F];g-=B-n.width,g*=c?1:-1}}var D=Object.assign({position:a},u&&Jue),x=l===!0?Xue({x:g,y:b}):{x:g,y:b};if(g=x.x,b=x.y,c){var y;return Object.assign({},D,(y={},y[M]=E?"0":"",y[A]=w?"0":"",y.transform=(R.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",y))}return Object.assign({},D,(t={},t[M]=E?b+"px":"",t[A]=w?g+"px":"",t.transform="",t))}function Que(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,s=r.adaptive,o=s===void 0?!0:s,a=r.roundOffsets,c=a===void 0?!0:a,u={placement:Pc(t.placement),variation:Sp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,U$(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,U$(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var dW={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Que,data:{}},ry={passive:!0};function ele(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,s=i===void 0?!0:i,o=n.resize,a=o===void 0?!0:o,c=Ya(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(l){l.addEventListener("scroll",r.update,ry)}),a&&c.addEventListener("resize",r.update,ry),function(){s&&u.forEach(function(l){l.removeEventListener("scroll",r.update,ry)}),a&&c.removeEventListener("resize",r.update,ry)}}var hW={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ele,data:{}},tle={left:"right",right:"left",bottom:"top",top:"bottom"};function Mw(e){return e.replace(/left|right|bottom|top/g,function(t){return tle[t]})}var rle={start:"end",end:"start"};function q$(e){return e.replace(/start|end/g,function(t){return rle[t]})}function VS(e){var t=Ya(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function KS(e){return Ap(kf(e)).left+VS(e).scrollLeft}function nle(e){var t=Ya(e),r=kf(e),n=t.visualViewport,i=r.clientWidth,s=r.clientHeight,o=0,a=0;return n&&(i=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=n.offsetLeft,a=n.offsetTop)),{width:i,height:s,x:o+KS(e),y:a}}function ile(e){var t,r=kf(e),n=VS(e),i=(t=e.ownerDocument)==null?void 0:t.body,s=xd(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=xd(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-n.scrollLeft+KS(e),c=-n.scrollTop;return Wu(i||r).direction==="rtl"&&(a+=xd(r.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}function GS(e){var t=Wu(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function pW(e){return["html","body","#document"].indexOf(Bc(e))>=0?e.ownerDocument.body:sa(e)&&GS(e)?e:pW(X3(e))}function Hg(e,t){var r;t===void 0&&(t=[]);var n=pW(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),s=Ya(n),o=i?[s].concat(s.visualViewport||[],GS(n)?n:[]):n,a=t.concat(o);return i?a:a.concat(Hg(X3(o)))}function Zx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function sle(e){var t=Ap(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function H$(e,t){return t===sW?Zx(nle(e)):Ep(t)?sle(t):Zx(ile(kf(e)))}function ole(e){var t=Hg(X3(e)),r=["absolute","fixed"].indexOf(Wu(e).position)>=0,n=r&&sa(e)?B2(e):e;return Ep(n)?t.filter(function(i){return Ep(i)&&cW(i,n)&&Bc(i)!=="body"}):[]}function ale(e,t,r){var n=t==="clippingParents"?ole(e):[].concat(t),i=[].concat(n,[r]),s=i[0],o=i.reduce(function(a,c){var u=H$(e,c);return a.top=xd(u.top,a.top),a.right=xv(u.right,a.right),a.bottom=xv(u.bottom,a.bottom),a.left=xd(u.left,a.left),a},H$(e,s));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function gW(e){var t=e.reference,r=e.element,n=e.placement,i=n?Pc(n):null,s=n?Sp(n):null,o=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,c;switch(i){case Vs:c={x:o,y:t.y-r.height};break;case aa:c={x:o,y:t.y+t.height};break;case ca:c={x:t.x+t.width,y:a};break;case Ks:c={x:t.x-r.width,y:a};break;default:c={x:t.x,y:t.y}}var u=i?WS(i):null;if(u!=null){var l=u==="y"?"height":"width";switch(s){case xp:c[u]=c[u]-(t[l]/2-r[l]/2);break;case wm:c[u]=c[u]+(t[l]/2-r[l]/2);break}}return c}function vm(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,s=r.boundary,o=s===void 0?$ue:s,a=r.rootBoundary,c=a===void 0?sW:a,u=r.elementContext,l=u===void 0?F1:u,d=r.altBoundary,h=d===void 0?!1:d,g=r.padding,m=g===void 0?0:g,b=lW(typeof m!="number"?m:fW(m,z2)),k=l===F1?Tue:F1,w=e.rects.popper,E=e.elements[h?k:l],A=ale(Ep(E)?E:E.contextElement||kf(e.elements.popper),o,c),M=Ap(e.elements.reference),R=gW({reference:M,element:w,placement:i}),N=Zx(Object.assign({},w,R)),z=l===F1?N:M,F={top:A.top-z.top+b.top,bottom:z.bottom-A.bottom+b.bottom,left:A.left-z.left+b.left,right:z.right-A.right+b.right},L=e.modifiersData.offset;if(l===F1&&L){var B=L[i];Object.keys(F).forEach(function(D){var x=[ca,aa].indexOf(D)>=0?1:-1,y=[Vs,aa].indexOf(D)>=0?"y":"x";F[D]+=B[y]*x})}return F}function cle(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,s=r.rootBoundary,o=r.padding,a=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?oW:c,l=Sp(n),d=l?a?B$:B$.filter(function(m){return Sp(m)===l}):z2,h=d.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=d);var g=h.reduce(function(m,b){return m[b]=vm(e,{placement:b,boundary:i,rootBoundary:s,padding:o})[Pc(b)],m},{});return Object.keys(g).sort(function(m,b){return g[m]-g[b]})}function ule(e){if(Pc(e)===US)return[];var t=Mw(e);return[q$(e),t,q$(t)]}function lle(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,s=i===void 0?!0:i,o=r.altAxis,a=o===void 0?!0:o,c=r.fallbackPlacements,u=r.padding,l=r.boundary,d=r.rootBoundary,h=r.altBoundary,g=r.flipVariations,m=g===void 0?!0:g,b=r.allowedAutoPlacements,k=t.options.placement,w=Pc(k),E=w===k,A=c||(E||!m?[Mw(k)]:ule(k)),M=[k].concat(A).reduce(function(q,W){return q.concat(Pc(W)===US?cle(t,{placement:W,boundary:l,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:b}):W)},[]),R=t.rects.reference,N=t.rects.popper,z=new Map,F=!0,L=M[0],B=0;B<M.length;B++){var D=M[B],x=Pc(D),y=Sp(D)===xp,f=[Vs,aa].indexOf(x)>=0,p=f?"width":"height",v=vm(t,{placement:D,boundary:l,rootBoundary:d,altBoundary:h,padding:u}),I=f?y?ca:Ks:y?aa:Vs;R[p]>N[p]&&(I=Mw(I));var j=Mw(I),$=[];if(s&&$.push(v[x]<=0),a&&$.push(v[I]<=0,v[j]<=0),$.every(function(q){return q})){L=D,F=!1;break}z.set(D,$)}if(F)for(var C=m?3:1,O=function(q){var W=M.find(function(K){var Y=z.get(K);if(Y)return Y.slice(0,q).every(function(te){return te})});if(W)return L=W,"break"},_=C;_>0;_--){var P=O(_);if(P==="break")break}t.placement!==L&&(t.modifiersData[n]._skip=!0,t.placement=L,t.reset=!0)}}var fle={name:"flip",enabled:!0,phase:"main",fn:lle,requiresIfExists:["offset"],data:{_skip:!1}};function W$(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function V$(e){return[Vs,ca,aa,Ks].some(function(t){return e[t]>=0})}function dle(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,o=vm(t,{elementContext:"reference"}),a=vm(t,{altBoundary:!0}),c=W$(o,n),u=W$(a,i,s),l=V$(c),d=V$(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":d})}var hle={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dle};function ple(e,t,r){var n=Pc(e),i=[Ks,Vs].indexOf(n)>=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[Ks,ca].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function gle(e){var t=e.state,r=e.options,n=e.name,i=r.offset,s=i===void 0?[0,0]:i,o=oW.reduce(function(l,d){return l[d]=ple(d,t.rects,s),l},{}),a=o[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}var mle={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gle};function ble(e){var t=e.state,r=e.name;t.modifiersData[r]=gW({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var mW={name:"popperOffsets",enabled:!0,phase:"read",fn:ble,data:{}};function yle(e){return e==="x"?"y":"x"}function wle(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,s=i===void 0?!0:i,o=r.altAxis,a=o===void 0?!1:o,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,d=r.padding,h=r.tether,g=h===void 0?!0:h,m=r.tetherOffset,b=m===void 0?0:m,k=vm(t,{boundary:c,rootBoundary:u,padding:d,altBoundary:l}),w=Pc(t.placement),E=Sp(t.placement),A=!E,M=WS(w),R=yle(M),N=t.modifiersData.popperOffsets,z=t.rects.reference,F=t.rects.popper,L=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,B=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,x={x:0,y:0};if(N){if(s){var y,f=M==="y"?Vs:Ks,p=M==="y"?aa:ca,v=M==="y"?"height":"width",I=N[M],j=I+k[f],$=I-k[p],C=g?-F[v]/2:0,O=E===xp?z[v]:F[v],_=E===xp?-F[v]:-z[v],P=t.elements.arrow,q=g&&P?HS(P):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uW(),K=W[f],Y=W[p],te=qg(0,z[v],q[v]),re=A?z[v]/2-C-te-K-B.mainAxis:O-te-K-B.mainAxis,be=A?-z[v]/2+C+te+Y+B.mainAxis:_+te+Y+B.mainAxis,ve=t.elements.arrow&&B2(t.elements.arrow),ye=ve?M==="y"?ve.clientTop||0:ve.clientLeft||0:0,Se=(y=D?.[M])!=null?y:0,_e=I+re-Se-ye,ke=I+be-Se,it=qg(g?xv(j,_e):j,I,g?xd($,ke):$);N[M]=it,x[M]=it-I}if(a){var Re,J=M==="x"?Vs:Ks,ne=M==="x"?aa:ca,le=N[R],he=R==="y"?"height":"width",Pe=le+k[J],xe=le-k[ne],oe=[Vs,Ks].indexOf(w)!==-1,me=(Re=D?.[R])!=null?Re:0,je=oe?Pe:le-z[he]-F[he]-me+B.altAxis,U=oe?le+z[he]+F[he]-me-B.altAxis:xe,S=g&&oe?Vue(je,le,U):qg(g?je:Pe,le,g?U:xe);N[R]=S,x[R]=S-le}t.modifiersData[n]=x}}var vle={name:"preventOverflow",enabled:!0,phase:"main",fn:wle,requiresIfExists:["offset"]};function _le(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function xle(e){return e===Ya(e)||!sa(e)?VS(e):_le(e)}function Ele(e){var t=e.getBoundingClientRect(),r=kp(t.width)/e.offsetWidth||1,n=kp(t.height)/e.offsetHeight||1;return r!==1||n!==1}function kle(e,t,r){r===void 0&&(r=!1);var n=sa(t),i=sa(t)&&Ele(t),s=kf(t),o=Ap(e,i),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Bc(t)!=="body"||GS(s))&&(a=xle(t)),sa(t)?(c=Ap(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=KS(s))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function Ale(e){var t=new Map,r=new Set,n=[];e.forEach(function(s){t.set(s.name,s)});function i(s){r.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!r.has(a)){var c=t.get(a);c&&i(c)}}),n.push(s)}return e.forEach(function(s){r.has(s.name)||i(s)}),n}function Sle(e){var t=Ale(e);return Fue.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function Cle(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Ile(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var K$={placement:"bottom",modifiers:[],strategy:"absolute"};function G$(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function ZS(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,s=i===void 0?K$:i;return function(o,a,c){c===void 0&&(c=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},K$,s),modifiersData:{},elements:{reference:o,popper:a},attributes:{},styles:{}},l=[],d=!1,h={state:u,setOptions:function(b){var k=typeof b=="function"?b(u.options):b;m(),u.options=Object.assign({},s,u.options,k),u.scrollParents={reference:Ep(o)?Hg(o):o.contextElement?Hg(o.contextElement):[],popper:Hg(a)};var w=Sle(Ile([].concat(n,u.options.modifiers)));return u.orderedModifiers=w.filter(function(E){return E.enabled}),g(),h.update()},forceUpdate:function(){if(!d){var b=u.elements,k=b.reference,w=b.popper;if(G$(k,w)){u.rects={reference:kle(k,B2(w),u.options.strategy==="fixed"),popper:HS(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(F){return u.modifiersData[F.name]=Object.assign({},F.data)});for(var E=0;E<u.orderedModifiers.length;E++){if(u.reset===!0){u.reset=!1,E=-1;continue}var A=u.orderedModifiers[E],M=A.fn,R=A.options,N=R===void 0?{}:R,z=A.name;typeof M=="function"&&(u=M({state:u,options:N,name:z,instance:h})||u)}}}},update:Cle(function(){return new Promise(function(b){h.forceUpdate(),b(u)})}),destroy:function(){m(),d=!0}};if(!G$(o,a))return h;h.setOptions(c).then(function(b){!d&&c.onFirstUpdate&&c.onFirstUpdate(b)});function g(){u.orderedModifiers.forEach(function(b){var k=b.name,w=b.options,E=w===void 0?{}:w,A=b.effect;if(typeof A=="function"){var M=A({state:u,name:k,instance:h,options:E}),R=function(){};l.push(M||R)}})}function m(){l.forEach(function(b){return b()}),l=[]}return h}}ZS();var Mle=[hW,mW,dW,aW];ZS({defaultModifiers:Mle});var $le=[hW,mW,dW,aW,mle,fle,vle,Yue,hle],i0t=ZS({defaultModifiers:$le});function qi(e,t){Tle(e)&&(e="100%");var r=Nle(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ny(e){return Math.min(1,Math.max(0,e))}function Tle(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Nle(e){return typeof e=="string"&&e.indexOf("%")!==-1}function bW(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function iy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function id(e){return e.length===1?"0"+e:String(e)}function Ole(e,t,r){return{r:qi(e,255)*255,g:qi(t,255)*255,b:qi(r,255)*255}}function Z$(e,t,r){e=qi(e,255),t=qi(t,255),r=qi(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s=0,o=0,a=(n+i)/2;if(n===i)o=0,s=0;else{var c=n-i;switch(o=a>.5?c/(2-n-i):c/(n+i),n){case e:s=(t-r)/c+(t<r?6:0);break;case t:s=(r-e)/c+2;break;case r:s=(e-t)/c+4;break}s/=6}return{h:s,s:o,l:a}}function P6(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function jle(e,t,r){var n,i,s;if(e=qi(e,360),t=qi(t,100),r=qi(r,100),t===0)i=r,s=r,n=r;else{var o=r<.5?r*(1+t):r+t-r*t,a=2*r-o;n=P6(a,o,e+1/3),i=P6(a,o,e),s=P6(a,o,e-1/3)}return{r:n*255,g:i*255,b:s*255}}function Y$(e,t,r){e=qi(e,255),t=qi(t,255),r=qi(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),s=0,o=n,a=n-i,c=n===0?0:a/n;if(n===i)s=0;else{switch(n){case e:s=(t-r)/a+(t<r?6:0);break;case t:s=(r-e)/a+2;break;case r:s=(e-t)/a+4;break}s/=6}return{h:s,s:c,v:o}}function Ple(e,t,r){e=qi(e,360)*6,t=qi(t,100),r=qi(r,100);var n=Math.floor(e),i=e-n,s=r*(1-t),o=r*(1-i*t),a=r*(1-(1-i)*t),c=n%6,u=[r,o,s,s,a,r][c],l=[a,r,r,o,s,s][c],d=[s,s,a,r,r,o][c];return{r:u*255,g:l*255,b:d*255}}function J$(e,t,r,n){var i=[id(Math.round(e).toString(16)),id(Math.round(t).toString(16)),id(Math.round(r).toString(16))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Dle(e,t,r,n,i){var s=[id(Math.round(e).toString(16)),id(Math.round(t).toString(16)),id(Math.round(r).toString(16)),id(Rle(n))];return i&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Rle(e){return Math.round(parseFloat(e)*255).toString(16)}function X$(e){return yo(e)/255}function yo(e){return parseInt(e,16)}function Lle(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Yx={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function zle(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,s=null,o=!1,a=!1;return typeof e=="string"&&(e=Ule(e)),typeof e=="object"&&(su(e.r)&&su(e.g)&&su(e.b)?(t=Ole(e.r,e.g,e.b),o=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):su(e.h)&&su(e.s)&&su(e.v)?(n=iy(e.s),i=iy(e.v),t=Ple(e.h,n,i),o=!0,a="hsv"):su(e.h)&&su(e.s)&&su(e.l)&&(n=iy(e.s),s=iy(e.l),t=jle(e.h,n,s),o=!0,a="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=bW(r),{ok:o,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var Ble="[-\\+]?\\d+%?",Fle="[-\\+]?\\d*\\.\\d+%?",Gl="(?:".concat(Fle,")|(?:").concat(Ble,")"),D6="[\\s|\\(]+(".concat(Gl,")[,|\\s]+(").concat(Gl,")[,|\\s]+(").concat(Gl,")\\s*\\)?"),R6="[\\s|\\(]+(".concat(Gl,")[,|\\s]+(").concat(Gl,")[,|\\s]+(").concat(Gl,")[,|\\s]+(").concat(Gl,")\\s*\\)?"),Ma={CSS_UNIT:new RegExp(Gl),rgb:new RegExp("rgb"+D6),rgba:new RegExp("rgba"+R6),hsl:new RegExp("hsl"+D6),hsla:new RegExp("hsla"+R6),hsv:new RegExp("hsv"+D6),hsva:new RegExp("hsva"+R6),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Ule(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Yx[e])e=Yx[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=Ma.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=Ma.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Ma.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=Ma.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Ma.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=Ma.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Ma.hex8.exec(e),r?{r:yo(r[1]),g:yo(r[2]),b:yo(r[3]),a:X$(r[4]),format:t?"name":"hex8"}:(r=Ma.hex6.exec(e),r?{r:yo(r[1]),g:yo(r[2]),b:yo(r[3]),format:t?"name":"hex"}:(r=Ma.hex4.exec(e),r?{r:yo(r[1]+r[1]),g:yo(r[2]+r[2]),b:yo(r[3]+r[3]),a:X$(r[4]+r[4]),format:t?"name":"hex8"}:(r=Ma.hex3.exec(e),r?{r:yo(r[1]+r[1]),g:yo(r[2]+r[2]),b:yo(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function su(e){return!!Ma.CSS_UNIT.exec(String(e))}var s0t=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=Lle(t)),this.originalInput=t;var i=zle(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,s=t.r/255,o=t.g/255,a=t.b/255;return s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=bW(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Y$(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Y$(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Z$(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Z$(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),J$(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Dle(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(qi(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(qi(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+J$(this.r,this.g,this.b,!1),r=0,n=Object.entries(Yx);r<n.length;r++){var i=n[r],s=i[0],o=i[1];if(t===o)return s}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,i=this.a<1&&this.a>=0,s=!r&&i&&(t.startsWith("hex")||t==="name");return s?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=ny(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=ny(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=ny(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=ny(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),s=r/100,o={r:(i.r-n.r)*s+n.r,g:(i.g-n.g)*s+n.g,b:(i.b-n.b)*s+n.b,a:(i.a-n.a)*s+n.a};return new e(o)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,s=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,s.push(new e(n));return s},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,s=r.v,o=[],a=1/t;t--;)o.push(new e({h:n,s:i,v:s})),s=(s+a)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],s=360/t,o=1;o<t;o++)i.push(new e({h:(n+o*s)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Js(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function F2(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sd.apply(this,arguments)}function qle(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_m(e,t)}function Jx(e){return Jx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jx(e)}function _m(e,t){return _m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},_m(e,t)}function Hle(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $w(e,t,r){return Hle()?$w=Reflect.construct.bind():$w=function(i,s,o){var a=[null];a.push.apply(a,s);var c=Function.bind.apply(i,a),u=new c;return o&&_m(u,o.prototype),u},$w.apply(null,arguments)}function Wle(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Xx(e){var t=typeof Map=="function"?new Map:void 0;return Xx=function(n){if(n===null||!Wle(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return $w(n,arguments,Jx(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_m(i,n)},Xx(e)}var Vle=/%[sdj%]/g,Kle=function(){};function Qx(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function Mo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0,s=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var o=e.replace(Vle,function(a){if(a==="%%")return"%";if(i>=s)return a;switch(a){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return a}});return o}return e}function Gle(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function ni(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Gle(t)&&typeof e=="string"&&!e)}function Zle(e,t,r){var n=[],i=0,s=e.length;function o(a){n.push.apply(n,a||[]),i++,i===s&&r(n)}e.forEach(function(a){t(a,o)})}function Q$(e,t,r){var n=0,i=e.length;function s(o){if(o&&o.length){r(o);return}var a=n;n=n+1,a<i?t(e[a],s):r([])}s([])}function Yle(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,e[r]||[])}),t}var eT=function(e){qle(t,e);function t(r,n){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=r,i.fields=n,i}return t}(Xx(Error));function Jle(e,t,r,n,i){if(t.first){var s=new Promise(function(h,g){var m=function(w){return n(w),w.length?g(new eT(w,Qx(w))):h(i)},b=Yle(e);Q$(b,r,m)});return s.catch(function(h){return h}),s}var o=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),c=a.length,u=0,l=[],d=new Promise(function(h,g){var m=function(k){if(l.push.apply(l,k),u++,u===c)return n(l),l.length?g(new eT(l,Qx(l))):h(i)};a.length||(n(l),h(i)),a.forEach(function(b){var k=e[b];o.indexOf(b)!==-1?Q$(k,r,m):Zle(k,r,m)})});return d.catch(function(h){return h}),d}function Xle(e){return!!(e&&e.message!==void 0)}function Qle(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function tT(e,t){return function(r){var n;return e.fullFields?n=Qle(t,e.fullFields):n=t[r.field||e.fullField],Xle(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function rT(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]=sd({},e[r],n):e[r]=n}}return e}var yW=function(t,r,n,i,s,o){t.required&&(!n.hasOwnProperty(t.field)||ni(r,o||t.type))&&i.push(Mo(s.messages.required,t.fullField))},efe=function(t,r,n,i,s){(/^\s+$/.test(r)||r==="")&&i.push(Mo(s.messages.whitespace,t.fullField))},sy,tfe=function(){if(sy)return sy;var e="[a-fA-F\\d:]",t=function(M){return M&&M.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",i=(`
2
2
  (?:
3
3
  (?:`+n+":){7}(?:"+n+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
4
4
  (?:`+n+":){6}(?:"+r+"|:"+n+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
@@ -632,14 +632,14 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
632
632
  * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
633
633
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
634
634
  * Copyright 2024 Fonticons, Inc.
635
- */const $0t={prefix:"fas",iconName:"info",icon:[192,512,[],"f129","M48 80a48 48 0 1 1 96 0A48 48 0 1 1 48 80zM0 224c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 224 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-192-32 0c-17.7 0-32-14.3-32-32z"]},T0t={prefix:"fas",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM112 256l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},N0t={prefix:"fas",iconName:"compass",icon:[512,512,[129517],"f14e","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm50.7-186.9L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},O0t={prefix:"fas",iconName:"laptop-code",icon:[640,512,[],"f5fc","M64 96c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 256-64 0 0-256L128 96l0 256-64 0L64 96zM0 403.2C0 392.6 8.6 384 19.2 384l601.6 0c10.6 0 19.2 8.6 19.2 19.2c0 42.4-34.4 76.8-76.8 76.8L76.8 480C34.4 480 0 445.6 0 403.2zM281 209l-31 31 31 31c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-48-48c-9.4-9.4-9.4-24.6 0-33.9l48-48c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM393 175l48 48c9.4 9.4 9.4 24.6 0 33.9l-48 48c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l31-31-31-31c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z"]},j0t={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},P0t={prefix:"fas",iconName:"film",icon:[512,512,[127902],"f008","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM48 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM48 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM48 112l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16L64 96c-8.8 0-16 7.2-16 16zM416 96c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM160 128l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32L192 96c-17.7 0-32 14.3-32 32zm32 160c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-128 0z"]},D0t={prefix:"fas",iconName:"arrow-right-from-bracket",icon:[512,512,["sign-out"],"f08b","M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"]},R0t={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"]},L0t={prefix:"fas",iconName:"money-bill",icon:[576,512,[],"f0d6","M64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64zm64 320l-64 0 0-64c35.3 0 64 28.7 64 64zM64 192l0-64 64 0c0 35.3-28.7 64-64 64zM448 384c0-35.3 28.7-64 64-64l0 64-64 0zm64-192c-35.3 0-64-28.7-64-64l64 0 0 64zM288 160a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},z0t={prefix:"fas",iconName:"wand-magic-sparkles",icon:[576,512,["magic-wand-sparkles"],"e2ca","M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z"]},B0t={prefix:"fas",iconName:"user",icon:[448,512,[128100,62144],"f007","M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z"]},F0t={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z"]},U0t={prefix:"fas",iconName:"location-arrow",icon:[448,512,[],"f124","M429.6 92.1c4.9-11.9 2.1-25.6-7-34.7s-22.8-11.9-34.7-7l-352 144c-14.2 5.8-22.2 20.8-19.3 35.8s16.1 25.8 31.4 25.8l176 0 0 176c0 15.3 10.8 28.4 25.8 31.4s30-5.1 35.8-19.3l144-352z"]},q0t={prefix:"fas",iconName:"fire",icon:[448,512,[128293],"f06d","M159.3 5.4c7.8-7.3 19.9-7.2 27.7 .1c27.6 25.9 53.5 53.8 77.7 84c11-14.4 23.5-30.1 37-42.9c7.9-7.4 20.1-7.4 28 .1c34.6 33 63.9 76.6 84.5 118c20.3 40.8 33.8 82.5 33.8 111.9C448 404.2 348.2 512 224 512C98.4 512 0 404.1 0 276.5c0-38.4 17.8-85.3 45.4-131.7C73.3 97.7 112.7 48.6 159.3 5.4zM225.7 416c25.3 0 47.7-7 68.8-21c42.1-29.4 53.4-88.2 28.1-134.4c-4.5-9-16-9.6-22.5-2l-25.2 29.3c-6.6 7.6-18.5 7.4-24.7-.5c-16.5-21-46-58.5-62.8-79.8c-6.3-8-18.3-8.1-24.7-.1c-33.8 42.5-50.8 69.3-50.8 99.4C112 375.4 162.6 416 225.7 416z"]},H0t={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},W0t={prefix:"fas",iconName:"microphone",icon:[384,512,[],"f130","M192 0C139 0 96 43 96 96l0 160c0 53 43 96 96 96s96-43 96-96l0-160c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40z"]},V0t={prefix:"fas",iconName:"rotate-left",icon:[512,512,["rotate-back","rotate-backward","undo-alt"],"f2ea","M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z"]},X2e={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},K0t=X2e,Q2e={prefix:"fas",iconName:"circle-stop",icon:[512,512,[62094,"stop-circle"],"f28d","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM192 160l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z"]},G0t=Q2e,Z0t={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},Y0t={prefix:"fas",iconName:"seedling",icon:[512,512,[127793,"sprout"],"f4d8","M512 32c0 113.6-84.6 207.5-194.2 222c-7.1-53.4-30.6-101.6-65.3-139.3C290.8 46.3 364 0 448 0l32 0c17.7 0 32 14.3 32 32zM0 96C0 78.3 14.3 64 32 64l32 0c123.7 0 224 100.3 224 224l0 32 0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-160C100.3 320 0 219.7 0 96z"]},J0t={prefix:"fas",iconName:"arrows-rotate",icon:[512,512,[128472,"refresh","sync"],"f021","M105.1 202.6c7.7-21.8 20.2-42.3 37.8-59.8c62.5-62.5 163.8-62.5 226.3 0L386.3 160 352 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l111.5 0c0 0 0 0 0 0l.4 0c17.7 0 32-14.3 32-32l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 35.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5zM39 289.3c-5 1.5-9.8 4.2-13.7 8.2c-4 4-6.7 8.8-8.1 14c-.3 1.2-.6 2.5-.8 3.8c-.3 1.7-.4 3.4-.4 5.1L16 432c0 17.7 14.3 32 32 32s32-14.3 32-32l0-35.1 17.6 17.5c0 0 0 0 0 0c87.5 87.4 229.3 87.4 316.7 0c24.4-24.4 42.1-53.1 52.9-83.8c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.5 62.5-163.8 62.5-226.3 0l-.1-.1L125.6 352l34.4 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48.4 288c-1.6 0-3.2 .1-4.8 .3s-3.1 .5-4.6 1z"]},X0t={prefix:"fas",iconName:"shield-halved",icon:[512,512,["shield-alt"],"f3ed","M256 0c4.6 0 9.2 1 13.4 2.9L457.7 82.8c22 9.3 38.4 31 38.3 57.2c-.5 99.2-41.3 280.7-213.6 363.2c-16.7 8-36.1 8-52.8 0C57.3 420.7 16.5 239.2 16 140c-.1-26.2 16.3-47.9 38.3-57.2L242.7 2.9C246.8 1 251.4 0 256 0zm0 66.8l0 378.1C394 378 431.1 230.1 432 141.4L256 66.8s0 0 0 0z"]},Q0t={prefix:"fas",iconName:"language",icon:[640,512,[],"f1ab","M0 128C0 92.7 28.7 64 64 64l192 0 48 0 16 0 256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64l-256 0-16 0-48 0L64 448c-35.3 0-64-28.7-64-64L0 128zm320 0l0 256 256 0 0-256-256 0zM178.3 175.9c-3.2-7.2-10.4-11.9-18.3-11.9s-15.1 4.7-18.3 11.9l-64 144c-4.5 10.1 .1 21.9 10.2 26.4s21.9-.1 26.4-10.2l8.9-20.1 73.6 0 8.9 20.1c4.5 10.1 16.3 14.6 26.4 10.2s14.6-16.3 10.2-26.4l-64-144zM160 233.2L179 276l-38 0 19-42.8zM448 164c11 0 20 9 20 20l0 4 44 0 16 0c11 0 20 9 20 20s-9 20-20 20l-2 0-1.6 4.5c-8.9 24.4-22.4 46.6-39.6 65.4c.9 .6 1.8 1.1 2.7 1.6l18.9 11.3c9.5 5.7 12.5 18 6.9 27.4s-18 12.5-27.4 6.9l-18.9-11.3c-4.5-2.7-8.8-5.5-13.1-8.5c-10.6 7.5-21.9 14-34 19.4l-3.6 1.6c-10.1 4.5-21.9-.1-26.4-10.2s.1-21.9 10.2-26.4l3.6-1.6c6.4-2.9 12.6-6.1 18.5-9.8l-12.2-12.2c-7.8-7.8-7.8-20.5 0-28.3s20.5-7.8 28.3 0l14.6 14.6 .5 .5c12.4-13.1 22.5-28.3 29.8-45L448 228l-72 0c-11 0-20-9-20-20s9-20 20-20l52 0 0-4c0-11 9-20 20-20z"]},ept={prefix:"fas",iconName:"question",icon:[320,512,[10067,10068,61736],"3f","M80 160c0-35.3 28.7-64 64-64l32 0c35.3 0 64 28.7 64 64l0 3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74l0 1.4c0 17.7 14.3 32 32 32s32-14.3 32-32l0-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7l0-3.6c0-70.7-57.3-128-128-128l-32 0C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},tpt={prefix:"fas",iconName:"cubes-stacked",icon:[448,512,[],"e4e6","M192 64l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32zM82.7 207c-15.3 8.8-20.5 28.4-11.7 43.7l32 55.4c8.8 15.3 28.4 20.5 43.7 11.7l55.4-32c15.3-8.8 20.5-28.4 11.7-43.7l-32-55.4c-8.8-15.3-28.4-20.5-43.7-11.7L82.7 207zM288 192c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0zm64 160c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0zM160 384l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32zM32 352c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0z"]},rpt={prefix:"fas",iconName:"cube",icon:[512,512,[],"f1b2","M234.5 5.7c13.9-5 29.1-5 43.1 0l192 68.6C495 83.4 512 107.5 512 134.6l0 242.9c0 27-17 51.2-42.5 60.3l-192 68.6c-13.9 5-29.1 5-43.1 0l-192-68.6C17 428.6 0 404.5 0 377.4L0 134.6c0-27 17-51.2 42.5-60.3l192-68.6zM256 66L82.3 128 256 190l173.7-62L256 66zm32 368.6l160-57.1 0-188L288 246.6l0 188z"]},npt={prefix:"fas",iconName:"wallet",icon:[512,512,[],"f555","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L80 128c-8.8 0-16-7.2-16-16s7.2-16 16-16l368 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32zM416 272a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},ipt={prefix:"fas",iconName:"plane-departure",icon:[640,512,[128747],"f5b0","M381 114.9L186.1 41.8c-16.7-6.2-35.2-5.3-51.1 2.7L89.1 67.4C78 73 77.2 88.5 87.6 95.2l146.9 94.5L136 240 77.8 214.1c-8.7-3.9-18.8-3.7-27.3 .6L18.3 230.8c-9.3 4.7-11.8 16.8-5 24.7l73.1 85.3c6.1 7.1 15 11.2 24.3 11.2l137.7 0c5 0 9.9-1.2 14.3-3.4L535.6 212.2c46.5-23.3 82.5-63.3 100.8-112C645.9 75 627.2 48 600.2 48l-57.4 0c-20.2 0-40.2 4.8-58.2 14L381 114.9zM0 480c0 17.7 14.3 32 32 32l576 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 448c-17.7 0-32 14.3-32 32z"]},spt={prefix:"fas",iconName:"diamond",icon:[512,512,[9830],"f219","M284.3 11.7c-15.6-15.6-40.9-15.6-56.6 0l-216 216c-15.6 15.6-15.6 40.9 0 56.6l216 216c15.6 15.6 40.9 15.6 56.6 0l216-216c15.6-15.6 15.6-40.9 0-56.6l-216-216z"]},opt={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"]},apt={prefix:"fas",iconName:"cubes",icon:[576,512,[],"f1b3","M290.8 48.6l78.4 29.7L288 109.5 206.8 78.3l78.4-29.7c1.8-.7 3.8-.7 5.7 0zM136 92.5l0 112.2c-1.3 .4-2.6 .8-3.9 1.3l-96 36.4C14.4 250.6 0 271.5 0 294.7L0 413.9c0 22.2 13.1 42.3 33.5 51.3l96 42.2c14.4 6.3 30.7 6.3 45.1 0L288 457.5l113.5 49.9c14.4 6.3 30.7 6.3 45.1 0l96-42.2c20.3-8.9 33.5-29.1 33.5-51.3l0-119.1c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-1.3-.5-2.6-.9-3.9-1.3l0-112.2c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-12.8-4.8-26.9-4.8-39.7 0l-96 36.4C150.4 48.4 136 69.3 136 92.5zM392 210.6l-82.4 31.2 0-89.2L392 121l0 89.6zM154.8 250.9l78.4 29.7L152 311.7 70.8 280.6l78.4-29.7c1.8-.7 3.8-.7 5.7 0zm18.8 204.4l0-100.5L256 323.2l0 95.9-82.4 36.2zM421.2 250.9c1.8-.7 3.8-.7 5.7 0l78.4 29.7L424 311.7l-81.2-31.1 78.4-29.7zM523.2 421.2l-77.6 34.1 0-100.5L528 323.2l0 90.7c0 3.2-1.9 6-4.8 7.3z"]},cpt={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},upt={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-128c0-17.7-14.3-32-32-32L352 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},lpt={prefix:"fas",iconName:"paperclip",icon:[448,512,[128206],"f0c6","M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z"]},fpt={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},ebe={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},dpt=ebe,hpt={prefix:"fas",iconName:"cart-shopping",icon:[576,512,[128722,"shopping-cart"],"f07a","M0 24C0 10.7 10.7 0 24 0L69.5 0c22 0 41.5 12.8 50.6 32l411 0c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3l-288.5 0 5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5L488 336c13.3 0 24 10.7 24 24s-10.7 24-24 24l-288.3 0c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5L24 48C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},ppt={prefix:"fas",iconName:"coins",icon:[512,512,[],"f51e","M512 80c0 18-14.3 34.6-38.4 48c-29.1 16.1-72.5 27.5-122.3 30.9c-3.7-1.8-7.4-3.5-11.3-5C300.6 137.4 248.2 128 192 128c-8.3 0-16.4 .2-24.5 .6l-1.1-.6C142.3 114.6 128 98 128 80c0-44.2 86-80 192-80S512 35.8 512 80zM160.7 161.1c10.2-.7 20.7-1.1 31.3-1.1c62.2 0 117.4 12.3 152.5 31.4C369.3 204.9 384 221.7 384 240c0 4-.7 7.9-2.1 11.7c-4.6 13.2-17 25.3-35 35.5c0 0 0 0 0 0c-.1 .1-.3 .1-.4 .2c0 0 0 0 0 0s0 0 0 0c-.3 .2-.6 .3-.9 .5c-35 19.4-90.8 32-153.6 32c-59.6 0-112.9-11.3-148.2-29.1c-1.9-.9-3.7-1.9-5.5-2.9C14.3 274.6 0 258 0 240c0-34.8 53.4-64.5 128-75.4c10.5-1.5 21.4-2.7 32.7-3.5zM416 240c0-21.9-10.6-39.9-24.1-53.4c28.3-4.4 54.2-11.4 76.2-20.5c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 19.3-16.5 37.1-43.8 50.9c-14.6 7.4-32.4 13.7-52.4 18.5c.1-1.8 .2-3.5 .2-5.3zm-32 96c0 18-14.3 34.6-38.4 48c-1.8 1-3.6 1.9-5.5 2.9C304.9 404.7 251.6 416 192 416c-62.8 0-118.6-12.6-153.6-32C14.3 370.6 0 354 0 336l0-35.4c12.5 10.3 27.6 18.7 43.9 25.5C83.4 342.6 135.8 352 192 352s108.6-9.4 148.1-25.9c7.8-3.2 15.3-6.9 22.4-10.9c6.1-3.4 11.8-7.2 17.2-11.2c1.5-1.1 2.9-2.3 4.3-3.4l0 3.4 0 5.7 0 26.3zm32 0l0-32 0-25.9c19-4.2 36.5-9.5 52.1-16c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 10.5-5 21-14.9 30.9c-16.3 16.3-45 29.7-81.3 38.4c.1-1.7 .2-3.5 .2-5.3zM192 448c56.2 0 108.6-9.4 148.1-25.9c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 44.2-86 80-192 80S0 476.2 0 432l0-35.4c12.5 10.3 27.6 18.7 43.9 25.5C83.4 438.6 135.8 448 192 448z"]},gpt={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},mpt={prefix:"fas",iconName:"id-card",icon:[576,512,[62147,"drivers-license"],"f2c2","M0 96l576 0c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96zm0 32L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-288L0 128zM64 405.3c0-29.5 23.9-53.3 53.3-53.3l117.3 0c29.5 0 53.3 23.9 53.3 53.3c0 5.9-4.8 10.7-10.7 10.7L74.7 416c-5.9 0-10.7-4.8-10.7-10.7zM176 192a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm176 16c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16z"]},bpt={prefix:"fas",iconName:"outdent",icon:[448,512,["dedent"],"f03b","M0 64C0 46.3 14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64zM192 192c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 96l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32zM.2 268.6c-8.2-6.4-8.2-18.9 0-25.3l101.9-79.3c10.5-8.2 25.8-.7 25.8 12.6l0 158.6c0 13.3-15.3 20.8-25.8 12.6L.2 268.6z"]},ypt={prefix:"fas",iconName:"rotate-right",icon:[512,512,["redo-alt","rotate-forward"],"f2f9","M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z"]},wpt={prefix:"fas",iconName:"stop",icon:[384,512,[9209],"f04d","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"]},vpt={prefix:"fas",iconName:"upload",icon:[512,512,[],"f093","M288 109.3L288 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-242.7-73.4 73.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0l128 128c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L288 109.3zM64 352l128 0c0 35.3 28.7 64 64 64s64-28.7 64-64l128 0c35.3 0 64 28.7 64 64l0 32c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64l0-32c0-35.3 28.7-64 64-64zM432 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"]},_pt={prefix:"fas",iconName:"bolt",icon:[448,512,[9889,"zap"],"f0e7","M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z"]},xpt={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},Ept={prefix:"fas",iconName:"ellipsis",icon:[448,512,["ellipsis-h"],"f141","M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"]},kpt={prefix:"fas",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416l384 0c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8l0-18.8c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"]},Apt={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},Spt={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},Cpt={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},Ipt={prefix:"fas",iconName:"user-shield",icon:[640,512,[],"f505","M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c1.8 0 3.5-.2 5.3-.5c-76.3-55.1-99.8-141-103.1-200.2c-16.1-4.8-33.1-7.3-50.7-7.3l-91.4 0zm308.8-78.3l-120 48C358 277.4 352 286.2 352 296c0 63.3 25.9 168.8 134.8 214.2c5.9 2.5 12.6 2.5 18.5 0C614.1 464.8 640 359.3 640 296c0-9.8-6-18.6-15.1-22.3l-120-48c-5.7-2.3-12.1-2.3-17.8 0zM591.4 312c-3.9 50.7-27.2 116.7-95.4 149.7l0-187.8L591.4 312z"]},Mpt={prefix:"fas",iconName:"wind",icon:[512,512,[],"f72e","M288 32c0 17.7 14.3 32 32 32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l320 0c53 0 96-43 96-96s-43-96-96-96L320 0c-17.7 0-32 14.3-32 32zm64 352c0 17.7 14.3 32 32 32l32 0c53 0 96-43 96-96s-43-96-96-96L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32zM128 512l32 0c53 0 96-43 96-96s-43-96-96-96L32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},$pt={prefix:"fas",iconName:"clapperboard",icon:[512,512,[],"e131","M448 32l-86.1 0-1 1-127 127 92.1 0 1-1L453.8 32.3c-1.9-.2-3.8-.3-5.8-.3zm64 128l0-64c0-15.1-5.3-29.1-14-40l-104 104L512 160zM294.1 32l-92.1 0-1 1L73.9 160l92.1 0 1-1 127-127zM64 32C28.7 32 0 60.7 0 96l0 64 6.1 0 1-1 127-127L64 32zM512 192L0 192 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224z"]},Tpt={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},Npt={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},Opt={prefix:"fas",iconName:"store",icon:[576,512,[],"f54e","M547.6 103.8L490.3 13.1C485.2 5 476.1 0 466.4 0L109.6 0C99.9 0 90.8 5 85.7 13.1L28.3 103.8c-29.6 46.8-3.4 111.9 51.9 119.4c4 .5 8.1 .8 12.1 .8c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.2 0 49.3-11.4 65.2-29c16 17.6 39.1 29 65.2 29c4.1 0 8.1-.3 12.1-.8c55.5-7.4 81.8-72.5 52.1-119.4zM499.7 254.9c0 0 0 0-.1 0c-5.3 .7-10.7 1.1-16.2 1.1c-12.4 0-24.3-1.9-35.4-5.3L448 384l-320 0 0-133.4c-11.2 3.5-23.2 5.4-35.6 5.4c-5.5 0-11-.4-16.3-1.1l-.1 0c-4.1-.6-8.1-1.3-12-2.3L64 384l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64 0-131.4c-4 1-8 1.8-12.3 2.3z"]},jpt={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},Ppt={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},Dpt={prefix:"fas",iconName:"percent",icon:[384,512,[62101,62785,"percentage"],"25","M374.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-320 320c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l320-320zM128 128A64 64 0 1 0 0 128a64 64 0 1 0 128 0zM384 384a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z"]},Rpt={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 96l0 64 64 0 0-64L64 96zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zm64 16l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm80 64l-64 0 0 64 64 0 0-64zM256 304c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16l0 96c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-160zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},Lpt={prefix:"fas",iconName:"pen-nib",icon:[512,512,[10001],"f5ad","M368.4 18.3L312.7 74.1 437.9 199.3l55.7-55.7c21.9-21.9 21.9-57.3 0-79.2L447.6 18.3c-21.9-21.9-57.3-21.9-79.2 0zM288 94.6l-9.2 2.8L134.7 140.6c-19.9 6-35.7 21.2-42.3 41L3.8 445.8c-3.8 11.3-1 23.9 7.3 32.4L164.7 324.7c-3-6.3-4.7-13.3-4.7-20.7c0-26.5 21.5-48 48-48s48 21.5 48 48s-21.5 48-48 48c-7.4 0-14.4-1.7-20.7-4.7L33.7 500.9c8.6 8.3 21.1 11.2 32.4 7.3l264.3-88.6c19.7-6.6 35-22.4 41-42.3l43.2-144.1 2.7-9.2L288 94.6z"]},tbe={prefix:"fas",iconName:"wand-magic",icon:[512,512,["magic"],"f0d0","M14.1 463.3c-18.7-18.7-18.7-49.1 0-67.9L395.4 14.1c18.7-18.7 49.1-18.7 67.9 0l34.6 34.6c18.7 18.7 18.7 49.1 0 67.9L116.5 497.9c-18.7 18.7-49.1 18.7-67.9 0L14.1 463.3zM347.6 187.6l105-105L429.4 59.3l-105 105 23.3 23.3z"]},zpt=tbe,Bpt={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},Fpt={prefix:"fas",iconName:"music",icon:[512,512,[127925],"f001","M499.1 6.3c8.1 6 12.9 15.6 12.9 25.7l0 72 0 264c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L448 147 192 223.8 192 432c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L128 200l0-72c0-14.1 9.3-26.6 22.8-30.7l320-96c9.7-2.9 20.2-1.1 28.3 5z"]},Upt={prefix:"fas",iconName:"hashtag",icon:[448,512,[62098],"23","M181.3 32.4c17.4 2.9 29.2 19.4 26.3 36.8L197.8 128l95.1 0 11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3s29.2 19.4 26.3 36.8L357.8 128l58.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-68.9 0L325.8 320l58.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-68.9 0-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8l9.8-58.7-95.1 0-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8L90.2 384 32 384c-17.7 0-32-14.3-32-32s14.3-32 32-32l68.9 0 21.3-128L64 192c-17.7 0-32-14.3-32-32s14.3-32 32-32l68.9 0 11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3zM187.1 192L165.8 320l95.1 0 21.3-128-95.1 0z"]},qpt={prefix:"fas",iconName:"fan",icon:[512,512,[],"f863","M258.6 0c-1.7 0-3.4 .1-5.1 .5C168 17 115.6 102.3 130.5 189.3c2.9 17 8.4 32.9 15.9 47.4L32 224l-2.6 0C13.2 224 0 237.2 0 253.4c0 1.7 .1 3.4 .5 5.1C17 344 102.3 396.4 189.3 381.5c17-2.9 32.9-8.4 47.4-15.9L224 480l0 2.6c0 16.2 13.2 29.4 29.4 29.4c1.7 0 3.4-.1 5.1-.5C344 495 396.4 409.7 381.5 322.7c-2.9-17-8.4-32.9-15.9-47.4L480 288l2.6 0c16.2 0 29.4-13.2 29.4-29.4c0-1.7-.1-3.4-.5-5.1C495 168 409.7 115.6 322.7 130.5c-17 2.9-32.9 8.4-47.4 15.9L288 32l0-2.6C288 13.2 274.8 0 258.6 0zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},Hpt={prefix:"fas",iconName:"book",icon:[448,512,[128212],"f02d","M96 0C43 0 0 43 0 96L0 416c0 53 43 96 96 96l288 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-64c17.7 0 32-14.3 32-32l0-320c0-17.7-14.3-32-32-32L384 0 96 0zm0 384l256 0 0 64L96 448c-17.7 0-32-14.3-32-32s14.3-32 32-32zm32-240c0-8.8 7.2-16 16-16l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16zm16 48l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},Wpt={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},Vpt={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},Kpt={prefix:"fas",iconName:"mug-saucer",icon:[640,512,["coffee"],"f0f4","M96 64c0-17.7 14.3-32 32-32l320 0 64 0c70.7 0 128 57.3 128 128s-57.3 128-128 128l-32 0c0 53-43 96-96 96l-192 0c-53 0-96-43-96-96L96 64zM480 224l32 0c35.3 0 64-28.7 64-64s-28.7-64-64-64l-32 0 0 128zM32 416l512 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]};var w8={exports:{}},nj;function rbe(){return nj||(nj=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function s(c,u,l,d,h){if(typeof l!="function")throw new TypeError("The listener must be a function");var g=new i(l,d||c,h),m=r?r+u:u;return c._events[m]?c._events[m].fn?c._events[m]=[c._events[m],g]:c._events[m].push(g):(c._events[m]=g,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],l,d;if(this._eventsCount===0)return u;for(d in l=this._events)t.call(l,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},a.prototype.listeners=function(u){var l=r?r+u:u,d=this._events[l];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,g=d.length,m=new Array(g);h<g;h++)m[h]=d[h].fn;return m},a.prototype.listenerCount=function(u){var l=r?r+u:u,d=this._events[l];return d?d.fn?1:d.length:0},a.prototype.emit=function(u,l,d,h,g,m){var b=r?r+u:u;if(!this._events[b])return!1;var k=this._events[b],w=arguments.length,E,A;if(k.fn){switch(k.once&&this.removeListener(u,k.fn,void 0,!0),w){case 1:return k.fn.call(k.context),!0;case 2:return k.fn.call(k.context,l),!0;case 3:return k.fn.call(k.context,l,d),!0;case 4:return k.fn.call(k.context,l,d,h),!0;case 5:return k.fn.call(k.context,l,d,h,g),!0;case 6:return k.fn.call(k.context,l,d,h,g,m),!0}for(A=1,E=new Array(w-1);A<w;A++)E[A-1]=arguments[A];k.fn.apply(k.context,E)}else{var M=k.length,R;for(A=0;A<M;A++)switch(k[A].once&&this.removeListener(u,k[A].fn,void 0,!0),w){case 1:k[A].fn.call(k[A].context);break;case 2:k[A].fn.call(k[A].context,l);break;case 3:k[A].fn.call(k[A].context,l,d);break;case 4:k[A].fn.call(k[A].context,l,d,h);break;default:if(!E)for(R=1,E=new Array(w-1);R<w;R++)E[R-1]=arguments[R];k[A].fn.apply(k[A].context,E)}}return!0},a.prototype.on=function(u,l,d){return s(this,u,l,d,!1)},a.prototype.once=function(u,l,d){return s(this,u,l,d,!0)},a.prototype.removeListener=function(u,l,d,h){var g=r?r+u:u;if(!this._events[g])return this;if(!l)return o(this,g),this;var m=this._events[g];if(m.fn)m.fn===l&&(!h||m.once)&&(!d||m.context===d)&&o(this,g);else{for(var b=0,k=[],w=m.length;b<w;b++)(m[b].fn!==l||h&&!m[b].once||d&&m[b].context!==d)&&k.push(m[b]);k.length?this._events[g]=k.length===1?k[0]:k:o(this,g)}return this},a.prototype.removeAllListeners=function(u){var l;return u?(l=r?r+u:u,this._events[l]&&o(this,l)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a}(w8)),w8.exports}var nbe=rbe();const G2=Js(nbe);class Wn extends Error{constructor(t,r){super(t),this.error=r}}class Rc extends Wn{constructor(){super(...arguments),this.name="WalletNotReadyError"}}class ibe extends Wn{constructor(){super(...arguments),this.name="WalletLoadError"}}class Q0 extends Wn{constructor(){super(...arguments),this.name="WalletConfigError"}}class Nc extends Wn{constructor(){super(...arguments),this.name="WalletConnectionError"}}class Z2 extends Wn{constructor(){super(...arguments),this.name="WalletDisconnectedError"}}class p4 extends Wn{constructor(){super(...arguments),this.name="WalletDisconnectionError"}}class Yl extends Wn{constructor(){super(...arguments),this.name="WalletAccountError"}}class jd extends Wn{constructor(){super(...arguments),this.name="WalletPublicKeyError"}}class Ur extends Wn{constructor(){super(...arguments),this.name="WalletNotConnectedError"}}class zu extends Wn{constructor(){super(...arguments),this.name="WalletSendTransactionError"}}class Ui extends Wn{constructor(){super(...arguments),this.name="WalletSignTransactionError"}}class Y2 extends Wn{constructor(){super(...arguments),this.name="WalletSignMessageError"}}class ij extends Wn{constructor(){super(...arguments),this.name="WalletSignInError"}}class sbe extends Wn{constructor(){super(...arguments),this.name="WalletWindowClosedError"}}var jt;(function(e){e.Installed="Installed",e.NotDetected="NotDetected",e.Loadable="Loadable",e.Unsupported="Unsupported"})(jt||(jt={}));class SK extends G2{get connected(){return!!this.publicKey}async autoConnect(){await this.connect()}async prepareTransaction(t,r,n={}){const i=this.publicKey;if(!i)throw new Ur;return t.feePayer=t.feePayer||i,t.recentBlockhash=t.recentBlockhash||(await r.getLatestBlockhash({commitment:n.preflightCommitment,minContextSlot:n.minContextSlot})).blockhash,t}}function $C(e){if(typeof window>"u"||typeof document>"u")return;const t=[];function r(){if(e())for(const s of t)s()}const n=setInterval(r,1e3);t.push(()=>clearInterval(n)),document.readyState==="loading"&&(document.addEventListener("DOMContentLoaded",r,{once:!0}),t.push(()=>document.removeEventListener("DOMContentLoaded",r))),document.readyState!=="complete"&&(window.addEventListener("load",r,{once:!0}),t.push(()=>window.removeEventListener("load",r))),r()}function UE(){if(!navigator)return!1;const e=navigator.userAgent.toLowerCase(),t=e.includes("iphone")||e.includes("ipad"),r=e.includes("safari");return t&&r}function Ba(e){return"version"in e}class CK extends SK{async sendTransaction(t,r,n={}){let i=!0;try{if(Ba(t)){if(!this.supportedTransactionVersions)throw new zu("Sending versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(t.version))throw new zu(`Sending transaction version ${t.version} isn't supported by this wallet`);try{t=await this.signTransaction(t);const s=t.serialize();return await r.sendRawTransaction(s,n)}catch(s){throw s instanceof Ui?(i=!1,s):new zu(s?.message,s)}}else try{const{signers:s,...o}=n;t=await this.prepareTransaction(t,r,o),s?.length&&t.partialSign(...s),t=await this.signTransaction(t);const a=t.serialize();return await r.sendRawTransaction(a,o)}catch(s){throw s instanceof Ui?(i=!1,s):new zu(s?.message,s)}}catch(s){throw i&&this.emit("error",s),s}}async signAllTransactions(t){for(const n of t)if(Ba(n)){if(!this.supportedTransactionVersions)throw new Ui("Signing versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(n.version))throw new Ui(`Signing transaction version ${n.version} isn't supported by this wallet`)}const r=[];for(const n of t)r.push(await this.signTransaction(n));return r}}class g4 extends CK{}class obe extends g4{}const TC="solana:signAndSendTransaction",IK="solana:signMessage",NC="solana:signTransaction",MK="standard:connect",abe="standard:disconnect",$K="standard:events";function cbe(e){return MK in e.features&&$K in e.features&&(TC in e.features||NC in e.features)}var qE;(function(e){e.Mainnet="mainnet-beta",e.Testnet="testnet",e.Devnet="devnet"})(qE||(qE={}));var v8={},H1={},sj;function ube(){if(sj)return H1;sj=1,H1.byteLength=a,H1.toByteArray=u,H1.fromByteArray=h;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=n.length;i<s;++i)e[i]=n[i],t[n.charCodeAt(i)]=i;t[45]=62,t[95]=63;function o(g){var m=g.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=g.indexOf("=");b===-1&&(b=m);var k=b===m?0:4-b%4;return[b,k]}function a(g){var m=o(g),b=m[0],k=m[1];return(b+k)*3/4-k}function c(g,m,b){return(m+b)*3/4-b}function u(g){var m,b=o(g),k=b[0],w=b[1],E=new r(c(g,k,w)),A=0,M=w>0?k-4:k,R;for(R=0;R<M;R+=4)m=t[g.charCodeAt(R)]<<18|t[g.charCodeAt(R+1)]<<12|t[g.charCodeAt(R+2)]<<6|t[g.charCodeAt(R+3)],E[A++]=m>>16&255,E[A++]=m>>8&255,E[A++]=m&255;return w===2&&(m=t[g.charCodeAt(R)]<<2|t[g.charCodeAt(R+1)]>>4,E[A++]=m&255),w===1&&(m=t[g.charCodeAt(R)]<<10|t[g.charCodeAt(R+1)]<<4|t[g.charCodeAt(R+2)]>>2,E[A++]=m>>8&255,E[A++]=m&255),E}function l(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function d(g,m,b){for(var k,w=[],E=m;E<b;E+=3)k=(g[E]<<16&16711680)+(g[E+1]<<8&65280)+(g[E+2]&255),w.push(l(k));return w.join("")}function h(g){for(var m,b=g.length,k=b%3,w=[],E=16383,A=0,M=b-k;A<M;A+=E)w.push(d(g,A,A+E>M?M:A+E));return k===1?(m=g[b-1],w.push(e[m>>2]+e[m<<4&63]+"==")):k===2&&(m=(g[b-2]<<8)+g[b-1],w.push(e[m>>10]+e[m>>4&63]+e[m<<2&63]+"=")),w.join("")}return H1}var gy={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var oj;function lbe(){return oj||(oj=1,gy.read=function(e,t,r,n,i){var s,o,a=i*8-n-1,c=(1<<a)-1,u=c>>1,l=-7,d=r?i-1:0,h=r?-1:1,g=e[t+d];for(d+=h,s=g&(1<<-l)-1,g>>=-l,l+=a;l>0;s=s*256+e[t+d],d+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=o*256+e[t+d],d+=h,l-=8);if(s===0)s=1-u;else{if(s===c)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-u}return(g?-1:1)*o*Math.pow(2,s-n)},gy.write=function(e,t,r,n,i,s){var o,a,c,u=s*8-i-1,l=(1<<u)-1,d=l>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,m=n?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+d>=1?t+=h/c:t+=h*Math.pow(2,1-d),t*c>=2&&(o++,c/=2),o+d>=l?(a=0,o=l):o+d>=1?(a=(t*c-1)*Math.pow(2,i),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+g]=a&255,g+=m,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[r+g]=o&255,g+=m,o/=256,u-=8);e[r+g-m]|=b*128}),gy}/*!
635
+ */const $0t={prefix:"fas",iconName:"info",icon:[192,512,[],"f129","M48 80a48 48 0 1 1 96 0A48 48 0 1 1 48 80zM0 224c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 224 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-192-32 0c-17.7 0-32-14.3-32-32z"]},T0t={prefix:"fas",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM112 256l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},N0t={prefix:"fas",iconName:"compass",icon:[512,512,[129517],"f14e","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm50.7-186.9L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},O0t={prefix:"fas",iconName:"laptop-code",icon:[640,512,[],"f5fc","M64 96c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 256-64 0 0-256L128 96l0 256-64 0L64 96zM0 403.2C0 392.6 8.6 384 19.2 384l601.6 0c10.6 0 19.2 8.6 19.2 19.2c0 42.4-34.4 76.8-76.8 76.8L76.8 480C34.4 480 0 445.6 0 403.2zM281 209l-31 31 31 31c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-48-48c-9.4-9.4-9.4-24.6 0-33.9l48-48c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM393 175l48 48c9.4 9.4 9.4 24.6 0 33.9l-48 48c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l31-31-31-31c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z"]},j0t={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},P0t={prefix:"fas",iconName:"film",icon:[512,512,[127902],"f008","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM48 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM48 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm368-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM48 112l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16L64 96c-8.8 0-16 7.2-16 16zM416 96c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM160 128l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32L192 96c-17.7 0-32 14.3-32 32zm32 160c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-128 0z"]},D0t={prefix:"fas",iconName:"arrow-right-from-bracket",icon:[512,512,["sign-out"],"f08b","M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"]},R0t={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"]},L0t={prefix:"fas",iconName:"money-bill",icon:[576,512,[],"f0d6","M64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64zm64 320l-64 0 0-64c35.3 0 64 28.7 64 64zM64 192l0-64 64 0c0 35.3-28.7 64-64 64zM448 384c0-35.3 28.7-64 64-64l0 64-64 0zm64-192c-35.3 0-64-28.7-64-64l64 0 0 64zM288 160a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},z0t={prefix:"fas",iconName:"wand-magic-sparkles",icon:[576,512,["magic-wand-sparkles"],"e2ca","M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z"]},B0t={prefix:"fas",iconName:"user",icon:[448,512,[128100,62144],"f007","M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z"]},F0t={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z"]},U0t={prefix:"fas",iconName:"location-arrow",icon:[448,512,[],"f124","M429.6 92.1c4.9-11.9 2.1-25.6-7-34.7s-22.8-11.9-34.7-7l-352 144c-14.2 5.8-22.2 20.8-19.3 35.8s16.1 25.8 31.4 25.8l176 0 0 176c0 15.3 10.8 28.4 25.8 31.4s30-5.1 35.8-19.3l144-352z"]},q0t={prefix:"fas",iconName:"fire",icon:[448,512,[128293],"f06d","M159.3 5.4c7.8-7.3 19.9-7.2 27.7 .1c27.6 25.9 53.5 53.8 77.7 84c11-14.4 23.5-30.1 37-42.9c7.9-7.4 20.1-7.4 28 .1c34.6 33 63.9 76.6 84.5 118c20.3 40.8 33.8 82.5 33.8 111.9C448 404.2 348.2 512 224 512C98.4 512 0 404.1 0 276.5c0-38.4 17.8-85.3 45.4-131.7C73.3 97.7 112.7 48.6 159.3 5.4zM225.7 416c25.3 0 47.7-7 68.8-21c42.1-29.4 53.4-88.2 28.1-134.4c-4.5-9-16-9.6-22.5-2l-25.2 29.3c-6.6 7.6-18.5 7.4-24.7-.5c-16.5-21-46-58.5-62.8-79.8c-6.3-8-18.3-8.1-24.7-.1c-33.8 42.5-50.8 69.3-50.8 99.4C112 375.4 162.6 416 225.7 416z"]},H0t={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},W0t={prefix:"fas",iconName:"microphone",icon:[384,512,[],"f130","M192 0C139 0 96 43 96 96l0 160c0 53 43 96 96 96s96-43 96-96l0-160c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40z"]},V0t={prefix:"fas",iconName:"rotate-left",icon:[512,512,["rotate-back","rotate-backward","undo-alt"],"f2ea","M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z"]},X2e={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},K0t=X2e,Q2e={prefix:"fas",iconName:"circle-stop",icon:[512,512,[62094,"stop-circle"],"f28d","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM192 160l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z"]},G0t=Q2e,Z0t={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},Y0t={prefix:"fas",iconName:"seedling",icon:[512,512,[127793,"sprout"],"f4d8","M512 32c0 113.6-84.6 207.5-194.2 222c-7.1-53.4-30.6-101.6-65.3-139.3C290.8 46.3 364 0 448 0l32 0c17.7 0 32 14.3 32 32zM0 96C0 78.3 14.3 64 32 64l32 0c123.7 0 224 100.3 224 224l0 32 0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-160C100.3 320 0 219.7 0 96z"]},J0t={prefix:"fas",iconName:"arrows-rotate",icon:[512,512,[128472,"refresh","sync"],"f021","M105.1 202.6c7.7-21.8 20.2-42.3 37.8-59.8c62.5-62.5 163.8-62.5 226.3 0L386.3 160 352 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l111.5 0c0 0 0 0 0 0l.4 0c17.7 0 32-14.3 32-32l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 35.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5zM39 289.3c-5 1.5-9.8 4.2-13.7 8.2c-4 4-6.7 8.8-8.1 14c-.3 1.2-.6 2.5-.8 3.8c-.3 1.7-.4 3.4-.4 5.1L16 432c0 17.7 14.3 32 32 32s32-14.3 32-32l0-35.1 17.6 17.5c0 0 0 0 0 0c87.5 87.4 229.3 87.4 316.7 0c24.4-24.4 42.1-53.1 52.9-83.8c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.5 62.5-163.8 62.5-226.3 0l-.1-.1L125.6 352l34.4 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48.4 288c-1.6 0-3.2 .1-4.8 .3s-3.1 .5-4.6 1z"]},X0t={prefix:"fas",iconName:"shield-halved",icon:[512,512,["shield-alt"],"f3ed","M256 0c4.6 0 9.2 1 13.4 2.9L457.7 82.8c22 9.3 38.4 31 38.3 57.2c-.5 99.2-41.3 280.7-213.6 363.2c-16.7 8-36.1 8-52.8 0C57.3 420.7 16.5 239.2 16 140c-.1-26.2 16.3-47.9 38.3-57.2L242.7 2.9C246.8 1 251.4 0 256 0zm0 66.8l0 378.1C394 378 431.1 230.1 432 141.4L256 66.8s0 0 0 0z"]},Q0t={prefix:"fas",iconName:"language",icon:[640,512,[],"f1ab","M0 128C0 92.7 28.7 64 64 64l192 0 48 0 16 0 256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64l-256 0-16 0-48 0L64 448c-35.3 0-64-28.7-64-64L0 128zm320 0l0 256 256 0 0-256-256 0zM178.3 175.9c-3.2-7.2-10.4-11.9-18.3-11.9s-15.1 4.7-18.3 11.9l-64 144c-4.5 10.1 .1 21.9 10.2 26.4s21.9-.1 26.4-10.2l8.9-20.1 73.6 0 8.9 20.1c4.5 10.1 16.3 14.6 26.4 10.2s14.6-16.3 10.2-26.4l-64-144zM160 233.2L179 276l-38 0 19-42.8zM448 164c11 0 20 9 20 20l0 4 44 0 16 0c11 0 20 9 20 20s-9 20-20 20l-2 0-1.6 4.5c-8.9 24.4-22.4 46.6-39.6 65.4c.9 .6 1.8 1.1 2.7 1.6l18.9 11.3c9.5 5.7 12.5 18 6.9 27.4s-18 12.5-27.4 6.9l-18.9-11.3c-4.5-2.7-8.8-5.5-13.1-8.5c-10.6 7.5-21.9 14-34 19.4l-3.6 1.6c-10.1 4.5-21.9-.1-26.4-10.2s.1-21.9 10.2-26.4l3.6-1.6c6.4-2.9 12.6-6.1 18.5-9.8l-12.2-12.2c-7.8-7.8-7.8-20.5 0-28.3s20.5-7.8 28.3 0l14.6 14.6 .5 .5c12.4-13.1 22.5-28.3 29.8-45L448 228l-72 0c-11 0-20-9-20-20s9-20 20-20l52 0 0-4c0-11 9-20 20-20z"]},ept={prefix:"fas",iconName:"question",icon:[320,512,[10067,10068,61736],"3f","M80 160c0-35.3 28.7-64 64-64l32 0c35.3 0 64 28.7 64 64l0 3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74l0 1.4c0 17.7 14.3 32 32 32s32-14.3 32-32l0-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7l0-3.6c0-70.7-57.3-128-128-128l-32 0C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},tpt={prefix:"fas",iconName:"cubes-stacked",icon:[448,512,[],"e4e6","M192 64l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32zM82.7 207c-15.3 8.8-20.5 28.4-11.7 43.7l32 55.4c8.8 15.3 28.4 20.5 43.7 11.7l55.4-32c15.3-8.8 20.5-28.4 11.7-43.7l-32-55.4c-8.8-15.3-28.4-20.5-43.7-11.7L82.7 207zM288 192c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0zm64 160c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0zM160 384l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32zM32 352c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0z"]},rpt={prefix:"fas",iconName:"chart-line",icon:[512,512,["line-chart"],"f201","M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"]},npt={prefix:"fas",iconName:"cube",icon:[512,512,[],"f1b2","M234.5 5.7c13.9-5 29.1-5 43.1 0l192 68.6C495 83.4 512 107.5 512 134.6l0 242.9c0 27-17 51.2-42.5 60.3l-192 68.6c-13.9 5-29.1 5-43.1 0l-192-68.6C17 428.6 0 404.5 0 377.4L0 134.6c0-27 17-51.2 42.5-60.3l192-68.6zM256 66L82.3 128 256 190l173.7-62L256 66zm32 368.6l160-57.1 0-188L288 246.6l0 188z"]},ipt={prefix:"fas",iconName:"wallet",icon:[512,512,[],"f555","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L80 128c-8.8 0-16-7.2-16-16s7.2-16 16-16l368 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32zM416 272a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},spt={prefix:"fas",iconName:"plane-departure",icon:[640,512,[128747],"f5b0","M381 114.9L186.1 41.8c-16.7-6.2-35.2-5.3-51.1 2.7L89.1 67.4C78 73 77.2 88.5 87.6 95.2l146.9 94.5L136 240 77.8 214.1c-8.7-3.9-18.8-3.7-27.3 .6L18.3 230.8c-9.3 4.7-11.8 16.8-5 24.7l73.1 85.3c6.1 7.1 15 11.2 24.3 11.2l137.7 0c5 0 9.9-1.2 14.3-3.4L535.6 212.2c46.5-23.3 82.5-63.3 100.8-112C645.9 75 627.2 48 600.2 48l-57.4 0c-20.2 0-40.2 4.8-58.2 14L381 114.9zM0 480c0 17.7 14.3 32 32 32l576 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 448c-17.7 0-32 14.3-32 32z"]},opt={prefix:"fas",iconName:"diamond",icon:[512,512,[9830],"f219","M284.3 11.7c-15.6-15.6-40.9-15.6-56.6 0l-216 216c-15.6 15.6-15.6 40.9 0 56.6l216 216c15.6 15.6 40.9 15.6 56.6 0l216-216c15.6-15.6 15.6-40.9 0-56.6l-216-216z"]},apt={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"]},cpt={prefix:"fas",iconName:"cubes",icon:[576,512,[],"f1b3","M290.8 48.6l78.4 29.7L288 109.5 206.8 78.3l78.4-29.7c1.8-.7 3.8-.7 5.7 0zM136 92.5l0 112.2c-1.3 .4-2.6 .8-3.9 1.3l-96 36.4C14.4 250.6 0 271.5 0 294.7L0 413.9c0 22.2 13.1 42.3 33.5 51.3l96 42.2c14.4 6.3 30.7 6.3 45.1 0L288 457.5l113.5 49.9c14.4 6.3 30.7 6.3 45.1 0l96-42.2c20.3-8.9 33.5-29.1 33.5-51.3l0-119.1c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-1.3-.5-2.6-.9-3.9-1.3l0-112.2c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-12.8-4.8-26.9-4.8-39.7 0l-96 36.4C150.4 48.4 136 69.3 136 92.5zM392 210.6l-82.4 31.2 0-89.2L392 121l0 89.6zM154.8 250.9l78.4 29.7L152 311.7 70.8 280.6l78.4-29.7c1.8-.7 3.8-.7 5.7 0zm18.8 204.4l0-100.5L256 323.2l0 95.9-82.4 36.2zM421.2 250.9c1.8-.7 3.8-.7 5.7 0l78.4 29.7L424 311.7l-81.2-31.1 78.4-29.7zM523.2 421.2l-77.6 34.1 0-100.5L528 323.2l0 90.7c0 3.2-1.9 6-4.8 7.3z"]},upt={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},lpt={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-128c0-17.7-14.3-32-32-32L352 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},fpt={prefix:"fas",iconName:"paperclip",icon:[448,512,[128206],"f0c6","M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z"]},dpt={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},ebe={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},hpt=ebe,ppt={prefix:"fas",iconName:"cart-shopping",icon:[576,512,[128722,"shopping-cart"],"f07a","M0 24C0 10.7 10.7 0 24 0L69.5 0c22 0 41.5 12.8 50.6 32l411 0c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3l-288.5 0 5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5L488 336c13.3 0 24 10.7 24 24s-10.7 24-24 24l-288.3 0c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5L24 48C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},gpt={prefix:"fas",iconName:"coins",icon:[512,512,[],"f51e","M512 80c0 18-14.3 34.6-38.4 48c-29.1 16.1-72.5 27.5-122.3 30.9c-3.7-1.8-7.4-3.5-11.3-5C300.6 137.4 248.2 128 192 128c-8.3 0-16.4 .2-24.5 .6l-1.1-.6C142.3 114.6 128 98 128 80c0-44.2 86-80 192-80S512 35.8 512 80zM160.7 161.1c10.2-.7 20.7-1.1 31.3-1.1c62.2 0 117.4 12.3 152.5 31.4C369.3 204.9 384 221.7 384 240c0 4-.7 7.9-2.1 11.7c-4.6 13.2-17 25.3-35 35.5c0 0 0 0 0 0c-.1 .1-.3 .1-.4 .2c0 0 0 0 0 0s0 0 0 0c-.3 .2-.6 .3-.9 .5c-35 19.4-90.8 32-153.6 32c-59.6 0-112.9-11.3-148.2-29.1c-1.9-.9-3.7-1.9-5.5-2.9C14.3 274.6 0 258 0 240c0-34.8 53.4-64.5 128-75.4c10.5-1.5 21.4-2.7 32.7-3.5zM416 240c0-21.9-10.6-39.9-24.1-53.4c28.3-4.4 54.2-11.4 76.2-20.5c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 19.3-16.5 37.1-43.8 50.9c-14.6 7.4-32.4 13.7-52.4 18.5c.1-1.8 .2-3.5 .2-5.3zm-32 96c0 18-14.3 34.6-38.4 48c-1.8 1-3.6 1.9-5.5 2.9C304.9 404.7 251.6 416 192 416c-62.8 0-118.6-12.6-153.6-32C14.3 370.6 0 354 0 336l0-35.4c12.5 10.3 27.6 18.7 43.9 25.5C83.4 342.6 135.8 352 192 352s108.6-9.4 148.1-25.9c7.8-3.2 15.3-6.9 22.4-10.9c6.1-3.4 11.8-7.2 17.2-11.2c1.5-1.1 2.9-2.3 4.3-3.4l0 3.4 0 5.7 0 26.3zm32 0l0-32 0-25.9c19-4.2 36.5-9.5 52.1-16c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 10.5-5 21-14.9 30.9c-16.3 16.3-45 29.7-81.3 38.4c.1-1.7 .2-3.5 .2-5.3zM192 448c56.2 0 108.6-9.4 148.1-25.9c16.3-6.8 31.5-15.2 43.9-25.5l0 35.4c0 44.2-86 80-192 80S0 476.2 0 432l0-35.4c12.5 10.3 27.6 18.7 43.9 25.5C83.4 438.6 135.8 448 192 448z"]},mpt={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},bpt={prefix:"fas",iconName:"id-card",icon:[576,512,[62147,"drivers-license"],"f2c2","M0 96l576 0c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96zm0 32L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-288L0 128zM64 405.3c0-29.5 23.9-53.3 53.3-53.3l117.3 0c29.5 0 53.3 23.9 53.3 53.3c0 5.9-4.8 10.7-10.7 10.7L74.7 416c-5.9 0-10.7-4.8-10.7-10.7zM176 192a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm176 16c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16z"]},ypt={prefix:"fas",iconName:"outdent",icon:[448,512,["dedent"],"f03b","M0 64C0 46.3 14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64zM192 192c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 96l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32zM.2 268.6c-8.2-6.4-8.2-18.9 0-25.3l101.9-79.3c10.5-8.2 25.8-.7 25.8 12.6l0 158.6c0 13.3-15.3 20.8-25.8 12.6L.2 268.6z"]},wpt={prefix:"fas",iconName:"rotate-right",icon:[512,512,["redo-alt","rotate-forward"],"f2f9","M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z"]},vpt={prefix:"fas",iconName:"stop",icon:[384,512,[9209],"f04d","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"]},_pt={prefix:"fas",iconName:"upload",icon:[512,512,[],"f093","M288 109.3L288 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-242.7-73.4 73.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0l128 128c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L288 109.3zM64 352l128 0c0 35.3 28.7 64 64 64s64-28.7 64-64l128 0c35.3 0 64 28.7 64 64l0 32c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64l0-32c0-35.3 28.7-64 64-64zM432 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"]},xpt={prefix:"fas",iconName:"bolt",icon:[448,512,[9889,"zap"],"f0e7","M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z"]},Ept={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},kpt={prefix:"fas",iconName:"ellipsis",icon:[448,512,["ellipsis-h"],"f141","M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"]},Apt={prefix:"fas",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416l384 0c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8l0-18.8c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"]},Spt={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},Cpt={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},Ipt={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},Mpt={prefix:"fas",iconName:"user-shield",icon:[640,512,[],"f505","M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c1.8 0 3.5-.2 5.3-.5c-76.3-55.1-99.8-141-103.1-200.2c-16.1-4.8-33.1-7.3-50.7-7.3l-91.4 0zm308.8-78.3l-120 48C358 277.4 352 286.2 352 296c0 63.3 25.9 168.8 134.8 214.2c5.9 2.5 12.6 2.5 18.5 0C614.1 464.8 640 359.3 640 296c0-9.8-6-18.6-15.1-22.3l-120-48c-5.7-2.3-12.1-2.3-17.8 0zM591.4 312c-3.9 50.7-27.2 116.7-95.4 149.7l0-187.8L591.4 312z"]},$pt={prefix:"fas",iconName:"wind",icon:[512,512,[],"f72e","M288 32c0 17.7 14.3 32 32 32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l320 0c53 0 96-43 96-96s-43-96-96-96L320 0c-17.7 0-32 14.3-32 32zm64 352c0 17.7 14.3 32 32 32l32 0c53 0 96-43 96-96s-43-96-96-96L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32zM128 512l32 0c53 0 96-43 96-96s-43-96-96-96L32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},Tpt={prefix:"fas",iconName:"clapperboard",icon:[512,512,[],"e131","M448 32l-86.1 0-1 1-127 127 92.1 0 1-1L453.8 32.3c-1.9-.2-3.8-.3-5.8-.3zm64 128l0-64c0-15.1-5.3-29.1-14-40l-104 104L512 160zM294.1 32l-92.1 0-1 1L73.9 160l92.1 0 1-1 127-127zM64 32C28.7 32 0 60.7 0 96l0 64 6.1 0 1-1 127-127L64 32zM512 192L0 192 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224z"]},Npt={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},Opt={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},jpt={prefix:"fas",iconName:"store",icon:[576,512,[],"f54e","M547.6 103.8L490.3 13.1C485.2 5 476.1 0 466.4 0L109.6 0C99.9 0 90.8 5 85.7 13.1L28.3 103.8c-29.6 46.8-3.4 111.9 51.9 119.4c4 .5 8.1 .8 12.1 .8c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.2 0 49.3-11.4 65.2-29c16 17.6 39.1 29 65.2 29c4.1 0 8.1-.3 12.1-.8c55.5-7.4 81.8-72.5 52.1-119.4zM499.7 254.9c0 0 0 0-.1 0c-5.3 .7-10.7 1.1-16.2 1.1c-12.4 0-24.3-1.9-35.4-5.3L448 384l-320 0 0-133.4c-11.2 3.5-23.2 5.4-35.6 5.4c-5.5 0-11-.4-16.3-1.1l-.1 0c-4.1-.6-8.1-1.3-12-2.3L64 384l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64 0-131.4c-4 1-8 1.8-12.3 2.3z"]},Ppt={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},Dpt={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},Rpt={prefix:"fas",iconName:"percent",icon:[384,512,[62101,62785,"percentage"],"25","M374.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-320 320c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l320-320zM128 128A64 64 0 1 0 0 128a64 64 0 1 0 128 0zM384 384a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z"]},Lpt={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 96l0 64 64 0 0-64L64 96zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zm64 16l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm80 64l-64 0 0 64 64 0 0-64zM256 304c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16l0 96c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-160zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},zpt={prefix:"fas",iconName:"pen-nib",icon:[512,512,[10001],"f5ad","M368.4 18.3L312.7 74.1 437.9 199.3l55.7-55.7c21.9-21.9 21.9-57.3 0-79.2L447.6 18.3c-21.9-21.9-57.3-21.9-79.2 0zM288 94.6l-9.2 2.8L134.7 140.6c-19.9 6-35.7 21.2-42.3 41L3.8 445.8c-3.8 11.3-1 23.9 7.3 32.4L164.7 324.7c-3-6.3-4.7-13.3-4.7-20.7c0-26.5 21.5-48 48-48s48 21.5 48 48s-21.5 48-48 48c-7.4 0-14.4-1.7-20.7-4.7L33.7 500.9c8.6 8.3 21.1 11.2 32.4 7.3l264.3-88.6c19.7-6.6 35-22.4 41-42.3l43.2-144.1 2.7-9.2L288 94.6z"]},tbe={prefix:"fas",iconName:"wand-magic",icon:[512,512,["magic"],"f0d0","M14.1 463.3c-18.7-18.7-18.7-49.1 0-67.9L395.4 14.1c18.7-18.7 49.1-18.7 67.9 0l34.6 34.6c18.7 18.7 18.7 49.1 0 67.9L116.5 497.9c-18.7 18.7-49.1 18.7-67.9 0L14.1 463.3zM347.6 187.6l105-105L429.4 59.3l-105 105 23.3 23.3z"]},Bpt=tbe,Fpt={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},Upt={prefix:"fas",iconName:"music",icon:[512,512,[127925],"f001","M499.1 6.3c8.1 6 12.9 15.6 12.9 25.7l0 72 0 264c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L448 147 192 223.8 192 432c0 44.2-43 80-96 80s-96-35.8-96-80s43-80 96-80c11.2 0 22 1.6 32 4.6L128 200l0-72c0-14.1 9.3-26.6 22.8-30.7l320-96c9.7-2.9 20.2-1.1 28.3 5z"]},qpt={prefix:"fas",iconName:"hashtag",icon:[448,512,[62098],"23","M181.3 32.4c17.4 2.9 29.2 19.4 26.3 36.8L197.8 128l95.1 0 11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3s29.2 19.4 26.3 36.8L357.8 128l58.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-68.9 0L325.8 320l58.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-68.9 0-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8l9.8-58.7-95.1 0-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8L90.2 384 32 384c-17.7 0-32-14.3-32-32s14.3-32 32-32l68.9 0 21.3-128L64 192c-17.7 0-32-14.3-32-32s14.3-32 32-32l68.9 0 11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3zM187.1 192L165.8 320l95.1 0 21.3-128-95.1 0z"]},Hpt={prefix:"fas",iconName:"fan",icon:[512,512,[],"f863","M258.6 0c-1.7 0-3.4 .1-5.1 .5C168 17 115.6 102.3 130.5 189.3c2.9 17 8.4 32.9 15.9 47.4L32 224l-2.6 0C13.2 224 0 237.2 0 253.4c0 1.7 .1 3.4 .5 5.1C17 344 102.3 396.4 189.3 381.5c17-2.9 32.9-8.4 47.4-15.9L224 480l0 2.6c0 16.2 13.2 29.4 29.4 29.4c1.7 0 3.4-.1 5.1-.5C344 495 396.4 409.7 381.5 322.7c-2.9-17-8.4-32.9-15.9-47.4L480 288l2.6 0c16.2 0 29.4-13.2 29.4-29.4c0-1.7-.1-3.4-.5-5.1C495 168 409.7 115.6 322.7 130.5c-17 2.9-32.9 8.4-47.4 15.9L288 32l0-2.6C288 13.2 274.8 0 258.6 0zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},Wpt={prefix:"fas",iconName:"book",icon:[448,512,[128212],"f02d","M96 0C43 0 0 43 0 96L0 416c0 53 43 96 96 96l288 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-64c17.7 0 32-14.3 32-32l0-320c0-17.7-14.3-32-32-32L384 0 96 0zm0 384l256 0 0 64L96 448c-17.7 0-32-14.3-32-32s14.3-32 32-32zm32-240c0-8.8 7.2-16 16-16l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16zm16 48l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},Vpt={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},Kpt={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},Gpt={prefix:"fas",iconName:"mug-saucer",icon:[640,512,["coffee"],"f0f4","M96 64c0-17.7 14.3-32 32-32l320 0 64 0c70.7 0 128 57.3 128 128s-57.3 128-128 128l-32 0c0 53-43 96-96 96l-192 0c-53 0-96-43-96-96L96 64zM480 224l32 0c35.3 0 64-28.7 64-64s-28.7-64-64-64l-32 0 0 128zM32 416l512 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]};var w8={exports:{}},nj;function rbe(){return nj||(nj=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function s(c,u,l,d,h){if(typeof l!="function")throw new TypeError("The listener must be a function");var g=new i(l,d||c,h),m=r?r+u:u;return c._events[m]?c._events[m].fn?c._events[m]=[c._events[m],g]:c._events[m].push(g):(c._events[m]=g,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],l,d;if(this._eventsCount===0)return u;for(d in l=this._events)t.call(l,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},a.prototype.listeners=function(u){var l=r?r+u:u,d=this._events[l];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,g=d.length,m=new Array(g);h<g;h++)m[h]=d[h].fn;return m},a.prototype.listenerCount=function(u){var l=r?r+u:u,d=this._events[l];return d?d.fn?1:d.length:0},a.prototype.emit=function(u,l,d,h,g,m){var b=r?r+u:u;if(!this._events[b])return!1;var k=this._events[b],w=arguments.length,E,A;if(k.fn){switch(k.once&&this.removeListener(u,k.fn,void 0,!0),w){case 1:return k.fn.call(k.context),!0;case 2:return k.fn.call(k.context,l),!0;case 3:return k.fn.call(k.context,l,d),!0;case 4:return k.fn.call(k.context,l,d,h),!0;case 5:return k.fn.call(k.context,l,d,h,g),!0;case 6:return k.fn.call(k.context,l,d,h,g,m),!0}for(A=1,E=new Array(w-1);A<w;A++)E[A-1]=arguments[A];k.fn.apply(k.context,E)}else{var M=k.length,R;for(A=0;A<M;A++)switch(k[A].once&&this.removeListener(u,k[A].fn,void 0,!0),w){case 1:k[A].fn.call(k[A].context);break;case 2:k[A].fn.call(k[A].context,l);break;case 3:k[A].fn.call(k[A].context,l,d);break;case 4:k[A].fn.call(k[A].context,l,d,h);break;default:if(!E)for(R=1,E=new Array(w-1);R<w;R++)E[R-1]=arguments[R];k[A].fn.apply(k[A].context,E)}}return!0},a.prototype.on=function(u,l,d){return s(this,u,l,d,!1)},a.prototype.once=function(u,l,d){return s(this,u,l,d,!0)},a.prototype.removeListener=function(u,l,d,h){var g=r?r+u:u;if(!this._events[g])return this;if(!l)return o(this,g),this;var m=this._events[g];if(m.fn)m.fn===l&&(!h||m.once)&&(!d||m.context===d)&&o(this,g);else{for(var b=0,k=[],w=m.length;b<w;b++)(m[b].fn!==l||h&&!m[b].once||d&&m[b].context!==d)&&k.push(m[b]);k.length?this._events[g]=k.length===1?k[0]:k:o(this,g)}return this},a.prototype.removeAllListeners=function(u){var l;return u?(l=r?r+u:u,this._events[l]&&o(this,l)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a}(w8)),w8.exports}var nbe=rbe();const G2=Js(nbe);class Wn extends Error{constructor(t,r){super(t),this.error=r}}class Rc extends Wn{constructor(){super(...arguments),this.name="WalletNotReadyError"}}class ibe extends Wn{constructor(){super(...arguments),this.name="WalletLoadError"}}class Q0 extends Wn{constructor(){super(...arguments),this.name="WalletConfigError"}}class Nc extends Wn{constructor(){super(...arguments),this.name="WalletConnectionError"}}class Z2 extends Wn{constructor(){super(...arguments),this.name="WalletDisconnectedError"}}class p4 extends Wn{constructor(){super(...arguments),this.name="WalletDisconnectionError"}}class Yl extends Wn{constructor(){super(...arguments),this.name="WalletAccountError"}}class jd extends Wn{constructor(){super(...arguments),this.name="WalletPublicKeyError"}}class Ur extends Wn{constructor(){super(...arguments),this.name="WalletNotConnectedError"}}class zu extends Wn{constructor(){super(...arguments),this.name="WalletSendTransactionError"}}class Ui extends Wn{constructor(){super(...arguments),this.name="WalletSignTransactionError"}}class Y2 extends Wn{constructor(){super(...arguments),this.name="WalletSignMessageError"}}class ij extends Wn{constructor(){super(...arguments),this.name="WalletSignInError"}}class sbe extends Wn{constructor(){super(...arguments),this.name="WalletWindowClosedError"}}var jt;(function(e){e.Installed="Installed",e.NotDetected="NotDetected",e.Loadable="Loadable",e.Unsupported="Unsupported"})(jt||(jt={}));class SK extends G2{get connected(){return!!this.publicKey}async autoConnect(){await this.connect()}async prepareTransaction(t,r,n={}){const i=this.publicKey;if(!i)throw new Ur;return t.feePayer=t.feePayer||i,t.recentBlockhash=t.recentBlockhash||(await r.getLatestBlockhash({commitment:n.preflightCommitment,minContextSlot:n.minContextSlot})).blockhash,t}}function $C(e){if(typeof window>"u"||typeof document>"u")return;const t=[];function r(){if(e())for(const s of t)s()}const n=setInterval(r,1e3);t.push(()=>clearInterval(n)),document.readyState==="loading"&&(document.addEventListener("DOMContentLoaded",r,{once:!0}),t.push(()=>document.removeEventListener("DOMContentLoaded",r))),document.readyState!=="complete"&&(window.addEventListener("load",r,{once:!0}),t.push(()=>window.removeEventListener("load",r))),r()}function UE(){if(!navigator)return!1;const e=navigator.userAgent.toLowerCase(),t=e.includes("iphone")||e.includes("ipad"),r=e.includes("safari");return t&&r}function Ba(e){return"version"in e}class CK extends SK{async sendTransaction(t,r,n={}){let i=!0;try{if(Ba(t)){if(!this.supportedTransactionVersions)throw new zu("Sending versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(t.version))throw new zu(`Sending transaction version ${t.version} isn't supported by this wallet`);try{t=await this.signTransaction(t);const s=t.serialize();return await r.sendRawTransaction(s,n)}catch(s){throw s instanceof Ui?(i=!1,s):new zu(s?.message,s)}}else try{const{signers:s,...o}=n;t=await this.prepareTransaction(t,r,o),s?.length&&t.partialSign(...s),t=await this.signTransaction(t);const a=t.serialize();return await r.sendRawTransaction(a,o)}catch(s){throw s instanceof Ui?(i=!1,s):new zu(s?.message,s)}}catch(s){throw i&&this.emit("error",s),s}}async signAllTransactions(t){for(const n of t)if(Ba(n)){if(!this.supportedTransactionVersions)throw new Ui("Signing versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(n.version))throw new Ui(`Signing transaction version ${n.version} isn't supported by this wallet`)}const r=[];for(const n of t)r.push(await this.signTransaction(n));return r}}class g4 extends CK{}class obe extends g4{}const TC="solana:signAndSendTransaction",IK="solana:signMessage",NC="solana:signTransaction",MK="standard:connect",abe="standard:disconnect",$K="standard:events";function cbe(e){return MK in e.features&&$K in e.features&&(TC in e.features||NC in e.features)}var qE;(function(e){e.Mainnet="mainnet-beta",e.Testnet="testnet",e.Devnet="devnet"})(qE||(qE={}));var v8={},H1={},sj;function ube(){if(sj)return H1;sj=1,H1.byteLength=a,H1.toByteArray=u,H1.fromByteArray=h;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=n.length;i<s;++i)e[i]=n[i],t[n.charCodeAt(i)]=i;t[45]=62,t[95]=63;function o(g){var m=g.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=g.indexOf("=");b===-1&&(b=m);var k=b===m?0:4-b%4;return[b,k]}function a(g){var m=o(g),b=m[0],k=m[1];return(b+k)*3/4-k}function c(g,m,b){return(m+b)*3/4-b}function u(g){var m,b=o(g),k=b[0],w=b[1],E=new r(c(g,k,w)),A=0,M=w>0?k-4:k,R;for(R=0;R<M;R+=4)m=t[g.charCodeAt(R)]<<18|t[g.charCodeAt(R+1)]<<12|t[g.charCodeAt(R+2)]<<6|t[g.charCodeAt(R+3)],E[A++]=m>>16&255,E[A++]=m>>8&255,E[A++]=m&255;return w===2&&(m=t[g.charCodeAt(R)]<<2|t[g.charCodeAt(R+1)]>>4,E[A++]=m&255),w===1&&(m=t[g.charCodeAt(R)]<<10|t[g.charCodeAt(R+1)]<<4|t[g.charCodeAt(R+2)]>>2,E[A++]=m>>8&255,E[A++]=m&255),E}function l(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function d(g,m,b){for(var k,w=[],E=m;E<b;E+=3)k=(g[E]<<16&16711680)+(g[E+1]<<8&65280)+(g[E+2]&255),w.push(l(k));return w.join("")}function h(g){for(var m,b=g.length,k=b%3,w=[],E=16383,A=0,M=b-k;A<M;A+=E)w.push(d(g,A,A+E>M?M:A+E));return k===1?(m=g[b-1],w.push(e[m>>2]+e[m<<4&63]+"==")):k===2&&(m=(g[b-2]<<8)+g[b-1],w.push(e[m>>10]+e[m>>4&63]+e[m<<2&63]+"=")),w.join("")}return H1}var gy={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var oj;function lbe(){return oj||(oj=1,gy.read=function(e,t,r,n,i){var s,o,a=i*8-n-1,c=(1<<a)-1,u=c>>1,l=-7,d=r?i-1:0,h=r?-1:1,g=e[t+d];for(d+=h,s=g&(1<<-l)-1,g>>=-l,l+=a;l>0;s=s*256+e[t+d],d+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=o*256+e[t+d],d+=h,l-=8);if(s===0)s=1-u;else{if(s===c)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-u}return(g?-1:1)*o*Math.pow(2,s-n)},gy.write=function(e,t,r,n,i,s){var o,a,c,u=s*8-i-1,l=(1<<u)-1,d=l>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,m=n?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+d>=1?t+=h/c:t+=h*Math.pow(2,1-d),t*c>=2&&(o++,c/=2),o+d>=l?(a=0,o=l):o+d>=1?(a=(t*c-1)*Math.pow(2,i),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+g]=a&255,g+=m,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[r+g]=o&255,g+=m,o/=256,u-=8);e[r+g-m]|=b*128}),gy}/*!
636
636
  * The buffer module from node.js, for the browser.
637
637
  *
638
638
  * @author Feross Aboukhadijeh <https://feross.org>
639
639
  * @license MIT
640
- */var aj;function OC(){return aj||(aj=1,function(e){const t=ube(),r=lbe(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const U=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(U,S),U.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(U){if(U>i)throw new RangeError('The value "'+U+'" is invalid for option "size"');const S=new Uint8Array(U);return Object.setPrototypeOf(S,a.prototype),S}function a(U,S,T){if(typeof U=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(U)}return c(U,S,T)}a.poolSize=8192;function c(U,S,T){if(typeof U=="string")return h(U,S);if(ArrayBuffer.isView(U))return m(U);if(U==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(Pe(U,ArrayBuffer)||U&&Pe(U.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(U,SharedArrayBuffer)||U&&Pe(U.buffer,SharedArrayBuffer)))return b(U,S,T);if(typeof U=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const H=U.valueOf&&U.valueOf();if(H!=null&&H!==U)return a.from(H,S,T);const V=k(U);if(V)return V;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof U[Symbol.toPrimitive]=="function")return a.from(U[Symbol.toPrimitive]("string"),S,T);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U)}a.from=function(U,S,T){return c(U,S,T)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function u(U){if(typeof U!="number")throw new TypeError('"size" argument must be of type number');if(U<0)throw new RangeError('The value "'+U+'" is invalid for option "size"')}function l(U,S,T){return u(U),U<=0?o(U):S!==void 0?typeof T=="string"?o(U).fill(S,T):o(U).fill(S):o(U)}a.alloc=function(U,S,T){return l(U,S,T)};function d(U){return u(U),o(U<0?0:w(U)|0)}a.allocUnsafe=function(U){return d(U)},a.allocUnsafeSlow=function(U){return d(U)};function h(U,S){if((typeof S!="string"||S==="")&&(S="utf8"),!a.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const T=A(U,S)|0;let H=o(T);const V=H.write(U,S);return V!==T&&(H=H.slice(0,V)),H}function g(U){const S=U.length<0?0:w(U.length)|0,T=o(S);for(let H=0;H<S;H+=1)T[H]=U[H]&255;return T}function m(U){if(Pe(U,Uint8Array)){const S=new Uint8Array(U);return b(S.buffer,S.byteOffset,S.byteLength)}return g(U)}function b(U,S,T){if(S<0||U.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if(U.byteLength<S+(T||0))throw new RangeError('"length" is outside of buffer bounds');let H;return S===void 0&&T===void 0?H=new Uint8Array(U):T===void 0?H=new Uint8Array(U,S):H=new Uint8Array(U,S,T),Object.setPrototypeOf(H,a.prototype),H}function k(U){if(a.isBuffer(U)){const S=w(U.length)|0,T=o(S);return T.length===0||U.copy(T,0,0,S),T}if(U.length!==void 0)return typeof U.length!="number"||xe(U.length)?o(0):g(U);if(U.type==="Buffer"&&Array.isArray(U.data))return g(U.data)}function w(U){if(U>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return U|0}function E(U){return+U!=U&&(U=0),a.alloc(+U)}a.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==a.prototype},a.compare=function(S,T){if(Pe(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),Pe(T,Uint8Array)&&(T=a.from(T,T.offset,T.byteLength)),!a.isBuffer(S)||!a.isBuffer(T))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===T)return 0;let H=S.length,V=T.length;for(let G=0,Z=Math.min(H,V);G<Z;++G)if(S[G]!==T[G]){H=S[G],V=T[G];break}return H<V?-1:V<H?1:0},a.isEncoding=function(S){switch(String(S).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(S,T){if(!Array.isArray(S))throw new TypeError('"list" argument must be an Array of Buffers');if(S.length===0)return a.alloc(0);let H;if(T===void 0)for(T=0,H=0;H<S.length;++H)T+=S[H].length;const V=a.allocUnsafe(T);let G=0;for(H=0;H<S.length;++H){let Z=S[H];if(Pe(Z,Uint8Array))G+Z.length>V.length?(a.isBuffer(Z)||(Z=a.from(Z)),Z.copy(V,G)):Uint8Array.prototype.set.call(V,Z,G);else if(a.isBuffer(Z))Z.copy(V,G);else throw new TypeError('"list" argument must be an Array of Buffers');G+=Z.length}return V};function A(U,S){if(a.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||Pe(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);const T=U.length,H=arguments.length>2&&arguments[2]===!0;if(!H&&T===0)return 0;let V=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":return Re(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return le(U).length;default:if(V)return H?-1:Re(U).length;S=(""+S).toLowerCase(),V=!0}}a.byteLength=A;function M(U,S,T){let H=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((T===void 0||T>this.length)&&(T=this.length),T<=0)||(T>>>=0,S>>>=0,T<=S))return"";for(U||(U="utf8");;)switch(U){case"hex":return $(this,S,T);case"utf8":case"utf-8":return f(this,S,T);case"ascii":return I(this,S,T);case"latin1":case"binary":return j(this,S,T);case"base64":return y(this,S,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,S,T);default:if(H)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),H=!0}}a.prototype._isBuffer=!0;function R(U,S,T){const H=U[S];U[S]=U[T],U[T]=H}a.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let T=0;T<S;T+=2)R(this,T,T+1);return this},a.prototype.swap32=function(){const S=this.length;if(S%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let T=0;T<S;T+=4)R(this,T,T+3),R(this,T+1,T+2);return this},a.prototype.swap64=function(){const S=this.length;if(S%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let T=0;T<S;T+=8)R(this,T,T+7),R(this,T+1,T+6),R(this,T+2,T+5),R(this,T+3,T+4);return this},a.prototype.toString=function(){const S=this.length;return S===0?"":arguments.length===0?f(this,0,S):M.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(S){if(!a.isBuffer(S))throw new TypeError("Argument must be a Buffer");return this===S?!0:a.compare(this,S)===0},a.prototype.inspect=function(){let S="";const T=e.INSPECT_MAX_BYTES;return S=this.toString("hex",0,T).replace(/(.{2})/g,"$1 ").trim(),this.length>T&&(S+=" ... "),"<Buffer "+S+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(S,T,H,V,G){if(Pe(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),!a.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(T===void 0&&(T=0),H===void 0&&(H=S?S.length:0),V===void 0&&(V=0),G===void 0&&(G=this.length),T<0||H>S.length||V<0||G>this.length)throw new RangeError("out of range index");if(V>=G&&T>=H)return 0;if(V>=G)return-1;if(T>=H)return 1;if(T>>>=0,H>>>=0,V>>>=0,G>>>=0,this===S)return 0;let Z=G-V,Ee=H-T;const Ie=Math.min(Z,Ee),ee=this.slice(V,G),se=S.slice(T,H);for(let we=0;we<Ie;++we)if(ee[we]!==se[we]){Z=ee[we],Ee=se[we];break}return Z<Ee?-1:Ee<Z?1:0};function N(U,S,T,H,V){if(U.length===0)return-1;if(typeof T=="string"?(H=T,T=0):T>2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,xe(T)&&(T=V?0:U.length-1),T<0&&(T=U.length+T),T>=U.length){if(V)return-1;T=U.length-1}else if(T<0)if(V)T=0;else return-1;if(typeof S=="string"&&(S=a.from(S,H)),a.isBuffer(S))return S.length===0?-1:z(U,S,T,H,V);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(U,S,T):Uint8Array.prototype.lastIndexOf.call(U,S,T):z(U,[S],T,H,V);throw new TypeError("val must be string, number or Buffer")}function z(U,S,T,H,V){let G=1,Z=U.length,Ee=S.length;if(H!==void 0&&(H=String(H).toLowerCase(),H==="ucs2"||H==="ucs-2"||H==="utf16le"||H==="utf-16le")){if(U.length<2||S.length<2)return-1;G=2,Z/=2,Ee/=2,T/=2}function Ie(se,we){return G===1?se[we]:se.readUInt16BE(we*G)}let ee;if(V){let se=-1;for(ee=T;ee<Z;ee++)if(Ie(U,ee)===Ie(S,se===-1?0:ee-se)){if(se===-1&&(se=ee),ee-se+1===Ee)return se*G}else se!==-1&&(ee-=ee-se),se=-1}else for(T+Ee>Z&&(T=Z-Ee),ee=T;ee>=0;ee--){let se=!0;for(let we=0;we<Ee;we++)if(Ie(U,ee+we)!==Ie(S,we)){se=!1;break}if(se)return ee}return-1}a.prototype.includes=function(S,T,H){return this.indexOf(S,T,H)!==-1},a.prototype.indexOf=function(S,T,H){return N(this,S,T,H,!0)},a.prototype.lastIndexOf=function(S,T,H){return N(this,S,T,H,!1)};function F(U,S,T,H){T=Number(T)||0;const V=U.length-T;H?(H=Number(H),H>V&&(H=V)):H=V;const G=S.length;H>G/2&&(H=G/2);let Z;for(Z=0;Z<H;++Z){const Ee=parseInt(S.substr(Z*2,2),16);if(xe(Ee))return Z;U[T+Z]=Ee}return Z}function L(U,S,T,H){return he(Re(S,U.length-T),U,T,H)}function B(U,S,T,H){return he(J(S),U,T,H)}function D(U,S,T,H){return he(le(S),U,T,H)}function x(U,S,T,H){return he(ne(S,U.length-T),U,T,H)}a.prototype.write=function(S,T,H,V){if(T===void 0)V="utf8",H=this.length,T=0;else if(H===void 0&&typeof T=="string")V=T,H=this.length,T=0;else if(isFinite(T))T=T>>>0,isFinite(H)?(H=H>>>0,V===void 0&&(V="utf8")):(V=H,H=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const G=this.length-T;if((H===void 0||H>G)&&(H=G),S.length>0&&(H<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");let Z=!1;for(;;)switch(V){case"hex":return F(this,S,T,H);case"utf8":case"utf-8":return L(this,S,T,H);case"ascii":case"latin1":case"binary":return B(this,S,T,H);case"base64":return D(this,S,T,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,S,T,H);default:if(Z)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),Z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(U,S,T){return S===0&&T===U.length?t.fromByteArray(U):t.fromByteArray(U.slice(S,T))}function f(U,S,T){T=Math.min(U.length,T);const H=[];let V=S;for(;V<T;){const G=U[V];let Z=null,Ee=G>239?4:G>223?3:G>191?2:1;if(V+Ee<=T){let Ie,ee,se,we;switch(Ee){case 1:G<128&&(Z=G);break;case 2:Ie=U[V+1],(Ie&192)===128&&(we=(G&31)<<6|Ie&63,we>127&&(Z=we));break;case 3:Ie=U[V+1],ee=U[V+2],(Ie&192)===128&&(ee&192)===128&&(we=(G&15)<<12|(Ie&63)<<6|ee&63,we>2047&&(we<55296||we>57343)&&(Z=we));break;case 4:Ie=U[V+1],ee=U[V+2],se=U[V+3],(Ie&192)===128&&(ee&192)===128&&(se&192)===128&&(we=(G&15)<<18|(Ie&63)<<12|(ee&63)<<6|se&63,we>65535&&we<1114112&&(Z=we))}}Z===null?(Z=65533,Ee=1):Z>65535&&(Z-=65536,H.push(Z>>>10&1023|55296),Z=56320|Z&1023),H.push(Z),V+=Ee}return v(H)}const p=4096;function v(U){const S=U.length;if(S<=p)return String.fromCharCode.apply(String,U);let T="",H=0;for(;H<S;)T+=String.fromCharCode.apply(String,U.slice(H,H+=p));return T}function I(U,S,T){let H="";T=Math.min(U.length,T);for(let V=S;V<T;++V)H+=String.fromCharCode(U[V]&127);return H}function j(U,S,T){let H="";T=Math.min(U.length,T);for(let V=S;V<T;++V)H+=String.fromCharCode(U[V]);return H}function $(U,S,T){const H=U.length;(!S||S<0)&&(S=0),(!T||T<0||T>H)&&(T=H);let V="";for(let G=S;G<T;++G)V+=oe[U[G]];return V}function C(U,S,T){const H=U.slice(S,T);let V="";for(let G=0;G<H.length-1;G+=2)V+=String.fromCharCode(H[G]+H[G+1]*256);return V}a.prototype.slice=function(S,T){const H=this.length;S=~~S,T=T===void 0?H:~~T,S<0?(S+=H,S<0&&(S=0)):S>H&&(S=H),T<0?(T+=H,T<0&&(T=0)):T>H&&(T=H),T<S&&(T=S);const V=this.subarray(S,T);return Object.setPrototypeOf(V,a.prototype),V};function O(U,S,T){if(U%1!==0||U<0)throw new RangeError("offset is not uint");if(U+S>T)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=this[S],G=1,Z=0;for(;++Z<T&&(G*=256);)V+=this[S+Z]*G;return V},a.prototype.readUintBE=a.prototype.readUIntBE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=this[S+--T],G=1;for(;T>0&&(G*=256);)V+=this[S+--T]*G;return V},a.prototype.readUint8=a.prototype.readUInt8=function(S,T){return S=S>>>0,T||O(S,1,this.length),this[S]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(S,T){return S=S>>>0,T||O(S,2,this.length),this[S]|this[S+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(S,T){return S=S>>>0,T||O(S,2,this.length),this[S]<<8|this[S+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(S,T){return S=S>>>0,T||O(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(S,T){return S=S>>>0,T||O(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},a.prototype.readBigUInt64LE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=T+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,G=this[++S]+this[++S]*2**8+this[++S]*2**16+H*2**24;return BigInt(V)+(BigInt(G)<<BigInt(32))}),a.prototype.readBigUInt64BE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=T*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],G=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+H;return(BigInt(V)<<BigInt(32))+BigInt(G)}),a.prototype.readIntLE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=this[S],G=1,Z=0;for(;++Z<T&&(G*=256);)V+=this[S+Z]*G;return G*=128,V>=G&&(V-=Math.pow(2,8*T)),V},a.prototype.readIntBE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=T,G=1,Z=this[S+--V];for(;V>0&&(G*=256);)Z+=this[S+--V]*G;return G*=128,Z>=G&&(Z-=Math.pow(2,8*T)),Z},a.prototype.readInt8=function(S,T){return S=S>>>0,T||O(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},a.prototype.readInt16LE=function(S,T){S=S>>>0,T||O(S,2,this.length);const H=this[S]|this[S+1]<<8;return H&32768?H|4294901760:H},a.prototype.readInt16BE=function(S,T){S=S>>>0,T||O(S,2,this.length);const H=this[S+1]|this[S]<<8;return H&32768?H|4294901760:H},a.prototype.readInt32LE=function(S,T){return S=S>>>0,T||O(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},a.prototype.readInt32BE=function(S,T){return S=S>>>0,T||O(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},a.prototype.readBigInt64LE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(H<<24);return(BigInt(V)<<BigInt(32))+BigInt(T+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24)}),a.prototype.readBigInt64BE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=(T<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(V)<<BigInt(32))+BigInt(this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+H)}),a.prototype.readFloatLE=function(S,T){return S=S>>>0,T||O(S,4,this.length),r.read(this,S,!0,23,4)},a.prototype.readFloatBE=function(S,T){return S=S>>>0,T||O(S,4,this.length),r.read(this,S,!1,23,4)},a.prototype.readDoubleLE=function(S,T){return S=S>>>0,T||O(S,8,this.length),r.read(this,S,!0,52,8)},a.prototype.readDoubleBE=function(S,T){return S=S>>>0,T||O(S,8,this.length),r.read(this,S,!1,52,8)};function _(U,S,T,H,V,G){if(!a.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>V||S<G)throw new RangeError('"value" argument is out of bounds');if(T+H>U.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(S,T,H,V){if(S=+S,T=T>>>0,H=H>>>0,!V){const Ee=Math.pow(2,8*H)-1;_(this,S,T,H,Ee,0)}let G=1,Z=0;for(this[T]=S&255;++Z<H&&(G*=256);)this[T+Z]=S/G&255;return T+H},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(S,T,H,V){if(S=+S,T=T>>>0,H=H>>>0,!V){const Ee=Math.pow(2,8*H)-1;_(this,S,T,H,Ee,0)}let G=H-1,Z=1;for(this[T+G]=S&255;--G>=0&&(Z*=256);)this[T+G]=S/Z&255;return T+H},a.prototype.writeUint8=a.prototype.writeUInt8=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,1,255,0),this[T]=S&255,T+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,65535,0),this[T]=S&255,this[T+1]=S>>>8,T+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,65535,0),this[T]=S>>>8,this[T+1]=S&255,T+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,4294967295,0),this[T+3]=S>>>24,this[T+2]=S>>>16,this[T+1]=S>>>8,this[T]=S&255,T+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,4294967295,0),this[T]=S>>>24,this[T+1]=S>>>16,this[T+2]=S>>>8,this[T+3]=S&255,T+4};function P(U,S,T,H,V){ye(S,H,V,U,T,7);let G=Number(S&BigInt(4294967295));U[T++]=G,G=G>>8,U[T++]=G,G=G>>8,U[T++]=G,G=G>>8,U[T++]=G;let Z=Number(S>>BigInt(32)&BigInt(4294967295));return U[T++]=Z,Z=Z>>8,U[T++]=Z,Z=Z>>8,U[T++]=Z,Z=Z>>8,U[T++]=Z,T}function q(U,S,T,H,V){ye(S,H,V,U,T,7);let G=Number(S&BigInt(4294967295));U[T+7]=G,G=G>>8,U[T+6]=G,G=G>>8,U[T+5]=G,G=G>>8,U[T+4]=G;let Z=Number(S>>BigInt(32)&BigInt(4294967295));return U[T+3]=Z,Z=Z>>8,U[T+2]=Z,Z=Z>>8,U[T+1]=Z,Z=Z>>8,U[T]=Z,T+8}a.prototype.writeBigUInt64LE=me(function(S,T=0){return P(this,S,T,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=me(function(S,T=0){return q(this,S,T,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(S,T,H,V){if(S=+S,T=T>>>0,!V){const Ie=Math.pow(2,8*H-1);_(this,S,T,H,Ie-1,-Ie)}let G=0,Z=1,Ee=0;for(this[T]=S&255;++G<H&&(Z*=256);)S<0&&Ee===0&&this[T+G-1]!==0&&(Ee=1),this[T+G]=(S/Z>>0)-Ee&255;return T+H},a.prototype.writeIntBE=function(S,T,H,V){if(S=+S,T=T>>>0,!V){const Ie=Math.pow(2,8*H-1);_(this,S,T,H,Ie-1,-Ie)}let G=H-1,Z=1,Ee=0;for(this[T+G]=S&255;--G>=0&&(Z*=256);)S<0&&Ee===0&&this[T+G+1]!==0&&(Ee=1),this[T+G]=(S/Z>>0)-Ee&255;return T+H},a.prototype.writeInt8=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,1,127,-128),S<0&&(S=255+S+1),this[T]=S&255,T+1},a.prototype.writeInt16LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,32767,-32768),this[T]=S&255,this[T+1]=S>>>8,T+2},a.prototype.writeInt16BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,32767,-32768),this[T]=S>>>8,this[T+1]=S&255,T+2},a.prototype.writeInt32LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,2147483647,-2147483648),this[T]=S&255,this[T+1]=S>>>8,this[T+2]=S>>>16,this[T+3]=S>>>24,T+4},a.prototype.writeInt32BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[T]=S>>>24,this[T+1]=S>>>16,this[T+2]=S>>>8,this[T+3]=S&255,T+4},a.prototype.writeBigInt64LE=me(function(S,T=0){return P(this,S,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=me(function(S,T=0){return q(this,S,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function W(U,S,T,H,V,G){if(T+H>U.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function K(U,S,T,H,V){return S=+S,T=T>>>0,V||W(U,S,T,4),r.write(U,S,T,H,23,4),T+4}a.prototype.writeFloatLE=function(S,T,H){return K(this,S,T,!0,H)},a.prototype.writeFloatBE=function(S,T,H){return K(this,S,T,!1,H)};function Y(U,S,T,H,V){return S=+S,T=T>>>0,V||W(U,S,T,8),r.write(U,S,T,H,52,8),T+8}a.prototype.writeDoubleLE=function(S,T,H){return Y(this,S,T,!0,H)},a.prototype.writeDoubleBE=function(S,T,H){return Y(this,S,T,!1,H)},a.prototype.copy=function(S,T,H,V){if(!a.isBuffer(S))throw new TypeError("argument should be a Buffer");if(H||(H=0),!V&&V!==0&&(V=this.length),T>=S.length&&(T=S.length),T||(T=0),V>0&&V<H&&(V=H),V===H||S.length===0||this.length===0)return 0;if(T<0)throw new RangeError("targetStart out of bounds");if(H<0||H>=this.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),S.length-T<V-H&&(V=S.length-T+H);const G=V-H;return this===S&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(T,H,V):Uint8Array.prototype.set.call(S,this.subarray(H,V),T),G},a.prototype.fill=function(S,T,H,V){if(typeof S=="string"){if(typeof T=="string"?(V=T,T=0,H=this.length):typeof H=="string"&&(V=H,H=this.length),V!==void 0&&typeof V!="string")throw new TypeError("encoding must be a string");if(typeof V=="string"&&!a.isEncoding(V))throw new TypeError("Unknown encoding: "+V);if(S.length===1){const Z=S.charCodeAt(0);(V==="utf8"&&Z<128||V==="latin1")&&(S=Z)}}else typeof S=="number"?S=S&255:typeof S=="boolean"&&(S=Number(S));if(T<0||this.length<T||this.length<H)throw new RangeError("Out of range index");if(H<=T)return this;T=T>>>0,H=H===void 0?this.length:H>>>0,S||(S=0);let G;if(typeof S=="number")for(G=T;G<H;++G)this[G]=S;else{const Z=a.isBuffer(S)?S:a.from(S,V),Ee=Z.length;if(Ee===0)throw new TypeError('The value "'+S+'" is invalid for argument "value"');for(G=0;G<H-T;++G)this[G+T]=Z[G%Ee]}return this};const te={};function re(U,S,T){te[U]=class extends T{constructor(){super(),Object.defineProperty(this,"message",{value:S.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${U}]`,this.stack,delete this.name}get code(){return U}set code(V){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:V,writable:!0})}toString(){return`${this.name} [${U}]: ${this.message}`}}}re("ERR_BUFFER_OUT_OF_BOUNDS",function(U){return U?`${U} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),re("ERR_INVALID_ARG_TYPE",function(U,S){return`The "${U}" argument must be of type number. Received type ${typeof S}`},TypeError),re("ERR_OUT_OF_RANGE",function(U,S,T){let H=`The value of "${U}" is out of range.`,V=T;return Number.isInteger(T)&&Math.abs(T)>2**32?V=be(String(T)):typeof T=="bigint"&&(V=String(T),(T>BigInt(2)**BigInt(32)||T<-(BigInt(2)**BigInt(32)))&&(V=be(V)),V+="n"),H+=` It must be ${S}. Received ${V}`,H},RangeError);function be(U){let S="",T=U.length;const H=U[0]==="-"?1:0;for(;T>=H+4;T-=3)S=`_${U.slice(T-3,T)}${S}`;return`${U.slice(0,T)}${S}`}function ve(U,S,T){Se(S,"offset"),(U[S]===void 0||U[S+T]===void 0)&&_e(S,U.length-(T+1))}function ye(U,S,T,H,V,G){if(U>T||U<S){const Z=typeof S=="bigint"?"n":"";let Ee;throw S===0||S===BigInt(0)?Ee=`>= 0${Z} and < 2${Z} ** ${(G+1)*8}${Z}`:Ee=`>= -(2${Z} ** ${(G+1)*8-1}${Z}) and < 2 ** ${(G+1)*8-1}${Z}`,new te.ERR_OUT_OF_RANGE("value",Ee,U)}ve(H,V,G)}function Se(U,S){if(typeof U!="number")throw new te.ERR_INVALID_ARG_TYPE(S,"number",U)}function _e(U,S,T){throw Math.floor(U)!==U?(Se(U,T),new te.ERR_OUT_OF_RANGE("offset","an integer",U)):S<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${S}`,U)}const ke=/[^+/0-9A-Za-z-_]/g;function it(U){if(U=U.split("=")[0],U=U.trim().replace(ke,""),U.length<2)return"";for(;U.length%4!==0;)U=U+"=";return U}function Re(U,S){S=S||1/0;let T;const H=U.length;let V=null;const G=[];for(let Z=0;Z<H;++Z){if(T=U.charCodeAt(Z),T>55295&&T<57344){if(!V){if(T>56319){(S-=3)>-1&&G.push(239,191,189);continue}else if(Z+1===H){(S-=3)>-1&&G.push(239,191,189);continue}V=T;continue}if(T<56320){(S-=3)>-1&&G.push(239,191,189),V=T;continue}T=(V-55296<<10|T-56320)+65536}else V&&(S-=3)>-1&&G.push(239,191,189);if(V=null,T<128){if((S-=1)<0)break;G.push(T)}else if(T<2048){if((S-=2)<0)break;G.push(T>>6|192,T&63|128)}else if(T<65536){if((S-=3)<0)break;G.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((S-=4)<0)break;G.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return G}function J(U){const S=[];for(let T=0;T<U.length;++T)S.push(U.charCodeAt(T)&255);return S}function ne(U,S){let T,H,V;const G=[];for(let Z=0;Z<U.length&&!((S-=2)<0);++Z)T=U.charCodeAt(Z),H=T>>8,V=T%256,G.push(V),G.push(H);return G}function le(U){return t.toByteArray(it(U))}function he(U,S,T,H){let V;for(V=0;V<H&&!(V+T>=S.length||V>=U.length);++V)S[V+T]=U[V];return V}function Pe(U,S){return U instanceof S||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===S.name}function xe(U){return U!==U}const oe=function(){const U="0123456789abcdef",S=new Array(256);for(let T=0;T<16;++T){const H=T*16;for(let V=0;V<16;++V)S[H+V]=U[T]+U[V]}return S}();function me(U){return typeof BigInt>"u"?je:U}function je(){throw new Error("BigInt not supported")}}(v8)),v8}var Ft=OC();const Zpt=Cne({__proto__:null},[Ft]),Fh=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function J2(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function HE(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function uh(e,...t){if(!J2(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function TK(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");HE(e.outputLen),HE(e.blockLen)}function Mv(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function fbe(e,t){uh(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Tp(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function _8(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function oc(e,t){return e<<32-t|e>>>t}const NK=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",dbe=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ed(e){if(uh(e),NK)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=dbe[e[r]];return t}const au={_0:48,_9:57,A:65,F:70,a:97,f:102};function cj(e){if(e>=au._0&&e<=au._9)return e-au._0;if(e>=au.A&&e<=au.F)return e-(au.A-10);if(e>=au.a&&e<=au.f)return e-(au.a-10)}function $v(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(NK)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=cj(e.charCodeAt(s)),a=cj(e.charCodeAt(s+1));if(o===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function hbe(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function jC(e){return typeof e=="string"&&(e=hbe(e)),uh(e),e}function Ic(...e){let t=0;for(let n=0;n<e.length;n++){const i=e[n];uh(i),t+=i.length}const r=new Uint8Array(t);for(let n=0,i=0;n<e.length;n++){const s=e[n];r.set(s,i),i+=s.length}return r}let OK=class{};function jK(e){const t=n=>e().update(jC(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function PC(e=32){if(Fh&&typeof Fh.getRandomValues=="function")return Fh.getRandomValues(new Uint8Array(e));if(Fh&&typeof Fh.randomBytes=="function")return Uint8Array.from(Fh.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function pbe(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,o,n),e.setUint32(t+u,a,n)}function gbe(e,t,r){return e&t^~e&r}function mbe(e,t,r){return e&t^e&r^t&r}let PK=class extends OK{constructor(t,r,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(t),this.view=_8(this.buffer)}update(t){Mv(this),t=jC(t),uh(t);const{view:r,buffer:n,blockLen:i}=this,s=t.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=_8(t);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Mv(this),fbe(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,Tp(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;pbe(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=_8(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,l=this.get();if(u>l.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,l[d],s)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return t.destroyed=o,t.finished=s,t.length=i,t.pos=a,i%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}};const gl=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ns=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),my=BigInt(2**32-1),uj=BigInt(32);function bbe(e,t=!1){return t?{h:Number(e&my),l:Number(e>>uj&my)}:{h:Number(e>>uj&my)|0,l:Number(e&my)|0}}function ybe(e,t=!1){const r=e.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:a}=bbe(e[s],t);[n[s],i[s]]=[o,a]}return[n,i]}const lj=(e,t,r)=>e>>>r,fj=(e,t,r)=>e<<32-r|t>>>r,Uh=(e,t,r)=>e>>>r|t<<32-r,qh=(e,t,r)=>e<<32-r|t>>>r,by=(e,t,r)=>e<<64-r|t>>>r-32,yy=(e,t,r)=>e>>>r-32|t<<64-r;function cu(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}const wbe=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),vbe=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,_be=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),xbe=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0,Ebe=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0),kbe=(e,t,r,n,i,s)=>t+r+n+i+s+(e/2**32|0)|0,Abe=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ml=new Uint32Array(64);let Sbe=class extends PK{constructor(t=32){super(64,t,8,!1),this.A=gl[0]|0,this.B=gl[1]|0,this.C=gl[2]|0,this.D=gl[3]|0,this.E=gl[4]|0,this.F=gl[5]|0,this.G=gl[6]|0,this.H=gl[7]|0}get(){const{A:t,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[t,r,n,i,s,o,a,c]}set(t,r,n,i,s,o,a,c){this.A=t|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,r){for(let d=0;d<16;d++,r+=4)ml[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const h=ml[d-15],g=ml[d-2],m=oc(h,7)^oc(h,18)^h>>>3,b=oc(g,17)^oc(g,19)^g>>>10;ml[d]=b+ml[d-7]+m+ml[d-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:u,H:l}=this;for(let d=0;d<64;d++){const h=oc(a,6)^oc(a,11)^oc(a,25),g=l+h+gbe(a,c,u)+Abe[d]+ml[d]|0,b=(oc(n,2)^oc(n,13)^oc(n,22))+mbe(n,i,s)|0;l=u,u=c,c=a,a=o+g|0,o=s,s=i,i=n,n=g+b|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,c=c+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(n,i,s,o,a,c,u,l)}roundClean(){Tp(ml)}destroy(){this.set(0,0,0,0,0,0,0,0),Tp(this.buffer)}};const DK=ybe(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Cbe=DK[0],Ibe=DK[1],bl=new Uint32Array(80),yl=new Uint32Array(80);class Mbe extends PK{constructor(t=64){super(128,t,16,!1),this.Ah=ns[0]|0,this.Al=ns[1]|0,this.Bh=ns[2]|0,this.Bl=ns[3]|0,this.Ch=ns[4]|0,this.Cl=ns[5]|0,this.Dh=ns[6]|0,this.Dl=ns[7]|0,this.Eh=ns[8]|0,this.El=ns[9]|0,this.Fh=ns[10]|0,this.Fl=ns[11]|0,this.Gh=ns[12]|0,this.Gl=ns[13]|0,this.Hh=ns[14]|0,this.Hl=ns[15]|0}get(){const{Ah:t,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:u,El:l,Fh:d,Fl:h,Gh:g,Gl:m,Hh:b,Hl:k}=this;return[t,r,n,i,s,o,a,c,u,l,d,h,g,m,b,k]}set(t,r,n,i,s,o,a,c,u,l,d,h,g,m,b,k){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=l|0,this.Fh=d|0,this.Fl=h|0,this.Gh=g|0,this.Gl=m|0,this.Hh=b|0,this.Hl=k|0}process(t,r){for(let A=0;A<16;A++,r+=4)bl[A]=t.getUint32(r),yl[A]=t.getUint32(r+=4);for(let A=16;A<80;A++){const M=bl[A-15]|0,R=yl[A-15]|0,N=Uh(M,R,1)^Uh(M,R,8)^lj(M,R,7),z=qh(M,R,1)^qh(M,R,8)^fj(M,R,7),F=bl[A-2]|0,L=yl[A-2]|0,B=Uh(F,L,19)^by(F,L,61)^lj(F,L,6),D=qh(F,L,19)^yy(F,L,61)^fj(F,L,6),x=_be(z,D,yl[A-7],yl[A-16]),y=xbe(x,N,B,bl[A-7],bl[A-16]);bl[A]=y|0,yl[A]=x|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:u,Dl:l,Eh:d,El:h,Fh:g,Fl:m,Gh:b,Gl:k,Hh:w,Hl:E}=this;for(let A=0;A<80;A++){const M=Uh(d,h,14)^Uh(d,h,18)^by(d,h,41),R=qh(d,h,14)^qh(d,h,18)^yy(d,h,41),N=d&g^~d&b,z=h&m^~h&k,F=Ebe(E,R,z,Ibe[A],yl[A]),L=kbe(F,w,M,N,Cbe[A],bl[A]),B=F|0,D=Uh(n,i,28)^by(n,i,34)^by(n,i,39),x=qh(n,i,28)^yy(n,i,34)^yy(n,i,39),y=n&s^n&a^s&a,f=i&o^i&c^o&c;w=b|0,E=k|0,b=g|0,k=m|0,g=d|0,m=h|0,{h:d,l:h}=cu(u|0,l|0,L|0,B|0),u=a|0,l=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const p=wbe(B,x,f);n=vbe(p,L,D,y),i=p|0}({h:n,l:i}=cu(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=cu(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=cu(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l}=cu(this.Dh|0,this.Dl|0,u|0,l|0),{h:d,l:h}=cu(this.Eh|0,this.El|0,d|0,h|0),{h:g,l:m}=cu(this.Fh|0,this.Fl|0,g|0,m|0),{h:b,l:k}=cu(this.Gh|0,this.Gl|0,b|0,k|0),{h:w,l:E}=cu(this.Hh|0,this.Hl|0,w|0,E|0),this.set(n,i,s,o,a,c,u,l,d,h,g,m,b,k,w,E)}roundClean(){Tp(bl,yl)}destroy(){Tp(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const RK=jK(()=>new Sbe),$be=jK(()=>new Mbe);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const DC=BigInt(0),WE=BigInt(1);function Pd(e,t=""){if(typeof e!="boolean"){const r=t&&`"${t}"`;throw new Error(r+"expected boolean, got type="+typeof e)}return e}function Fa(e,t,r=""){const n=J2(e),i=e?.length,s=t!==void 0;if(!n||s&&i!==t){const o=r&&`"${r}" `,a=s?` of length ${t}`:"",c=n?`length=${i}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+a+", got "+c)}return e}function wy(e){const t=e.toString(16);return t.length&1?"0"+t:t}function LK(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?DC:BigInt("0x"+e)}function m4(e){return LK(Ed(e))}function $m(e){return uh(e),LK(Ed(Uint8Array.from(e).reverse()))}function RC(e,t){return $v(e.toString(16).padStart(t*2,"0"))}function zK(e,t){return RC(e,t).reverse()}function xn(e,t,r){let n;if(typeof t=="string")try{n=$v(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(J2(t))n=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(e+" of length "+r+" expected, got "+i);return n}function dj(e){return Uint8Array.from(e)}const x8=e=>typeof e=="bigint"&&DC<=e;function Tbe(e,t,r){return x8(e)&&x8(t)&&x8(r)&&t<=e&&e<r}function VE(e,t,r,n){if(!Tbe(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function BK(e){let t;for(t=0;e>DC;e>>=WE,t+=1);return t}const X2=e=>(WE<<BigInt(e))-WE;function Nbe(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");const n=g=>new Uint8Array(g),i=g=>Uint8Array.of(g);let s=n(e),o=n(e),a=0;const c=()=>{s.fill(1),o.fill(0),a=0},u=(...g)=>r(o,s,...g),l=(g=n(0))=>{o=u(i(0),g),s=u(),g.length!==0&&(o=u(i(1),g),s=u())},d=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let g=0;const m=[];for(;g<t;){s=u();const b=s.slice();m.push(b),g+=s.length}return Ic(...m)};return(g,m)=>{c(),l(g);let b;for(;!(b=m(d()));)l();return c(),b}}function Q2(e,t,r={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function n(i,s,o){const a=e[i];if(o&&a===void 0)return;const c=typeof a;if(c!==s||a===null)throw new Error(`param "${i}" is invalid: expected ${s}, got ${c}`)}Object.entries(t).forEach(([i,s])=>n(i,s,!1)),Object.entries(r).forEach(([i,s])=>n(i,s,!0))}function Tv(e){const t=new WeakMap;return(r,...n)=>{const i=t.get(r);if(i!==void 0)return i;const s=e(r,...n);return t.set(r,s),s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ws=BigInt(0),Hi=BigInt(1),cd=BigInt(2),FK=BigInt(3),UK=BigInt(4),qK=BigInt(5),Obe=BigInt(7),HK=BigInt(8),jbe=BigInt(9),WK=BigInt(16);function Fn(e,t){const r=e%t;return r>=Ws?r:t+r}function _n(e,t,r){let n=e;for(;t-- >Ws;)n*=n,n%=r;return n}function hj(e,t){if(e===Ws)throw new Error("invert: expected non-zero number");if(t<=Ws)throw new Error("invert: expected positive modulus, got "+t);let r=Fn(e,t),n=t,i=Ws,s=Hi;for(;r!==Ws;){const a=n/r,c=n%r,u=i-s*a;n=r,r=c,i=s,s=u}if(n!==Hi)throw new Error("invert: does not exist");return Fn(i,t)}function LC(e,t,r){if(!e.eql(e.sqr(t),r))throw new Error("Cannot find square root")}function VK(e,t){const r=(e.ORDER+Hi)/UK,n=e.pow(t,r);return LC(e,n,t),n}function Pbe(e,t){const r=(e.ORDER-qK)/HK,n=e.mul(t,cd),i=e.pow(n,r),s=e.mul(t,i),o=e.mul(e.mul(s,cd),i),a=e.mul(s,e.sub(o,e.ONE));return LC(e,a,t),a}function Dbe(e){const t=lh(e),r=KK(e),n=r(t,t.neg(t.ONE)),i=r(t,n),s=r(t,t.neg(n)),o=(e+Obe)/WK;return(a,c)=>{let u=a.pow(c,o),l=a.mul(u,n);const d=a.mul(u,i),h=a.mul(u,s),g=a.eql(a.sqr(l),c),m=a.eql(a.sqr(d),c);u=a.cmov(u,l,g),l=a.cmov(h,d,m);const b=a.eql(a.sqr(l),c),k=a.cmov(u,l,b);return LC(a,k,c),k}}function KK(e){if(e<FK)throw new Error("sqrt is not defined for small field");let t=e-Hi,r=0;for(;t%cd===Ws;)t/=cd,r++;let n=cd;const i=lh(e);for(;pj(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return VK;let s=i.pow(n,t);const o=(t+Hi)/cd;return function(c,u){if(c.is0(u))return u;if(pj(c,u)!==1)throw new Error("Cannot find square root");let l=r,d=c.mul(c.ONE,s),h=c.pow(u,t),g=c.pow(u,o);for(;!c.eql(h,c.ONE);){if(c.is0(h))return c.ZERO;let m=1,b=c.sqr(h);for(;!c.eql(b,c.ONE);)if(m++,b=c.sqr(b),m===l)throw new Error("Cannot find square root");const k=Hi<<BigInt(l-m-1),w=c.pow(d,k);l=m,d=c.sqr(w),h=c.mul(h,d),g=c.mul(g,w)}return g}}function Rbe(e){return e%UK===FK?VK:e%HK===qK?Pbe:e%WK===jbe?Dbe(e):KK(e)}const Lbe=(e,t)=>(Fn(e,t)&Hi)===Hi,zbe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Bbe(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},r=zbe.reduce((n,i)=>(n[i]="function",n),t);return Q2(e,r),e}function Fbe(e,t,r){if(r<Ws)throw new Error("invalid exponent, negatives unsupported");if(r===Ws)return e.ONE;if(r===Hi)return t;let n=e.ONE,i=t;for(;r>Ws;)r&Hi&&(n=e.mul(n,i)),i=e.sqr(i),r>>=Hi;return n}function GK(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((o,a,c)=>e.is0(a)?o:(n[c]=o,e.mul(o,a)),e.ONE),s=e.inv(i);return t.reduceRight((o,a,c)=>e.is0(a)?o:(n[c]=e.mul(o,n[c]),e.mul(o,a)),s),n}function pj(e,t){const r=(e.ORDER-Hi)/cd,n=e.pow(t,r),i=e.eql(n,e.ONE),s=e.eql(n,e.ZERO),o=e.eql(n,e.neg(e.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function ZK(e,t){t!==void 0&&HE(t);const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function lh(e,t,r=!1,n={}){if(e<=Ws)throw new Error("invalid field: expected ORDER > 0, got "+e);let i,s,o=!1,a;if(typeof t=="object"&&t!=null){if(n.sqrt||r)throw new Error("cannot specify opts in two arguments");const h=t;h.BITS&&(i=h.BITS),h.sqrt&&(s=h.sqrt),typeof h.isLE=="boolean"&&(r=h.isLE),typeof h.modFromBytes=="boolean"&&(o=h.modFromBytes),a=h.allowedLengths}else typeof t=="number"&&(i=t),n.sqrt&&(s=n.sqrt);const{nBitLength:c,nByteLength:u}=ZK(e,i);if(u>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const d=Object.freeze({ORDER:e,isLE:r,BITS:c,BYTES:u,MASK:X2(c),ZERO:Ws,ONE:Hi,allowedLengths:a,create:h=>Fn(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return Ws<=h&&h<e},is0:h=>h===Ws,isValidNot0:h=>!d.is0(h)&&d.isValid(h),isOdd:h=>(h&Hi)===Hi,neg:h=>Fn(-h,e),eql:(h,g)=>h===g,sqr:h=>Fn(h*h,e),add:(h,g)=>Fn(h+g,e),sub:(h,g)=>Fn(h-g,e),mul:(h,g)=>Fn(h*g,e),pow:(h,g)=>Fbe(d,h,g),div:(h,g)=>Fn(h*hj(g,e),e),sqrN:h=>h*h,addN:(h,g)=>h+g,subN:(h,g)=>h-g,mulN:(h,g)=>h*g,inv:h=>hj(h,e),sqrt:s||(h=>(l||(l=Rbe(e)),l(d,h))),toBytes:h=>r?zK(h,u):RC(h,u),fromBytes:(h,g=!0)=>{if(a){if(!a.includes(h.length)||h.length>u)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+h.length);const b=new Uint8Array(u);b.set(h,r?0:b.length-h.length),h=b}if(h.length!==u)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+h.length);let m=r?$m(h):m4(h);if(o&&(m=Fn(m,e)),!g&&!d.isValid(m))throw new Error("invalid field element: outside of range 0..ORDER");return m},invertBatch:h=>GK(d,h),cmov:(h,g,m)=>m?g:h});return Object.freeze(d)}function YK(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function JK(e){const t=YK(e);return t+Math.ceil(t/2)}function Ube(e,t,r=!1){const n=e.length,i=YK(t),s=JK(t);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const o=r?$m(e):m4(e),a=Fn(o,t-Hi)+Hi;return r?zK(a,i):RC(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Np=BigInt(0),ud=BigInt(1);function Nv(e,t){const r=t.negate();return e?r:t}function ld(e,t){const r=GK(e.Fp,t.map(n=>n.Z));return t.map((n,i)=>e.fromAffine(n.toAffine(r[i])))}function XK(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function E8(e,t){XK(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1),i=2**e,s=X2(e),o=BigInt(e);return{windows:r,windowSize:n,mask:s,maxNumber:i,shiftBy:o}}function gj(e,t,r){const{windowSize:n,mask:i,maxNumber:s,shiftBy:o}=r;let a=Number(e&i),c=e>>o;a>n&&(a-=s,c+=ud);const u=t*n,l=u+Math.abs(a)-1,d=a===0,h=a<0,g=t%2!==0;return{nextN:c,offset:l,isZero:d,isNeg:h,isNegF:g,offsetF:u}}function qbe(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function Hbe(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}const k8=new WeakMap,QK=new WeakMap;function A8(e){return QK.get(e)||1}function mj(e){if(e!==Np)throw new Error("invalid wNAF")}let eG=class{constructor(t,r){this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=r}_unsafeLadder(t,r,n=this.ZERO){let i=t;for(;r>Np;)r&ud&&(n=n.add(i)),i=i.double(),r>>=ud;return n}precomputeWindow(t,r){const{windows:n,windowSize:i}=E8(r,this.bits),s=[];let o=t,a=o;for(let c=0;c<n;c++){a=o,s.push(a);for(let u=1;u<i;u++)a=a.add(o),s.push(a);o=a.double()}return s}wNAF(t,r,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let i=this.ZERO,s=this.BASE;const o=E8(t,this.bits);for(let a=0;a<o.windows;a++){const{nextN:c,offset:u,isZero:l,isNeg:d,isNegF:h,offsetF:g}=gj(n,a,o);n=c,l?s=s.add(Nv(h,r[g])):i=i.add(Nv(d,r[u]))}return mj(n),{p:i,f:s}}wNAFUnsafe(t,r,n,i=this.ZERO){const s=E8(t,this.bits);for(let o=0;o<s.windows&&n!==Np;o++){const{nextN:a,offset:c,isZero:u,isNeg:l}=gj(n,o,s);if(n=a,!u){const d=r[c];i=i.add(l?d.negate():d)}}return mj(n),i}getPrecomputes(t,r,n){let i=k8.get(r);return i||(i=this.precomputeWindow(r,t),t!==1&&(typeof n=="function"&&(i=n(i)),k8.set(r,i))),i}cached(t,r,n){const i=A8(t);return this.wNAF(i,this.getPrecomputes(i,t,n),r)}unsafe(t,r,n,i){const s=A8(t);return s===1?this._unsafeLadder(t,r,i):this.wNAFUnsafe(s,this.getPrecomputes(s,t,n),r,i)}createCache(t,r){XK(r,this.bits),QK.set(t,r),k8.delete(t)}hasCache(t){return A8(t)!==1}};function Wbe(e,t,r,n){let i=t,s=e.ZERO,o=e.ZERO;for(;r>Np||n>Np;)r&ud&&(s=s.add(i)),n&ud&&(o=o.add(i)),i=i.double(),r>>=ud,n>>=ud;return{p1:s,p2:o}}function tG(e,t,r,n){qbe(r,e),Hbe(n,t);const i=r.length,s=n.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,a=BK(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const u=X2(c),l=new Array(Number(u)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c;let h=o;for(let g=d;g>=0;g-=c){l.fill(o);for(let b=0;b<s;b++){const k=n[b],w=Number(k>>BigInt(g)&u);l[w]=l[w].add(r[b])}let m=o;for(let b=l.length-1,k=o;b>0;b--)k=k.add(l[b]),m=m.add(k);if(h=h.add(m),g!==0)for(let b=0;b<c;b++)h=h.double()}return h}function bj(e,t,r){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Bbe(t),t}else return lh(e,{isLE:r})}function rG(e,t,r={},n){if(n===void 0&&(n=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(const c of["p","n","h"]){const u=t[c];if(!(typeof u=="bigint"&&u>Np))throw new Error(`CURVE.${c} must be positive bigint`)}const i=bj(t.p,r.Fp,n),s=bj(t.n,r.Fn,n),a=["Gx","Gy","a",e==="weierstrass"?"b":"d"];for(const c of a)if(!i.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wl=BigInt(0),hi=BigInt(1),S8=BigInt(2),Vbe=BigInt(8);function Kbe(e,t,r,n){const i=e.sqr(r),s=e.sqr(n),o=e.add(e.mul(t.a,i),s),a=e.add(e.ONE,e.mul(t.d,e.mul(i,s)));return e.eql(o,a)}function Gbe(e,t={}){const r=rG("edwards",e,t,t.FpFnLE),{Fp:n,Fn:i}=r;let s=r.CURVE;const{h:o}=s;Q2(t,{},{uvRatio:"function"});const a=S8<<BigInt(i.BYTES*8)-hi,c=k=>n.create(k),u=t.uvRatio||((k,w)=>{try{return{isValid:!0,value:n.sqrt(n.div(k,w))}}catch{return{isValid:!1,value:wl}}});if(!Kbe(n,s,s.Gx,s.Gy))throw new Error("bad curve params: generator point");function l(k,w,E=!1){const A=E?hi:wl;return VE("coordinate "+k,w,A,a),w}function d(k){if(!(k instanceof m))throw new Error("ExtendedPoint expected")}const h=Tv((k,w)=>{const{X:E,Y:A,Z:M}=k,R=k.is0();w==null&&(w=R?Vbe:n.inv(M));const N=c(E*w),z=c(A*w),F=n.mul(M,w);if(R)return{x:wl,y:hi};if(F!==hi)throw new Error("invZ was invalid");return{x:N,y:z}}),g=Tv(k=>{const{a:w,d:E}=s;if(k.is0())throw new Error("bad point: ZERO");const{X:A,Y:M,Z:R,T:N}=k,z=c(A*A),F=c(M*M),L=c(R*R),B=c(L*L),D=c(z*w),x=c(L*c(D+F)),y=c(B+c(E*c(z*F)));if(x!==y)throw new Error("bad point: equation left != right (1)");const f=c(A*M),p=c(R*N);if(f!==p)throw new Error("bad point: equation left != right (2)");return!0});class m{constructor(w,E,A,M){this.X=l("x",w),this.Y=l("y",E),this.Z=l("z",A,!0),this.T=l("t",M),Object.freeze(this)}static CURVE(){return s}static fromAffine(w){if(w instanceof m)throw new Error("extended point not allowed");const{x:E,y:A}=w||{};return l("x",E),l("y",A),new m(E,A,hi,c(E*A))}static fromBytes(w,E=!1){const A=n.BYTES,{a:M,d:R}=s;w=dj(Fa(w,A,"point")),Pd(E,"zip215");const N=dj(w),z=w[A-1];N[A-1]=z&-129;const F=$m(N),L=E?a:n.ORDER;VE("point.y",F,wl,L);const B=c(F*F),D=c(B-hi),x=c(R*B-M);let{isValid:y,value:f}=u(D,x);if(!y)throw new Error("bad point: invalid y coordinate");const p=(f&hi)===hi,v=(z&128)!==0;if(!E&&f===wl&&v)throw new Error("bad point: x=0 and x_0=1");return v!==p&&(f=c(-f)),m.fromAffine({x:f,y:F})}static fromHex(w,E=!1){return m.fromBytes(xn("point",w),E)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(w=8,E=!0){return b.createCache(this,w),E||this.multiply(S8),this}assertValidity(){g(this)}equals(w){d(w);const{X:E,Y:A,Z:M}=this,{X:R,Y:N,Z:z}=w,F=c(E*z),L=c(R*M),B=c(A*z),D=c(N*M);return F===L&&B===D}is0(){return this.equals(m.ZERO)}negate(){return new m(c(-this.X),this.Y,this.Z,c(-this.T))}double(){const{a:w}=s,{X:E,Y:A,Z:M}=this,R=c(E*E),N=c(A*A),z=c(S8*c(M*M)),F=c(w*R),L=E+A,B=c(c(L*L)-R-N),D=F+N,x=D-z,y=F-N,f=c(B*x),p=c(D*y),v=c(B*y),I=c(x*D);return new m(f,p,I,v)}add(w){d(w);const{a:E,d:A}=s,{X:M,Y:R,Z:N,T:z}=this,{X:F,Y:L,Z:B,T:D}=w,x=c(M*F),y=c(R*L),f=c(z*A*D),p=c(N*B),v=c((M+R)*(F+L)-x-y),I=p-f,j=p+f,$=c(y-E*x),C=c(v*I),O=c(j*$),_=c(v*$),P=c(I*j);return new m(C,O,P,_)}subtract(w){return this.add(w.negate())}multiply(w){if(!i.isValidNot0(w))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:E,f:A}=b.cached(this,w,M=>ld(m,M));return ld(m,[E,A])[0]}multiplyUnsafe(w,E=m.ZERO){if(!i.isValid(w))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return w===wl?m.ZERO:this.is0()||w===hi?this:b.unsafe(this,w,A=>ld(m,A),E)}isSmallOrder(){return this.multiplyUnsafe(o).is0()}isTorsionFree(){return b.unsafe(this,s.n).is0()}toAffine(w){return h(this,w)}clearCofactor(){return o===hi?this:this.multiplyUnsafe(o)}toBytes(){const{x:w,y:E}=this.toAffine(),A=n.toBytes(E);return A[A.length-1]|=w&hi?128:0,A}toHex(){return Ed(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(w){return ld(m,w)}static msm(w,E){return tG(m,i,w,E)}_setWindowSize(w){this.precompute(w)}toRawBytes(){return this.toBytes()}}m.BASE=new m(s.Gx,s.Gy,hi,c(s.Gx*s.Gy)),m.ZERO=new m(wl,hi,hi,wl),m.Fp=n,m.Fn=i;const b=new eG(m,i.BITS);return m.BASE.precompute(8),m}function Zbe(e,t,r={}){if(typeof t!="function")throw new Error('"hash" function param is required');Q2(r,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:n}=r,{BASE:i,Fp:s,Fn:o}=e,a=r.randomBytes||PC,c=r.adjustScalarBytes||(L=>L),u=r.domain||((L,B,D)=>{if(Pd(D,"phflag"),B.length||D)throw new Error("Contexts/pre-hash are not supported");return L});function l(L){return o.create($m(L))}function d(L){const B=A.secretKey;L=xn("private key",L,B);const D=xn("hashed private key",t(L),2*B),x=c(D.slice(0,B)),y=D.slice(B,2*B),f=l(x);return{head:x,prefix:y,scalar:f}}function h(L){const{head:B,prefix:D,scalar:x}=d(L),y=i.multiply(x),f=y.toBytes();return{head:B,prefix:D,scalar:x,point:y,pointBytes:f}}function g(L){return h(L).pointBytes}function m(L=Uint8Array.of(),...B){const D=Ic(...B);return l(t(u(D,xn("context",L),!!n)))}function b(L,B,D={}){L=xn("message",L),n&&(L=n(L));const{prefix:x,scalar:y,pointBytes:f}=h(B),p=m(D.context,x,L),v=i.multiply(p).toBytes(),I=m(D.context,v,f,L),j=o.create(p+I*y);if(!o.isValid(j))throw new Error("sign failed: invalid s");const $=Ic(v,o.toBytes(j));return Fa($,A.signature,"result")}const k={zip215:!0};function w(L,B,D,x=k){const{context:y,zip215:f}=x,p=A.signature;L=xn("signature",L,p),B=xn("message",B),D=xn("publicKey",D,A.publicKey),f!==void 0&&Pd(f,"zip215"),n&&(B=n(B));const v=p/2,I=L.subarray(0,v),j=$m(L.subarray(v,p));let $,C,O;try{$=e.fromBytes(D,f),C=e.fromBytes(I,f),O=i.multiplyUnsafe(j)}catch{return!1}if(!f&&$.isSmallOrder())return!1;const _=m(y,C.toBytes(),$.toBytes(),B);return C.add($.multiplyUnsafe(_)).subtract(O).clearCofactor().is0()}const E=s.BYTES,A={secretKey:E,publicKey:E,signature:2*E,seed:E};function M(L=a(A.seed)){return Fa(L,A.seed,"seed")}function R(L){const B=F.randomSecretKey(L);return{secretKey:B,publicKey:g(B)}}function N(L){return J2(L)&&L.length===o.BYTES}function z(L,B){try{return!!e.fromBytes(L,B)}catch{return!1}}const F={getExtendedPublicKey:h,randomSecretKey:M,isValidSecretKey:N,isValidPublicKey:z,toMontgomery(L){const{y:B}=e.fromBytes(L),D=A.publicKey,x=D===32;if(!x&&D!==57)throw new Error("only defined for 25519 and 448");const y=x?s.div(hi+B,hi-B):s.div(B-hi,B+hi);return s.toBytes(y)},toMontgomerySecret(L){const B=A.secretKey;Fa(L,B);const D=t(L.subarray(0,B));return c(D).subarray(0,B)},randomPrivateKey:M,precompute(L=8,B=e.BASE){return B.precompute(L,!1)}};return Object.freeze({keygen:R,getPublicKey:g,sign:b,verify:w,utils:F,Point:e,lengths:A})}function Ybe(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp,n=lh(t.n,e.nBitLength,!0),i={Fp:r,Fn:n,uvRatio:e.uvRatio},s={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:i,hash:e.hash,eddsaOpts:s}}function Jbe(e,t){const r=t.Point;return Object.assign({},t,{ExtendedPoint:r,CURVE:e,nBitLength:r.Fn.BITS,nByteLength:r.Fn.BYTES})}function Xbe(e){const{CURVE:t,curveOpts:r,hash:n,eddsaOpts:i}=Ybe(e),s=Gbe(t,r),o=Zbe(s,n,i);return Jbe(e,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Qbe=BigInt(1),yj=BigInt(2);BigInt(3);const eye=BigInt(5),tye=BigInt(8),zC=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),nG={p:zC,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:tye,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function rye(e){const t=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=zC,a=e*e%s*e%s,c=_n(a,yj,s)*a%s,u=_n(c,Qbe,s)*e%s,l=_n(u,eye,s)*u%s,d=_n(l,t,s)*l%s,h=_n(d,r,s)*d%s,g=_n(h,n,s)*h%s,m=_n(g,i,s)*g%s,b=_n(m,i,s)*g%s,k=_n(b,t,s)*l%s;return{pow_p_5_8:_n(k,yj,s)*e%s,b2:a}}function nye(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const wj=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function iye(e,t){const r=zC,n=Fn(t*t*t,r),i=Fn(n*n*t,r),s=rye(e*i).pow_p_5_8;let o=Fn(e*n*s,r);const a=Fn(t*o*o,r),c=o,u=Fn(o*wj,r),l=a===e,d=a===Fn(-e,r),h=a===Fn(-e*wj,r);return l&&(o=c),(d||h)&&(o=u),Lbe(o,r)&&(o=Fn(-o,r)),{isValid:l||d,value:o}}const sye=lh(nG.p,{isLE:!0}),oye={...nG,Fp:sye,hash:$be,adjustScalarBytes:nye,uvRatio:iye},eb=Xbe(oye);var zw={exports:{}},aye=zw.exports,vj;function cye(){return vj||(vj=1,function(e){(function(t,r){function n(y,f){if(!y)throw new Error(f||"Assertion failed")}function i(y,f){y.super_=f;var p=function(){};p.prototype=f.prototype,y.prototype=new p,y.prototype.constructor=y}function s(y,f,p){if(s.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(y||0,f||10,p||"be"))}typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=U2.Buffer}catch{}s.isBN=function(f){return f instanceof s?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===s.wordSize&&Array.isArray(f.words)},s.max=function(f,p){return f.cmp(p)>0?f:p},s.min=function(f,p){return f.cmp(p)<0?f:p},s.prototype._init=function(f,p,v){if(typeof f=="number")return this._initNumber(f,p,v);if(typeof f=="object")return this._initArray(f,p,v);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var I=0;f[0]==="-"&&(I++,this.negative=1),I<f.length&&(p===16?this._parseHex(f,I,v):(this._parseBase(f,p,I),v==="le"&&this._initArray(this.toArray(),p,v)))},s.prototype._initNumber=function(f,p,v){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(n(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),p,v)},s.prototype._initArray=function(f,p,v){if(n(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var j,$,C=0;if(v==="be")for(I=f.length-1,j=0;I>=0;I-=3)$=f[I]|f[I-1]<<8|f[I-2]<<16,this.words[j]|=$<<C&67108863,this.words[j+1]=$>>>26-C&67108863,C+=24,C>=26&&(C-=26,j++);else if(v==="le")for(I=0,j=0;I<f.length;I+=3)$=f[I]|f[I+1]<<8|f[I+2]<<16,this.words[j]|=$<<C&67108863,this.words[j+1]=$>>>26-C&67108863,C+=24,C>=26&&(C-=26,j++);return this._strip()};function a(y,f){var p=y.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+y)}function c(y,f,p){var v=a(y,p);return p-1>=f&&(v|=a(y,p-1)<<4),v}s.prototype._parseHex=function(f,p,v){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var j=0,$=0,C;if(v==="be")for(I=f.length-1;I>=p;I-=2)C=c(f,p,I)<<j,this.words[$]|=C&67108863,j>=18?(j-=18,$+=1,this.words[$]|=C>>>26):j+=8;else{var O=f.length-p;for(I=O%2===0?p+1:p;I<f.length;I+=2)C=c(f,p,I)<<j,this.words[$]|=C&67108863,j>=18?(j-=18,$+=1,this.words[$]|=C>>>26):j+=8}this._strip()};function u(y,f,p,v){for(var I=0,j=0,$=Math.min(y.length,p),C=f;C<$;C++){var O=y.charCodeAt(C)-48;I*=v,O>=49?j=O-49+10:O>=17?j=O-17+10:j=O,n(O>=0&&j<v,"Invalid character"),I+=j}return I}s.prototype._parseBase=function(f,p,v){this.words=[0],this.length=1;for(var I=0,j=1;j<=67108863;j*=p)I++;I--,j=j/p|0;for(var $=f.length-v,C=$%I,O=Math.min($,$-C)+v,_=0,P=v;P<O;P+=I)_=u(f,P,P+I,p),this.imuln(j),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_);if(C!==0){var q=1;for(_=u(f,P,f.length,p),P=0;P<C;P++)q*=p;this.imuln(q),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_)}this._strip()},s.prototype.copy=function(f){f.words=new Array(this.length);for(var p=0;p<this.length;p++)f.words[p]=this.words[p];f.length=this.length,f.negative=this.negative,f.red=this.red};function l(y,f){y.words=f.words,y.length=f.length,y.negative=f.negative,y.red=f.red}if(s.prototype._move=function(f){l(f,this)},s.prototype.clone=function(){var f=new s(null);return this.copy(f),f},s.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(f,p){f=f||10,p=p|0||1;var v;if(f===16||f==="hex"){v="";for(var I=0,j=0,$=0;$<this.length;$++){var C=this.words[$],O=((C<<I|j)&16777215).toString(16);j=C>>>24-I&16777215,I+=2,I>=26&&(I-=26,$--),j!==0||$!==this.length-1?v=h[6-O.length]+O+v:v=O+v}for(j!==0&&(v=j.toString(16)+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(f===(f|0)&&f>=2&&f<=36){var _=g[f],P=m[f];v="";var q=this.clone();for(q.negative=0;!q.isZero();){var W=q.modrn(P).toString(f);q=q.idivn(P),q.isZero()?v=W+v:v=h[_-W.length]+W+v}for(this.isZero()&&(v="0"+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(f,p){return this.toArrayLike(o,f,p)}),s.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var b=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};s.prototype.toArrayLike=function(f,p,v){this._strip();var I=this.byteLength(),j=v||Math.max(1,I);n(I<=j,"byte array longer than desired length"),n(j>0,"Requested array length <= 0");var $=b(f,j),C=p==="le"?"LE":"BE";return this["_toArrayLike"+C]($,I),$},s.prototype._toArrayLikeLE=function(f,p){for(var v=0,I=0,j=0,$=0;j<this.length;j++){var C=this.words[j]<<$|I;f[v++]=C&255,v<f.length&&(f[v++]=C>>8&255),v<f.length&&(f[v++]=C>>16&255),$===6?(v<f.length&&(f[v++]=C>>24&255),I=0,$=0):(I=C>>>24,$+=2)}if(v<f.length)for(f[v++]=I;v<f.length;)f[v++]=0},s.prototype._toArrayLikeBE=function(f,p){for(var v=f.length-1,I=0,j=0,$=0;j<this.length;j++){var C=this.words[j]<<$|I;f[v--]=C&255,v>=0&&(f[v--]=C>>8&255),v>=0&&(f[v--]=C>>16&255),$===6?(v>=0&&(f[v--]=C>>24&255),I=0,$=0):(I=C>>>24,$+=2)}if(v>=0)for(f[v--]=I;v>=0;)f[v--]=0},Math.clz32?s.prototype._countBits=function(f){return 32-Math.clz32(f)}:s.prototype._countBits=function(f){var p=f,v=0;return p>=4096&&(v+=13,p>>>=13),p>=64&&(v+=7,p>>>=7),p>=8&&(v+=4,p>>>=4),p>=2&&(v+=2,p>>>=2),v+p},s.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,v=0;return(p&8191)===0&&(v+=13,p>>>=13),(p&127)===0&&(v+=7,p>>>=7),(p&15)===0&&(v+=4,p>>>=4),(p&3)===0&&(v+=2,p>>>=2),(p&1)===0&&v++,v},s.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function k(y){for(var f=new Array(y.bitLength()),p=0;p<f.length;p++){var v=p/26|0,I=p%26;f[p]=y.words[v]>>>I&1}return f}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;p<this.length;p++){var v=this._zeroBits(this.words[p]);if(f+=v,v!==26)break}return f},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},s.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var p=0;p<f.length;p++)this.words[p]=this.words[p]|f.words[p];return this._strip()},s.prototype.ior=function(f){return n((this.negative|f.negative)===0),this.iuor(f)},s.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},s.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},s.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var v=0;v<p.length;v++)this.words[v]=this.words[v]&f.words[v];return this.length=p.length,this._strip()},s.prototype.iand=function(f){return n((this.negative|f.negative)===0),this.iuand(f)},s.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},s.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},s.prototype.iuxor=function(f){var p,v;this.length>f.length?(p=this,v=f):(p=f,v=this);for(var I=0;I<v.length;I++)this.words[I]=p.words[I]^v.words[I];if(this!==p)for(;I<p.length;I++)this.words[I]=p.words[I];return this.length=p.length,this._strip()},s.prototype.ixor=function(f){return n((this.negative|f.negative)===0),this.iuxor(f)},s.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},s.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},s.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,v=f%26;this._expand(p),v>0&&p--;for(var I=0;I<p;I++)this.words[I]=~this.words[I]&67108863;return v>0&&(this.words[I]=~this.words[I]&67108863>>26-v),this._strip()},s.prototype.notn=function(f){return this.clone().inotn(f)},s.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var v=f/26|0,I=f%26;return this._expand(v+1),p?this.words[v]=this.words[v]|1<<I:this.words[v]=this.words[v]&~(1<<I),this._strip()},s.prototype.iadd=function(f){var p;if(this.negative!==0&&f.negative===0)return this.negative=0,p=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,p=this.isub(f),f.negative=1,p._normSign();var v,I;this.length>f.length?(v=this,I=f):(v=f,I=this);for(var j=0,$=0;$<I.length;$++)p=(v.words[$]|0)+(I.words[$]|0)+j,this.words[$]=p&67108863,j=p>>>26;for(;j!==0&&$<v.length;$++)p=(v.words[$]|0)+j,this.words[$]=p&67108863,j=p>>>26;if(this.length=v.length,j!==0)this.words[this.length]=j,this.length++;else if(v!==this)for(;$<v.length;$++)this.words[$]=v.words[$];return this},s.prototype.add=function(f){var p;return f.negative!==0&&this.negative===0?(f.negative=0,p=this.sub(f),f.negative^=1,p):f.negative===0&&this.negative!==0?(this.negative=0,p=f.sub(this),this.negative=1,p):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},s.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var v=this.cmp(f);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,j;v>0?(I=this,j=f):(I=f,j=this);for(var $=0,C=0;C<j.length;C++)p=(I.words[C]|0)-(j.words[C]|0)+$,$=p>>26,this.words[C]=p&67108863;for(;$!==0&&C<I.length;C++)p=(I.words[C]|0)+$,$=p>>26,this.words[C]=p&67108863;if($===0&&C<I.length&&I!==this)for(;C<I.length;C++)this.words[C]=I.words[C];return this.length=Math.max(this.length,C),I!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(f){return this.clone().isub(f)};function w(y,f,p){p.negative=f.negative^y.negative;var v=y.length+f.length|0;p.length=v,v=v-1|0;var I=y.words[0]|0,j=f.words[0]|0,$=I*j,C=$&67108863,O=$/67108864|0;p.words[0]=C;for(var _=1;_<v;_++){for(var P=O>>>26,q=O&67108863,W=Math.min(_,f.length-1),K=Math.max(0,_-y.length+1);K<=W;K++){var Y=_-K|0;I=y.words[Y]|0,j=f.words[K]|0,$=I*j+q,P+=$/67108864|0,q=$&67108863}p.words[_]=q|0,O=P|0}return O!==0?p.words[_]=O|0:p.length--,p._strip()}var E=function(f,p,v){var I=f.words,j=p.words,$=v.words,C=0,O,_,P,q=I[0]|0,W=q&8191,K=q>>>13,Y=I[1]|0,te=Y&8191,re=Y>>>13,be=I[2]|0,ve=be&8191,ye=be>>>13,Se=I[3]|0,_e=Se&8191,ke=Se>>>13,it=I[4]|0,Re=it&8191,J=it>>>13,ne=I[5]|0,le=ne&8191,he=ne>>>13,Pe=I[6]|0,xe=Pe&8191,oe=Pe>>>13,me=I[7]|0,je=me&8191,U=me>>>13,S=I[8]|0,T=S&8191,H=S>>>13,V=I[9]|0,G=V&8191,Z=V>>>13,Ee=j[0]|0,Ie=Ee&8191,ee=Ee>>>13,se=j[1]|0,we=se&8191,Te=se>>>13,yt=j[2]|0,De=yt&8191,Ke=yt>>>13,qt=j[3]|0,ut=qt&8191,We=qt>>>13,er=j[4]|0,wt=er&8191,qe=er>>>13,_r=j[5]|0,It=_r&8191,tt=_r>>>13,tr=j[6]|0,St=tr&8191,Ye=tr>>>13,rr=j[7]|0,mt=rr&8191,rt=rr>>>13,xr=j[8]|0,Ct=xr&8191,nt=xr>>>13,ar=j[9]|0,pt=ar&8191,Mt=ar>>>13;v.negative=f.negative^p.negative,v.length=19,O=Math.imul(W,Ie),_=Math.imul(W,ee),_=_+Math.imul(K,Ie)|0,P=Math.imul(K,ee);var Ii=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,O=Math.imul(te,Ie),_=Math.imul(te,ee),_=_+Math.imul(re,Ie)|0,P=Math.imul(re,ee),O=O+Math.imul(W,we)|0,_=_+Math.imul(W,Te)|0,_=_+Math.imul(K,we)|0,P=P+Math.imul(K,Te)|0;var Dn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,O=Math.imul(ve,Ie),_=Math.imul(ve,ee),_=_+Math.imul(ye,Ie)|0,P=Math.imul(ye,ee),O=O+Math.imul(te,we)|0,_=_+Math.imul(te,Te)|0,_=_+Math.imul(re,we)|0,P=P+Math.imul(re,Te)|0,O=O+Math.imul(W,De)|0,_=_+Math.imul(W,Ke)|0,_=_+Math.imul(K,De)|0,P=P+Math.imul(K,Ke)|0;var si=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(si>>>26)|0,si&=67108863,O=Math.imul(_e,Ie),_=Math.imul(_e,ee),_=_+Math.imul(ke,Ie)|0,P=Math.imul(ke,ee),O=O+Math.imul(ve,we)|0,_=_+Math.imul(ve,Te)|0,_=_+Math.imul(ye,we)|0,P=P+Math.imul(ye,Te)|0,O=O+Math.imul(te,De)|0,_=_+Math.imul(te,Ke)|0,_=_+Math.imul(re,De)|0,P=P+Math.imul(re,Ke)|0,O=O+Math.imul(W,ut)|0,_=_+Math.imul(W,We)|0,_=_+Math.imul(K,ut)|0,P=P+Math.imul(K,We)|0;var ms=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ms>>>26)|0,ms&=67108863,O=Math.imul(Re,Ie),_=Math.imul(Re,ee),_=_+Math.imul(J,Ie)|0,P=Math.imul(J,ee),O=O+Math.imul(_e,we)|0,_=_+Math.imul(_e,Te)|0,_=_+Math.imul(ke,we)|0,P=P+Math.imul(ke,Te)|0,O=O+Math.imul(ve,De)|0,_=_+Math.imul(ve,Ke)|0,_=_+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0,O=O+Math.imul(te,ut)|0,_=_+Math.imul(te,We)|0,_=_+Math.imul(re,ut)|0,P=P+Math.imul(re,We)|0,O=O+Math.imul(W,wt)|0,_=_+Math.imul(W,qe)|0,_=_+Math.imul(K,wt)|0,P=P+Math.imul(K,qe)|0;var wn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(wn>>>26)|0,wn&=67108863,O=Math.imul(le,Ie),_=Math.imul(le,ee),_=_+Math.imul(he,Ie)|0,P=Math.imul(he,ee),O=O+Math.imul(Re,we)|0,_=_+Math.imul(Re,Te)|0,_=_+Math.imul(J,we)|0,P=P+Math.imul(J,Te)|0,O=O+Math.imul(_e,De)|0,_=_+Math.imul(_e,Ke)|0,_=_+Math.imul(ke,De)|0,P=P+Math.imul(ke,Ke)|0,O=O+Math.imul(ve,ut)|0,_=_+Math.imul(ve,We)|0,_=_+Math.imul(ye,ut)|0,P=P+Math.imul(ye,We)|0,O=O+Math.imul(te,wt)|0,_=_+Math.imul(te,qe)|0,_=_+Math.imul(re,wt)|0,P=P+Math.imul(re,qe)|0,O=O+Math.imul(W,It)|0,_=_+Math.imul(W,tt)|0,_=_+Math.imul(K,It)|0,P=P+Math.imul(K,tt)|0;var ro=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ro>>>26)|0,ro&=67108863,O=Math.imul(xe,Ie),_=Math.imul(xe,ee),_=_+Math.imul(oe,Ie)|0,P=Math.imul(oe,ee),O=O+Math.imul(le,we)|0,_=_+Math.imul(le,Te)|0,_=_+Math.imul(he,we)|0,P=P+Math.imul(he,Te)|0,O=O+Math.imul(Re,De)|0,_=_+Math.imul(Re,Ke)|0,_=_+Math.imul(J,De)|0,P=P+Math.imul(J,Ke)|0,O=O+Math.imul(_e,ut)|0,_=_+Math.imul(_e,We)|0,_=_+Math.imul(ke,ut)|0,P=P+Math.imul(ke,We)|0,O=O+Math.imul(ve,wt)|0,_=_+Math.imul(ve,qe)|0,_=_+Math.imul(ye,wt)|0,P=P+Math.imul(ye,qe)|0,O=O+Math.imul(te,It)|0,_=_+Math.imul(te,tt)|0,_=_+Math.imul(re,It)|0,P=P+Math.imul(re,tt)|0,O=O+Math.imul(W,St)|0,_=_+Math.imul(W,Ye)|0,_=_+Math.imul(K,St)|0,P=P+Math.imul(K,Ye)|0;var no=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(no>>>26)|0,no&=67108863,O=Math.imul(je,Ie),_=Math.imul(je,ee),_=_+Math.imul(U,Ie)|0,P=Math.imul(U,ee),O=O+Math.imul(xe,we)|0,_=_+Math.imul(xe,Te)|0,_=_+Math.imul(oe,we)|0,P=P+Math.imul(oe,Te)|0,O=O+Math.imul(le,De)|0,_=_+Math.imul(le,Ke)|0,_=_+Math.imul(he,De)|0,P=P+Math.imul(he,Ke)|0,O=O+Math.imul(Re,ut)|0,_=_+Math.imul(Re,We)|0,_=_+Math.imul(J,ut)|0,P=P+Math.imul(J,We)|0,O=O+Math.imul(_e,wt)|0,_=_+Math.imul(_e,qe)|0,_=_+Math.imul(ke,wt)|0,P=P+Math.imul(ke,qe)|0,O=O+Math.imul(ve,It)|0,_=_+Math.imul(ve,tt)|0,_=_+Math.imul(ye,It)|0,P=P+Math.imul(ye,tt)|0,O=O+Math.imul(te,St)|0,_=_+Math.imul(te,Ye)|0,_=_+Math.imul(re,St)|0,P=P+Math.imul(re,Ye)|0,O=O+Math.imul(W,mt)|0,_=_+Math.imul(W,rt)|0,_=_+Math.imul(K,mt)|0,P=P+Math.imul(K,rt)|0;var io=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(io>>>26)|0,io&=67108863,O=Math.imul(T,Ie),_=Math.imul(T,ee),_=_+Math.imul(H,Ie)|0,P=Math.imul(H,ee),O=O+Math.imul(je,we)|0,_=_+Math.imul(je,Te)|0,_=_+Math.imul(U,we)|0,P=P+Math.imul(U,Te)|0,O=O+Math.imul(xe,De)|0,_=_+Math.imul(xe,Ke)|0,_=_+Math.imul(oe,De)|0,P=P+Math.imul(oe,Ke)|0,O=O+Math.imul(le,ut)|0,_=_+Math.imul(le,We)|0,_=_+Math.imul(he,ut)|0,P=P+Math.imul(he,We)|0,O=O+Math.imul(Re,wt)|0,_=_+Math.imul(Re,qe)|0,_=_+Math.imul(J,wt)|0,P=P+Math.imul(J,qe)|0,O=O+Math.imul(_e,It)|0,_=_+Math.imul(_e,tt)|0,_=_+Math.imul(ke,It)|0,P=P+Math.imul(ke,tt)|0,O=O+Math.imul(ve,St)|0,_=_+Math.imul(ve,Ye)|0,_=_+Math.imul(ye,St)|0,P=P+Math.imul(ye,Ye)|0,O=O+Math.imul(te,mt)|0,_=_+Math.imul(te,rt)|0,_=_+Math.imul(re,mt)|0,P=P+Math.imul(re,rt)|0,O=O+Math.imul(W,Ct)|0,_=_+Math.imul(W,nt)|0,_=_+Math.imul(K,Ct)|0,P=P+Math.imul(K,nt)|0;var so=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(so>>>26)|0,so&=67108863,O=Math.imul(G,Ie),_=Math.imul(G,ee),_=_+Math.imul(Z,Ie)|0,P=Math.imul(Z,ee),O=O+Math.imul(T,we)|0,_=_+Math.imul(T,Te)|0,_=_+Math.imul(H,we)|0,P=P+Math.imul(H,Te)|0,O=O+Math.imul(je,De)|0,_=_+Math.imul(je,Ke)|0,_=_+Math.imul(U,De)|0,P=P+Math.imul(U,Ke)|0,O=O+Math.imul(xe,ut)|0,_=_+Math.imul(xe,We)|0,_=_+Math.imul(oe,ut)|0,P=P+Math.imul(oe,We)|0,O=O+Math.imul(le,wt)|0,_=_+Math.imul(le,qe)|0,_=_+Math.imul(he,wt)|0,P=P+Math.imul(he,qe)|0,O=O+Math.imul(Re,It)|0,_=_+Math.imul(Re,tt)|0,_=_+Math.imul(J,It)|0,P=P+Math.imul(J,tt)|0,O=O+Math.imul(_e,St)|0,_=_+Math.imul(_e,Ye)|0,_=_+Math.imul(ke,St)|0,P=P+Math.imul(ke,Ye)|0,O=O+Math.imul(ve,mt)|0,_=_+Math.imul(ve,rt)|0,_=_+Math.imul(ye,mt)|0,P=P+Math.imul(ye,rt)|0,O=O+Math.imul(te,Ct)|0,_=_+Math.imul(te,nt)|0,_=_+Math.imul(re,Ct)|0,P=P+Math.imul(re,nt)|0,O=O+Math.imul(W,pt)|0,_=_+Math.imul(W,Mt)|0,_=_+Math.imul(K,pt)|0,P=P+Math.imul(K,Mt)|0;var oo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(oo>>>26)|0,oo&=67108863,O=Math.imul(G,we),_=Math.imul(G,Te),_=_+Math.imul(Z,we)|0,P=Math.imul(Z,Te),O=O+Math.imul(T,De)|0,_=_+Math.imul(T,Ke)|0,_=_+Math.imul(H,De)|0,P=P+Math.imul(H,Ke)|0,O=O+Math.imul(je,ut)|0,_=_+Math.imul(je,We)|0,_=_+Math.imul(U,ut)|0,P=P+Math.imul(U,We)|0,O=O+Math.imul(xe,wt)|0,_=_+Math.imul(xe,qe)|0,_=_+Math.imul(oe,wt)|0,P=P+Math.imul(oe,qe)|0,O=O+Math.imul(le,It)|0,_=_+Math.imul(le,tt)|0,_=_+Math.imul(he,It)|0,P=P+Math.imul(he,tt)|0,O=O+Math.imul(Re,St)|0,_=_+Math.imul(Re,Ye)|0,_=_+Math.imul(J,St)|0,P=P+Math.imul(J,Ye)|0,O=O+Math.imul(_e,mt)|0,_=_+Math.imul(_e,rt)|0,_=_+Math.imul(ke,mt)|0,P=P+Math.imul(ke,rt)|0,O=O+Math.imul(ve,Ct)|0,_=_+Math.imul(ve,nt)|0,_=_+Math.imul(ye,Ct)|0,P=P+Math.imul(ye,nt)|0,O=O+Math.imul(te,pt)|0,_=_+Math.imul(te,Mt)|0,_=_+Math.imul(re,pt)|0,P=P+Math.imul(re,Mt)|0;var Ji=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Ji>>>26)|0,Ji&=67108863,O=Math.imul(G,De),_=Math.imul(G,Ke),_=_+Math.imul(Z,De)|0,P=Math.imul(Z,Ke),O=O+Math.imul(T,ut)|0,_=_+Math.imul(T,We)|0,_=_+Math.imul(H,ut)|0,P=P+Math.imul(H,We)|0,O=O+Math.imul(je,wt)|0,_=_+Math.imul(je,qe)|0,_=_+Math.imul(U,wt)|0,P=P+Math.imul(U,qe)|0,O=O+Math.imul(xe,It)|0,_=_+Math.imul(xe,tt)|0,_=_+Math.imul(oe,It)|0,P=P+Math.imul(oe,tt)|0,O=O+Math.imul(le,St)|0,_=_+Math.imul(le,Ye)|0,_=_+Math.imul(he,St)|0,P=P+Math.imul(he,Ye)|0,O=O+Math.imul(Re,mt)|0,_=_+Math.imul(Re,rt)|0,_=_+Math.imul(J,mt)|0,P=P+Math.imul(J,rt)|0,O=O+Math.imul(_e,Ct)|0,_=_+Math.imul(_e,nt)|0,_=_+Math.imul(ke,Ct)|0,P=P+Math.imul(ke,nt)|0,O=O+Math.imul(ve,pt)|0,_=_+Math.imul(ve,Mt)|0,_=_+Math.imul(ye,pt)|0,P=P+Math.imul(ye,Mt)|0;var ao=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ao>>>26)|0,ao&=67108863,O=Math.imul(G,ut),_=Math.imul(G,We),_=_+Math.imul(Z,ut)|0,P=Math.imul(Z,We),O=O+Math.imul(T,wt)|0,_=_+Math.imul(T,qe)|0,_=_+Math.imul(H,wt)|0,P=P+Math.imul(H,qe)|0,O=O+Math.imul(je,It)|0,_=_+Math.imul(je,tt)|0,_=_+Math.imul(U,It)|0,P=P+Math.imul(U,tt)|0,O=O+Math.imul(xe,St)|0,_=_+Math.imul(xe,Ye)|0,_=_+Math.imul(oe,St)|0,P=P+Math.imul(oe,Ye)|0,O=O+Math.imul(le,mt)|0,_=_+Math.imul(le,rt)|0,_=_+Math.imul(he,mt)|0,P=P+Math.imul(he,rt)|0,O=O+Math.imul(Re,Ct)|0,_=_+Math.imul(Re,nt)|0,_=_+Math.imul(J,Ct)|0,P=P+Math.imul(J,nt)|0,O=O+Math.imul(_e,pt)|0,_=_+Math.imul(_e,Mt)|0,_=_+Math.imul(ke,pt)|0,P=P+Math.imul(ke,Mt)|0;var co=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(co>>>26)|0,co&=67108863,O=Math.imul(G,wt),_=Math.imul(G,qe),_=_+Math.imul(Z,wt)|0,P=Math.imul(Z,qe),O=O+Math.imul(T,It)|0,_=_+Math.imul(T,tt)|0,_=_+Math.imul(H,It)|0,P=P+Math.imul(H,tt)|0,O=O+Math.imul(je,St)|0,_=_+Math.imul(je,Ye)|0,_=_+Math.imul(U,St)|0,P=P+Math.imul(U,Ye)|0,O=O+Math.imul(xe,mt)|0,_=_+Math.imul(xe,rt)|0,_=_+Math.imul(oe,mt)|0,P=P+Math.imul(oe,rt)|0,O=O+Math.imul(le,Ct)|0,_=_+Math.imul(le,nt)|0,_=_+Math.imul(he,Ct)|0,P=P+Math.imul(he,nt)|0,O=O+Math.imul(Re,pt)|0,_=_+Math.imul(Re,Mt)|0,_=_+Math.imul(J,pt)|0,P=P+Math.imul(J,Mt)|0;var Rn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Rn>>>26)|0,Rn&=67108863,O=Math.imul(G,It),_=Math.imul(G,tt),_=_+Math.imul(Z,It)|0,P=Math.imul(Z,tt),O=O+Math.imul(T,St)|0,_=_+Math.imul(T,Ye)|0,_=_+Math.imul(H,St)|0,P=P+Math.imul(H,Ye)|0,O=O+Math.imul(je,mt)|0,_=_+Math.imul(je,rt)|0,_=_+Math.imul(U,mt)|0,P=P+Math.imul(U,rt)|0,O=O+Math.imul(xe,Ct)|0,_=_+Math.imul(xe,nt)|0,_=_+Math.imul(oe,Ct)|0,P=P+Math.imul(oe,nt)|0,O=O+Math.imul(le,pt)|0,_=_+Math.imul(le,Mt)|0,_=_+Math.imul(he,pt)|0,P=P+Math.imul(he,Mt)|0;var uo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(uo>>>26)|0,uo&=67108863,O=Math.imul(G,St),_=Math.imul(G,Ye),_=_+Math.imul(Z,St)|0,P=Math.imul(Z,Ye),O=O+Math.imul(T,mt)|0,_=_+Math.imul(T,rt)|0,_=_+Math.imul(H,mt)|0,P=P+Math.imul(H,rt)|0,O=O+Math.imul(je,Ct)|0,_=_+Math.imul(je,nt)|0,_=_+Math.imul(U,Ct)|0,P=P+Math.imul(U,nt)|0,O=O+Math.imul(xe,pt)|0,_=_+Math.imul(xe,Mt)|0,_=_+Math.imul(oe,pt)|0,P=P+Math.imul(oe,Mt)|0;var lo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(lo>>>26)|0,lo&=67108863,O=Math.imul(G,mt),_=Math.imul(G,rt),_=_+Math.imul(Z,mt)|0,P=Math.imul(Z,rt),O=O+Math.imul(T,Ct)|0,_=_+Math.imul(T,nt)|0,_=_+Math.imul(H,Ct)|0,P=P+Math.imul(H,nt)|0,O=O+Math.imul(je,pt)|0,_=_+Math.imul(je,Mt)|0,_=_+Math.imul(U,pt)|0,P=P+Math.imul(U,Mt)|0;var fo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(fo>>>26)|0,fo&=67108863,O=Math.imul(G,Ct),_=Math.imul(G,nt),_=_+Math.imul(Z,Ct)|0,P=Math.imul(Z,nt),O=O+Math.imul(T,pt)|0,_=_+Math.imul(T,Mt)|0,_=_+Math.imul(H,pt)|0,P=P+Math.imul(H,Mt)|0;var ru=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ru>>>26)|0,ru&=67108863,O=Math.imul(G,pt),_=Math.imul(G,Mt),_=_+Math.imul(Z,pt)|0,P=Math.imul(Z,Mt);var nu=(C+O|0)+((_&8191)<<13)|0;return C=(P+(_>>>13)|0)+(nu>>>26)|0,nu&=67108863,$[0]=Ii,$[1]=Dn,$[2]=si,$[3]=ms,$[4]=wn,$[5]=ro,$[6]=no,$[7]=io,$[8]=so,$[9]=oo,$[10]=Ji,$[11]=ao,$[12]=co,$[13]=Rn,$[14]=uo,$[15]=lo,$[16]=fo,$[17]=ru,$[18]=nu,C!==0&&($[19]=C,v.length++),v};Math.imul||(E=w);function A(y,f,p){p.negative=f.negative^y.negative,p.length=y.length+f.length;for(var v=0,I=0,j=0;j<p.length-1;j++){var $=I;I=0;for(var C=v&67108863,O=Math.min(j,f.length-1),_=Math.max(0,j-y.length+1);_<=O;_++){var P=j-_,q=y.words[P]|0,W=f.words[_]|0,K=q*W,Y=K&67108863;$=$+(K/67108864|0)|0,Y=Y+C|0,C=Y&67108863,$=$+(Y>>>26)|0,I+=$>>>26,$&=67108863}p.words[j]=C,v=$,$=I}return v!==0?p.words[j]=v:p.length--,p._strip()}function M(y,f,p){return A(y,f,p)}s.prototype.mulTo=function(f,p){var v,I=this.length+f.length;return this.length===10&&f.length===10?v=E(this,f,p):I<63?v=w(this,f,p):I<1024?v=A(this,f,p):v=M(this,f,p),v},s.prototype.mul=function(f){var p=new s(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},s.prototype.mulf=function(f){var p=new s(null);return p.words=new Array(this.length+f.length),M(this,f,p)},s.prototype.imul=function(f){return this.clone().mulTo(f,this)},s.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var v=0,I=0;I<this.length;I++){var j=(this.words[I]|0)*f,$=(j&67108863)+(v&67108863);v>>=26,v+=j/67108864|0,v+=$>>>26,this.words[I]=$&67108863}return v!==0&&(this.words[I]=v,this.length++),this.length=f===0?1:this.length,p?this.ineg():this},s.prototype.muln=function(f){return this.clone().imuln(f)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(f){var p=k(f);if(p.length===0)return new s(1);for(var v=this,I=0;I<p.length&&p[I]===0;I++,v=v.sqr());if(++I<p.length)for(var j=v.sqr();I<p.length;I++,j=j.sqr())p[I]!==0&&(v=v.mul(j));return v},s.prototype.iushln=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26,I=67108863>>>26-p<<26-p,j;if(p!==0){var $=0;for(j=0;j<this.length;j++){var C=this.words[j]&I,O=(this.words[j]|0)-C<<p;this.words[j]=O|$,$=C>>>26-p}$&&(this.words[j]=$,this.length++)}if(v!==0){for(j=this.length-1;j>=0;j--)this.words[j+v]=this.words[j];for(j=0;j<v;j++)this.words[j]=0;this.length+=v}return this._strip()},s.prototype.ishln=function(f){return n(this.negative===0),this.iushln(f)},s.prototype.iushrn=function(f,p,v){n(typeof f=="number"&&f>=0);var I;p?I=(p-p%26)/26:I=0;var j=f%26,$=Math.min((f-j)/26,this.length),C=67108863^67108863>>>j<<j,O=v;if(I-=$,I=Math.max(0,I),O){for(var _=0;_<$;_++)O.words[_]=this.words[_];O.length=$}if($!==0)if(this.length>$)for(this.length-=$,_=0;_<this.length;_++)this.words[_]=this.words[_+$];else this.words[0]=0,this.length=1;var P=0;for(_=this.length-1;_>=0&&(P!==0||_>=I);_--){var q=this.words[_]|0;this.words[_]=P<<26-j|q>>>j,P=q&C}return O&&P!==0&&(O.words[O.length++]=P),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(f,p,v){return n(this.negative===0),this.iushrn(f,p,v)},s.prototype.shln=function(f){return this.clone().ishln(f)},s.prototype.ushln=function(f){return this.clone().iushln(f)},s.prototype.shrn=function(f){return this.clone().ishrn(f)},s.prototype.ushrn=function(f){return this.clone().iushrn(f)},s.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26,I=1<<p;if(this.length<=v)return!1;var j=this.words[v];return!!(j&I)},s.prototype.imaskn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(p!==0&&v++,this.length=Math.min(v,this.length),p!==0){var I=67108863^67108863>>>p<<p;this.words[this.length-1]&=I}return this._strip()},s.prototype.maskn=function(f){return this.clone().imaskn(f)},s.prototype.iaddn=function(f){return n(typeof f=="number"),n(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},s.prototype._iaddn=function(f){this.words[0]+=f;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},s.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this._strip()},s.prototype.addn=function(f){return this.clone().iaddn(f)},s.prototype.subn=function(f){return this.clone().isubn(f)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(f,p,v){var I=f.length+v,j;this._expand(I);var $,C=0;for(j=0;j<f.length;j++){$=(this.words[j+v]|0)+C;var O=(f.words[j]|0)*p;$-=O&67108863,C=($>>26)-(O/67108864|0),this.words[j+v]=$&67108863}for(;j<this.length-v;j++)$=(this.words[j+v]|0)+C,C=$>>26,this.words[j+v]=$&67108863;if(C===0)return this._strip();for(n(C===-1),C=0,j=0;j<this.length;j++)$=-(this.words[j]|0)+C,C=$>>26,this.words[j]=$&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(f,p){var v=this.length-f.length,I=this.clone(),j=f,$=j.words[j.length-1]|0,C=this._countBits($);v=26-C,v!==0&&(j=j.ushln(v),I.iushln(v),$=j.words[j.length-1]|0);var O=I.length-j.length,_;if(p!=="mod"){_=new s(null),_.length=O+1,_.words=new Array(_.length);for(var P=0;P<_.length;P++)_.words[P]=0}var q=I.clone()._ishlnsubmul(j,1,O);q.negative===0&&(I=q,_&&(_.words[O]=1));for(var W=O-1;W>=0;W--){var K=(I.words[j.length+W]|0)*67108864+(I.words[j.length+W-1]|0);for(K=Math.min(K/$|0,67108863),I._ishlnsubmul(j,K,W);I.negative!==0;)K--,I.negative=0,I._ishlnsubmul(j,1,W),I.isZero()||(I.negative^=1);_&&(_.words[W]=K)}return _&&_._strip(),I._strip(),p!=="div"&&v!==0&&I.iushrn(v),{div:_||null,mod:I}},s.prototype.divmod=function(f,p,v){if(n(!f.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var I,j,$;return this.negative!==0&&f.negative===0?($=this.neg().divmod(f,p),p!=="mod"&&(I=$.div.neg()),p!=="div"&&(j=$.mod.neg(),v&&j.negative!==0&&j.iadd(f)),{div:I,mod:j}):this.negative===0&&f.negative!==0?($=this.divmod(f.neg(),p),p!=="mod"&&(I=$.div.neg()),{div:I,mod:$.mod}):(this.negative&f.negative)!==0?($=this.neg().divmod(f.neg(),p),p!=="div"&&(j=$.mod.neg(),v&&j.negative!==0&&j.isub(f)),{div:$.div,mod:j}):f.length>this.length||this.cmp(f)<0?{div:new s(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new s(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new s(this.modrn(f.words[0]))}:this._wordDiv(f,p)},s.prototype.div=function(f){return this.divmod(f,"div",!1).div},s.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},s.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},s.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var v=p.div.negative!==0?p.mod.isub(f):p.mod,I=f.ushrn(1),j=f.andln(1),$=v.cmp(I);return $<0||j===1&&$===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},s.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var v=(1<<26)%f,I=0,j=this.length-1;j>=0;j--)I=(v*I+(this.words[j]|0))%f;return p?-I:I},s.prototype.modn=function(f){return this.modrn(f)},s.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var v=0,I=this.length-1;I>=0;I--){var j=(this.words[I]|0)+v*67108864;this.words[I]=j/f|0,v=j%f}return this._strip(),p?this.ineg():this},s.prototype.divn=function(f){return this.clone().idivn(f)},s.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,v=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var I=new s(1),j=new s(0),$=new s(0),C=new s(1),O=0;p.isEven()&&v.isEven();)p.iushrn(1),v.iushrn(1),++O;for(var _=v.clone(),P=p.clone();!p.isZero();){for(var q=0,W=1;(p.words[0]&W)===0&&q<26;++q,W<<=1);if(q>0)for(p.iushrn(q);q-- >0;)(I.isOdd()||j.isOdd())&&(I.iadd(_),j.isub(P)),I.iushrn(1),j.iushrn(1);for(var K=0,Y=1;(v.words[0]&Y)===0&&K<26;++K,Y<<=1);if(K>0)for(v.iushrn(K);K-- >0;)($.isOdd()||C.isOdd())&&($.iadd(_),C.isub(P)),$.iushrn(1),C.iushrn(1);p.cmp(v)>=0?(p.isub(v),I.isub($),j.isub(C)):(v.isub(p),$.isub(I),C.isub(j))}return{a:$,b:C,gcd:v.iushln(O)}},s.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,v=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var I=new s(1),j=new s(0),$=v.clone();p.cmpn(1)>0&&v.cmpn(1)>0;){for(var C=0,O=1;(p.words[0]&O)===0&&C<26;++C,O<<=1);if(C>0)for(p.iushrn(C);C-- >0;)I.isOdd()&&I.iadd($),I.iushrn(1);for(var _=0,P=1;(v.words[0]&P)===0&&_<26;++_,P<<=1);if(_>0)for(v.iushrn(_);_-- >0;)j.isOdd()&&j.iadd($),j.iushrn(1);p.cmp(v)>=0?(p.isub(v),I.isub(j)):(v.isub(p),j.isub(I))}var q;return p.cmpn(1)===0?q=I:q=j,q.cmpn(0)<0&&q.iadd(f),q},s.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),v=f.clone();p.negative=0,v.negative=0;for(var I=0;p.isEven()&&v.isEven();I++)p.iushrn(1),v.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;v.isEven();)v.iushrn(1);var j=p.cmp(v);if(j<0){var $=p;p=v,v=$}else if(j===0||v.cmpn(1)===0)break;p.isub(v)}while(!0);return v.iushln(I)},s.prototype.invm=function(f){return this.egcd(f).a.umod(f)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(f){return this.words[0]&f},s.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,v=(f-p)/26,I=1<<p;if(this.length<=v)return this._expand(v+1),this.words[v]|=I,this;for(var j=I,$=v;j!==0&&$<this.length;$++){var C=this.words[$]|0;C+=j,j=C>>>26,C&=67108863,this.words[$]=C}return j!==0&&(this.words[$]=j,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var v;if(this.length>1)v=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var I=this.words[0]|0;v=I===f?0:I<f?-1:1}return this.negative!==0?-v|0:v},s.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var p=this.ucmp(f);return this.negative!==0?-p|0:p},s.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var p=0,v=this.length-1;v>=0;v--){var I=this.words[v]|0,j=f.words[v]|0;if(I!==j){I<j?p=-1:I>j&&(p=1);break}}return p},s.prototype.gtn=function(f){return this.cmpn(f)===1},s.prototype.gt=function(f){return this.cmp(f)===1},s.prototype.gten=function(f){return this.cmpn(f)>=0},s.prototype.gte=function(f){return this.cmp(f)>=0},s.prototype.ltn=function(f){return this.cmpn(f)===-1},s.prototype.lt=function(f){return this.cmp(f)===-1},s.prototype.lten=function(f){return this.cmpn(f)<=0},s.prototype.lte=function(f){return this.cmp(f)<=0},s.prototype.eqn=function(f){return this.cmpn(f)===0},s.prototype.eq=function(f){return this.cmp(f)===0},s.red=function(f){return new D(f)},s.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(f){return this.red=f,this},s.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},s.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},s.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},s.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},s.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},s.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},s.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},s.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var R={k256:null,p224:null,p192:null,p25519:null};function N(y,f){this.name=y,this.p=new s(f,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var f=new s(null);return f.words=new Array(Math.ceil(this.n/13)),f},N.prototype.ireduce=function(f){var p=f,v;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),v=p.bitLength();while(v>this.n);var I=v<this.n?-1:p.ucmp(this.p);return I===0?(p.words[0]=0,p.length=1):I>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},N.prototype.split=function(f,p){f.iushrn(this.n,0,p)},N.prototype.imulK=function(f){return f.imul(this.k)};function z(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(z,N),z.prototype.split=function(f,p){for(var v=4194303,I=Math.min(f.length,9),j=0;j<I;j++)p.words[j]=f.words[j];if(p.length=I,f.length<=9){f.words[0]=0,f.length=1;return}var $=f.words[9];for(p.words[p.length++]=$&v,j=10;j<f.length;j++){var C=f.words[j]|0;f.words[j-10]=(C&v)<<4|$>>>22,$=C}$>>>=22,f.words[j-10]=$,$===0&&f.length>10?f.length-=10:f.length-=9},z.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,v=0;v<f.length;v++){var I=f.words[v]|0;p+=I*977,f.words[v]=p&67108863,p=I*64+(p/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function F(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(F,N);function L(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(L,N);function B(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(B,N),B.prototype.imulK=function(f){for(var p=0,v=0;v<f.length;v++){var I=(f.words[v]|0)*19+p,j=I&67108863;I>>>=26,f.words[v]=j,p=I}return p!==0&&(f.words[f.length++]=p),f},s._prime=function(f){if(R[f])return R[f];var p;if(f==="k256")p=new z;else if(f==="p224")p=new F;else if(f==="p192")p=new L;else if(f==="p25519")p=new B;else throw new Error("Unknown prime "+f);return R[f]=p,p};function D(y){if(typeof y=="string"){var f=s._prime(y);this.m=f.p,this.prime=f}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}D.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},D.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},D.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(l(f,f.umod(this.m)._forceRed(this)),f)},D.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},D.prototype.add=function(f,p){this._verify2(f,p);var v=f.add(p);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},D.prototype.iadd=function(f,p){this._verify2(f,p);var v=f.iadd(p);return v.cmp(this.m)>=0&&v.isub(this.m),v},D.prototype.sub=function(f,p){this._verify2(f,p);var v=f.sub(p);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},D.prototype.isub=function(f,p){this._verify2(f,p);var v=f.isub(p);return v.cmpn(0)<0&&v.iadd(this.m),v},D.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},D.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},D.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},D.prototype.isqr=function(f){return this.imul(f,f.clone())},D.prototype.sqr=function(f){return this.mul(f,f)},D.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var v=this.m.add(new s(1)).iushrn(2);return this.pow(f,v)}for(var I=this.m.subn(1),j=0;!I.isZero()&&I.andln(1)===0;)j++,I.iushrn(1);n(!I.isZero());var $=new s(1).toRed(this),C=$.redNeg(),O=this.m.subn(1).iushrn(1),_=this.m.bitLength();for(_=new s(2*_*_).toRed(this);this.pow(_,O).cmp(C)!==0;)_.redIAdd(C);for(var P=this.pow(_,I),q=this.pow(f,I.addn(1).iushrn(1)),W=this.pow(f,I),K=j;W.cmp($)!==0;){for(var Y=W,te=0;Y.cmp($)!==0;te++)Y=Y.redSqr();n(te<K);var re=this.pow(P,new s(1).iushln(K-te-1));q=q.redMul(re),P=re.redSqr(),W=W.redMul(P),K=te}return q},D.prototype.invm=function(f){var p=f._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},D.prototype.pow=function(f,p){if(p.isZero())return new s(1).toRed(this);if(p.cmpn(1)===0)return f.clone();var v=4,I=new Array(1<<v);I[0]=new s(1).toRed(this),I[1]=f;for(var j=2;j<I.length;j++)I[j]=this.mul(I[j-1],f);var $=I[0],C=0,O=0,_=p.bitLength()%26;for(_===0&&(_=26),j=p.length-1;j>=0;j--){for(var P=p.words[j],q=_-1;q>=0;q--){var W=P>>q&1;if($!==I[0]&&($=this.sqr($)),W===0&&C===0){O=0;continue}C<<=1,C|=W,O++,!(O!==v&&(j!==0||q!==0))&&($=this.mul($,I[C]),O=0,C=0)}_=26}return $},D.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},D.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},s.mont=function(f){return new x(f)};function x(y){D.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(x,D),x.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},x.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},x.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var v=f.imul(p),I=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=v.isub(I).iushrn(this.shift),$=j;return j.cmp(this.m)>=0?$=j.isub(this.m):j.cmpn(0)<0&&($=j.iadd(this.m)),$._forceRed(this)},x.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new s(0)._forceRed(this);var v=f.mul(p),I=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=v.isub(I).iushrn(this.shift),$=j;return j.cmp(this.m)>=0?$=j.isub(this.m):j.cmpn(0)<0&&($=j.iadd(this.m)),$._forceRed(this)},x.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(e,aye)}(zw)),zw.exports}var uye=cye();const _j=Js(uye);var vy={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var xj;function iG(){return xj||(xj=1,function(e,t){var r=OC(),n=r.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=n(o);return a!==void 0?typeof c=="string"?u.fill(a,c):u.fill(a):u.fill(0),u},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 r.SlowBuffer(o)}}(vy,vy.exports)),vy.exports}var C8,Ej;function lye(){if(Ej)return C8;Ej=1;var e=iG().Buffer;function t(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),i=0;i<n.length;i++)n[i]=255;for(var s=0;s<r.length;s++){var o=r.charAt(s),a=o.charCodeAt(0);if(n[a]!==255)throw new TypeError(o+" is ambiguous");n[a]=s}var c=r.length,u=r.charAt(0),l=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function h(b){if((Array.isArray(b)||b instanceof Uint8Array)&&(b=e.from(b)),!e.isBuffer(b))throw new TypeError("Expected Buffer");if(b.length===0)return"";for(var k=0,w=0,E=0,A=b.length;E!==A&&b[E]===0;)E++,k++;for(var M=(A-E)*d+1>>>0,R=new Uint8Array(M);E!==A;){for(var N=b[E],z=0,F=M-1;(N!==0||z<w)&&F!==-1;F--,z++)N+=256*R[F]>>>0,R[F]=N%c>>>0,N=N/c>>>0;if(N!==0)throw new Error("Non-zero carry");w=z,E++}for(var L=M-w;L!==M&&R[L]===0;)L++;for(var B=u.repeat(k);L<M;++L)B+=r.charAt(R[L]);return B}function g(b){if(typeof b!="string")throw new TypeError("Expected String");if(b.length===0)return e.alloc(0);for(var k=0,w=0,E=0;b[k]===u;)w++,k++;for(var A=(b.length-k)*l+1>>>0,M=new Uint8Array(A);k<b.length;){var R=b.charCodeAt(k);if(R>255)return;var N=n[R];if(N===255)return;for(var z=0,F=A-1;(N!==0||z<E)&&F!==-1;F--,z++)N+=c*M[F]>>>0,M[F]=N%256>>>0,N=N/256>>>0;if(N!==0)throw new Error("Non-zero carry");E=z,k++}for(var L=A-E;L!==A&&M[L]===0;)L++;var B=e.allocUnsafe(w+(A-L));B.fill(0,0,w);for(var D=w;L!==A;)B[D++]=M[L++];return B}function m(b){var k=g(b);if(k)return k;throw new Error("Non-base"+c+" character")}return{encode:h,decodeUnsafe:g,decode:m}}return C8=t,C8}var I8,kj;function fye(){if(kj)return I8;kj=1;var e=lye(),t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";return I8=e(t),I8}var dye=fye();const vs=Js(dye),Aj=RK;var Tr={},Bw={exports:{}},hye=Bw.exports,Sj;function pye(){return Sj||(Sj=1,function(e){(function(t,r){function n(y,f){if(!y)throw new Error(f||"Assertion failed")}function i(y,f){y.super_=f;var p=function(){};p.prototype=f.prototype,y.prototype=new p,y.prototype.constructor=y}function s(y,f,p){if(s.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(y||0,f||10,p||"be"))}typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=U2.Buffer}catch{}s.isBN=function(f){return f instanceof s?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===s.wordSize&&Array.isArray(f.words)},s.max=function(f,p){return f.cmp(p)>0?f:p},s.min=function(f,p){return f.cmp(p)<0?f:p},s.prototype._init=function(f,p,v){if(typeof f=="number")return this._initNumber(f,p,v);if(typeof f=="object")return this._initArray(f,p,v);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var I=0;f[0]==="-"&&(I++,this.negative=1),I<f.length&&(p===16?this._parseHex(f,I,v):(this._parseBase(f,p,I),v==="le"&&this._initArray(this.toArray(),p,v)))},s.prototype._initNumber=function(f,p,v){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(n(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),p,v)},s.prototype._initArray=function(f,p,v){if(n(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var j,$,C=0;if(v==="be")for(I=f.length-1,j=0;I>=0;I-=3)$=f[I]|f[I-1]<<8|f[I-2]<<16,this.words[j]|=$<<C&67108863,this.words[j+1]=$>>>26-C&67108863,C+=24,C>=26&&(C-=26,j++);else if(v==="le")for(I=0,j=0;I<f.length;I+=3)$=f[I]|f[I+1]<<8|f[I+2]<<16,this.words[j]|=$<<C&67108863,this.words[j+1]=$>>>26-C&67108863,C+=24,C>=26&&(C-=26,j++);return this._strip()};function a(y,f){var p=y.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+y)}function c(y,f,p){var v=a(y,p);return p-1>=f&&(v|=a(y,p-1)<<4),v}s.prototype._parseHex=function(f,p,v){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var j=0,$=0,C;if(v==="be")for(I=f.length-1;I>=p;I-=2)C=c(f,p,I)<<j,this.words[$]|=C&67108863,j>=18?(j-=18,$+=1,this.words[$]|=C>>>26):j+=8;else{var O=f.length-p;for(I=O%2===0?p+1:p;I<f.length;I+=2)C=c(f,p,I)<<j,this.words[$]|=C&67108863,j>=18?(j-=18,$+=1,this.words[$]|=C>>>26):j+=8}this._strip()};function u(y,f,p,v){for(var I=0,j=0,$=Math.min(y.length,p),C=f;C<$;C++){var O=y.charCodeAt(C)-48;I*=v,O>=49?j=O-49+10:O>=17?j=O-17+10:j=O,n(O>=0&&j<v,"Invalid character"),I+=j}return I}s.prototype._parseBase=function(f,p,v){this.words=[0],this.length=1;for(var I=0,j=1;j<=67108863;j*=p)I++;I--,j=j/p|0;for(var $=f.length-v,C=$%I,O=Math.min($,$-C)+v,_=0,P=v;P<O;P+=I)_=u(f,P,P+I,p),this.imuln(j),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_);if(C!==0){var q=1;for(_=u(f,P,f.length,p),P=0;P<C;P++)q*=p;this.imuln(q),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_)}this._strip()},s.prototype.copy=function(f){f.words=new Array(this.length);for(var p=0;p<this.length;p++)f.words[p]=this.words[p];f.length=this.length,f.negative=this.negative,f.red=this.red};function l(y,f){y.words=f.words,y.length=f.length,y.negative=f.negative,y.red=f.red}if(s.prototype._move=function(f){l(f,this)},s.prototype.clone=function(){var f=new s(null);return this.copy(f),f},s.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(f,p){f=f||10,p=p|0||1;var v;if(f===16||f==="hex"){v="";for(var I=0,j=0,$=0;$<this.length;$++){var C=this.words[$],O=((C<<I|j)&16777215).toString(16);j=C>>>24-I&16777215,I+=2,I>=26&&(I-=26,$--),j!==0||$!==this.length-1?v=h[6-O.length]+O+v:v=O+v}for(j!==0&&(v=j.toString(16)+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(f===(f|0)&&f>=2&&f<=36){var _=g[f],P=m[f];v="";var q=this.clone();for(q.negative=0;!q.isZero();){var W=q.modrn(P).toString(f);q=q.idivn(P),q.isZero()?v=W+v:v=h[_-W.length]+W+v}for(this.isZero()&&(v="0"+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(f,p){return this.toArrayLike(o,f,p)}),s.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var b=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};s.prototype.toArrayLike=function(f,p,v){this._strip();var I=this.byteLength(),j=v||Math.max(1,I);n(I<=j,"byte array longer than desired length"),n(j>0,"Requested array length <= 0");var $=b(f,j),C=p==="le"?"LE":"BE";return this["_toArrayLike"+C]($,I),$},s.prototype._toArrayLikeLE=function(f,p){for(var v=0,I=0,j=0,$=0;j<this.length;j++){var C=this.words[j]<<$|I;f[v++]=C&255,v<f.length&&(f[v++]=C>>8&255),v<f.length&&(f[v++]=C>>16&255),$===6?(v<f.length&&(f[v++]=C>>24&255),I=0,$=0):(I=C>>>24,$+=2)}if(v<f.length)for(f[v++]=I;v<f.length;)f[v++]=0},s.prototype._toArrayLikeBE=function(f,p){for(var v=f.length-1,I=0,j=0,$=0;j<this.length;j++){var C=this.words[j]<<$|I;f[v--]=C&255,v>=0&&(f[v--]=C>>8&255),v>=0&&(f[v--]=C>>16&255),$===6?(v>=0&&(f[v--]=C>>24&255),I=0,$=0):(I=C>>>24,$+=2)}if(v>=0)for(f[v--]=I;v>=0;)f[v--]=0},Math.clz32?s.prototype._countBits=function(f){return 32-Math.clz32(f)}:s.prototype._countBits=function(f){var p=f,v=0;return p>=4096&&(v+=13,p>>>=13),p>=64&&(v+=7,p>>>=7),p>=8&&(v+=4,p>>>=4),p>=2&&(v+=2,p>>>=2),v+p},s.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,v=0;return(p&8191)===0&&(v+=13,p>>>=13),(p&127)===0&&(v+=7,p>>>=7),(p&15)===0&&(v+=4,p>>>=4),(p&3)===0&&(v+=2,p>>>=2),(p&1)===0&&v++,v},s.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function k(y){for(var f=new Array(y.bitLength()),p=0;p<f.length;p++){var v=p/26|0,I=p%26;f[p]=y.words[v]>>>I&1}return f}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;p<this.length;p++){var v=this._zeroBits(this.words[p]);if(f+=v,v!==26)break}return f},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},s.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var p=0;p<f.length;p++)this.words[p]=this.words[p]|f.words[p];return this._strip()},s.prototype.ior=function(f){return n((this.negative|f.negative)===0),this.iuor(f)},s.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},s.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},s.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var v=0;v<p.length;v++)this.words[v]=this.words[v]&f.words[v];return this.length=p.length,this._strip()},s.prototype.iand=function(f){return n((this.negative|f.negative)===0),this.iuand(f)},s.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},s.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},s.prototype.iuxor=function(f){var p,v;this.length>f.length?(p=this,v=f):(p=f,v=this);for(var I=0;I<v.length;I++)this.words[I]=p.words[I]^v.words[I];if(this!==p)for(;I<p.length;I++)this.words[I]=p.words[I];return this.length=p.length,this._strip()},s.prototype.ixor=function(f){return n((this.negative|f.negative)===0),this.iuxor(f)},s.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},s.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},s.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,v=f%26;this._expand(p),v>0&&p--;for(var I=0;I<p;I++)this.words[I]=~this.words[I]&67108863;return v>0&&(this.words[I]=~this.words[I]&67108863>>26-v),this._strip()},s.prototype.notn=function(f){return this.clone().inotn(f)},s.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var v=f/26|0,I=f%26;return this._expand(v+1),p?this.words[v]=this.words[v]|1<<I:this.words[v]=this.words[v]&~(1<<I),this._strip()},s.prototype.iadd=function(f){var p;if(this.negative!==0&&f.negative===0)return this.negative=0,p=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,p=this.isub(f),f.negative=1,p._normSign();var v,I;this.length>f.length?(v=this,I=f):(v=f,I=this);for(var j=0,$=0;$<I.length;$++)p=(v.words[$]|0)+(I.words[$]|0)+j,this.words[$]=p&67108863,j=p>>>26;for(;j!==0&&$<v.length;$++)p=(v.words[$]|0)+j,this.words[$]=p&67108863,j=p>>>26;if(this.length=v.length,j!==0)this.words[this.length]=j,this.length++;else if(v!==this)for(;$<v.length;$++)this.words[$]=v.words[$];return this},s.prototype.add=function(f){var p;return f.negative!==0&&this.negative===0?(f.negative=0,p=this.sub(f),f.negative^=1,p):f.negative===0&&this.negative!==0?(this.negative=0,p=f.sub(this),this.negative=1,p):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},s.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var v=this.cmp(f);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,j;v>0?(I=this,j=f):(I=f,j=this);for(var $=0,C=0;C<j.length;C++)p=(I.words[C]|0)-(j.words[C]|0)+$,$=p>>26,this.words[C]=p&67108863;for(;$!==0&&C<I.length;C++)p=(I.words[C]|0)+$,$=p>>26,this.words[C]=p&67108863;if($===0&&C<I.length&&I!==this)for(;C<I.length;C++)this.words[C]=I.words[C];return this.length=Math.max(this.length,C),I!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(f){return this.clone().isub(f)};function w(y,f,p){p.negative=f.negative^y.negative;var v=y.length+f.length|0;p.length=v,v=v-1|0;var I=y.words[0]|0,j=f.words[0]|0,$=I*j,C=$&67108863,O=$/67108864|0;p.words[0]=C;for(var _=1;_<v;_++){for(var P=O>>>26,q=O&67108863,W=Math.min(_,f.length-1),K=Math.max(0,_-y.length+1);K<=W;K++){var Y=_-K|0;I=y.words[Y]|0,j=f.words[K]|0,$=I*j+q,P+=$/67108864|0,q=$&67108863}p.words[_]=q|0,O=P|0}return O!==0?p.words[_]=O|0:p.length--,p._strip()}var E=function(f,p,v){var I=f.words,j=p.words,$=v.words,C=0,O,_,P,q=I[0]|0,W=q&8191,K=q>>>13,Y=I[1]|0,te=Y&8191,re=Y>>>13,be=I[2]|0,ve=be&8191,ye=be>>>13,Se=I[3]|0,_e=Se&8191,ke=Se>>>13,it=I[4]|0,Re=it&8191,J=it>>>13,ne=I[5]|0,le=ne&8191,he=ne>>>13,Pe=I[6]|0,xe=Pe&8191,oe=Pe>>>13,me=I[7]|0,je=me&8191,U=me>>>13,S=I[8]|0,T=S&8191,H=S>>>13,V=I[9]|0,G=V&8191,Z=V>>>13,Ee=j[0]|0,Ie=Ee&8191,ee=Ee>>>13,se=j[1]|0,we=se&8191,Te=se>>>13,yt=j[2]|0,De=yt&8191,Ke=yt>>>13,qt=j[3]|0,ut=qt&8191,We=qt>>>13,er=j[4]|0,wt=er&8191,qe=er>>>13,_r=j[5]|0,It=_r&8191,tt=_r>>>13,tr=j[6]|0,St=tr&8191,Ye=tr>>>13,rr=j[7]|0,mt=rr&8191,rt=rr>>>13,xr=j[8]|0,Ct=xr&8191,nt=xr>>>13,ar=j[9]|0,pt=ar&8191,Mt=ar>>>13;v.negative=f.negative^p.negative,v.length=19,O=Math.imul(W,Ie),_=Math.imul(W,ee),_=_+Math.imul(K,Ie)|0,P=Math.imul(K,ee);var Ii=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,O=Math.imul(te,Ie),_=Math.imul(te,ee),_=_+Math.imul(re,Ie)|0,P=Math.imul(re,ee),O=O+Math.imul(W,we)|0,_=_+Math.imul(W,Te)|0,_=_+Math.imul(K,we)|0,P=P+Math.imul(K,Te)|0;var Dn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,O=Math.imul(ve,Ie),_=Math.imul(ve,ee),_=_+Math.imul(ye,Ie)|0,P=Math.imul(ye,ee),O=O+Math.imul(te,we)|0,_=_+Math.imul(te,Te)|0,_=_+Math.imul(re,we)|0,P=P+Math.imul(re,Te)|0,O=O+Math.imul(W,De)|0,_=_+Math.imul(W,Ke)|0,_=_+Math.imul(K,De)|0,P=P+Math.imul(K,Ke)|0;var si=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(si>>>26)|0,si&=67108863,O=Math.imul(_e,Ie),_=Math.imul(_e,ee),_=_+Math.imul(ke,Ie)|0,P=Math.imul(ke,ee),O=O+Math.imul(ve,we)|0,_=_+Math.imul(ve,Te)|0,_=_+Math.imul(ye,we)|0,P=P+Math.imul(ye,Te)|0,O=O+Math.imul(te,De)|0,_=_+Math.imul(te,Ke)|0,_=_+Math.imul(re,De)|0,P=P+Math.imul(re,Ke)|0,O=O+Math.imul(W,ut)|0,_=_+Math.imul(W,We)|0,_=_+Math.imul(K,ut)|0,P=P+Math.imul(K,We)|0;var ms=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ms>>>26)|0,ms&=67108863,O=Math.imul(Re,Ie),_=Math.imul(Re,ee),_=_+Math.imul(J,Ie)|0,P=Math.imul(J,ee),O=O+Math.imul(_e,we)|0,_=_+Math.imul(_e,Te)|0,_=_+Math.imul(ke,we)|0,P=P+Math.imul(ke,Te)|0,O=O+Math.imul(ve,De)|0,_=_+Math.imul(ve,Ke)|0,_=_+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0,O=O+Math.imul(te,ut)|0,_=_+Math.imul(te,We)|0,_=_+Math.imul(re,ut)|0,P=P+Math.imul(re,We)|0,O=O+Math.imul(W,wt)|0,_=_+Math.imul(W,qe)|0,_=_+Math.imul(K,wt)|0,P=P+Math.imul(K,qe)|0;var wn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(wn>>>26)|0,wn&=67108863,O=Math.imul(le,Ie),_=Math.imul(le,ee),_=_+Math.imul(he,Ie)|0,P=Math.imul(he,ee),O=O+Math.imul(Re,we)|0,_=_+Math.imul(Re,Te)|0,_=_+Math.imul(J,we)|0,P=P+Math.imul(J,Te)|0,O=O+Math.imul(_e,De)|0,_=_+Math.imul(_e,Ke)|0,_=_+Math.imul(ke,De)|0,P=P+Math.imul(ke,Ke)|0,O=O+Math.imul(ve,ut)|0,_=_+Math.imul(ve,We)|0,_=_+Math.imul(ye,ut)|0,P=P+Math.imul(ye,We)|0,O=O+Math.imul(te,wt)|0,_=_+Math.imul(te,qe)|0,_=_+Math.imul(re,wt)|0,P=P+Math.imul(re,qe)|0,O=O+Math.imul(W,It)|0,_=_+Math.imul(W,tt)|0,_=_+Math.imul(K,It)|0,P=P+Math.imul(K,tt)|0;var ro=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ro>>>26)|0,ro&=67108863,O=Math.imul(xe,Ie),_=Math.imul(xe,ee),_=_+Math.imul(oe,Ie)|0,P=Math.imul(oe,ee),O=O+Math.imul(le,we)|0,_=_+Math.imul(le,Te)|0,_=_+Math.imul(he,we)|0,P=P+Math.imul(he,Te)|0,O=O+Math.imul(Re,De)|0,_=_+Math.imul(Re,Ke)|0,_=_+Math.imul(J,De)|0,P=P+Math.imul(J,Ke)|0,O=O+Math.imul(_e,ut)|0,_=_+Math.imul(_e,We)|0,_=_+Math.imul(ke,ut)|0,P=P+Math.imul(ke,We)|0,O=O+Math.imul(ve,wt)|0,_=_+Math.imul(ve,qe)|0,_=_+Math.imul(ye,wt)|0,P=P+Math.imul(ye,qe)|0,O=O+Math.imul(te,It)|0,_=_+Math.imul(te,tt)|0,_=_+Math.imul(re,It)|0,P=P+Math.imul(re,tt)|0,O=O+Math.imul(W,St)|0,_=_+Math.imul(W,Ye)|0,_=_+Math.imul(K,St)|0,P=P+Math.imul(K,Ye)|0;var no=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(no>>>26)|0,no&=67108863,O=Math.imul(je,Ie),_=Math.imul(je,ee),_=_+Math.imul(U,Ie)|0,P=Math.imul(U,ee),O=O+Math.imul(xe,we)|0,_=_+Math.imul(xe,Te)|0,_=_+Math.imul(oe,we)|0,P=P+Math.imul(oe,Te)|0,O=O+Math.imul(le,De)|0,_=_+Math.imul(le,Ke)|0,_=_+Math.imul(he,De)|0,P=P+Math.imul(he,Ke)|0,O=O+Math.imul(Re,ut)|0,_=_+Math.imul(Re,We)|0,_=_+Math.imul(J,ut)|0,P=P+Math.imul(J,We)|0,O=O+Math.imul(_e,wt)|0,_=_+Math.imul(_e,qe)|0,_=_+Math.imul(ke,wt)|0,P=P+Math.imul(ke,qe)|0,O=O+Math.imul(ve,It)|0,_=_+Math.imul(ve,tt)|0,_=_+Math.imul(ye,It)|0,P=P+Math.imul(ye,tt)|0,O=O+Math.imul(te,St)|0,_=_+Math.imul(te,Ye)|0,_=_+Math.imul(re,St)|0,P=P+Math.imul(re,Ye)|0,O=O+Math.imul(W,mt)|0,_=_+Math.imul(W,rt)|0,_=_+Math.imul(K,mt)|0,P=P+Math.imul(K,rt)|0;var io=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(io>>>26)|0,io&=67108863,O=Math.imul(T,Ie),_=Math.imul(T,ee),_=_+Math.imul(H,Ie)|0,P=Math.imul(H,ee),O=O+Math.imul(je,we)|0,_=_+Math.imul(je,Te)|0,_=_+Math.imul(U,we)|0,P=P+Math.imul(U,Te)|0,O=O+Math.imul(xe,De)|0,_=_+Math.imul(xe,Ke)|0,_=_+Math.imul(oe,De)|0,P=P+Math.imul(oe,Ke)|0,O=O+Math.imul(le,ut)|0,_=_+Math.imul(le,We)|0,_=_+Math.imul(he,ut)|0,P=P+Math.imul(he,We)|0,O=O+Math.imul(Re,wt)|0,_=_+Math.imul(Re,qe)|0,_=_+Math.imul(J,wt)|0,P=P+Math.imul(J,qe)|0,O=O+Math.imul(_e,It)|0,_=_+Math.imul(_e,tt)|0,_=_+Math.imul(ke,It)|0,P=P+Math.imul(ke,tt)|0,O=O+Math.imul(ve,St)|0,_=_+Math.imul(ve,Ye)|0,_=_+Math.imul(ye,St)|0,P=P+Math.imul(ye,Ye)|0,O=O+Math.imul(te,mt)|0,_=_+Math.imul(te,rt)|0,_=_+Math.imul(re,mt)|0,P=P+Math.imul(re,rt)|0,O=O+Math.imul(W,Ct)|0,_=_+Math.imul(W,nt)|0,_=_+Math.imul(K,Ct)|0,P=P+Math.imul(K,nt)|0;var so=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(so>>>26)|0,so&=67108863,O=Math.imul(G,Ie),_=Math.imul(G,ee),_=_+Math.imul(Z,Ie)|0,P=Math.imul(Z,ee),O=O+Math.imul(T,we)|0,_=_+Math.imul(T,Te)|0,_=_+Math.imul(H,we)|0,P=P+Math.imul(H,Te)|0,O=O+Math.imul(je,De)|0,_=_+Math.imul(je,Ke)|0,_=_+Math.imul(U,De)|0,P=P+Math.imul(U,Ke)|0,O=O+Math.imul(xe,ut)|0,_=_+Math.imul(xe,We)|0,_=_+Math.imul(oe,ut)|0,P=P+Math.imul(oe,We)|0,O=O+Math.imul(le,wt)|0,_=_+Math.imul(le,qe)|0,_=_+Math.imul(he,wt)|0,P=P+Math.imul(he,qe)|0,O=O+Math.imul(Re,It)|0,_=_+Math.imul(Re,tt)|0,_=_+Math.imul(J,It)|0,P=P+Math.imul(J,tt)|0,O=O+Math.imul(_e,St)|0,_=_+Math.imul(_e,Ye)|0,_=_+Math.imul(ke,St)|0,P=P+Math.imul(ke,Ye)|0,O=O+Math.imul(ve,mt)|0,_=_+Math.imul(ve,rt)|0,_=_+Math.imul(ye,mt)|0,P=P+Math.imul(ye,rt)|0,O=O+Math.imul(te,Ct)|0,_=_+Math.imul(te,nt)|0,_=_+Math.imul(re,Ct)|0,P=P+Math.imul(re,nt)|0,O=O+Math.imul(W,pt)|0,_=_+Math.imul(W,Mt)|0,_=_+Math.imul(K,pt)|0,P=P+Math.imul(K,Mt)|0;var oo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(oo>>>26)|0,oo&=67108863,O=Math.imul(G,we),_=Math.imul(G,Te),_=_+Math.imul(Z,we)|0,P=Math.imul(Z,Te),O=O+Math.imul(T,De)|0,_=_+Math.imul(T,Ke)|0,_=_+Math.imul(H,De)|0,P=P+Math.imul(H,Ke)|0,O=O+Math.imul(je,ut)|0,_=_+Math.imul(je,We)|0,_=_+Math.imul(U,ut)|0,P=P+Math.imul(U,We)|0,O=O+Math.imul(xe,wt)|0,_=_+Math.imul(xe,qe)|0,_=_+Math.imul(oe,wt)|0,P=P+Math.imul(oe,qe)|0,O=O+Math.imul(le,It)|0,_=_+Math.imul(le,tt)|0,_=_+Math.imul(he,It)|0,P=P+Math.imul(he,tt)|0,O=O+Math.imul(Re,St)|0,_=_+Math.imul(Re,Ye)|0,_=_+Math.imul(J,St)|0,P=P+Math.imul(J,Ye)|0,O=O+Math.imul(_e,mt)|0,_=_+Math.imul(_e,rt)|0,_=_+Math.imul(ke,mt)|0,P=P+Math.imul(ke,rt)|0,O=O+Math.imul(ve,Ct)|0,_=_+Math.imul(ve,nt)|0,_=_+Math.imul(ye,Ct)|0,P=P+Math.imul(ye,nt)|0,O=O+Math.imul(te,pt)|0,_=_+Math.imul(te,Mt)|0,_=_+Math.imul(re,pt)|0,P=P+Math.imul(re,Mt)|0;var Ji=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Ji>>>26)|0,Ji&=67108863,O=Math.imul(G,De),_=Math.imul(G,Ke),_=_+Math.imul(Z,De)|0,P=Math.imul(Z,Ke),O=O+Math.imul(T,ut)|0,_=_+Math.imul(T,We)|0,_=_+Math.imul(H,ut)|0,P=P+Math.imul(H,We)|0,O=O+Math.imul(je,wt)|0,_=_+Math.imul(je,qe)|0,_=_+Math.imul(U,wt)|0,P=P+Math.imul(U,qe)|0,O=O+Math.imul(xe,It)|0,_=_+Math.imul(xe,tt)|0,_=_+Math.imul(oe,It)|0,P=P+Math.imul(oe,tt)|0,O=O+Math.imul(le,St)|0,_=_+Math.imul(le,Ye)|0,_=_+Math.imul(he,St)|0,P=P+Math.imul(he,Ye)|0,O=O+Math.imul(Re,mt)|0,_=_+Math.imul(Re,rt)|0,_=_+Math.imul(J,mt)|0,P=P+Math.imul(J,rt)|0,O=O+Math.imul(_e,Ct)|0,_=_+Math.imul(_e,nt)|0,_=_+Math.imul(ke,Ct)|0,P=P+Math.imul(ke,nt)|0,O=O+Math.imul(ve,pt)|0,_=_+Math.imul(ve,Mt)|0,_=_+Math.imul(ye,pt)|0,P=P+Math.imul(ye,Mt)|0;var ao=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ao>>>26)|0,ao&=67108863,O=Math.imul(G,ut),_=Math.imul(G,We),_=_+Math.imul(Z,ut)|0,P=Math.imul(Z,We),O=O+Math.imul(T,wt)|0,_=_+Math.imul(T,qe)|0,_=_+Math.imul(H,wt)|0,P=P+Math.imul(H,qe)|0,O=O+Math.imul(je,It)|0,_=_+Math.imul(je,tt)|0,_=_+Math.imul(U,It)|0,P=P+Math.imul(U,tt)|0,O=O+Math.imul(xe,St)|0,_=_+Math.imul(xe,Ye)|0,_=_+Math.imul(oe,St)|0,P=P+Math.imul(oe,Ye)|0,O=O+Math.imul(le,mt)|0,_=_+Math.imul(le,rt)|0,_=_+Math.imul(he,mt)|0,P=P+Math.imul(he,rt)|0,O=O+Math.imul(Re,Ct)|0,_=_+Math.imul(Re,nt)|0,_=_+Math.imul(J,Ct)|0,P=P+Math.imul(J,nt)|0,O=O+Math.imul(_e,pt)|0,_=_+Math.imul(_e,Mt)|0,_=_+Math.imul(ke,pt)|0,P=P+Math.imul(ke,Mt)|0;var co=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(co>>>26)|0,co&=67108863,O=Math.imul(G,wt),_=Math.imul(G,qe),_=_+Math.imul(Z,wt)|0,P=Math.imul(Z,qe),O=O+Math.imul(T,It)|0,_=_+Math.imul(T,tt)|0,_=_+Math.imul(H,It)|0,P=P+Math.imul(H,tt)|0,O=O+Math.imul(je,St)|0,_=_+Math.imul(je,Ye)|0,_=_+Math.imul(U,St)|0,P=P+Math.imul(U,Ye)|0,O=O+Math.imul(xe,mt)|0,_=_+Math.imul(xe,rt)|0,_=_+Math.imul(oe,mt)|0,P=P+Math.imul(oe,rt)|0,O=O+Math.imul(le,Ct)|0,_=_+Math.imul(le,nt)|0,_=_+Math.imul(he,Ct)|0,P=P+Math.imul(he,nt)|0,O=O+Math.imul(Re,pt)|0,_=_+Math.imul(Re,Mt)|0,_=_+Math.imul(J,pt)|0,P=P+Math.imul(J,Mt)|0;var Rn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Rn>>>26)|0,Rn&=67108863,O=Math.imul(G,It),_=Math.imul(G,tt),_=_+Math.imul(Z,It)|0,P=Math.imul(Z,tt),O=O+Math.imul(T,St)|0,_=_+Math.imul(T,Ye)|0,_=_+Math.imul(H,St)|0,P=P+Math.imul(H,Ye)|0,O=O+Math.imul(je,mt)|0,_=_+Math.imul(je,rt)|0,_=_+Math.imul(U,mt)|0,P=P+Math.imul(U,rt)|0,O=O+Math.imul(xe,Ct)|0,_=_+Math.imul(xe,nt)|0,_=_+Math.imul(oe,Ct)|0,P=P+Math.imul(oe,nt)|0,O=O+Math.imul(le,pt)|0,_=_+Math.imul(le,Mt)|0,_=_+Math.imul(he,pt)|0,P=P+Math.imul(he,Mt)|0;var uo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(uo>>>26)|0,uo&=67108863,O=Math.imul(G,St),_=Math.imul(G,Ye),_=_+Math.imul(Z,St)|0,P=Math.imul(Z,Ye),O=O+Math.imul(T,mt)|0,_=_+Math.imul(T,rt)|0,_=_+Math.imul(H,mt)|0,P=P+Math.imul(H,rt)|0,O=O+Math.imul(je,Ct)|0,_=_+Math.imul(je,nt)|0,_=_+Math.imul(U,Ct)|0,P=P+Math.imul(U,nt)|0,O=O+Math.imul(xe,pt)|0,_=_+Math.imul(xe,Mt)|0,_=_+Math.imul(oe,pt)|0,P=P+Math.imul(oe,Mt)|0;var lo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(lo>>>26)|0,lo&=67108863,O=Math.imul(G,mt),_=Math.imul(G,rt),_=_+Math.imul(Z,mt)|0,P=Math.imul(Z,rt),O=O+Math.imul(T,Ct)|0,_=_+Math.imul(T,nt)|0,_=_+Math.imul(H,Ct)|0,P=P+Math.imul(H,nt)|0,O=O+Math.imul(je,pt)|0,_=_+Math.imul(je,Mt)|0,_=_+Math.imul(U,pt)|0,P=P+Math.imul(U,Mt)|0;var fo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(fo>>>26)|0,fo&=67108863,O=Math.imul(G,Ct),_=Math.imul(G,nt),_=_+Math.imul(Z,Ct)|0,P=Math.imul(Z,nt),O=O+Math.imul(T,pt)|0,_=_+Math.imul(T,Mt)|0,_=_+Math.imul(H,pt)|0,P=P+Math.imul(H,Mt)|0;var ru=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ru>>>26)|0,ru&=67108863,O=Math.imul(G,pt),_=Math.imul(G,Mt),_=_+Math.imul(Z,pt)|0,P=Math.imul(Z,Mt);var nu=(C+O|0)+((_&8191)<<13)|0;return C=(P+(_>>>13)|0)+(nu>>>26)|0,nu&=67108863,$[0]=Ii,$[1]=Dn,$[2]=si,$[3]=ms,$[4]=wn,$[5]=ro,$[6]=no,$[7]=io,$[8]=so,$[9]=oo,$[10]=Ji,$[11]=ao,$[12]=co,$[13]=Rn,$[14]=uo,$[15]=lo,$[16]=fo,$[17]=ru,$[18]=nu,C!==0&&($[19]=C,v.length++),v};Math.imul||(E=w);function A(y,f,p){p.negative=f.negative^y.negative,p.length=y.length+f.length;for(var v=0,I=0,j=0;j<p.length-1;j++){var $=I;I=0;for(var C=v&67108863,O=Math.min(j,f.length-1),_=Math.max(0,j-y.length+1);_<=O;_++){var P=j-_,q=y.words[P]|0,W=f.words[_]|0,K=q*W,Y=K&67108863;$=$+(K/67108864|0)|0,Y=Y+C|0,C=Y&67108863,$=$+(Y>>>26)|0,I+=$>>>26,$&=67108863}p.words[j]=C,v=$,$=I}return v!==0?p.words[j]=v:p.length--,p._strip()}function M(y,f,p){return A(y,f,p)}s.prototype.mulTo=function(f,p){var v,I=this.length+f.length;return this.length===10&&f.length===10?v=E(this,f,p):I<63?v=w(this,f,p):I<1024?v=A(this,f,p):v=M(this,f,p),v},s.prototype.mul=function(f){var p=new s(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},s.prototype.mulf=function(f){var p=new s(null);return p.words=new Array(this.length+f.length),M(this,f,p)},s.prototype.imul=function(f){return this.clone().mulTo(f,this)},s.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var v=0,I=0;I<this.length;I++){var j=(this.words[I]|0)*f,$=(j&67108863)+(v&67108863);v>>=26,v+=j/67108864|0,v+=$>>>26,this.words[I]=$&67108863}return v!==0&&(this.words[I]=v,this.length++),this.length=f===0?1:this.length,p?this.ineg():this},s.prototype.muln=function(f){return this.clone().imuln(f)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(f){var p=k(f);if(p.length===0)return new s(1);for(var v=this,I=0;I<p.length&&p[I]===0;I++,v=v.sqr());if(++I<p.length)for(var j=v.sqr();I<p.length;I++,j=j.sqr())p[I]!==0&&(v=v.mul(j));return v},s.prototype.iushln=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26,I=67108863>>>26-p<<26-p,j;if(p!==0){var $=0;for(j=0;j<this.length;j++){var C=this.words[j]&I,O=(this.words[j]|0)-C<<p;this.words[j]=O|$,$=C>>>26-p}$&&(this.words[j]=$,this.length++)}if(v!==0){for(j=this.length-1;j>=0;j--)this.words[j+v]=this.words[j];for(j=0;j<v;j++)this.words[j]=0;this.length+=v}return this._strip()},s.prototype.ishln=function(f){return n(this.negative===0),this.iushln(f)},s.prototype.iushrn=function(f,p,v){n(typeof f=="number"&&f>=0);var I;p?I=(p-p%26)/26:I=0;var j=f%26,$=Math.min((f-j)/26,this.length),C=67108863^67108863>>>j<<j,O=v;if(I-=$,I=Math.max(0,I),O){for(var _=0;_<$;_++)O.words[_]=this.words[_];O.length=$}if($!==0)if(this.length>$)for(this.length-=$,_=0;_<this.length;_++)this.words[_]=this.words[_+$];else this.words[0]=0,this.length=1;var P=0;for(_=this.length-1;_>=0&&(P!==0||_>=I);_--){var q=this.words[_]|0;this.words[_]=P<<26-j|q>>>j,P=q&C}return O&&P!==0&&(O.words[O.length++]=P),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(f,p,v){return n(this.negative===0),this.iushrn(f,p,v)},s.prototype.shln=function(f){return this.clone().ishln(f)},s.prototype.ushln=function(f){return this.clone().iushln(f)},s.prototype.shrn=function(f){return this.clone().ishrn(f)},s.prototype.ushrn=function(f){return this.clone().iushrn(f)},s.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26,I=1<<p;if(this.length<=v)return!1;var j=this.words[v];return!!(j&I)},s.prototype.imaskn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(p!==0&&v++,this.length=Math.min(v,this.length),p!==0){var I=67108863^67108863>>>p<<p;this.words[this.length-1]&=I}return this._strip()},s.prototype.maskn=function(f){return this.clone().imaskn(f)},s.prototype.iaddn=function(f){return n(typeof f=="number"),n(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},s.prototype._iaddn=function(f){this.words[0]+=f;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},s.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this._strip()},s.prototype.addn=function(f){return this.clone().iaddn(f)},s.prototype.subn=function(f){return this.clone().isubn(f)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(f,p,v){var I=f.length+v,j;this._expand(I);var $,C=0;for(j=0;j<f.length;j++){$=(this.words[j+v]|0)+C;var O=(f.words[j]|0)*p;$-=O&67108863,C=($>>26)-(O/67108864|0),this.words[j+v]=$&67108863}for(;j<this.length-v;j++)$=(this.words[j+v]|0)+C,C=$>>26,this.words[j+v]=$&67108863;if(C===0)return this._strip();for(n(C===-1),C=0,j=0;j<this.length;j++)$=-(this.words[j]|0)+C,C=$>>26,this.words[j]=$&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(f,p){var v=this.length-f.length,I=this.clone(),j=f,$=j.words[j.length-1]|0,C=this._countBits($);v=26-C,v!==0&&(j=j.ushln(v),I.iushln(v),$=j.words[j.length-1]|0);var O=I.length-j.length,_;if(p!=="mod"){_=new s(null),_.length=O+1,_.words=new Array(_.length);for(var P=0;P<_.length;P++)_.words[P]=0}var q=I.clone()._ishlnsubmul(j,1,O);q.negative===0&&(I=q,_&&(_.words[O]=1));for(var W=O-1;W>=0;W--){var K=(I.words[j.length+W]|0)*67108864+(I.words[j.length+W-1]|0);for(K=Math.min(K/$|0,67108863),I._ishlnsubmul(j,K,W);I.negative!==0;)K--,I.negative=0,I._ishlnsubmul(j,1,W),I.isZero()||(I.negative^=1);_&&(_.words[W]=K)}return _&&_._strip(),I._strip(),p!=="div"&&v!==0&&I.iushrn(v),{div:_||null,mod:I}},s.prototype.divmod=function(f,p,v){if(n(!f.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var I,j,$;return this.negative!==0&&f.negative===0?($=this.neg().divmod(f,p),p!=="mod"&&(I=$.div.neg()),p!=="div"&&(j=$.mod.neg(),v&&j.negative!==0&&j.iadd(f)),{div:I,mod:j}):this.negative===0&&f.negative!==0?($=this.divmod(f.neg(),p),p!=="mod"&&(I=$.div.neg()),{div:I,mod:$.mod}):(this.negative&f.negative)!==0?($=this.neg().divmod(f.neg(),p),p!=="div"&&(j=$.mod.neg(),v&&j.negative!==0&&j.isub(f)),{div:$.div,mod:j}):f.length>this.length||this.cmp(f)<0?{div:new s(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new s(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new s(this.modrn(f.words[0]))}:this._wordDiv(f,p)},s.prototype.div=function(f){return this.divmod(f,"div",!1).div},s.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},s.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},s.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var v=p.div.negative!==0?p.mod.isub(f):p.mod,I=f.ushrn(1),j=f.andln(1),$=v.cmp(I);return $<0||j===1&&$===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},s.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var v=(1<<26)%f,I=0,j=this.length-1;j>=0;j--)I=(v*I+(this.words[j]|0))%f;return p?-I:I},s.prototype.modn=function(f){return this.modrn(f)},s.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var v=0,I=this.length-1;I>=0;I--){var j=(this.words[I]|0)+v*67108864;this.words[I]=j/f|0,v=j%f}return this._strip(),p?this.ineg():this},s.prototype.divn=function(f){return this.clone().idivn(f)},s.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,v=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var I=new s(1),j=new s(0),$=new s(0),C=new s(1),O=0;p.isEven()&&v.isEven();)p.iushrn(1),v.iushrn(1),++O;for(var _=v.clone(),P=p.clone();!p.isZero();){for(var q=0,W=1;(p.words[0]&W)===0&&q<26;++q,W<<=1);if(q>0)for(p.iushrn(q);q-- >0;)(I.isOdd()||j.isOdd())&&(I.iadd(_),j.isub(P)),I.iushrn(1),j.iushrn(1);for(var K=0,Y=1;(v.words[0]&Y)===0&&K<26;++K,Y<<=1);if(K>0)for(v.iushrn(K);K-- >0;)($.isOdd()||C.isOdd())&&($.iadd(_),C.isub(P)),$.iushrn(1),C.iushrn(1);p.cmp(v)>=0?(p.isub(v),I.isub($),j.isub(C)):(v.isub(p),$.isub(I),C.isub(j))}return{a:$,b:C,gcd:v.iushln(O)}},s.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,v=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var I=new s(1),j=new s(0),$=v.clone();p.cmpn(1)>0&&v.cmpn(1)>0;){for(var C=0,O=1;(p.words[0]&O)===0&&C<26;++C,O<<=1);if(C>0)for(p.iushrn(C);C-- >0;)I.isOdd()&&I.iadd($),I.iushrn(1);for(var _=0,P=1;(v.words[0]&P)===0&&_<26;++_,P<<=1);if(_>0)for(v.iushrn(_);_-- >0;)j.isOdd()&&j.iadd($),j.iushrn(1);p.cmp(v)>=0?(p.isub(v),I.isub(j)):(v.isub(p),j.isub(I))}var q;return p.cmpn(1)===0?q=I:q=j,q.cmpn(0)<0&&q.iadd(f),q},s.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),v=f.clone();p.negative=0,v.negative=0;for(var I=0;p.isEven()&&v.isEven();I++)p.iushrn(1),v.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;v.isEven();)v.iushrn(1);var j=p.cmp(v);if(j<0){var $=p;p=v,v=$}else if(j===0||v.cmpn(1)===0)break;p.isub(v)}while(!0);return v.iushln(I)},s.prototype.invm=function(f){return this.egcd(f).a.umod(f)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(f){return this.words[0]&f},s.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,v=(f-p)/26,I=1<<p;if(this.length<=v)return this._expand(v+1),this.words[v]|=I,this;for(var j=I,$=v;j!==0&&$<this.length;$++){var C=this.words[$]|0;C+=j,j=C>>>26,C&=67108863,this.words[$]=C}return j!==0&&(this.words[$]=j,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var v;if(this.length>1)v=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var I=this.words[0]|0;v=I===f?0:I<f?-1:1}return this.negative!==0?-v|0:v},s.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var p=this.ucmp(f);return this.negative!==0?-p|0:p},s.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var p=0,v=this.length-1;v>=0;v--){var I=this.words[v]|0,j=f.words[v]|0;if(I!==j){I<j?p=-1:I>j&&(p=1);break}}return p},s.prototype.gtn=function(f){return this.cmpn(f)===1},s.prototype.gt=function(f){return this.cmp(f)===1},s.prototype.gten=function(f){return this.cmpn(f)>=0},s.prototype.gte=function(f){return this.cmp(f)>=0},s.prototype.ltn=function(f){return this.cmpn(f)===-1},s.prototype.lt=function(f){return this.cmp(f)===-1},s.prototype.lten=function(f){return this.cmpn(f)<=0},s.prototype.lte=function(f){return this.cmp(f)<=0},s.prototype.eqn=function(f){return this.cmpn(f)===0},s.prototype.eq=function(f){return this.cmp(f)===0},s.red=function(f){return new D(f)},s.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(f){return this.red=f,this},s.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},s.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},s.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},s.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},s.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},s.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},s.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},s.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var R={k256:null,p224:null,p192:null,p25519:null};function N(y,f){this.name=y,this.p=new s(f,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var f=new s(null);return f.words=new Array(Math.ceil(this.n/13)),f},N.prototype.ireduce=function(f){var p=f,v;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),v=p.bitLength();while(v>this.n);var I=v<this.n?-1:p.ucmp(this.p);return I===0?(p.words[0]=0,p.length=1):I>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},N.prototype.split=function(f,p){f.iushrn(this.n,0,p)},N.prototype.imulK=function(f){return f.imul(this.k)};function z(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(z,N),z.prototype.split=function(f,p){for(var v=4194303,I=Math.min(f.length,9),j=0;j<I;j++)p.words[j]=f.words[j];if(p.length=I,f.length<=9){f.words[0]=0,f.length=1;return}var $=f.words[9];for(p.words[p.length++]=$&v,j=10;j<f.length;j++){var C=f.words[j]|0;f.words[j-10]=(C&v)<<4|$>>>22,$=C}$>>>=22,f.words[j-10]=$,$===0&&f.length>10?f.length-=10:f.length-=9},z.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,v=0;v<f.length;v++){var I=f.words[v]|0;p+=I*977,f.words[v]=p&67108863,p=I*64+(p/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function F(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(F,N);function L(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(L,N);function B(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(B,N),B.prototype.imulK=function(f){for(var p=0,v=0;v<f.length;v++){var I=(f.words[v]|0)*19+p,j=I&67108863;I>>>=26,f.words[v]=j,p=I}return p!==0&&(f.words[f.length++]=p),f},s._prime=function(f){if(R[f])return R[f];var p;if(f==="k256")p=new z;else if(f==="p224")p=new F;else if(f==="p192")p=new L;else if(f==="p25519")p=new B;else throw new Error("Unknown prime "+f);return R[f]=p,p};function D(y){if(typeof y=="string"){var f=s._prime(y);this.m=f.p,this.prime=f}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}D.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},D.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},D.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(l(f,f.umod(this.m)._forceRed(this)),f)},D.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},D.prototype.add=function(f,p){this._verify2(f,p);var v=f.add(p);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},D.prototype.iadd=function(f,p){this._verify2(f,p);var v=f.iadd(p);return v.cmp(this.m)>=0&&v.isub(this.m),v},D.prototype.sub=function(f,p){this._verify2(f,p);var v=f.sub(p);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},D.prototype.isub=function(f,p){this._verify2(f,p);var v=f.isub(p);return v.cmpn(0)<0&&v.iadd(this.m),v},D.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},D.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},D.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},D.prototype.isqr=function(f){return this.imul(f,f.clone())},D.prototype.sqr=function(f){return this.mul(f,f)},D.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var v=this.m.add(new s(1)).iushrn(2);return this.pow(f,v)}for(var I=this.m.subn(1),j=0;!I.isZero()&&I.andln(1)===0;)j++,I.iushrn(1);n(!I.isZero());var $=new s(1).toRed(this),C=$.redNeg(),O=this.m.subn(1).iushrn(1),_=this.m.bitLength();for(_=new s(2*_*_).toRed(this);this.pow(_,O).cmp(C)!==0;)_.redIAdd(C);for(var P=this.pow(_,I),q=this.pow(f,I.addn(1).iushrn(1)),W=this.pow(f,I),K=j;W.cmp($)!==0;){for(var Y=W,te=0;Y.cmp($)!==0;te++)Y=Y.redSqr();n(te<K);var re=this.pow(P,new s(1).iushln(K-te-1));q=q.redMul(re),P=re.redSqr(),W=W.redMul(P),K=te}return q},D.prototype.invm=function(f){var p=f._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},D.prototype.pow=function(f,p){if(p.isZero())return new s(1).toRed(this);if(p.cmpn(1)===0)return f.clone();var v=4,I=new Array(1<<v);I[0]=new s(1).toRed(this),I[1]=f;for(var j=2;j<I.length;j++)I[j]=this.mul(I[j-1],f);var $=I[0],C=0,O=0,_=p.bitLength()%26;for(_===0&&(_=26),j=p.length-1;j>=0;j--){for(var P=p.words[j],q=_-1;q>=0;q--){var W=P>>q&1;if($!==I[0]&&($=this.sqr($)),W===0&&C===0){O=0;continue}C<<=1,C|=W,O++,!(O!==v&&(j!==0||q!==0))&&($=this.mul($,I[C]),O=0,C=0)}_=26}return $},D.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},D.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},s.mont=function(f){return new x(f)};function x(y){D.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(x,D),x.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},x.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},x.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var v=f.imul(p),I=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=v.isub(I).iushrn(this.shift),$=j;return j.cmp(this.m)>=0?$=j.isub(this.m):j.cmpn(0)<0&&($=j.iadd(this.m)),$._forceRed(this)},x.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new s(0)._forceRed(this);var v=f.mul(p),I=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=v.isub(I).iushrn(this.shift),$=j;return j.cmp(this.m)>=0?$=j.isub(this.m):j.cmpn(0)<0&&($=j.iadd(this.m)),$._forceRed(this)},x.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(e,hye)}(Bw)),Bw.exports}var M8,Cj;function gye(){if(Cj)return M8;Cj=1;var e=iG().Buffer;function t(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),i=0;i<n.length;i++)n[i]=255;for(var s=0;s<r.length;s++){var o=r.charAt(s),a=o.charCodeAt(0);if(n[a]!==255)throw new TypeError(o+" is ambiguous");n[a]=s}var c=r.length,u=r.charAt(0),l=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function h(b){if((Array.isArray(b)||b instanceof Uint8Array)&&(b=e.from(b)),!e.isBuffer(b))throw new TypeError("Expected Buffer");if(b.length===0)return"";for(var k=0,w=0,E=0,A=b.length;E!==A&&b[E]===0;)E++,k++;for(var M=(A-E)*d+1>>>0,R=new Uint8Array(M);E!==A;){for(var N=b[E],z=0,F=M-1;(N!==0||z<w)&&F!==-1;F--,z++)N+=256*R[F]>>>0,R[F]=N%c>>>0,N=N/c>>>0;if(N!==0)throw new Error("Non-zero carry");w=z,E++}for(var L=M-w;L!==M&&R[L]===0;)L++;for(var B=u.repeat(k);L<M;++L)B+=r.charAt(R[L]);return B}function g(b){if(typeof b!="string")throw new TypeError("Expected String");if(b.length===0)return e.alloc(0);for(var k=0,w=0,E=0;b[k]===u;)w++,k++;for(var A=(b.length-k)*l+1>>>0,M=new Uint8Array(A);k<b.length;){var R=b.charCodeAt(k);if(R>255)return;var N=n[R];if(N===255)return;for(var z=0,F=A-1;(N!==0||z<E)&&F!==-1;F--,z++)N+=c*M[F]>>>0,M[F]=N%256>>>0,N=N/256>>>0;if(N!==0)throw new Error("Non-zero carry");E=z,k++}for(var L=A-E;L!==A&&M[L]===0;)L++;var B=e.allocUnsafe(w+(A-L));B.fill(0,0,w);for(var D=w;L!==A;)B[D++]=M[L++];return B}function m(b){var k=g(b);if(k)return k;throw new Error("Non-base"+c+" character")}return{encode:h,decodeUnsafe:g,decode:m}}return M8=t,M8}var $8,Ij;function mye(){if(Ij)return $8;Ij=1;var e=gye(),t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";return $8=e(t),$8}function Nu(e,t,r){return t<=e&&e<=r}function b4(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function bye(e){for(var t=String(e),r=t.length,n=0,i=[];n<r;){var s=t.charCodeAt(n);if(s<55296||s>57343)i.push(s);else if(56320<=s&&s<=57343)i.push(65533);else if(55296<=s&&s<=56319)if(n===r-1)i.push(65533);else{var o=e.charCodeAt(n+1);if(56320<=o&&o<=57343){var a=s&1023,c=o&1023;i.push(65536+(a<<10)+c),n+=1}else i.push(65533)}n+=1}return i}function yye(e){for(var t="",r=0;r<e.length;++r){var n=e[r];n<=65535?t+=String.fromCharCode(n):(n-=65536,t+=String.fromCharCode((n>>10)+55296,(n&1023)+56320))}return t}var Ov=-1;function BC(e){this.tokens=[].slice.call(e)}BC.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():Ov},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var Op=-1;function T8(e,t){if(e)throw TypeError("Decoder error");return t||65533}var jv="utf-8";function Pv(e,t){if(!(this instanceof Pv))return new Pv(e,t);if(e=e!==void 0?String(e).toLowerCase():jv,e!==jv)throw new Error("Encoding not supported. Only utf-8 is supported");t=b4(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}Pv.prototype={decode:function(t,r){var n;typeof t=="object"&&t instanceof ArrayBuffer?n=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):n=new Uint8Array(0),r=b4(r),this._streaming||(this._decoder=new wye({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!r.stream;for(var i=new BC(n),s=[],o;!i.endOfStream()&&(o=this._decoder.handler(i,i.read()),o!==Op);)o!==null&&(Array.isArray(o)?s.push.apply(s,o):s.push(o));if(!this._streaming){do{if(o=this._decoder.handler(i,i.read()),o===Op)break;o!==null&&(Array.isArray(o)?s.push.apply(s,o):s.push(o))}while(!i.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),yye(s)}};function Dv(e,t){if(!(this instanceof Dv))return new Dv(e,t);if(e=e!==void 0?String(e).toLowerCase():jv,e!==jv)throw new Error("Encoding not supported. Only utf-8 is supported");t=b4(t),this._streaming=!1,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}Dv.prototype={encode:function(t,r){t=t?String(t):"",r=b4(r),this._streaming||(this._encoder=new vye(this._options)),this._streaming=!!r.stream;for(var n=[],i=new BC(bye(t)),s;!i.endOfStream()&&(s=this._encoder.handler(i,i.read()),s!==Op);)Array.isArray(s)?n.push.apply(n,s):n.push(s);if(!this._streaming){for(;s=this._encoder.handler(i,i.read()),s!==Op;)Array.isArray(s)?n.push.apply(n,s):n.push(s);this._encoder=null}return new Uint8Array(n)}};function wye(e){var t=e.fatal,r=0,n=0,i=0,s=128,o=191;this.handler=function(a,c){if(c===Ov&&i!==0)return i=0,T8(t);if(c===Ov)return Op;if(i===0){if(Nu(c,0,127))return c;if(Nu(c,194,223))i=1,r=c-192;else if(Nu(c,224,239))c===224&&(s=160),c===237&&(o=159),i=2,r=c-224;else if(Nu(c,240,244))c===240&&(s=144),c===244&&(o=143),i=3,r=c-240;else return T8(t);return r=r<<6*i,null}if(!Nu(c,s,o))return r=i=n=0,s=128,o=191,a.prepend(c),T8(t);if(s=128,o=191,n+=1,r+=c-128<<6*(i-n),n!==i)return null;var u=r;return r=i=n=0,u}}function vye(e){e.fatal,this.handler=function(t,r){if(r===Ov)return Op;if(Nu(r,0,127))return r;var n,i;Nu(r,128,2047)?(n=1,i=192):Nu(r,2048,65535)?(n=2,i=224):Nu(r,65536,1114111)&&(n=3,i=240);for(var s=[(r>>6*n)+i];n>0;){var o=r>>6*(n-1);s.push(128|o&63),n-=1}return s}}const _ye=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:Pv,TextEncoder:Dv},Symbol.toStringTag,{value:"Module"})),xye=F2(_ye);var Mj;function Eye(){if(Mj)return Tr;Mj=1;var e=Tr&&Tr.__createBinding||(Object.create?function(L,B,D,x){x===void 0&&(x=D),Object.defineProperty(L,x,{enumerable:!0,get:function(){return B[D]}})}:function(L,B,D,x){x===void 0&&(x=D),L[x]=B[D]}),t=Tr&&Tr.__setModuleDefault||(Object.create?function(L,B){Object.defineProperty(L,"default",{enumerable:!0,value:B})}:function(L,B){L.default=B}),r=Tr&&Tr.__decorate||function(L,B,D,x){var y=arguments.length,f=y<3?B:x===null?x=Object.getOwnPropertyDescriptor(B,D):x,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(L,B,D,x);else for(var v=L.length-1;v>=0;v--)(p=L[v])&&(f=(y<3?p(f):y>3?p(B,D,f):p(B,D))||f);return y>3&&f&&Object.defineProperty(B,D,f),f},n=Tr&&Tr.__importStar||function(L){if(L&&L.__esModule)return L;var B={};if(L!=null)for(var D in L)D!=="default"&&Object.hasOwnProperty.call(L,D)&&e(B,L,D);return t(B,L),B},i=Tr&&Tr.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.deserializeUnchecked=Tr.deserialize=Tr.serialize=Tr.BinaryReader=Tr.BinaryWriter=Tr.BorshError=Tr.baseDecode=Tr.baseEncode=void 0;const s=i(pye()),o=i(mye()),a=n(xye),c=typeof TextDecoder!="function"?a.TextDecoder:TextDecoder,u=new c("utf-8",{fatal:!0});function l(L){return typeof L=="string"&&(L=Buffer.from(L,"utf8")),o.default.encode(Buffer.from(L))}Tr.baseEncode=l;function d(L){return Buffer.from(o.default.decode(L))}Tr.baseDecode=d;const h=1024;class g extends Error{constructor(B){super(B),this.fieldPath=[],this.originalMessage=B}addToFieldPath(B){this.fieldPath.splice(0,0,B),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}Tr.BorshError=g;class m{constructor(){this.buf=Buffer.alloc(h),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(h)]))}writeU8(B){this.maybeResize(),this.buf.writeUInt8(B,this.length),this.length+=1}writeU16(B){this.maybeResize(),this.buf.writeUInt16LE(B,this.length),this.length+=2}writeU32(B){this.maybeResize(),this.buf.writeUInt32LE(B,this.length),this.length+=4}writeU64(B){this.maybeResize(),this.writeBuffer(Buffer.from(new s.default(B).toArray("le",8)))}writeU128(B){this.maybeResize(),this.writeBuffer(Buffer.from(new s.default(B).toArray("le",16)))}writeU256(B){this.maybeResize(),this.writeBuffer(Buffer.from(new s.default(B).toArray("le",32)))}writeU512(B){this.maybeResize(),this.writeBuffer(Buffer.from(new s.default(B).toArray("le",64)))}writeBuffer(B){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),B,Buffer.alloc(h)]),this.length+=B.length}writeString(B){this.maybeResize();const D=Buffer.from(B,"utf8");this.writeU32(D.length),this.writeBuffer(D)}writeFixedArray(B){this.writeBuffer(Buffer.from(B))}writeArray(B,D){this.maybeResize(),this.writeU32(B.length);for(const x of B)this.maybeResize(),D(x)}toArray(){return this.buf.subarray(0,this.length)}}Tr.BinaryWriter=m;function b(L,B,D){const x=D.value;D.value=function(...y){try{return x.apply(this,y)}catch(f){if(f instanceof RangeError){const p=f.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(p)>=0)throw new g("Reached the end of buffer when deserializing")}throw f}}}class k{constructor(B){this.buf=B,this.offset=0}readU8(){const B=this.buf.readUInt8(this.offset);return this.offset+=1,B}readU16(){const B=this.buf.readUInt16LE(this.offset);return this.offset+=2,B}readU32(){const B=this.buf.readUInt32LE(this.offset);return this.offset+=4,B}readU64(){const B=this.readBuffer(8);return new s.default(B,"le")}readU128(){const B=this.readBuffer(16);return new s.default(B,"le")}readU256(){const B=this.readBuffer(32);return new s.default(B,"le")}readU512(){const B=this.readBuffer(64);return new s.default(B,"le")}readBuffer(B){if(this.offset+B>this.buf.length)throw new g(`Expected buffer length ${B} isn't within bounds`);const D=this.buf.slice(this.offset,this.offset+B);return this.offset+=B,D}readString(){const B=this.readU32(),D=this.readBuffer(B);try{return u.decode(D)}catch(x){throw new g(`Error decoding UTF-8 string: ${x}`)}}readFixedArray(B){return new Uint8Array(this.readBuffer(B))}readArray(B){const D=this.readU32(),x=Array();for(let y=0;y<D;++y)x.push(B());return x}}r([b],k.prototype,"readU8",null),r([b],k.prototype,"readU16",null),r([b],k.prototype,"readU32",null),r([b],k.prototype,"readU64",null),r([b],k.prototype,"readU128",null),r([b],k.prototype,"readU256",null),r([b],k.prototype,"readU512",null),r([b],k.prototype,"readString",null),r([b],k.prototype,"readFixedArray",null),r([b],k.prototype,"readArray",null),Tr.BinaryReader=k;function w(L){return L.charAt(0).toUpperCase()+L.slice(1)}function E(L,B,D,x,y){try{if(typeof x=="string")y[`write${w(x)}`](D);else if(x instanceof Array)if(typeof x[0]=="number"){if(D.length!==x[0])throw new g(`Expecting byte array of length ${x[0]}, but got ${D.length} bytes`);y.writeFixedArray(D)}else if(x.length===2&&typeof x[1]=="number"){if(D.length!==x[1])throw new g(`Expecting byte array of length ${x[1]}, but got ${D.length} bytes`);for(let f=0;f<x[1];f++)E(L,null,D[f],x[0],y)}else y.writeArray(D,f=>{E(L,B,f,x[0],y)});else if(x.kind!==void 0)switch(x.kind){case"option":{D==null?y.writeU8(0):(y.writeU8(1),E(L,B,D,x.type,y));break}case"map":{y.writeU32(D.size),D.forEach((f,p)=>{E(L,B,p,x.key,y),E(L,B,f,x.value,y)});break}default:throw new g(`FieldType ${x} unrecognized`)}else A(L,D,y)}catch(f){throw f instanceof g&&f.addToFieldPath(B),f}}function A(L,B,D){if(typeof B.borshSerialize=="function"){B.borshSerialize(D);return}const x=L.get(B.constructor);if(!x)throw new g(`Class ${B.constructor.name} is missing in schema`);if(x.kind==="struct")x.fields.map(([y,f])=>{E(L,y,B[y],f,D)});else if(x.kind==="enum"){const y=B[x.field];for(let f=0;f<x.values.length;++f){const[p,v]=x.values[f];if(p===y){D.writeU8(f),E(L,p,B[p],v,D);break}}}else throw new g(`Unexpected schema kind: ${x.kind} for ${B.constructor.name}`)}function M(L,B,D=m){const x=new D;return A(L,B,x),x.toArray()}Tr.serialize=M;function R(L,B,D,x){try{if(typeof D=="string")return x[`read${w(D)}`]();if(D instanceof Array){if(typeof D[0]=="number")return x.readFixedArray(D[0]);if(typeof D[1]=="number"){const y=[];for(let f=0;f<D[1];f++)y.push(R(L,null,D[0],x));return y}else return x.readArray(()=>R(L,B,D[0],x))}if(D.kind==="option")return x.readU8()?R(L,B,D.type,x):void 0;if(D.kind==="map"){let y=new Map;const f=x.readU32();for(let p=0;p<f;p++){const v=R(L,B,D.key,x),I=R(L,B,D.value,x);y.set(v,I)}return y}return N(L,D,x)}catch(y){throw y instanceof g&&y.addToFieldPath(B),y}}function N(L,B,D){if(typeof B.borshDeserialize=="function")return B.borshDeserialize(D);const x=L.get(B);if(!x)throw new g(`Class ${B.name} is missing in schema`);if(x.kind==="struct"){const y={};for(const[f,p]of L.get(B).fields)y[f]=R(L,f,p,D);return new B(y)}if(x.kind==="enum"){const y=D.readU8();if(y>=x.values.length)throw new g(`Enum index: ${y} is out of range`);const[f,p]=x.values[y],v=R(L,f,p,D);return new B({[f]:v})}throw new g(`Unexpected schema kind: ${x.kind} for ${B.constructor.name}`)}function z(L,B,D,x=k){const y=new x(D),f=N(L,B,y);if(y.offset<D.length)throw new g(`Unexpected ${D.length-y.offset} bytes after deserialized data`);return f}Tr.deserialize=z;function F(L,B,D,x=k){const y=new x(D);return N(L,B,y)}return Tr.deserializeUnchecked=F,Tr}var N8=Eye(),ge={},$j;function kye(){if($j)return ge;$j=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.s16=ge.s8=ge.nu64be=ge.u48be=ge.u40be=ge.u32be=ge.u24be=ge.u16be=ge.nu64=ge.u48=ge.u40=ge.u32=ge.u24=ge.u16=ge.u8=ge.offset=ge.greedy=ge.Constant=ge.UTF8=ge.CString=ge.Blob=ge.Boolean=ge.BitField=ge.BitStructure=ge.VariantLayout=ge.Union=ge.UnionLayoutDiscriminator=ge.UnionDiscriminator=ge.Structure=ge.Sequence=ge.DoubleBE=ge.Double=ge.FloatBE=ge.Float=ge.NearInt64BE=ge.NearInt64=ge.NearUInt64BE=ge.NearUInt64=ge.IntBE=ge.Int=ge.UIntBE=ge.UInt=ge.OffsetLayout=ge.GreedyCount=ge.ExternalLayout=ge.bindConstructorLayout=ge.nameWithProperty=ge.Layout=ge.uint8ArrayToBuffer=ge.checkUint8Array=void 0,ge.constant=ge.utf8=ge.cstr=ge.blob=ge.unionLayoutDiscriminator=ge.union=ge.seq=ge.bits=ge.struct=ge.f64be=ge.f64=ge.f32be=ge.f32=ge.ns64be=ge.s48be=ge.s40be=ge.s32be=ge.s24be=ge.s16be=ge.ns64=ge.s48=ge.s40=ge.s32=ge.s24=void 0;const e=OC();function t(_){if(!(_ instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}ge.checkUint8Array=t;function r(_){return t(_),e.Buffer.from(_.buffer,_.byteOffset,_.length)}ge.uint8ArrayToBuffer=r;let n=class{constructor(P,q){if(!Number.isInteger(P))throw new TypeError("span must be an integer");this.span=P,this.property=q}makeDestinationObject(){return{}}getSpan(P,q){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(P){const q=Object.create(this.constructor.prototype);return Object.assign(q,this),q.property=P,q}fromArray(P){}};ge.Layout=n;function i(_,P){return P.property?_+"["+P.property+"]":_}ge.nameWithProperty=i;function s(_,P){if(typeof _!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(_,"layout_"))throw new Error("Class is already bound to a layout");if(!(P&&P instanceof n))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(P,"boundConstructor_"))throw new Error("layout is already bound to a constructor");_.layout_=P,P.boundConstructor_=_,P.makeDestinationObject=()=>new _,Object.defineProperty(_.prototype,"encode",{value(q,W){return P.encode(this,q,W)},writable:!0}),Object.defineProperty(_,"decode",{value(q,W){return P.decode(q,W)},writable:!0})}ge.bindConstructorLayout=s;class o extends n{isCount(){throw new Error("ExternalLayout is abstract")}}ge.ExternalLayout=o;class a extends o{constructor(P=1,q){if(!Number.isInteger(P)||0>=P)throw new TypeError("elementSpan must be a (positive) integer");super(-1,q),this.elementSpan=P}isCount(){return!0}decode(P,q=0){t(P);const W=P.length-q;return Math.floor(W/this.elementSpan)}encode(P,q,W){return 0}}ge.GreedyCount=a;class c extends o{constructor(P,q=0,W){if(!(P instanceof n))throw new TypeError("layout must be a Layout");if(!Number.isInteger(q))throw new TypeError("offset must be integer or undefined");super(P.span,W||P.property),this.layout=P,this.offset=q}isCount(){return this.layout instanceof u||this.layout instanceof l}decode(P,q=0){return this.layout.decode(P,q+this.offset)}encode(P,q,W=0){return this.layout.encode(P,q,W+this.offset)}}ge.OffsetLayout=c;class u extends n{constructor(P,q){if(super(P,q),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(P,q=0){return r(P).readUIntLE(q,this.span)}encode(P,q,W=0){return r(q).writeUIntLE(P,W,this.span),this.span}}ge.UInt=u;class l extends n{constructor(P,q){if(super(P,q),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(P,q=0){return r(P).readUIntBE(q,this.span)}encode(P,q,W=0){return r(q).writeUIntBE(P,W,this.span),this.span}}ge.UIntBE=l;class d extends n{constructor(P,q){if(super(P,q),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(P,q=0){return r(P).readIntLE(q,this.span)}encode(P,q,W=0){return r(q).writeIntLE(P,W,this.span),this.span}}ge.Int=d;class h extends n{constructor(P,q){if(super(P,q),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(P,q=0){return r(P).readIntBE(q,this.span)}encode(P,q,W=0){return r(q).writeIntBE(P,W,this.span),this.span}}ge.IntBE=h;const g=Math.pow(2,32);function m(_){const P=Math.floor(_/g),q=_-P*g;return{hi32:P,lo32:q}}function b(_,P){return _*g+P}class k extends n{constructor(P){super(8,P)}decode(P,q=0){const W=r(P),K=W.readUInt32LE(q),Y=W.readUInt32LE(q+4);return b(Y,K)}encode(P,q,W=0){const K=m(P),Y=r(q);return Y.writeUInt32LE(K.lo32,W),Y.writeUInt32LE(K.hi32,W+4),8}}ge.NearUInt64=k;class w extends n{constructor(P){super(8,P)}decode(P,q=0){const W=r(P),K=W.readUInt32BE(q),Y=W.readUInt32BE(q+4);return b(K,Y)}encode(P,q,W=0){const K=m(P),Y=r(q);return Y.writeUInt32BE(K.hi32,W),Y.writeUInt32BE(K.lo32,W+4),8}}ge.NearUInt64BE=w;class E extends n{constructor(P){super(8,P)}decode(P,q=0){const W=r(P),K=W.readUInt32LE(q),Y=W.readInt32LE(q+4);return b(Y,K)}encode(P,q,W=0){const K=m(P),Y=r(q);return Y.writeUInt32LE(K.lo32,W),Y.writeInt32LE(K.hi32,W+4),8}}ge.NearInt64=E;class A extends n{constructor(P){super(8,P)}decode(P,q=0){const W=r(P),K=W.readInt32BE(q),Y=W.readUInt32BE(q+4);return b(K,Y)}encode(P,q,W=0){const K=m(P),Y=r(q);return Y.writeInt32BE(K.hi32,W),Y.writeUInt32BE(K.lo32,W+4),8}}ge.NearInt64BE=A;class M extends n{constructor(P){super(4,P)}decode(P,q=0){return r(P).readFloatLE(q)}encode(P,q,W=0){return r(q).writeFloatLE(P,W),4}}ge.Float=M;class R extends n{constructor(P){super(4,P)}decode(P,q=0){return r(P).readFloatBE(q)}encode(P,q,W=0){return r(q).writeFloatBE(P,W),4}}ge.FloatBE=R;class N extends n{constructor(P){super(8,P)}decode(P,q=0){return r(P).readDoubleLE(q)}encode(P,q,W=0){return r(q).writeDoubleLE(P,W),8}}ge.Double=N;class z extends n{constructor(P){super(8,P)}decode(P,q=0){return r(P).readDoubleBE(q)}encode(P,q,W=0){return r(q).writeDoubleBE(P,W),8}}ge.DoubleBE=z;class F extends n{constructor(P,q,W){if(!(P instanceof n))throw new TypeError("elementLayout must be a Layout");if(!(q instanceof o&&q.isCount()||Number.isInteger(q)&&0<=q))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let K=-1;!(q instanceof o)&&0<P.span&&(K=q*P.span),super(K,W),this.elementLayout=P,this.count=q}getSpan(P,q=0){if(0<=this.span)return this.span;let W=0,K=this.count;if(K instanceof o&&(K=K.decode(P,q)),0<this.elementLayout.span)W=K*this.elementLayout.span;else{let Y=0;for(;Y<K;)W+=this.elementLayout.getSpan(P,q+W),++Y}return W}decode(P,q=0){const W=[];let K=0,Y=this.count;for(Y instanceof o&&(Y=Y.decode(P,q));K<Y;)W.push(this.elementLayout.decode(P,q)),q+=this.elementLayout.getSpan(P,q),K+=1;return W}encode(P,q,W=0){const K=this.elementLayout,Y=P.reduce((te,re)=>te+K.encode(re,q,W+te),0);return this.count instanceof o&&this.count.encode(P.length,q,W),Y}}ge.Sequence=F;class L extends n{constructor(P,q,W){if(!(Array.isArray(P)&&P.reduce((Y,te)=>Y&&te instanceof n,!0)))throw new TypeError("fields must be array of Layout instances");typeof q=="boolean"&&W===void 0&&(W=q,q=void 0);for(const Y of P)if(0>Y.span&&Y.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let K=-1;try{K=P.reduce((Y,te)=>Y+te.getSpan(),0)}catch{}super(K,q),this.fields=P,this.decodePrefixes=!!W}getSpan(P,q=0){if(0<=this.span)return this.span;let W=0;try{W=this.fields.reduce((K,Y)=>{const te=Y.getSpan(P,q);return q+=te,K+te},0)}catch{throw new RangeError("indeterminate span")}return W}decode(P,q=0){t(P);const W=this.makeDestinationObject();for(const K of this.fields)if(K.property!==void 0&&(W[K.property]=K.decode(P,q)),q+=K.getSpan(P,q),this.decodePrefixes&&P.length===q)break;return W}encode(P,q,W=0){const K=W;let Y=0,te=0;for(const re of this.fields){let be=re.span;if(te=0<be?be:0,re.property!==void 0){const ve=P[re.property];ve!==void 0&&(te=re.encode(ve,q,W),0>be&&(be=re.getSpan(q,W)))}Y=W,W+=be}return Y+te-K}fromArray(P){const q=this.makeDestinationObject();for(const W of this.fields)W.property!==void 0&&0<P.length&&(q[W.property]=P.shift());return q}layoutFor(P){if(typeof P!="string")throw new TypeError("property must be string");for(const q of this.fields)if(q.property===P)return q}offsetOf(P){if(typeof P!="string")throw new TypeError("property must be string");let q=0;for(const W of this.fields){if(W.property===P)return q;0>W.span?q=-1:0<=q&&(q+=W.span)}}}ge.Structure=L;class B{constructor(P){this.property=P}decode(P,q){throw new Error("UnionDiscriminator is abstract")}encode(P,q,W){throw new Error("UnionDiscriminator is abstract")}}ge.UnionDiscriminator=B;class D extends B{constructor(P,q){if(!(P instanceof o&&P.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(q||P.property||"variant"),this.layout=P}decode(P,q){return this.layout.decode(P,q)}encode(P,q,W){return this.layout.encode(P,q,W)}}ge.UnionLayoutDiscriminator=D;class x extends n{constructor(P,q,W){let K;if(P instanceof u||P instanceof l)K=new D(new c(P));else if(P instanceof o&&P.isCount())K=new D(P);else if(P instanceof B)K=P;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(q===void 0&&(q=null),!(q===null||q instanceof n))throw new TypeError("defaultLayout must be null or a Layout");if(q!==null){if(0>q.span)throw new Error("defaultLayout must have constant span");q.property===void 0&&(q=q.replicate("content"))}let Y=-1;q&&(Y=q.span,0<=Y&&(P instanceof u||P instanceof l)&&(Y+=K.layout.span)),super(Y,W),this.discriminator=K,this.usesPrefixDiscriminator=P instanceof u||P instanceof l,this.defaultLayout=q,this.registry={};let te=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(re){return te(re)},this.configGetSourceVariant=function(re){te=re.bind(this)}}getSpan(P,q=0){if(0<=this.span)return this.span;const W=this.getVariant(P,q);if(!W)throw new Error("unable to determine span for unrecognized variant");return W.getSpan(P,q)}defaultGetSourceVariant(P){if(Object.prototype.hasOwnProperty.call(P,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(P,this.defaultLayout.property))return;const q=this.registry[P[this.discriminator.property]];if(q&&(!q.layout||q.property&&Object.prototype.hasOwnProperty.call(P,q.property)))return q}else for(const q in this.registry){const W=this.registry[q];if(W.property&&Object.prototype.hasOwnProperty.call(P,W.property))return W}throw new Error("unable to infer src variant")}decode(P,q=0){let W;const K=this.discriminator,Y=K.decode(P,q),te=this.registry[Y];if(te===void 0){const re=this.defaultLayout;let be=0;this.usesPrefixDiscriminator&&(be=K.layout.span),W=this.makeDestinationObject(),W[K.property]=Y,W[re.property]=re.decode(P,q+be)}else W=te.decode(P,q);return W}encode(P,q,W=0){const K=this.getSourceVariant(P);if(K===void 0){const Y=this.discriminator,te=this.defaultLayout;let re=0;return this.usesPrefixDiscriminator&&(re=Y.layout.span),Y.encode(P[Y.property],q,W),re+te.encode(P[te.property],q,W+re)}return K.encode(P,q,W)}addVariant(P,q,W){const K=new y(this,P,q,W);return this.registry[P]=K,K}getVariant(P,q=0){let W;return P instanceof Uint8Array?W=this.discriminator.decode(P,q):W=P,this.registry[W]}}ge.Union=x;class y extends n{constructor(P,q,W,K){if(!(P instanceof x))throw new TypeError("union must be a Union");if(!Number.isInteger(q)||0>q)throw new TypeError("variant must be a (non-negative) integer");if(typeof W=="string"&&K===void 0&&(K=W,W=null),W){if(!(W instanceof n))throw new TypeError("layout must be a Layout");if(P.defaultLayout!==null&&0<=W.span&&W.span>P.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof K!="string")throw new TypeError("variant must have a String property")}let Y=P.span;0>P.span&&(Y=W?W.span:0,0<=Y&&P.usesPrefixDiscriminator&&(Y+=P.discriminator.layout.span)),super(Y,K),this.union=P,this.variant=q,this.layout=W||null}getSpan(P,q=0){if(0<=this.span)return this.span;let W=0;this.union.usesPrefixDiscriminator&&(W=this.union.discriminator.layout.span);let K=0;return this.layout&&(K=this.layout.getSpan(P,q+W)),W+K}decode(P,q=0){const W=this.makeDestinationObject();if(this!==this.union.getVariant(P,q))throw new Error("variant mismatch");let K=0;return this.union.usesPrefixDiscriminator&&(K=this.union.discriminator.layout.span),this.layout?W[this.property]=this.layout.decode(P,q+K):this.property?W[this.property]=!0:this.union.usesPrefixDiscriminator&&(W[this.union.discriminator.property]=this.variant),W}encode(P,q,W=0){let K=0;if(this.union.usesPrefixDiscriminator&&(K=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(P,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,q,W);let Y=K;if(this.layout&&(this.layout.encode(P[this.property],q,W+K),Y+=this.layout.getSpan(q,W+K),0<=this.union.span&&Y>this.union.span))throw new Error("encoded variant overruns containing union");return Y}fromArray(P){if(this.layout)return this.layout.fromArray(P)}}ge.VariantLayout=y;function f(_){return 0>_&&(_+=4294967296),_}class p extends n{constructor(P,q,W){if(!(P instanceof u||P instanceof l))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof q=="string"&&W===void 0&&(W=q,q=!1),4<P.span)throw new RangeError("word cannot exceed 32 bits");super(P.span,W),this.word=P,this.msb=!!q,this.fields=[];let K=0;this._packedSetValue=function(Y){return K=f(Y),this},this._packedGetValue=function(){return K}}decode(P,q=0){const W=this.makeDestinationObject(),K=this.word.decode(P,q);this._packedSetValue(K);for(const Y of this.fields)Y.property!==void 0&&(W[Y.property]=Y.decode(P));return W}encode(P,q,W=0){const K=this.word.decode(q,W);this._packedSetValue(K);for(const Y of this.fields)if(Y.property!==void 0){const te=P[Y.property];te!==void 0&&Y.encode(te)}return this.word.encode(this._packedGetValue(),q,W)}addField(P,q){const W=new v(this,P,q);return this.fields.push(W),W}addBoolean(P){const q=new I(this,P);return this.fields.push(q),q}fieldFor(P){if(typeof P!="string")throw new TypeError("property must be string");for(const q of this.fields)if(q.property===P)return q}}ge.BitStructure=p;class v{constructor(P,q,W){if(!(P instanceof p))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(q)||0>=q)throw new TypeError("bits must be positive integer");const K=8*P.span,Y=P.fields.reduce((te,re)=>te+re.bits,0);if(q+Y>K)throw new Error("bits too long for span remainder ("+(K-Y)+" of "+K+" remain)");this.container=P,this.bits=q,this.valueMask=(1<<q)-1,q===32&&(this.valueMask=4294967295),this.start=Y,this.container.msb&&(this.start=K-Y-q),this.wordMask=f(this.valueMask<<this.start),this.property=W}decode(P,q){const W=this.container._packedGetValue();return f(W&this.wordMask)>>>this.start}encode(P){if(typeof P!="number"||!Number.isInteger(P)||P!==f(P&this.valueMask))throw new TypeError(i("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const q=this.container._packedGetValue(),W=f(P<<this.start);this.container._packedSetValue(f(q&~this.wordMask)|W)}}ge.BitField=v;class I extends v{constructor(P,q){super(P,1,q)}decode(P,q){return!!super.decode(P,q)}encode(P){typeof P=="boolean"&&(P=+P),super.encode(P)}}ge.Boolean=I;class j extends n{constructor(P,q){if(!(P instanceof o&&P.isCount()||Number.isInteger(P)&&0<=P))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let W=-1;P instanceof o||(W=P),super(W,q),this.length=P}getSpan(P,q){let W=this.span;return 0>W&&(W=this.length.decode(P,q)),W}decode(P,q=0){let W=this.span;return 0>W&&(W=this.length.decode(P,q)),r(P).slice(q,q+W)}encode(P,q,W){let K=this.length;if(this.length instanceof o&&(K=P.length),!(P instanceof Uint8Array&&K===P.length))throw new TypeError(i("Blob.encode",this)+" requires (length "+K+") Uint8Array as src");if(W+K>q.length)throw new RangeError("encoding overruns Uint8Array");const Y=r(P);return r(q).write(Y.toString("hex"),W,K,"hex"),this.length instanceof o&&this.length.encode(K,q,W),K}}ge.Blob=j;class $ extends n{constructor(P){super(-1,P)}getSpan(P,q=0){t(P);let W=q;for(;W<P.length&&P[W]!==0;)W+=1;return 1+W-q}decode(P,q=0){const W=this.getSpan(P,q);return r(P).slice(q,q+W-1).toString("utf-8")}encode(P,q,W=0){typeof P!="string"&&(P=String(P));const K=e.Buffer.from(P,"utf8"),Y=K.length;if(W+Y>q.length)throw new RangeError("encoding overruns Buffer");const te=r(q);return K.copy(te,W),te[W+Y]=0,Y+1}}ge.CString=$;class C extends n{constructor(P,q){if(typeof P=="string"&&q===void 0&&(q=P,P=void 0),P===void 0)P=-1;else if(!Number.isInteger(P))throw new TypeError("maxSpan must be an integer");super(-1,q),this.maxSpan=P}getSpan(P,q=0){return t(P),P.length-q}decode(P,q=0){const W=this.getSpan(P,q);if(0<=this.maxSpan&&this.maxSpan<W)throw new RangeError("text length exceeds maxSpan");return r(P).slice(q,q+W).toString("utf-8")}encode(P,q,W=0){typeof P!="string"&&(P=String(P));const K=e.Buffer.from(P,"utf8"),Y=K.length;if(0<=this.maxSpan&&this.maxSpan<Y)throw new RangeError("text length exceeds maxSpan");if(W+Y>q.length)throw new RangeError("encoding overruns Buffer");return K.copy(r(q),W),Y}}ge.UTF8=C;class O extends n{constructor(P,q){super(0,q),this.value=P}decode(P,q){return this.value}encode(P,q,W){return 0}}return ge.Constant=O,ge.greedy=(_,P)=>new a(_,P),ge.offset=(_,P,q)=>new c(_,P,q),ge.u8=_=>new u(1,_),ge.u16=_=>new u(2,_),ge.u24=_=>new u(3,_),ge.u32=_=>new u(4,_),ge.u40=_=>new u(5,_),ge.u48=_=>new u(6,_),ge.nu64=_=>new k(_),ge.u16be=_=>new l(2,_),ge.u24be=_=>new l(3,_),ge.u32be=_=>new l(4,_),ge.u40be=_=>new l(5,_),ge.u48be=_=>new l(6,_),ge.nu64be=_=>new w(_),ge.s8=_=>new d(1,_),ge.s16=_=>new d(2,_),ge.s24=_=>new d(3,_),ge.s32=_=>new d(4,_),ge.s40=_=>new d(5,_),ge.s48=_=>new d(6,_),ge.ns64=_=>new E(_),ge.s16be=_=>new h(2,_),ge.s24be=_=>new h(3,_),ge.s32be=_=>new h(4,_),ge.s40be=_=>new h(5,_),ge.s48be=_=>new h(6,_),ge.ns64be=_=>new A(_),ge.f32=_=>new M(_),ge.f32be=_=>new R(_),ge.f64=_=>new N(_),ge.f64be=_=>new z(_),ge.struct=(_,P,q)=>new L(_,P,q),ge.bits=(_,P,q)=>new p(_,P,q),ge.seq=(_,P,q)=>new F(_,P,q),ge.union=(_,P,q)=>new x(_,P,q),ge.unionLayoutDiscriminator=(_,P)=>new D(_,P),ge.blob=(_,P)=>new j(_,P),ge.cstr=_=>new $(_),ge.utf8=(_,P)=>new C(_,P),ge.constant=(_,P)=>new O(_,P),ge}var ie=kye(),Aye=8078e3,Sye=8078001,Cye=8078004,Iye=8078005,Mye=8078006,$ye=8078011;function sG(e){return Array.isArray(e)?"%5B"+e.map(sG).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function Tye([e,t]){return`${e}=${sG(t)}`}function Nye(e){const t=Object.entries(e).map(Tye).join("&");return btoa(t)}function Oye(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${Nye(t)}'`),`${r}\``}}var pp=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,n;if(t){const{cause:s,...o}=t;s&&(n={cause:s}),Object.keys(o).length>0&&(r=o)}const i=Oye(e,r);super(i,n),this.context={__code:e,...r},this.name="SolanaError"}};function jye(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function Pye(e){return Object.freeze({...e,encode:t=>{const r=new Uint8Array(jye(t,e));return e.write(t,r,0),r}})}function Dye(e){return Object.freeze({...e,decode:(t,r=0)=>e.read(t,r)[0]})}function Hh(e){return"fixedSize"in e&&typeof e.fixedSize=="number"}function Rye(e,t){if(Hh(e)!==Hh(t))throw new pp(Cye);if(Hh(e)&&Hh(t)&&e.fixedSize!==t.fixedSize)throw new pp(Iye,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Hh(e)&&!Hh(t)&&e.maxSize!==t.maxSize)throw new pp(Mye,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function Lye(e,t,r=0){if(t.length-r<=0)throw new pp(Aye,{codecDescription:e})}function zye(e,t,r,n=0){const i=r.length-n;if(i<t)throw new pp(Sye,{bytesLength:i,codecDescription:e,expected:t})}function Bye(e,t,r,n){if(n<t||n>r)throw new pp($ye,{codecDescription:e,max:r,min:t,value:n})}function oG(e){return e?.endian!==1}function Fye(e){return Pye({fixedSize:e.size,write(t,r,n){e.range&&Bye(e.name,e.range[0],e.range[1],t);const i=new ArrayBuffer(e.size);return e.set(new DataView(i),t,oG(e.config)),r.set(new Uint8Array(i),n),n+e.size}})}function Uye(e){return Dye({fixedSize:e.size,read(t,r=0){Lye(e.name,t,r),zye(e.name,e.size,t,r);const n=new DataView(qye(t,r,e.size));return[e.get(n,oG(e.config)),r+e.size]}})}function qye(e,t,r){const n=e.byteOffset+(t??0),i=r??e.byteLength;return e.buffer.slice(n,n+i)}var Hye=(e={})=>Fye({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,r,n)=>t.setBigUint64(0,BigInt(r),n),size:8}),Wye=(e={})=>Uye({config:e,get:(t,r)=>t.getBigUint64(0,r),name:"u64",size:8}),Vye=(e={})=>Rye(Hye(e),Wye(e));class Kye extends TypeError{constructor(t,r){let n;const{message:i,explanation:s,...o}=t,{path:a}=t,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function Gye(e){return tb(e)&&typeof e[Symbol.iterator]=="function"}function tb(e){return typeof e=="object"&&e!=null}function Rv(e){return tb(e)&&!Array.isArray(e)}function Wa(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Zye(e){const{done:t,value:r}=e.next();return t?void 0:r}function Yye(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${Wa(n)}\``}=e;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...e,message:c}}function*Tj(e,t,r,n){Gye(e)||(e=[e]);for(const i of e){const s=Yye(i,t,r,n);s&&(yield s)}}function*FC(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i,mask:o};s&&(e=t.coercer(e,a));let c="valid";for(const u of t.validator(e,a))u.explanation=r.message,c="not_valid",yield[u,void 0];for(let[u,l,d]of t.entries(e,a)){const h=FC(l,d,{path:u===void 0?n:[...n,u],branch:u===void 0?i:[...i,l],coerce:s,mask:o,message:r.message});for(const g of h)g[0]?(c=g[0].refinement!=null?"not_refined":"not_valid",yield[g[0],void 0]):s&&(l=g[1],u===void 0?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):tb(e)&&(l!==void 0||u in e)&&(e[u]=l))}if(c!=="not_valid")for(const u of t.refiner(e,a))u.explanation=r.message,c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,e])}let Zc=class{constructor(t){const{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,u)=>{const l=i(c,u);return Tj(l,u,this,c)}:this.validator=()=>[],s?this.refiner=(c,u)=>{const l=s(c,u);return Tj(l,u,this,c)}:this.refiner=()=>[]}assert(t,r){return Jye(t,this,r)}create(t,r){return Tm(t,this,r)}is(t){return aG(t,this)}mask(t,r){return Xye(t,this,r)}validate(t,r={}){return rb(t,this,r)}};function Jye(e,t,r){const n=rb(e,t,{message:r});if(n[0])throw n[0]}function Tm(e,t,r){const n=rb(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Xye(e,t,r){const n=rb(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function aG(e,t){return!rb(e,t)[0]}function rb(e,t,r={}){const n=FC(e,t,r),i=Zye(n);return i[0]?[new Kye(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function fh(e,t){return new Zc({type:e,schema:null,validator:t})}function Qye(){return fh("any",()=>!0)}function Qe(e){return new Zc({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${Wa(t)}`}})}function Fc(){return fh("boolean",e=>typeof e=="boolean")}function UC(e){return fh("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${Wa(t)}`)}function yn(e){const t=Wa(e),r=typeof e;return new Zc({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${Wa(n)}`}})}function ewe(){return fh("never",()=>!1)}function et(e){return new Zc({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function pe(){return fh("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${Wa(e)}`)}function _t(e){return new Zc({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function cG(e,t){return new Zc({type:"record",schema:null,*entries(r){if(tb(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return Rv(r)||`Expected an object, but received: ${Wa(r)}`},coercer(r){return Rv(r)?{...r}:r}})}function ze(){return fh("string",e=>typeof e=="string"||`Expected a string, but received: ${Wa(e)}`)}function qC(e){const t=ewe();return new Zc({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${Wa(r)}`},coercer(r){return Array.isArray(r)?r.slice():r}})}function Ce(e){const t=Object.keys(e);return new Zc({type:"type",schema:e,*entries(r){if(tb(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return Rv(r)||`Expected an object, but received: ${Wa(r)}`},coercer(r){return Rv(r)?{...r}:r}})}function Ss(e){const t=e.map(r=>r.type).join(" | ");return new Zc({type:"union",schema:null,coercer(r,n){for(const i of e){const[s,o]=i.validate(r,{coerce:!0,mask:n.mask});if(!s)return o}return r},validator(r,n){const i=[];for(const s of e){const[...o]=FC(r,s,n),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${Wa(r)}`,...i]}})}function E1(){return fh("unknown",()=>!0)}function nb(e,t,r){return new Zc({...e,coercer:(n,i)=>aG(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}const uG=F2(V0e);var O8,Nj;function twe(){if(Nj)return O8;Nj=1;const e=uG.v4;return O8=function(r,n,i,s){if(typeof r!="string")throw new TypeError(r+" must be a string");s=s||{};const o=typeof s.version=="number"?s.version:2;if(o!==1&&o!==2)throw new TypeError(o+" must be 1 or 2");const a={method:r};if(o===2&&(a.jsonrpc="2.0"),n){if(typeof n!="object"&&!Array.isArray(n))throw new TypeError(n+" must be an object, array or omitted");a.params=n}if(typeof i>"u"){const c=typeof s.generator=="function"?s.generator:function(){return e()};a.id=c(a,s)}else o===2&&i===null?s.notificationIdNull&&(a.id=null):a.id=i;return a},O8}var j8,Oj;function rwe(){if(Oj)return j8;Oj=1;const e=uG.v4,t=twe(),r=function(n,i){if(!(this instanceof r))return new r(n,i);i||(i={}),this.options={reviver:typeof i.reviver<"u"?i.reviver:null,replacer:typeof i.replacer<"u"?i.replacer:null,generator:typeof i.generator<"u"?i.generator:function(){return e()},version:typeof i.version<"u"?i.version:2,notificationIdNull:typeof i.notificationIdNull=="boolean"?i.notificationIdNull:!1},this.callServer=n};return j8=r,r.prototype.request=function(n,i,s,o){const a=this;let c=null;const u=Array.isArray(n)&&typeof i=="function";if(this.options.version===1&&u)throw new TypeError("JSON-RPC 1.0 does not support batching");if(u||!u&&n&&typeof n=="object"&&typeof i=="function")o=i,c=n;else{typeof s=="function"&&(o=s,s=void 0);const h=typeof o=="function";try{c=t(n,i,s,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(g){if(h){o(g);return}throw g}if(!h)return c}let d;try{d=JSON.stringify(c,this.options.replacer)}catch(h){o(h);return}return this.callServer(d,function(h,g){a._parseResponse(h,g,o)}),c},r.prototype._parseResponse=function(n,i,s){if(n){s(n);return}if(!i){s();return}let o;try{o=JSON.parse(i,this.options.reviver)}catch(a){s(a);return}if(s.length===3)if(Array.isArray(o)){const a=function(u){return typeof u.error<"u"},c=function(u){return!a(u)};s(null,o.filter(a),o.filter(c));return}else{s(null,o.error,o.result);return}s(null,o)},j8}rwe();let lG=class extends OK{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,TK(t);const n=jC(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?t.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=t.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),Tp(s)}update(t){return Mv(this),this.iHash.update(t),this}digestInto(t){Mv(this),uh(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return t=t,t.finished=i,t.destroyed=s,t.blockLen=o,t.outputLen=a,t.oHash=r._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const fG=(e,t,r)=>new lG(e,t).update(r).digest();fG.create=(e,t)=>new lG(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const jj=(e,t)=>(e+(e>=0?t:-t)/dG)/t;function nwe(e,t,r){const[[n,i],[s,o]]=t,a=jj(o*e,r),c=jj(-i*e,r);let u=e-a*n-c*s,l=-a*i-c*o;const d=u<Bu,h=l<Bu;d&&(u=-u),h&&(l=-l);const g=X2(Math.ceil(BK(r)/2))+gp;if(u<Bu||u>=g||l<Bu||l>=g)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:d,k1:u,k2neg:h,k2:l}}function KE(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function P8(e,t){const r={};for(let n of Object.keys(t))r[n]=e[n]===void 0?t[n]:e[n];return Pd(r.lowS,"lowS"),Pd(r.prehash,"prehash"),r.format!==void 0&&KE(r.format),r}let iwe=class extends Error{constructor(t=""){super(t)}};const Cu={Err:iwe,_tlv:{encode:(e,t)=>{const{Err:r}=Cu;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");const n=t.length/2,i=wy(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const s=n>127?wy(i.length/2|128):"";return wy(e)+s+i+t},decode(e,t){const{Err:r}=Cu;let n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");const i=t[n++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const u=t.subarray(n,n+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const l of u)o=o<<8|l;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const a=t.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:t.subarray(n+o)}}},_int:{encode(e){const{Err:t}=Cu;if(e<Bu)throw new t("integer: negative integers are not allowed");let r=wy(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:t}=Cu;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return m4(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=Cu,i=xn("signature",e),{v:s,l:o}=n.decode(48,i);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=n.decode(2,s),{v:u,l}=n.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(u)}},hexFromSig(e){const{_tlv:t,_int:r}=Cu,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s)),s=n+i;return t.encode(48,s)}},Bu=BigInt(0),gp=BigInt(1),dG=BigInt(2),_y=BigInt(3),swe=BigInt(4);function ep(e,t){const{BYTES:r}=e;let n;if(typeof t=="bigint")n=t;else{let i=xn("private key",t);try{n=e.fromBytes(i)}catch{throw new Error(`invalid private key: expected ui8a of size ${r}, got ${typeof t}`)}}if(!e.isValidNot0(n))throw new Error("invalid private key: out of range [1..N-1]");return n}function owe(e,t={}){const r=rG("weierstrass",e,t),{Fp:n,Fn:i}=r;let s=r.CURVE;const{h:o,n:a}=s;Q2(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:c}=t;if(c&&(!n.is0(s.a)||typeof c.beta!="bigint"||!Array.isArray(c.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const u=pG(n,i);function l(){if(!n.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function d(x,y,f){const{x:p,y:v}=y.toAffine(),I=n.toBytes(p);if(Pd(f,"isCompressed"),f){l();const j=!n.isOdd(v);return Ic(hG(j),I)}else return Ic(Uint8Array.of(4),I,n.toBytes(v))}function h(x){Fa(x,void 0,"Point");const{publicKey:y,publicKeyUncompressed:f}=u,p=x.length,v=x[0],I=x.subarray(1);if(p===y&&(v===2||v===3)){const j=n.fromBytes(I);if(!n.isValid(j))throw new Error("bad point: is not on curve, wrong x");const $=b(j);let C;try{C=n.sqrt($)}catch(P){const q=P instanceof Error?": "+P.message:"";throw new Error("bad point: is not on curve, sqrt error"+q)}l();const O=n.isOdd(C);return(v&1)===1!==O&&(C=n.neg(C)),{x:j,y:C}}else if(p===f&&v===4){const j=n.BYTES,$=n.fromBytes(I.subarray(0,j)),C=n.fromBytes(I.subarray(j,j*2));if(!k($,C))throw new Error("bad point: is not on curve");return{x:$,y:C}}else throw new Error(`bad point: got length ${p}, expected compressed=${y} or uncompressed=${f}`)}const g=t.toBytes||d,m=t.fromBytes||h;function b(x){const y=n.sqr(x),f=n.mul(y,x);return n.add(n.add(f,n.mul(x,s.a)),s.b)}function k(x,y){const f=n.sqr(y),p=b(x);return n.eql(f,p)}if(!k(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const w=n.mul(n.pow(s.a,_y),swe),E=n.mul(n.sqr(s.b),BigInt(27));if(n.is0(n.add(w,E)))throw new Error("bad curve params: a or b");function A(x,y,f=!1){if(!n.isValid(y)||f&&n.is0(y))throw new Error(`bad point coordinate ${x}`);return y}function M(x){if(!(x instanceof L))throw new Error("ProjectivePoint expected")}function R(x){if(!c||!c.basises)throw new Error("no endo");return nwe(x,c.basises,i.ORDER)}const N=Tv((x,y)=>{const{X:f,Y:p,Z:v}=x;if(n.eql(v,n.ONE))return{x:f,y:p};const I=x.is0();y==null&&(y=I?n.ONE:n.inv(v));const j=n.mul(f,y),$=n.mul(p,y),C=n.mul(v,y);if(I)return{x:n.ZERO,y:n.ZERO};if(!n.eql(C,n.ONE))throw new Error("invZ was invalid");return{x:j,y:$}}),z=Tv(x=>{if(x.is0()){if(t.allowInfinityPoint&&!n.is0(x.Y))return;throw new Error("bad point: ZERO")}const{x:y,y:f}=x.toAffine();if(!n.isValid(y)||!n.isValid(f))throw new Error("bad point: x or y not field elements");if(!k(y,f))throw new Error("bad point: equation left != right");if(!x.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function F(x,y,f,p,v){return f=new L(n.mul(f.X,x),f.Y,f.Z),y=Nv(p,y),f=Nv(v,f),y.add(f)}class L{constructor(y,f,p){this.X=A("x",y),this.Y=A("y",f,!0),this.Z=A("z",p),Object.freeze(this)}static CURVE(){return s}static fromAffine(y){const{x:f,y:p}=y||{};if(!y||!n.isValid(f)||!n.isValid(p))throw new Error("invalid affine point");if(y instanceof L)throw new Error("projective point not allowed");return n.is0(f)&&n.is0(p)?L.ZERO:new L(f,p,n.ONE)}static fromBytes(y){const f=L.fromAffine(m(Fa(y,void 0,"point")));return f.assertValidity(),f}static fromHex(y){return L.fromBytes(xn("pointHex",y))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(y=8,f=!0){return D.createCache(this,y),f||this.multiply(_y),this}assertValidity(){z(this)}hasEvenY(){const{y}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(y)}equals(y){M(y);const{X:f,Y:p,Z:v}=this,{X:I,Y:j,Z:$}=y,C=n.eql(n.mul(f,$),n.mul(I,v)),O=n.eql(n.mul(p,$),n.mul(j,v));return C&&O}negate(){return new L(this.X,n.neg(this.Y),this.Z)}double(){const{a:y,b:f}=s,p=n.mul(f,_y),{X:v,Y:I,Z:j}=this;let $=n.ZERO,C=n.ZERO,O=n.ZERO,_=n.mul(v,v),P=n.mul(I,I),q=n.mul(j,j),W=n.mul(v,I);return W=n.add(W,W),O=n.mul(v,j),O=n.add(O,O),$=n.mul(y,O),C=n.mul(p,q),C=n.add($,C),$=n.sub(P,C),C=n.add(P,C),C=n.mul($,C),$=n.mul(W,$),O=n.mul(p,O),q=n.mul(y,q),W=n.sub(_,q),W=n.mul(y,W),W=n.add(W,O),O=n.add(_,_),_=n.add(O,_),_=n.add(_,q),_=n.mul(_,W),C=n.add(C,_),q=n.mul(I,j),q=n.add(q,q),_=n.mul(q,W),$=n.sub($,_),O=n.mul(q,P),O=n.add(O,O),O=n.add(O,O),new L($,C,O)}add(y){M(y);const{X:f,Y:p,Z:v}=this,{X:I,Y:j,Z:$}=y;let C=n.ZERO,O=n.ZERO,_=n.ZERO;const P=s.a,q=n.mul(s.b,_y);let W=n.mul(f,I),K=n.mul(p,j),Y=n.mul(v,$),te=n.add(f,p),re=n.add(I,j);te=n.mul(te,re),re=n.add(W,K),te=n.sub(te,re),re=n.add(f,v);let be=n.add(I,$);return re=n.mul(re,be),be=n.add(W,Y),re=n.sub(re,be),be=n.add(p,v),C=n.add(j,$),be=n.mul(be,C),C=n.add(K,Y),be=n.sub(be,C),_=n.mul(P,re),C=n.mul(q,Y),_=n.add(C,_),C=n.sub(K,_),_=n.add(K,_),O=n.mul(C,_),K=n.add(W,W),K=n.add(K,W),Y=n.mul(P,Y),re=n.mul(q,re),K=n.add(K,Y),Y=n.sub(W,Y),Y=n.mul(P,Y),re=n.add(re,Y),W=n.mul(K,re),O=n.add(O,W),W=n.mul(be,re),C=n.mul(te,C),C=n.sub(C,W),W=n.mul(te,K),_=n.mul(be,_),_=n.add(_,W),new L(C,O,_)}subtract(y){return this.add(y.negate())}is0(){return this.equals(L.ZERO)}multiply(y){const{endo:f}=t;if(!i.isValidNot0(y))throw new Error("invalid scalar: out of range");let p,v;const I=j=>D.cached(this,j,$=>ld(L,$));if(f){const{k1neg:j,k1:$,k2neg:C,k2:O}=R(y),{p:_,f:P}=I($),{p:q,f:W}=I(O);v=P.add(W),p=F(f.beta,_,q,j,C)}else{const{p:j,f:$}=I(y);p=j,v=$}return ld(L,[p,v])[0]}multiplyUnsafe(y){const{endo:f}=t,p=this;if(!i.isValid(y))throw new Error("invalid scalar: out of range");if(y===Bu||p.is0())return L.ZERO;if(y===gp)return p;if(D.hasCache(this))return this.multiply(y);if(f){const{k1neg:v,k1:I,k2neg:j,k2:$}=R(y),{p1:C,p2:O}=Wbe(L,p,I,$);return F(f.beta,C,O,v,j)}else return D.unsafe(p,y)}multiplyAndAddUnsafe(y,f,p){const v=this.multiplyUnsafe(f).add(y.multiplyUnsafe(p));return v.is0()?void 0:v}toAffine(y){return N(this,y)}isTorsionFree(){const{isTorsionFree:y}=t;return o===gp?!0:y?y(L,this):D.unsafe(this,a).is0()}clearCofactor(){const{clearCofactor:y}=t;return o===gp?this:y?y(L,this):this.multiplyUnsafe(o)}isSmallOrder(){return this.multiplyUnsafe(o).is0()}toBytes(y=!0){return Pd(y,"isCompressed"),this.assertValidity(),g(L,this,y)}toHex(y=!0){return Ed(this.toBytes(y))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(y=!0){return this.toBytes(y)}_setWindowSize(y){this.precompute(y)}static normalizeZ(y){return ld(L,y)}static msm(y,f){return tG(L,i,y,f)}static fromPrivateKey(y){return L.BASE.multiply(ep(i,y))}}L.BASE=new L(s.Gx,s.Gy,n.ONE),L.ZERO=new L(n.ZERO,n.ONE,n.ZERO),L.Fp=n,L.Fn=i;const B=i.BITS,D=new eG(L,t.endo?Math.ceil(B/2):B);return L.BASE.precompute(8),L}function hG(e){return Uint8Array.of(e?2:3)}function pG(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function awe(e,t={}){const{Fn:r}=e,n=t.randomBytes||PC,i=Object.assign(pG(e.Fp,r),{seed:JK(r.ORDER)});function s(g){try{return!!ep(r,g)}catch{return!1}}function o(g,m){const{publicKey:b,publicKeyUncompressed:k}=i;try{const w=g.length;return m===!0&&w!==b||m===!1&&w!==k?!1:!!e.fromBytes(g)}catch{return!1}}function a(g=n(i.seed)){return Ube(Fa(g,i.seed,"seed"),r.ORDER)}function c(g,m=!0){return e.BASE.multiply(ep(r,g)).toBytes(m)}function u(g){const m=a(g);return{secretKey:m,publicKey:c(m)}}function l(g){if(typeof g=="bigint")return!1;if(g instanceof e)return!0;const{secretKey:m,publicKey:b,publicKeyUncompressed:k}=i;if(r.allowedLengths||m===b)return;const w=xn("key",g).length;return w===b||w===k}function d(g,m,b=!0){if(l(g)===!0)throw new Error("first arg must be private key");if(l(m)===!1)throw new Error("second arg must be public key");const k=ep(r,g);return e.fromHex(m).multiply(k).toBytes(b)}return Object.freeze({getPublicKey:c,getSharedSecret:d,keygen:u,Point:e,utils:{isValidSecretKey:s,isValidPublicKey:o,randomSecretKey:a,isValidPrivateKey:s,randomPrivateKey:a,normPrivateKeyToScalar:g=>ep(r,g),precompute(g=8,m=e.BASE){return m.precompute(g,!1)}},lengths:i})}function cwe(e,t,r={}){TK(t),Q2(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const n=r.randomBytes||PC,i=r.hmac||((f,...p)=>fG(t,f,Ic(...p))),{Fp:s,Fn:o}=e,{ORDER:a,BITS:c}=o,{keygen:u,getPublicKey:l,getSharedSecret:d,utils:h,lengths:g}=awe(e,r),m={prehash:!1,lowS:typeof r.lowS=="boolean"?r.lowS:!1,format:void 0,extraEntropy:!1},b="compact";function k(f){const p=a>>gp;return f>p}function w(f,p){if(!o.isValidNot0(p))throw new Error(`invalid signature ${f}: out of range 1..Point.Fn.ORDER`);return p}function E(f,p){KE(p);const v=g.signature,I=p==="compact"?v:p==="recovered"?v+1:void 0;return Fa(f,I,`${p} signature`)}class A{constructor(p,v,I){this.r=w("r",p),this.s=w("s",v),I!=null&&(this.recovery=I),Object.freeze(this)}static fromBytes(p,v=b){E(p,v);let I;if(v==="der"){const{r:O,s:_}=Cu.toSig(Fa(p));return new A(O,_)}v==="recovered"&&(I=p[0],v="compact",p=p.subarray(1));const j=o.BYTES,$=p.subarray(0,j),C=p.subarray(j,j*2);return new A(o.fromBytes($),o.fromBytes(C),I)}static fromHex(p,v){return this.fromBytes($v(p),v)}addRecoveryBit(p){return new A(this.r,this.s,p)}recoverPublicKey(p){const v=s.ORDER,{r:I,s:j,recovery:$}=this;if($==null||![0,1,2,3].includes($))throw new Error("recovery id invalid");if(a*dG<v&&$>1)throw new Error("recovery id is ambiguous for h>1 curve");const O=$===2||$===3?I+a:I;if(!s.isValid(O))throw new Error("recovery id 2 or 3 invalid");const _=s.toBytes(O),P=e.fromBytes(Ic(hG(($&1)===0),_)),q=o.inv(O),W=R(xn("msgHash",p)),K=o.create(-W*q),Y=o.create(j*q),te=e.BASE.multiplyUnsafe(K).add(P.multiplyUnsafe(Y));if(te.is0())throw new Error("point at infinify");return te.assertValidity(),te}hasHighS(){return k(this.s)}toBytes(p=b){if(KE(p),p==="der")return $v(Cu.hexFromSig(this));const v=o.toBytes(this.r),I=o.toBytes(this.s);if(p==="recovered"){if(this.recovery==null)throw new Error("recovery bit must be present");return Ic(Uint8Array.of(this.recovery),v,I)}return Ic(v,I)}toHex(p){return Ed(this.toBytes(p))}assertValidity(){}static fromCompact(p){return A.fromBytes(xn("sig",p),"compact")}static fromDER(p){return A.fromBytes(xn("sig",p),"der")}normalizeS(){return this.hasHighS()?new A(this.r,o.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Ed(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Ed(this.toBytes("compact"))}}const M=r.bits2int||function(p){if(p.length>8192)throw new Error("input is too large");const v=m4(p),I=p.length*8-c;return I>0?v>>BigInt(I):v},R=r.bits2int_modN||function(p){return o.create(M(p))},N=X2(c);function z(f){return VE("num < 2^"+c,f,Bu,N),o.toBytes(f)}function F(f,p){return Fa(f,void 0,"message"),p?Fa(t(f),void 0,"prehashed message"):f}function L(f,p,v){if(["recovered","canonical"].some(K=>K in v))throw new Error("sign() legacy options not supported");const{lowS:I,prehash:j,extraEntropy:$}=P8(v,m);f=F(f,j);const C=R(f),O=ep(o,p),_=[z(O),z(C)];if($!=null&&$!==!1){const K=$===!0?n(g.secretKey):$;_.push(xn("extraEntropy",K))}const P=Ic(..._),q=C;function W(K){const Y=M(K);if(!o.isValidNot0(Y))return;const te=o.inv(Y),re=e.BASE.multiply(Y).toAffine(),be=o.create(re.x);if(be===Bu)return;const ve=o.create(te*o.create(q+be*O));if(ve===Bu)return;let ye=(re.x===be?0:2)|Number(re.y&gp),Se=ve;return I&&k(ve)&&(Se=o.neg(ve),ye^=1),new A(be,Se,ye)}return{seed:P,k2sig:W}}function B(f,p,v={}){f=xn("message",f);const{seed:I,k2sig:j}=L(f,p,v);return Nbe(t.outputLen,o.BYTES,i)(I,j)}function D(f){let p;const v=typeof f=="string"||J2(f),I=!v&&f!==null&&typeof f=="object"&&typeof f.r=="bigint"&&typeof f.s=="bigint";if(!v&&!I)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(I)p=new A(f.r,f.s);else if(v){try{p=A.fromBytes(xn("sig",f),"der")}catch(j){if(!(j instanceof Cu.Err))throw j}if(!p)try{p=A.fromBytes(xn("sig",f),"compact")}catch{return!1}}return p||!1}function x(f,p,v,I={}){const{lowS:j,prehash:$,format:C}=P8(I,m);if(v=xn("publicKey",v),p=F(xn("message",p),$),"strict"in I)throw new Error("options.strict was renamed to lowS");const O=C===void 0?D(f):A.fromBytes(xn("sig",f),C);if(O===!1)return!1;try{const _=e.fromBytes(v);if(j&&O.hasHighS())return!1;const{r:P,s:q}=O,W=R(p),K=o.inv(q),Y=o.create(W*K),te=o.create(P*K),re=e.BASE.multiplyUnsafe(Y).add(_.multiplyUnsafe(te));return re.is0()?!1:o.create(re.x)===P}catch{return!1}}function y(f,p,v={}){const{prehash:I}=P8(v,m);return p=F(p,I),A.fromBytes(f,"recovered").recoverPublicKey(p).toBytes()}return Object.freeze({keygen:u,getPublicKey:l,getSharedSecret:d,utils:h,lengths:g,Point:e,sign:B,verify:x,recoverPublicKey:y,Signature:A,hash:t})}function uwe(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp;let n=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(o=>Math.ceil(o/2)))):void 0;const i=lh(t.n,{BITS:e.nBitLength,allowedLengths:n,modFromBytes:e.wrapPrivateKey}),s={Fp:r,Fn:i,allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:s}}function lwe(e){const{CURVE:t,curveOpts:r}=uwe(e),n={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:r,hash:e.hash,ecdsaOpts:n}}function fwe(e,t){const r=t.Point;return Object.assign({},t,{ProjectivePoint:r,CURVE:Object.assign({},e,ZK(r.Fn.ORDER,r.Fn.BITS))})}function dwe(e){const{CURVE:t,curveOpts:r,hash:n,ecdsaOpts:i}=lwe(e),s=owe(t,r),o=cwe(s,n,i);return fwe(e,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function hwe(e,t){const r=n=>dwe({...e,hash:n});return{...r(t),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const HC={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},pwe={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Pj=BigInt(2);function gwe(e){const t=HC.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=_n(l,r,t)*l%t,h=_n(d,r,t)*l%t,g=_n(h,Pj,t)*u%t,m=_n(g,i,t)*g%t,b=_n(m,s,t)*m%t,k=_n(b,a,t)*b%t,w=_n(k,c,t)*k%t,E=_n(w,a,t)*b%t,A=_n(E,r,t)*l%t,M=_n(A,o,t)*m%t,R=_n(M,n,t)*u%t,N=_n(R,Pj,t);if(!GE.eql(GE.sqr(N),e))throw new Error("Cannot find square root");return N}const GE=lh(HC.p,{sqrt:gwe}),mwe=hwe({...HC,Fp:GE,lowS:!0,endo:pwe},RK);eb.utils.randomPrivateKey;eb.getPublicKey;function Dj(e){try{return eb.ExtendedPoint.fromHex(e),!0}catch{return!1}}const gG=(e,t)=>eb.sign(e,t.slice(0,32)),bwe=eb.verify,WC=e=>Ft.Buffer.isBuffer(e)?e:e instanceof Uint8Array?Ft.Buffer.from(e.buffer,e.byteOffset,e.byteLength):Ft.Buffer.from(e);class mG{constructor(t){Object.assign(this,t)}encode(){return Ft.Buffer.from(N8.serialize(Gg,this))}static decode(t){return N8.deserialize(Gg,this,t)}static decodeUnchecked(t){return N8.deserializeUnchecked(Gg,this,t)}}const Gg=new Map;var bG;const yG=32,Uu=32;function ywe(e){return e._bn!==void 0}let Rj=1;class bt extends mG{constructor(t){if(super({}),this._bn=void 0,ywe(t))this._bn=t._bn;else{if(typeof t=="string"){const r=vs.decode(t);if(r.length!=Uu)throw new Error("Invalid public key input");this._bn=new _j(r)}else this._bn=new _j(t);if(this._bn.byteLength()>Uu)throw new Error("Invalid public key input")}}static unique(){const t=new bt(Rj);return Rj+=1,new bt(t.toBuffer())}equals(t){return this._bn.eq(t._bn)}toBase58(){return vs.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const t=this.toBuffer();return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}toBuffer(){const t=this._bn.toArrayLike(Ft.Buffer);if(t.length===Uu)return t;const r=Ft.Buffer.alloc(32);return t.copy(r,32-t.length),r}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(t,r,n){const i=Ft.Buffer.concat([t.toBuffer(),Ft.Buffer.from(r),n.toBuffer()]),s=Aj(i);return new bt(s)}static createProgramAddressSync(t,r){let n=Ft.Buffer.alloc(0);t.forEach(function(s){if(s.length>yG)throw new TypeError("Max seed length exceeded");n=Ft.Buffer.concat([n,WC(s)])}),n=Ft.Buffer.concat([n,r.toBuffer(),Ft.Buffer.from("ProgramDerivedAddress")]);const i=Aj(n);if(Dj(i))throw new Error("Invalid seeds, address must fall off the curve");return new bt(i)}static async createProgramAddress(t,r){return this.createProgramAddressSync(t,r)}static findProgramAddressSync(t,r){let n=255,i;for(;n!=0;){try{const s=t.concat(Ft.Buffer.from([n]));i=this.createProgramAddressSync(s,r)}catch(s){if(s instanceof TypeError)throw s;n--;continue}return[i,n]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,r){return this.findProgramAddressSync(t,r)}static isOnCurve(t){const r=new bt(t);return Dj(r.toBytes())}}bG=bt;bt.default=new bG("11111111111111111111111111111111");Gg.set(bt,{kind:"struct",fields:[["_bn","u256"]]});new bt("BPFLoader1111111111111111111111111111111111");const kd=1232,y4=127,jp=64;class Nm{constructor(t,r){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=r}keySegments(){const t=[this.staticAccountKeys];return this.accountKeysFromLookups&&(t.push(this.accountKeysFromLookups.writable),t.push(this.accountKeysFromLookups.readonly)),t}get(t){for(const r of this.keySegments()){if(t<r.length)return r[t];t-=r.length}}get length(){return this.keySegments().flat().length}compileInstructions(t){if(this.length>256)throw new Error("Account index overflow encountered during compilation");const n=new Map;this.keySegments().flat().forEach((s,o)=>{n.set(s.toBase58(),o)});const i=s=>{const o=n.get(s.toBase58());if(o===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return o};return t.map(s=>({programIdIndex:i(s.programId),accountKeyIndexes:s.keys.map(o=>i(o.pubkey)),data:s.data}))}}const Gt=(e="publicKey")=>ie.blob(32,e),wwe=(e="signature")=>ie.blob(64,e),tp=(e="string")=>{const t=ie.struct([ie.u32("length"),ie.u32("lengthPadding"),ie.blob(ie.offset(ie.u32(),-8),"chars")],e),r=t.decode.bind(t),n=t.encode.bind(t),i=t;return i.decode=(s,o)=>r(s,o).chars.toString(),i.encode=(s,o,a)=>{const c={chars:Ft.Buffer.from(s,"utf8")};return n(c,o,a)},i.alloc=s=>ie.u32().span+ie.u32().span+Ft.Buffer.from(s,"utf8").length,i},vwe=(e="authorized")=>ie.struct([Gt("staker"),Gt("withdrawer")],e),_we=(e="lockup")=>ie.struct([ie.ns64("unixTimestamp"),ie.ns64("epoch"),Gt("custodian")],e),xwe=(e="voteInit")=>ie.struct([Gt("nodePubkey"),Gt("authorizedVoter"),Gt("authorizedWithdrawer"),ie.u8("commission")],e),Ewe=(e="voteAuthorizeWithSeedArgs")=>ie.struct([ie.u32("voteAuthorizationType"),Gt("currentAuthorityDerivedKeyOwnerPubkey"),tp("currentAuthorityDerivedKeySeed"),Gt("newAuthorized")],e);function wG(e,t){const r=i=>{if(i.span>=0)return i.span;if(typeof i.alloc=="function")return i.alloc(t[i.property]);if("count"in i&&"elementLayout"in i){const s=t[i.property];if(Array.isArray(s))return s.length*r(i.elementLayout)}else if("fields"in i)return wG({layout:i},t[i.property]);return 0};let n=0;return e.layout.fields.forEach(i=>{n+=r(i)}),n}function xo(e){let t=0,r=0;for(;;){let n=e.shift();if(t|=(n&127)<<r*7,r+=1,(n&128)===0)break}return t}function Eo(e,t){let r=t;for(;;){let n=r&127;if(r>>=7,r==0){e.push(n);break}else n|=128,e.push(n)}}function Zn(e,t){if(!e)throw new Error(t||"Assertion failed")}class w4{constructor(t,r){this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=r}static compile(t,r){const n=new Map,i=o=>{const a=o.toBase58();let c=n.get(a);return c===void 0&&(c={isSigner:!1,isWritable:!1,isInvoked:!1},n.set(a,c)),c},s=i(r);s.isSigner=!0,s.isWritable=!0;for(const o of t){i(o.programId).isInvoked=!0;for(const a of o.keys){const c=i(a.pubkey);c.isSigner||=a.isSigner,c.isWritable||=a.isWritable}}return new w4(r,n)}getMessageComponents(){const t=[...this.keyMetaMap.entries()];Zn(t.length<=256,"Max static account keys length exceeded");const r=t.filter(([,c])=>c.isSigner&&c.isWritable),n=t.filter(([,c])=>c.isSigner&&!c.isWritable),i=t.filter(([,c])=>!c.isSigner&&c.isWritable),s=t.filter(([,c])=>!c.isSigner&&!c.isWritable),o={numRequiredSignatures:r.length+n.length,numReadonlySignedAccounts:n.length,numReadonlyUnsignedAccounts:s.length};{Zn(r.length>0,"Expected at least one writable signer key");const[c]=r[0];Zn(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}const a=[...r.map(([c])=>new bt(c)),...n.map(([c])=>new bt(c)),...i.map(([c])=>new bt(c)),...s.map(([c])=>new bt(c))];return[o,a]}extractTableLookup(t){const[r,n]=this.drainKeysFoundInLookupTable(t.state.addresses,o=>!o.isSigner&&!o.isInvoked&&o.isWritable),[i,s]=this.drainKeysFoundInLookupTable(t.state.addresses,o=>!o.isSigner&&!o.isInvoked&&!o.isWritable);if(!(r.length===0&&i.length===0))return[{accountKey:t.key,writableIndexes:r,readonlyIndexes:i},{writable:n,readonly:s}]}drainKeysFoundInLookupTable(t,r){const n=new Array,i=new Array;for(const[s,o]of this.keyMetaMap.entries())if(r(o)){const a=new bt(s),c=t.findIndex(u=>u.equals(a));c>=0&&(Zn(c<256,"Max lookup table index exceeded"),n.push(c),i.push(a),this.keyMetaMap.delete(s))}return[n,i]}}const vG="Reached end of buffer unexpectedly";function Ou(e){if(e.length===0)throw new Error(vG);return e.shift()}function ko(e,...t){const[r]=t;if(t.length===2?r+(t[1]??0)>e.length:r>=e.length)throw new Error(vG);return e.splice(...t)}class Dd{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map(r=>new bt(r)),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach(r=>this.indexToProgramIds.set(r.programIdIndex,this.accountKeys[r.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:vs.decode(t.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new Nm(this.staticAccountKeys)}static compile(t){const r=w4.compile(t.instructions,t.payerKey),[n,i]=r.getMessageComponents(),o=new Nm(i).compileInstructions(t.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:vs.encode(a.data)}));return new Dd({header:n,accountKeys:i,recentBlockhash:t.recentBlockhash,instructions:o})}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){const r=this.header.numRequiredSignatures;if(t>=this.header.numRequiredSignatures){const n=t-r,s=this.accountKeys.length-r-this.header.numReadonlyUnsignedAccounts;return n<s}else{const n=r-this.header.numReadonlySignedAccounts;return t<n}}isProgramId(t){return this.indexToProgramIds.has(t)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((t,r)=>!this.isProgramId(r))}serialize(){const t=this.accountKeys.length;let r=[];Eo(r,t);const n=this.instructions.map(d=>{const{accounts:h,programIdIndex:g}=d,m=Array.from(vs.decode(d.data));let b=[];Eo(b,h.length);let k=[];return Eo(k,m.length),{programIdIndex:g,keyIndicesCount:Ft.Buffer.from(b),keyIndices:h,dataLength:Ft.Buffer.from(k),data:m}});let i=[];Eo(i,n.length);let s=Ft.Buffer.alloc(kd);Ft.Buffer.from(i).copy(s);let o=i.length;n.forEach(d=>{const g=ie.struct([ie.u8("programIdIndex"),ie.blob(d.keyIndicesCount.length,"keyIndicesCount"),ie.seq(ie.u8("keyIndex"),d.keyIndices.length,"keyIndices"),ie.blob(d.dataLength.length,"dataLength"),ie.seq(ie.u8("userdatum"),d.data.length,"data")]).encode(d,s,o);o+=g}),s=s.slice(0,o);const a=ie.struct([ie.blob(1,"numRequiredSignatures"),ie.blob(1,"numReadonlySignedAccounts"),ie.blob(1,"numReadonlyUnsignedAccounts"),ie.blob(r.length,"keyCount"),ie.seq(Gt("key"),t,"keys"),Gt("recentBlockhash")]),c={numRequiredSignatures:Ft.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:Ft.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:Ft.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:Ft.Buffer.from(r),keys:this.accountKeys.map(d=>WC(d.toBytes())),recentBlockhash:vs.decode(this.recentBlockhash)};let u=Ft.Buffer.alloc(2048);const l=a.encode(c,u);return s.copy(u,l),u.slice(0,l+s.length)}static from(t){let r=[...t];const n=Ou(r);if(n!==(n&y4))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const i=Ou(r),s=Ou(r),o=xo(r);let a=[];for(let h=0;h<o;h++){const g=ko(r,0,Uu);a.push(new bt(Ft.Buffer.from(g)))}const c=ko(r,0,Uu),u=xo(r);let l=[];for(let h=0;h<u;h++){const g=Ou(r),m=xo(r),b=ko(r,0,m),k=xo(r),w=ko(r,0,k),E=vs.encode(Ft.Buffer.from(w));l.push({programIdIndex:g,accounts:b,data:E})}const d={header:{numRequiredSignatures:n,numReadonlySignedAccounts:i,numReadonlyUnsignedAccounts:s},recentBlockhash:vs.encode(Ft.Buffer.from(c)),accountKeys:a,instructions:l};return new Dd(d)}}class Om{constructor(t){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=t.header,this.staticAccountKeys=t.staticAccountKeys,this.recentBlockhash=t.recentBlockhash,this.compiledInstructions=t.compiledInstructions,this.addressTableLookups=t.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let t=0;for(const r of this.addressTableLookups)t+=r.readonlyIndexes.length+r.writableIndexes.length;return t}getAccountKeys(t){let r;if(t&&"accountKeysFromLookups"in t&&t.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=t.accountKeysFromLookups.writable.length+t.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");r=t.accountKeysFromLookups}else if(t&&"addressLookupTableAccounts"in t&&t.addressLookupTableAccounts)r=this.resolveAddressTableLookups(t.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Nm(this.staticAccountKeys,r)}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){const r=this.header.numRequiredSignatures,n=this.staticAccountKeys.length;if(t>=n){const i=t-n,s=this.addressTableLookups.reduce((o,a)=>o+a.writableIndexes.length,0);return i<s}else if(t>=this.header.numRequiredSignatures){const i=t-r,o=n-r-this.header.numReadonlyUnsignedAccounts;return i<o}else{const i=r-this.header.numReadonlySignedAccounts;return t<i}}resolveAddressTableLookups(t){const r={writable:[],readonly:[]};for(const n of this.addressTableLookups){const i=t.find(s=>s.key.equals(n.accountKey));if(!i)throw new Error(`Failed to find address lookup table account for table key ${n.accountKey.toBase58()}`);for(const s of n.writableIndexes)if(s<i.state.addresses.length)r.writable.push(i.state.addresses[s]);else throw new Error(`Failed to find address for index ${s} in address lookup table ${n.accountKey.toBase58()}`);for(const s of n.readonlyIndexes)if(s<i.state.addresses.length)r.readonly.push(i.state.addresses[s]);else throw new Error(`Failed to find address for index ${s} in address lookup table ${n.accountKey.toBase58()}`)}return r}static compile(t){const r=w4.compile(t.instructions,t.payerKey),n=new Array,i={writable:new Array,readonly:new Array},s=t.addressLookupTableAccounts||[];for(const l of s){const d=r.extractTableLookup(l);if(d!==void 0){const[h,{writable:g,readonly:m}]=d;n.push(h),i.writable.push(...g),i.readonly.push(...m)}}const[o,a]=r.getMessageComponents(),u=new Nm(a,i).compileInstructions(t.instructions);return new Om({header:o,staticAccountKeys:a,recentBlockhash:t.recentBlockhash,compiledInstructions:u,addressTableLookups:n})}serialize(){const t=Array();Eo(t,this.staticAccountKeys.length);const r=this.serializeInstructions(),n=Array();Eo(n,this.compiledInstructions.length);const i=this.serializeAddressTableLookups(),s=Array();Eo(s,this.addressTableLookups.length);const o=ie.struct([ie.u8("prefix"),ie.struct([ie.u8("numRequiredSignatures"),ie.u8("numReadonlySignedAccounts"),ie.u8("numReadonlyUnsignedAccounts")],"header"),ie.blob(t.length,"staticAccountKeysLength"),ie.seq(Gt(),this.staticAccountKeys.length,"staticAccountKeys"),Gt("recentBlockhash"),ie.blob(n.length,"instructionsLength"),ie.blob(r.length,"serializedInstructions"),ie.blob(s.length,"addressTableLookupsLength"),ie.blob(i.length,"serializedAddressTableLookups")]),a=new Uint8Array(kd),u=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(t),staticAccountKeys:this.staticAccountKeys.map(l=>l.toBytes()),recentBlockhash:vs.decode(this.recentBlockhash),instructionsLength:new Uint8Array(n),serializedInstructions:r,addressTableLookupsLength:new Uint8Array(s),serializedAddressTableLookups:i},a);return a.slice(0,u)}serializeInstructions(){let t=0;const r=new Uint8Array(kd);for(const n of this.compiledInstructions){const i=Array();Eo(i,n.accountKeyIndexes.length);const s=Array();Eo(s,n.data.length);const o=ie.struct([ie.u8("programIdIndex"),ie.blob(i.length,"encodedAccountKeyIndexesLength"),ie.seq(ie.u8(),n.accountKeyIndexes.length,"accountKeyIndexes"),ie.blob(s.length,"encodedDataLength"),ie.blob(n.data.length,"data")]);t+=o.encode({programIdIndex:n.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(i),accountKeyIndexes:n.accountKeyIndexes,encodedDataLength:new Uint8Array(s),data:n.data},r,t)}return r.slice(0,t)}serializeAddressTableLookups(){let t=0;const r=new Uint8Array(kd);for(const n of this.addressTableLookups){const i=Array();Eo(i,n.writableIndexes.length);const s=Array();Eo(s,n.readonlyIndexes.length);const o=ie.struct([Gt("accountKey"),ie.blob(i.length,"encodedWritableIndexesLength"),ie.seq(ie.u8(),n.writableIndexes.length,"writableIndexes"),ie.blob(s.length,"encodedReadonlyIndexesLength"),ie.seq(ie.u8(),n.readonlyIndexes.length,"readonlyIndexes")]);t+=o.encode({accountKey:n.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(i),writableIndexes:n.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(s),readonlyIndexes:n.readonlyIndexes},r,t)}return r.slice(0,t)}static deserialize(t){let r=[...t];const n=Ou(r),i=n&y4;Zn(n!==i,"Expected versioned message but received legacy message");const s=i;Zn(s===0,`Expected versioned message with version 0 but found version ${s}`);const o={numRequiredSignatures:Ou(r),numReadonlySignedAccounts:Ou(r),numReadonlyUnsignedAccounts:Ou(r)},a=[],c=xo(r);for(let m=0;m<c;m++)a.push(new bt(ko(r,0,Uu)));const u=vs.encode(ko(r,0,Uu)),l=xo(r),d=[];for(let m=0;m<l;m++){const b=Ou(r),k=xo(r),w=ko(r,0,k),E=xo(r),A=new Uint8Array(ko(r,0,E));d.push({programIdIndex:b,accountKeyIndexes:w,data:A})}const h=xo(r),g=[];for(let m=0;m<h;m++){const b=new bt(ko(r,0,Uu)),k=xo(r),w=ko(r,0,k),E=xo(r),A=ko(r,0,E);g.push({accountKey:b,writableIndexes:w,readonlyIndexes:A})}return new Om({header:o,staticAccountKeys:a,recentBlockhash:u,compiledInstructions:d,addressTableLookups:g})}}const v4={deserializeMessageVersion(e){const t=e[0],r=t&y4;return r===t?"legacy":r},deserialize:e=>{const t=v4.deserializeMessageVersion(e);if(t==="legacy")return Dd.from(e);if(t===0)return Om.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}},kwe=Ft.Buffer.alloc(jp).fill(0);class fd{constructor(t){this.keys=void 0,this.programId=void 0,this.data=Ft.Buffer.alloc(0),this.programId=t.programId,this.keys=t.keys,t.data&&(this.data=t.data)}toJSON(){return{keys:this.keys.map(({pubkey:t,isSigner:r,isWritable:n})=>({pubkey:t.toJSON(),isSigner:r,isWritable:n})),programId:this.programId.toJSON(),data:[...this.data]}}}class ua{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"nonceInfo")){const{minContextSlot:r,nonceInfo:n}=t;this.minNonceContextSlot=r,this.nonceInfo=n}else if(Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){const{blockhash:r,lastValidBlockHeight:n}=t;this.recentBlockhash=r,this.lastValidBlockHeight=n}else{const{recentBlockhash:r,nonceInfo:n}=t;n&&(this.nonceInfo=n),this.recentBlockhash=r}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(t=>t.toJSON()),signers:this.signatures.map(({publicKey:t})=>t.toJSON())}}add(...t){if(t.length===0)throw new Error("No instructions");return t.forEach(r=>{"instructions"in r?this.instructions=this.instructions.concat(r.instructions):"data"in r&&"programId"in r&&"keys"in r?this.instructions.push(r):this.instructions.push(new fd(r))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,r;if(this.nonceInfo?(t=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?r=[this.nonceInfo.nonceInstruction,...this.instructions]:r=this.instructions):(t=this.recentBlockhash,r=this.instructions),!t)throw new Error("Transaction recentBlockhash required");r.length<1&&console.warn("No instructions provided");let n;if(this.feePayer)n=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)n=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let b=0;b<r.length;b++)if(r[b].programId===void 0)throw new Error(`Transaction instruction index ${b} has undefined program id`);const i=[],s=[];r.forEach(b=>{b.keys.forEach(w=>{s.push({...w})});const k=b.programId.toString();i.includes(k)||i.push(k)}),i.forEach(b=>{s.push({pubkey:new bt(b),isSigner:!1,isWritable:!1})});const o=[];s.forEach(b=>{const k=b.pubkey.toString(),w=o.findIndex(E=>E.pubkey.toString()===k);w>-1?(o[w].isWritable=o[w].isWritable||b.isWritable,o[w].isSigner=o[w].isSigner||b.isSigner):o.push(b)}),o.sort(function(b,k){if(b.isSigner!==k.isSigner)return b.isSigner?-1:1;if(b.isWritable!==k.isWritable)return b.isWritable?-1:1;const w={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return b.pubkey.toBase58().localeCompare(k.pubkey.toBase58(),"en",w)});const a=o.findIndex(b=>b.pubkey.equals(n));if(a>-1){const[b]=o.splice(a,1);b.isSigner=!0,b.isWritable=!0,o.unshift(b)}else o.unshift({pubkey:n,isSigner:!0,isWritable:!0});for(const b of this.signatures){const k=o.findIndex(w=>w.pubkey.equals(b.publicKey));if(k>-1)o[k].isSigner||(o[k].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${b.publicKey.toString()}`)}let c=0,u=0,l=0;const d=[],h=[];o.forEach(({pubkey:b,isSigner:k,isWritable:w})=>{k?(d.push(b.toString()),c+=1,w||(u+=1)):(h.push(b.toString()),w||(l+=1))});const g=d.concat(h),m=r.map(b=>{const{data:k,programId:w}=b;return{programIdIndex:g.indexOf(w.toString()),accounts:b.keys.map(E=>g.indexOf(E.pubkey.toString())),data:vs.encode(k)}});return m.forEach(b=>{Zn(b.programIdIndex>=0),b.accounts.forEach(k=>Zn(k>=0))}),new Dd({header:{numRequiredSignatures:c,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:l},accountKeys:g,recentBlockhash:t,instructions:m})}_compile(){const t=this.compileMessage(),r=t.accountKeys.slice(0,t.header.numRequiredSignatures);return this.signatures.length===r.length&&this.signatures.every((i,s)=>r[s].equals(i.publicKey))||(this.signatures=r.map(n=>({signature:null,publicKey:n}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return(await t.getFeeForMessage(this.compileMessage())).value}setSigners(...t){if(t.length===0)throw new Error("No signers");const r=new Set;this.signatures=t.filter(n=>{const i=n.toString();return r.has(i)?!1:(r.add(i),!0)}).map(n=>({signature:null,publicKey:n}))}sign(...t){if(t.length===0)throw new Error("No signers");const r=new Set,n=[];for(const s of t){const o=s.publicKey.toString();r.has(o)||(r.add(o),n.push(s))}this.signatures=n.map(s=>({signature:null,publicKey:s.publicKey}));const i=this._compile();this._partialSign(i,...n)}partialSign(...t){if(t.length===0)throw new Error("No signers");const r=new Set,n=[];for(const s of t){const o=s.publicKey.toString();r.has(o)||(r.add(o),n.push(s))}const i=this._compile();this._partialSign(i,...n)}_partialSign(t,...r){const n=t.serialize();r.forEach(i=>{const s=gG(n,i.secretKey);this._addSignature(i.publicKey,WC(s))})}addSignature(t,r){this._compile(),this._addSignature(t,r)}_addSignature(t,r){Zn(r.length===64);const n=this.signatures.findIndex(i=>t.equals(i.publicKey));if(n<0)throw new Error(`unknown signer: ${t.toString()}`);this.signatures[n].signature=Ft.Buffer.from(r)}verifySignatures(t=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),t)}_getMessageSignednessErrors(t,r){const n={};for(const{signature:i,publicKey:s}of this.signatures)i===null?r&&(n.missing||=[]).push(s):bwe(i,t,s.toBytes())||(n.invalid||=[]).push(s);return n.invalid||n.missing?n:void 0}serialize(t){const{requireAllSignatures:r,verifySignatures:n}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},t),i=this.serializeMessage();if(n){const s=this._getMessageSignednessErrors(i,r);if(s){let o="Signature verification failed.";throw s.invalid&&(o+=`
640
+ */var aj;function OC(){return aj||(aj=1,function(e){const t=ube(),r=lbe(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const U=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(U,S),U.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(U){if(U>i)throw new RangeError('The value "'+U+'" is invalid for option "size"');const S=new Uint8Array(U);return Object.setPrototypeOf(S,a.prototype),S}function a(U,S,T){if(typeof U=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(U)}return c(U,S,T)}a.poolSize=8192;function c(U,S,T){if(typeof U=="string")return h(U,S);if(ArrayBuffer.isView(U))return m(U);if(U==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(Pe(U,ArrayBuffer)||U&&Pe(U.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(U,SharedArrayBuffer)||U&&Pe(U.buffer,SharedArrayBuffer)))return b(U,S,T);if(typeof U=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const H=U.valueOf&&U.valueOf();if(H!=null&&H!==U)return a.from(H,S,T);const V=k(U);if(V)return V;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof U[Symbol.toPrimitive]=="function")return a.from(U[Symbol.toPrimitive]("string"),S,T);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U)}a.from=function(U,S,T){return c(U,S,T)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function u(U){if(typeof U!="number")throw new TypeError('"size" argument must be of type number');if(U<0)throw new RangeError('The value "'+U+'" is invalid for option "size"')}function l(U,S,T){return u(U),U<=0?o(U):S!==void 0?typeof T=="string"?o(U).fill(S,T):o(U).fill(S):o(U)}a.alloc=function(U,S,T){return l(U,S,T)};function d(U){return u(U),o(U<0?0:w(U)|0)}a.allocUnsafe=function(U){return d(U)},a.allocUnsafeSlow=function(U){return d(U)};function h(U,S){if((typeof S!="string"||S==="")&&(S="utf8"),!a.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const T=A(U,S)|0;let H=o(T);const V=H.write(U,S);return V!==T&&(H=H.slice(0,V)),H}function g(U){const S=U.length<0?0:w(U.length)|0,T=o(S);for(let H=0;H<S;H+=1)T[H]=U[H]&255;return T}function m(U){if(Pe(U,Uint8Array)){const S=new Uint8Array(U);return b(S.buffer,S.byteOffset,S.byteLength)}return g(U)}function b(U,S,T){if(S<0||U.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if(U.byteLength<S+(T||0))throw new RangeError('"length" is outside of buffer bounds');let H;return S===void 0&&T===void 0?H=new Uint8Array(U):T===void 0?H=new Uint8Array(U,S):H=new Uint8Array(U,S,T),Object.setPrototypeOf(H,a.prototype),H}function k(U){if(a.isBuffer(U)){const S=w(U.length)|0,T=o(S);return T.length===0||U.copy(T,0,0,S),T}if(U.length!==void 0)return typeof U.length!="number"||xe(U.length)?o(0):g(U);if(U.type==="Buffer"&&Array.isArray(U.data))return g(U.data)}function w(U){if(U>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return U|0}function E(U){return+U!=U&&(U=0),a.alloc(+U)}a.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==a.prototype},a.compare=function(S,T){if(Pe(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),Pe(T,Uint8Array)&&(T=a.from(T,T.offset,T.byteLength)),!a.isBuffer(S)||!a.isBuffer(T))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===T)return 0;let H=S.length,V=T.length;for(let G=0,Z=Math.min(H,V);G<Z;++G)if(S[G]!==T[G]){H=S[G],V=T[G];break}return H<V?-1:V<H?1:0},a.isEncoding=function(S){switch(String(S).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(S,T){if(!Array.isArray(S))throw new TypeError('"list" argument must be an Array of Buffers');if(S.length===0)return a.alloc(0);let H;if(T===void 0)for(T=0,H=0;H<S.length;++H)T+=S[H].length;const V=a.allocUnsafe(T);let G=0;for(H=0;H<S.length;++H){let Z=S[H];if(Pe(Z,Uint8Array))G+Z.length>V.length?(a.isBuffer(Z)||(Z=a.from(Z)),Z.copy(V,G)):Uint8Array.prototype.set.call(V,Z,G);else if(a.isBuffer(Z))Z.copy(V,G);else throw new TypeError('"list" argument must be an Array of Buffers');G+=Z.length}return V};function A(U,S){if(a.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||Pe(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);const T=U.length,H=arguments.length>2&&arguments[2]===!0;if(!H&&T===0)return 0;let V=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":return Re(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return le(U).length;default:if(V)return H?-1:Re(U).length;S=(""+S).toLowerCase(),V=!0}}a.byteLength=A;function M(U,S,T){let H=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((T===void 0||T>this.length)&&(T=this.length),T<=0)||(T>>>=0,S>>>=0,T<=S))return"";for(U||(U="utf8");;)switch(U){case"hex":return $(this,S,T);case"utf8":case"utf-8":return f(this,S,T);case"ascii":return I(this,S,T);case"latin1":case"binary":return j(this,S,T);case"base64":return y(this,S,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,S,T);default:if(H)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),H=!0}}a.prototype._isBuffer=!0;function R(U,S,T){const H=U[S];U[S]=U[T],U[T]=H}a.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let T=0;T<S;T+=2)R(this,T,T+1);return this},a.prototype.swap32=function(){const S=this.length;if(S%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let T=0;T<S;T+=4)R(this,T,T+3),R(this,T+1,T+2);return this},a.prototype.swap64=function(){const S=this.length;if(S%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let T=0;T<S;T+=8)R(this,T,T+7),R(this,T+1,T+6),R(this,T+2,T+5),R(this,T+3,T+4);return this},a.prototype.toString=function(){const S=this.length;return S===0?"":arguments.length===0?f(this,0,S):M.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(S){if(!a.isBuffer(S))throw new TypeError("Argument must be a Buffer");return this===S?!0:a.compare(this,S)===0},a.prototype.inspect=function(){let S="";const T=e.INSPECT_MAX_BYTES;return S=this.toString("hex",0,T).replace(/(.{2})/g,"$1 ").trim(),this.length>T&&(S+=" ... "),"<Buffer "+S+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(S,T,H,V,G){if(Pe(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),!a.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(T===void 0&&(T=0),H===void 0&&(H=S?S.length:0),V===void 0&&(V=0),G===void 0&&(G=this.length),T<0||H>S.length||V<0||G>this.length)throw new RangeError("out of range index");if(V>=G&&T>=H)return 0;if(V>=G)return-1;if(T>=H)return 1;if(T>>>=0,H>>>=0,V>>>=0,G>>>=0,this===S)return 0;let Z=G-V,Ee=H-T;const Ie=Math.min(Z,Ee),ee=this.slice(V,G),se=S.slice(T,H);for(let we=0;we<Ie;++we)if(ee[we]!==se[we]){Z=ee[we],Ee=se[we];break}return Z<Ee?-1:Ee<Z?1:0};function N(U,S,T,H,V){if(U.length===0)return-1;if(typeof T=="string"?(H=T,T=0):T>2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,xe(T)&&(T=V?0:U.length-1),T<0&&(T=U.length+T),T>=U.length){if(V)return-1;T=U.length-1}else if(T<0)if(V)T=0;else return-1;if(typeof S=="string"&&(S=a.from(S,H)),a.isBuffer(S))return S.length===0?-1:z(U,S,T,H,V);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(U,S,T):Uint8Array.prototype.lastIndexOf.call(U,S,T):z(U,[S],T,H,V);throw new TypeError("val must be string, number or Buffer")}function z(U,S,T,H,V){let G=1,Z=U.length,Ee=S.length;if(H!==void 0&&(H=String(H).toLowerCase(),H==="ucs2"||H==="ucs-2"||H==="utf16le"||H==="utf-16le")){if(U.length<2||S.length<2)return-1;G=2,Z/=2,Ee/=2,T/=2}function Ie(se,we){return G===1?se[we]:se.readUInt16BE(we*G)}let ee;if(V){let se=-1;for(ee=T;ee<Z;ee++)if(Ie(U,ee)===Ie(S,se===-1?0:ee-se)){if(se===-1&&(se=ee),ee-se+1===Ee)return se*G}else se!==-1&&(ee-=ee-se),se=-1}else for(T+Ee>Z&&(T=Z-Ee),ee=T;ee>=0;ee--){let se=!0;for(let we=0;we<Ee;we++)if(Ie(U,ee+we)!==Ie(S,we)){se=!1;break}if(se)return ee}return-1}a.prototype.includes=function(S,T,H){return this.indexOf(S,T,H)!==-1},a.prototype.indexOf=function(S,T,H){return N(this,S,T,H,!0)},a.prototype.lastIndexOf=function(S,T,H){return N(this,S,T,H,!1)};function F(U,S,T,H){T=Number(T)||0;const V=U.length-T;H?(H=Number(H),H>V&&(H=V)):H=V;const G=S.length;H>G/2&&(H=G/2);let Z;for(Z=0;Z<H;++Z){const Ee=parseInt(S.substr(Z*2,2),16);if(xe(Ee))return Z;U[T+Z]=Ee}return Z}function L(U,S,T,H){return he(Re(S,U.length-T),U,T,H)}function B(U,S,T,H){return he(J(S),U,T,H)}function D(U,S,T,H){return he(le(S),U,T,H)}function x(U,S,T,H){return he(ne(S,U.length-T),U,T,H)}a.prototype.write=function(S,T,H,V){if(T===void 0)V="utf8",H=this.length,T=0;else if(H===void 0&&typeof T=="string")V=T,H=this.length,T=0;else if(isFinite(T))T=T>>>0,isFinite(H)?(H=H>>>0,V===void 0&&(V="utf8")):(V=H,H=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const G=this.length-T;if((H===void 0||H>G)&&(H=G),S.length>0&&(H<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");let Z=!1;for(;;)switch(V){case"hex":return F(this,S,T,H);case"utf8":case"utf-8":return L(this,S,T,H);case"ascii":case"latin1":case"binary":return B(this,S,T,H);case"base64":return D(this,S,T,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,S,T,H);default:if(Z)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),Z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(U,S,T){return S===0&&T===U.length?t.fromByteArray(U):t.fromByteArray(U.slice(S,T))}function f(U,S,T){T=Math.min(U.length,T);const H=[];let V=S;for(;V<T;){const G=U[V];let Z=null,Ee=G>239?4:G>223?3:G>191?2:1;if(V+Ee<=T){let Ie,ee,se,we;switch(Ee){case 1:G<128&&(Z=G);break;case 2:Ie=U[V+1],(Ie&192)===128&&(we=(G&31)<<6|Ie&63,we>127&&(Z=we));break;case 3:Ie=U[V+1],ee=U[V+2],(Ie&192)===128&&(ee&192)===128&&(we=(G&15)<<12|(Ie&63)<<6|ee&63,we>2047&&(we<55296||we>57343)&&(Z=we));break;case 4:Ie=U[V+1],ee=U[V+2],se=U[V+3],(Ie&192)===128&&(ee&192)===128&&(se&192)===128&&(we=(G&15)<<18|(Ie&63)<<12|(ee&63)<<6|se&63,we>65535&&we<1114112&&(Z=we))}}Z===null?(Z=65533,Ee=1):Z>65535&&(Z-=65536,H.push(Z>>>10&1023|55296),Z=56320|Z&1023),H.push(Z),V+=Ee}return v(H)}const p=4096;function v(U){const S=U.length;if(S<=p)return String.fromCharCode.apply(String,U);let T="",H=0;for(;H<S;)T+=String.fromCharCode.apply(String,U.slice(H,H+=p));return T}function I(U,S,T){let H="";T=Math.min(U.length,T);for(let V=S;V<T;++V)H+=String.fromCharCode(U[V]&127);return H}function j(U,S,T){let H="";T=Math.min(U.length,T);for(let V=S;V<T;++V)H+=String.fromCharCode(U[V]);return H}function $(U,S,T){const H=U.length;(!S||S<0)&&(S=0),(!T||T<0||T>H)&&(T=H);let V="";for(let G=S;G<T;++G)V+=oe[U[G]];return V}function C(U,S,T){const H=U.slice(S,T);let V="";for(let G=0;G<H.length-1;G+=2)V+=String.fromCharCode(H[G]+H[G+1]*256);return V}a.prototype.slice=function(S,T){const H=this.length;S=~~S,T=T===void 0?H:~~T,S<0?(S+=H,S<0&&(S=0)):S>H&&(S=H),T<0?(T+=H,T<0&&(T=0)):T>H&&(T=H),T<S&&(T=S);const V=this.subarray(S,T);return Object.setPrototypeOf(V,a.prototype),V};function O(U,S,T){if(U%1!==0||U<0)throw new RangeError("offset is not uint");if(U+S>T)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=this[S],G=1,Z=0;for(;++Z<T&&(G*=256);)V+=this[S+Z]*G;return V},a.prototype.readUintBE=a.prototype.readUIntBE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=this[S+--T],G=1;for(;T>0&&(G*=256);)V+=this[S+--T]*G;return V},a.prototype.readUint8=a.prototype.readUInt8=function(S,T){return S=S>>>0,T||O(S,1,this.length),this[S]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(S,T){return S=S>>>0,T||O(S,2,this.length),this[S]|this[S+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(S,T){return S=S>>>0,T||O(S,2,this.length),this[S]<<8|this[S+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(S,T){return S=S>>>0,T||O(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(S,T){return S=S>>>0,T||O(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},a.prototype.readBigUInt64LE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=T+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,G=this[++S]+this[++S]*2**8+this[++S]*2**16+H*2**24;return BigInt(V)+(BigInt(G)<<BigInt(32))}),a.prototype.readBigUInt64BE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=T*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],G=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+H;return(BigInt(V)<<BigInt(32))+BigInt(G)}),a.prototype.readIntLE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=this[S],G=1,Z=0;for(;++Z<T&&(G*=256);)V+=this[S+Z]*G;return G*=128,V>=G&&(V-=Math.pow(2,8*T)),V},a.prototype.readIntBE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=T,G=1,Z=this[S+--V];for(;V>0&&(G*=256);)Z+=this[S+--V]*G;return G*=128,Z>=G&&(Z-=Math.pow(2,8*T)),Z},a.prototype.readInt8=function(S,T){return S=S>>>0,T||O(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},a.prototype.readInt16LE=function(S,T){S=S>>>0,T||O(S,2,this.length);const H=this[S]|this[S+1]<<8;return H&32768?H|4294901760:H},a.prototype.readInt16BE=function(S,T){S=S>>>0,T||O(S,2,this.length);const H=this[S+1]|this[S]<<8;return H&32768?H|4294901760:H},a.prototype.readInt32LE=function(S,T){return S=S>>>0,T||O(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},a.prototype.readInt32BE=function(S,T){return S=S>>>0,T||O(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},a.prototype.readBigInt64LE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(H<<24);return(BigInt(V)<<BigInt(32))+BigInt(T+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24)}),a.prototype.readBigInt64BE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=(T<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(V)<<BigInt(32))+BigInt(this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+H)}),a.prototype.readFloatLE=function(S,T){return S=S>>>0,T||O(S,4,this.length),r.read(this,S,!0,23,4)},a.prototype.readFloatBE=function(S,T){return S=S>>>0,T||O(S,4,this.length),r.read(this,S,!1,23,4)},a.prototype.readDoubleLE=function(S,T){return S=S>>>0,T||O(S,8,this.length),r.read(this,S,!0,52,8)},a.prototype.readDoubleBE=function(S,T){return S=S>>>0,T||O(S,8,this.length),r.read(this,S,!1,52,8)};function _(U,S,T,H,V,G){if(!a.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>V||S<G)throw new RangeError('"value" argument is out of bounds');if(T+H>U.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(S,T,H,V){if(S=+S,T=T>>>0,H=H>>>0,!V){const Ee=Math.pow(2,8*H)-1;_(this,S,T,H,Ee,0)}let G=1,Z=0;for(this[T]=S&255;++Z<H&&(G*=256);)this[T+Z]=S/G&255;return T+H},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(S,T,H,V){if(S=+S,T=T>>>0,H=H>>>0,!V){const Ee=Math.pow(2,8*H)-1;_(this,S,T,H,Ee,0)}let G=H-1,Z=1;for(this[T+G]=S&255;--G>=0&&(Z*=256);)this[T+G]=S/Z&255;return T+H},a.prototype.writeUint8=a.prototype.writeUInt8=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,1,255,0),this[T]=S&255,T+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,65535,0),this[T]=S&255,this[T+1]=S>>>8,T+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,65535,0),this[T]=S>>>8,this[T+1]=S&255,T+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,4294967295,0),this[T+3]=S>>>24,this[T+2]=S>>>16,this[T+1]=S>>>8,this[T]=S&255,T+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,4294967295,0),this[T]=S>>>24,this[T+1]=S>>>16,this[T+2]=S>>>8,this[T+3]=S&255,T+4};function P(U,S,T,H,V){ye(S,H,V,U,T,7);let G=Number(S&BigInt(4294967295));U[T++]=G,G=G>>8,U[T++]=G,G=G>>8,U[T++]=G,G=G>>8,U[T++]=G;let Z=Number(S>>BigInt(32)&BigInt(4294967295));return U[T++]=Z,Z=Z>>8,U[T++]=Z,Z=Z>>8,U[T++]=Z,Z=Z>>8,U[T++]=Z,T}function q(U,S,T,H,V){ye(S,H,V,U,T,7);let G=Number(S&BigInt(4294967295));U[T+7]=G,G=G>>8,U[T+6]=G,G=G>>8,U[T+5]=G,G=G>>8,U[T+4]=G;let Z=Number(S>>BigInt(32)&BigInt(4294967295));return U[T+3]=Z,Z=Z>>8,U[T+2]=Z,Z=Z>>8,U[T+1]=Z,Z=Z>>8,U[T]=Z,T+8}a.prototype.writeBigUInt64LE=me(function(S,T=0){return P(this,S,T,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=me(function(S,T=0){return q(this,S,T,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(S,T,H,V){if(S=+S,T=T>>>0,!V){const Ie=Math.pow(2,8*H-1);_(this,S,T,H,Ie-1,-Ie)}let G=0,Z=1,Ee=0;for(this[T]=S&255;++G<H&&(Z*=256);)S<0&&Ee===0&&this[T+G-1]!==0&&(Ee=1),this[T+G]=(S/Z>>0)-Ee&255;return T+H},a.prototype.writeIntBE=function(S,T,H,V){if(S=+S,T=T>>>0,!V){const Ie=Math.pow(2,8*H-1);_(this,S,T,H,Ie-1,-Ie)}let G=H-1,Z=1,Ee=0;for(this[T+G]=S&255;--G>=0&&(Z*=256);)S<0&&Ee===0&&this[T+G+1]!==0&&(Ee=1),this[T+G]=(S/Z>>0)-Ee&255;return T+H},a.prototype.writeInt8=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,1,127,-128),S<0&&(S=255+S+1),this[T]=S&255,T+1},a.prototype.writeInt16LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,32767,-32768),this[T]=S&255,this[T+1]=S>>>8,T+2},a.prototype.writeInt16BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,32767,-32768),this[T]=S>>>8,this[T+1]=S&255,T+2},a.prototype.writeInt32LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,2147483647,-2147483648),this[T]=S&255,this[T+1]=S>>>8,this[T+2]=S>>>16,this[T+3]=S>>>24,T+4},a.prototype.writeInt32BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[T]=S>>>24,this[T+1]=S>>>16,this[T+2]=S>>>8,this[T+3]=S&255,T+4},a.prototype.writeBigInt64LE=me(function(S,T=0){return P(this,S,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=me(function(S,T=0){return q(this,S,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function W(U,S,T,H,V,G){if(T+H>U.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function K(U,S,T,H,V){return S=+S,T=T>>>0,V||W(U,S,T,4),r.write(U,S,T,H,23,4),T+4}a.prototype.writeFloatLE=function(S,T,H){return K(this,S,T,!0,H)},a.prototype.writeFloatBE=function(S,T,H){return K(this,S,T,!1,H)};function Y(U,S,T,H,V){return S=+S,T=T>>>0,V||W(U,S,T,8),r.write(U,S,T,H,52,8),T+8}a.prototype.writeDoubleLE=function(S,T,H){return Y(this,S,T,!0,H)},a.prototype.writeDoubleBE=function(S,T,H){return Y(this,S,T,!1,H)},a.prototype.copy=function(S,T,H,V){if(!a.isBuffer(S))throw new TypeError("argument should be a Buffer");if(H||(H=0),!V&&V!==0&&(V=this.length),T>=S.length&&(T=S.length),T||(T=0),V>0&&V<H&&(V=H),V===H||S.length===0||this.length===0)return 0;if(T<0)throw new RangeError("targetStart out of bounds");if(H<0||H>=this.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),S.length-T<V-H&&(V=S.length-T+H);const G=V-H;return this===S&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(T,H,V):Uint8Array.prototype.set.call(S,this.subarray(H,V),T),G},a.prototype.fill=function(S,T,H,V){if(typeof S=="string"){if(typeof T=="string"?(V=T,T=0,H=this.length):typeof H=="string"&&(V=H,H=this.length),V!==void 0&&typeof V!="string")throw new TypeError("encoding must be a string");if(typeof V=="string"&&!a.isEncoding(V))throw new TypeError("Unknown encoding: "+V);if(S.length===1){const Z=S.charCodeAt(0);(V==="utf8"&&Z<128||V==="latin1")&&(S=Z)}}else typeof S=="number"?S=S&255:typeof S=="boolean"&&(S=Number(S));if(T<0||this.length<T||this.length<H)throw new RangeError("Out of range index");if(H<=T)return this;T=T>>>0,H=H===void 0?this.length:H>>>0,S||(S=0);let G;if(typeof S=="number")for(G=T;G<H;++G)this[G]=S;else{const Z=a.isBuffer(S)?S:a.from(S,V),Ee=Z.length;if(Ee===0)throw new TypeError('The value "'+S+'" is invalid for argument "value"');for(G=0;G<H-T;++G)this[G+T]=Z[G%Ee]}return this};const te={};function re(U,S,T){te[U]=class extends T{constructor(){super(),Object.defineProperty(this,"message",{value:S.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${U}]`,this.stack,delete this.name}get code(){return U}set code(V){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:V,writable:!0})}toString(){return`${this.name} [${U}]: ${this.message}`}}}re("ERR_BUFFER_OUT_OF_BOUNDS",function(U){return U?`${U} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),re("ERR_INVALID_ARG_TYPE",function(U,S){return`The "${U}" argument must be of type number. Received type ${typeof S}`},TypeError),re("ERR_OUT_OF_RANGE",function(U,S,T){let H=`The value of "${U}" is out of range.`,V=T;return Number.isInteger(T)&&Math.abs(T)>2**32?V=be(String(T)):typeof T=="bigint"&&(V=String(T),(T>BigInt(2)**BigInt(32)||T<-(BigInt(2)**BigInt(32)))&&(V=be(V)),V+="n"),H+=` It must be ${S}. Received ${V}`,H},RangeError);function be(U){let S="",T=U.length;const H=U[0]==="-"?1:0;for(;T>=H+4;T-=3)S=`_${U.slice(T-3,T)}${S}`;return`${U.slice(0,T)}${S}`}function ve(U,S,T){Se(S,"offset"),(U[S]===void 0||U[S+T]===void 0)&&_e(S,U.length-(T+1))}function ye(U,S,T,H,V,G){if(U>T||U<S){const Z=typeof S=="bigint"?"n":"";let Ee;throw S===0||S===BigInt(0)?Ee=`>= 0${Z} and < 2${Z} ** ${(G+1)*8}${Z}`:Ee=`>= -(2${Z} ** ${(G+1)*8-1}${Z}) and < 2 ** ${(G+1)*8-1}${Z}`,new te.ERR_OUT_OF_RANGE("value",Ee,U)}ve(H,V,G)}function Se(U,S){if(typeof U!="number")throw new te.ERR_INVALID_ARG_TYPE(S,"number",U)}function _e(U,S,T){throw Math.floor(U)!==U?(Se(U,T),new te.ERR_OUT_OF_RANGE("offset","an integer",U)):S<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${S}`,U)}const ke=/[^+/0-9A-Za-z-_]/g;function it(U){if(U=U.split("=")[0],U=U.trim().replace(ke,""),U.length<2)return"";for(;U.length%4!==0;)U=U+"=";return U}function Re(U,S){S=S||1/0;let T;const H=U.length;let V=null;const G=[];for(let Z=0;Z<H;++Z){if(T=U.charCodeAt(Z),T>55295&&T<57344){if(!V){if(T>56319){(S-=3)>-1&&G.push(239,191,189);continue}else if(Z+1===H){(S-=3)>-1&&G.push(239,191,189);continue}V=T;continue}if(T<56320){(S-=3)>-1&&G.push(239,191,189),V=T;continue}T=(V-55296<<10|T-56320)+65536}else V&&(S-=3)>-1&&G.push(239,191,189);if(V=null,T<128){if((S-=1)<0)break;G.push(T)}else if(T<2048){if((S-=2)<0)break;G.push(T>>6|192,T&63|128)}else if(T<65536){if((S-=3)<0)break;G.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((S-=4)<0)break;G.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return G}function J(U){const S=[];for(let T=0;T<U.length;++T)S.push(U.charCodeAt(T)&255);return S}function ne(U,S){let T,H,V;const G=[];for(let Z=0;Z<U.length&&!((S-=2)<0);++Z)T=U.charCodeAt(Z),H=T>>8,V=T%256,G.push(V),G.push(H);return G}function le(U){return t.toByteArray(it(U))}function he(U,S,T,H){let V;for(V=0;V<H&&!(V+T>=S.length||V>=U.length);++V)S[V+T]=U[V];return V}function Pe(U,S){return U instanceof S||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===S.name}function xe(U){return U!==U}const oe=function(){const U="0123456789abcdef",S=new Array(256);for(let T=0;T<16;++T){const H=T*16;for(let V=0;V<16;++V)S[H+V]=U[T]+U[V]}return S}();function me(U){return typeof BigInt>"u"?je:U}function je(){throw new Error("BigInt not supported")}}(v8)),v8}var Ft=OC();const Ypt=Cne({__proto__:null},[Ft]),Fh=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function J2(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function HE(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function uh(e,...t){if(!J2(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function TK(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");HE(e.outputLen),HE(e.blockLen)}function Mv(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function fbe(e,t){uh(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Tp(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function _8(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function oc(e,t){return e<<32-t|e>>>t}const NK=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",dbe=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ed(e){if(uh(e),NK)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=dbe[e[r]];return t}const au={_0:48,_9:57,A:65,F:70,a:97,f:102};function cj(e){if(e>=au._0&&e<=au._9)return e-au._0;if(e>=au.A&&e<=au.F)return e-(au.A-10);if(e>=au.a&&e<=au.f)return e-(au.a-10)}function $v(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(NK)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=cj(e.charCodeAt(s)),a=cj(e.charCodeAt(s+1));if(o===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function hbe(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function jC(e){return typeof e=="string"&&(e=hbe(e)),uh(e),e}function Ic(...e){let t=0;for(let n=0;n<e.length;n++){const i=e[n];uh(i),t+=i.length}const r=new Uint8Array(t);for(let n=0,i=0;n<e.length;n++){const s=e[n];r.set(s,i),i+=s.length}return r}let OK=class{};function jK(e){const t=n=>e().update(jC(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function PC(e=32){if(Fh&&typeof Fh.getRandomValues=="function")return Fh.getRandomValues(new Uint8Array(e));if(Fh&&typeof Fh.randomBytes=="function")return Uint8Array.from(Fh.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function pbe(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,o,n),e.setUint32(t+u,a,n)}function gbe(e,t,r){return e&t^~e&r}function mbe(e,t,r){return e&t^e&r^t&r}let PK=class extends OK{constructor(t,r,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(t),this.view=_8(this.buffer)}update(t){Mv(this),t=jC(t),uh(t);const{view:r,buffer:n,blockLen:i}=this,s=t.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=_8(t);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Mv(this),fbe(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,Tp(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;pbe(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=_8(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,l=this.get();if(u>l.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,l[d],s)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return t.destroyed=o,t.finished=s,t.length=i,t.pos=a,i%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}};const gl=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ns=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),my=BigInt(2**32-1),uj=BigInt(32);function bbe(e,t=!1){return t?{h:Number(e&my),l:Number(e>>uj&my)}:{h:Number(e>>uj&my)|0,l:Number(e&my)|0}}function ybe(e,t=!1){const r=e.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:a}=bbe(e[s],t);[n[s],i[s]]=[o,a]}return[n,i]}const lj=(e,t,r)=>e>>>r,fj=(e,t,r)=>e<<32-r|t>>>r,Uh=(e,t,r)=>e>>>r|t<<32-r,qh=(e,t,r)=>e<<32-r|t>>>r,by=(e,t,r)=>e<<64-r|t>>>r-32,yy=(e,t,r)=>e>>>r-32|t<<64-r;function cu(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}const wbe=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),vbe=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,_be=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),xbe=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0,Ebe=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0),kbe=(e,t,r,n,i,s)=>t+r+n+i+s+(e/2**32|0)|0,Abe=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ml=new Uint32Array(64);let Sbe=class extends PK{constructor(t=32){super(64,t,8,!1),this.A=gl[0]|0,this.B=gl[1]|0,this.C=gl[2]|0,this.D=gl[3]|0,this.E=gl[4]|0,this.F=gl[5]|0,this.G=gl[6]|0,this.H=gl[7]|0}get(){const{A:t,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[t,r,n,i,s,o,a,c]}set(t,r,n,i,s,o,a,c){this.A=t|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,r){for(let d=0;d<16;d++,r+=4)ml[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const h=ml[d-15],g=ml[d-2],m=oc(h,7)^oc(h,18)^h>>>3,b=oc(g,17)^oc(g,19)^g>>>10;ml[d]=b+ml[d-7]+m+ml[d-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:u,H:l}=this;for(let d=0;d<64;d++){const h=oc(a,6)^oc(a,11)^oc(a,25),g=l+h+gbe(a,c,u)+Abe[d]+ml[d]|0,b=(oc(n,2)^oc(n,13)^oc(n,22))+mbe(n,i,s)|0;l=u,u=c,c=a,a=o+g|0,o=s,s=i,i=n,n=g+b|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,c=c+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(n,i,s,o,a,c,u,l)}roundClean(){Tp(ml)}destroy(){this.set(0,0,0,0,0,0,0,0),Tp(this.buffer)}};const DK=ybe(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Cbe=DK[0],Ibe=DK[1],bl=new Uint32Array(80),yl=new Uint32Array(80);class Mbe extends PK{constructor(t=64){super(128,t,16,!1),this.Ah=ns[0]|0,this.Al=ns[1]|0,this.Bh=ns[2]|0,this.Bl=ns[3]|0,this.Ch=ns[4]|0,this.Cl=ns[5]|0,this.Dh=ns[6]|0,this.Dl=ns[7]|0,this.Eh=ns[8]|0,this.El=ns[9]|0,this.Fh=ns[10]|0,this.Fl=ns[11]|0,this.Gh=ns[12]|0,this.Gl=ns[13]|0,this.Hh=ns[14]|0,this.Hl=ns[15]|0}get(){const{Ah:t,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:u,El:l,Fh:d,Fl:h,Gh:g,Gl:m,Hh:b,Hl:k}=this;return[t,r,n,i,s,o,a,c,u,l,d,h,g,m,b,k]}set(t,r,n,i,s,o,a,c,u,l,d,h,g,m,b,k){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=l|0,this.Fh=d|0,this.Fl=h|0,this.Gh=g|0,this.Gl=m|0,this.Hh=b|0,this.Hl=k|0}process(t,r){for(let A=0;A<16;A++,r+=4)bl[A]=t.getUint32(r),yl[A]=t.getUint32(r+=4);for(let A=16;A<80;A++){const M=bl[A-15]|0,R=yl[A-15]|0,N=Uh(M,R,1)^Uh(M,R,8)^lj(M,R,7),z=qh(M,R,1)^qh(M,R,8)^fj(M,R,7),F=bl[A-2]|0,L=yl[A-2]|0,B=Uh(F,L,19)^by(F,L,61)^lj(F,L,6),D=qh(F,L,19)^yy(F,L,61)^fj(F,L,6),x=_be(z,D,yl[A-7],yl[A-16]),y=xbe(x,N,B,bl[A-7],bl[A-16]);bl[A]=y|0,yl[A]=x|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:u,Dl:l,Eh:d,El:h,Fh:g,Fl:m,Gh:b,Gl:k,Hh:w,Hl:E}=this;for(let A=0;A<80;A++){const M=Uh(d,h,14)^Uh(d,h,18)^by(d,h,41),R=qh(d,h,14)^qh(d,h,18)^yy(d,h,41),N=d&g^~d&b,z=h&m^~h&k,F=Ebe(E,R,z,Ibe[A],yl[A]),L=kbe(F,w,M,N,Cbe[A],bl[A]),B=F|0,D=Uh(n,i,28)^by(n,i,34)^by(n,i,39),x=qh(n,i,28)^yy(n,i,34)^yy(n,i,39),y=n&s^n&a^s&a,f=i&o^i&c^o&c;w=b|0,E=k|0,b=g|0,k=m|0,g=d|0,m=h|0,{h:d,l:h}=cu(u|0,l|0,L|0,B|0),u=a|0,l=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const p=wbe(B,x,f);n=vbe(p,L,D,y),i=p|0}({h:n,l:i}=cu(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=cu(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=cu(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l}=cu(this.Dh|0,this.Dl|0,u|0,l|0),{h:d,l:h}=cu(this.Eh|0,this.El|0,d|0,h|0),{h:g,l:m}=cu(this.Fh|0,this.Fl|0,g|0,m|0),{h:b,l:k}=cu(this.Gh|0,this.Gl|0,b|0,k|0),{h:w,l:E}=cu(this.Hh|0,this.Hl|0,w|0,E|0),this.set(n,i,s,o,a,c,u,l,d,h,g,m,b,k,w,E)}roundClean(){Tp(bl,yl)}destroy(){Tp(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const RK=jK(()=>new Sbe),$be=jK(()=>new Mbe);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const DC=BigInt(0),WE=BigInt(1);function Pd(e,t=""){if(typeof e!="boolean"){const r=t&&`"${t}"`;throw new Error(r+"expected boolean, got type="+typeof e)}return e}function Fa(e,t,r=""){const n=J2(e),i=e?.length,s=t!==void 0;if(!n||s&&i!==t){const o=r&&`"${r}" `,a=s?` of length ${t}`:"",c=n?`length=${i}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+a+", got "+c)}return e}function wy(e){const t=e.toString(16);return t.length&1?"0"+t:t}function LK(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?DC:BigInt("0x"+e)}function m4(e){return LK(Ed(e))}function $m(e){return uh(e),LK(Ed(Uint8Array.from(e).reverse()))}function RC(e,t){return $v(e.toString(16).padStart(t*2,"0"))}function zK(e,t){return RC(e,t).reverse()}function xn(e,t,r){let n;if(typeof t=="string")try{n=$v(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(J2(t))n=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(e+" of length "+r+" expected, got "+i);return n}function dj(e){return Uint8Array.from(e)}const x8=e=>typeof e=="bigint"&&DC<=e;function Tbe(e,t,r){return x8(e)&&x8(t)&&x8(r)&&t<=e&&e<r}function VE(e,t,r,n){if(!Tbe(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function BK(e){let t;for(t=0;e>DC;e>>=WE,t+=1);return t}const X2=e=>(WE<<BigInt(e))-WE;function Nbe(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");const n=g=>new Uint8Array(g),i=g=>Uint8Array.of(g);let s=n(e),o=n(e),a=0;const c=()=>{s.fill(1),o.fill(0),a=0},u=(...g)=>r(o,s,...g),l=(g=n(0))=>{o=u(i(0),g),s=u(),g.length!==0&&(o=u(i(1),g),s=u())},d=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let g=0;const m=[];for(;g<t;){s=u();const b=s.slice();m.push(b),g+=s.length}return Ic(...m)};return(g,m)=>{c(),l(g);let b;for(;!(b=m(d()));)l();return c(),b}}function Q2(e,t,r={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function n(i,s,o){const a=e[i];if(o&&a===void 0)return;const c=typeof a;if(c!==s||a===null)throw new Error(`param "${i}" is invalid: expected ${s}, got ${c}`)}Object.entries(t).forEach(([i,s])=>n(i,s,!1)),Object.entries(r).forEach(([i,s])=>n(i,s,!0))}function Tv(e){const t=new WeakMap;return(r,...n)=>{const i=t.get(r);if(i!==void 0)return i;const s=e(r,...n);return t.set(r,s),s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ws=BigInt(0),Hi=BigInt(1),cd=BigInt(2),FK=BigInt(3),UK=BigInt(4),qK=BigInt(5),Obe=BigInt(7),HK=BigInt(8),jbe=BigInt(9),WK=BigInt(16);function Fn(e,t){const r=e%t;return r>=Ws?r:t+r}function _n(e,t,r){let n=e;for(;t-- >Ws;)n*=n,n%=r;return n}function hj(e,t){if(e===Ws)throw new Error("invert: expected non-zero number");if(t<=Ws)throw new Error("invert: expected positive modulus, got "+t);let r=Fn(e,t),n=t,i=Ws,s=Hi;for(;r!==Ws;){const a=n/r,c=n%r,u=i-s*a;n=r,r=c,i=s,s=u}if(n!==Hi)throw new Error("invert: does not exist");return Fn(i,t)}function LC(e,t,r){if(!e.eql(e.sqr(t),r))throw new Error("Cannot find square root")}function VK(e,t){const r=(e.ORDER+Hi)/UK,n=e.pow(t,r);return LC(e,n,t),n}function Pbe(e,t){const r=(e.ORDER-qK)/HK,n=e.mul(t,cd),i=e.pow(n,r),s=e.mul(t,i),o=e.mul(e.mul(s,cd),i),a=e.mul(s,e.sub(o,e.ONE));return LC(e,a,t),a}function Dbe(e){const t=lh(e),r=KK(e),n=r(t,t.neg(t.ONE)),i=r(t,n),s=r(t,t.neg(n)),o=(e+Obe)/WK;return(a,c)=>{let u=a.pow(c,o),l=a.mul(u,n);const d=a.mul(u,i),h=a.mul(u,s),g=a.eql(a.sqr(l),c),m=a.eql(a.sqr(d),c);u=a.cmov(u,l,g),l=a.cmov(h,d,m);const b=a.eql(a.sqr(l),c),k=a.cmov(u,l,b);return LC(a,k,c),k}}function KK(e){if(e<FK)throw new Error("sqrt is not defined for small field");let t=e-Hi,r=0;for(;t%cd===Ws;)t/=cd,r++;let n=cd;const i=lh(e);for(;pj(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return VK;let s=i.pow(n,t);const o=(t+Hi)/cd;return function(c,u){if(c.is0(u))return u;if(pj(c,u)!==1)throw new Error("Cannot find square root");let l=r,d=c.mul(c.ONE,s),h=c.pow(u,t),g=c.pow(u,o);for(;!c.eql(h,c.ONE);){if(c.is0(h))return c.ZERO;let m=1,b=c.sqr(h);for(;!c.eql(b,c.ONE);)if(m++,b=c.sqr(b),m===l)throw new Error("Cannot find square root");const k=Hi<<BigInt(l-m-1),w=c.pow(d,k);l=m,d=c.sqr(w),h=c.mul(h,d),g=c.mul(g,w)}return g}}function Rbe(e){return e%UK===FK?VK:e%HK===qK?Pbe:e%WK===jbe?Dbe(e):KK(e)}const Lbe=(e,t)=>(Fn(e,t)&Hi)===Hi,zbe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Bbe(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},r=zbe.reduce((n,i)=>(n[i]="function",n),t);return Q2(e,r),e}function Fbe(e,t,r){if(r<Ws)throw new Error("invalid exponent, negatives unsupported");if(r===Ws)return e.ONE;if(r===Hi)return t;let n=e.ONE,i=t;for(;r>Ws;)r&Hi&&(n=e.mul(n,i)),i=e.sqr(i),r>>=Hi;return n}function GK(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((o,a,c)=>e.is0(a)?o:(n[c]=o,e.mul(o,a)),e.ONE),s=e.inv(i);return t.reduceRight((o,a,c)=>e.is0(a)?o:(n[c]=e.mul(o,n[c]),e.mul(o,a)),s),n}function pj(e,t){const r=(e.ORDER-Hi)/cd,n=e.pow(t,r),i=e.eql(n,e.ONE),s=e.eql(n,e.ZERO),o=e.eql(n,e.neg(e.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function ZK(e,t){t!==void 0&&HE(t);const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function lh(e,t,r=!1,n={}){if(e<=Ws)throw new Error("invalid field: expected ORDER > 0, got "+e);let i,s,o=!1,a;if(typeof t=="object"&&t!=null){if(n.sqrt||r)throw new Error("cannot specify opts in two arguments");const h=t;h.BITS&&(i=h.BITS),h.sqrt&&(s=h.sqrt),typeof h.isLE=="boolean"&&(r=h.isLE),typeof h.modFromBytes=="boolean"&&(o=h.modFromBytes),a=h.allowedLengths}else typeof t=="number"&&(i=t),n.sqrt&&(s=n.sqrt);const{nBitLength:c,nByteLength:u}=ZK(e,i);if(u>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const d=Object.freeze({ORDER:e,isLE:r,BITS:c,BYTES:u,MASK:X2(c),ZERO:Ws,ONE:Hi,allowedLengths:a,create:h=>Fn(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return Ws<=h&&h<e},is0:h=>h===Ws,isValidNot0:h=>!d.is0(h)&&d.isValid(h),isOdd:h=>(h&Hi)===Hi,neg:h=>Fn(-h,e),eql:(h,g)=>h===g,sqr:h=>Fn(h*h,e),add:(h,g)=>Fn(h+g,e),sub:(h,g)=>Fn(h-g,e),mul:(h,g)=>Fn(h*g,e),pow:(h,g)=>Fbe(d,h,g),div:(h,g)=>Fn(h*hj(g,e),e),sqrN:h=>h*h,addN:(h,g)=>h+g,subN:(h,g)=>h-g,mulN:(h,g)=>h*g,inv:h=>hj(h,e),sqrt:s||(h=>(l||(l=Rbe(e)),l(d,h))),toBytes:h=>r?zK(h,u):RC(h,u),fromBytes:(h,g=!0)=>{if(a){if(!a.includes(h.length)||h.length>u)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+h.length);const b=new Uint8Array(u);b.set(h,r?0:b.length-h.length),h=b}if(h.length!==u)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+h.length);let m=r?$m(h):m4(h);if(o&&(m=Fn(m,e)),!g&&!d.isValid(m))throw new Error("invalid field element: outside of range 0..ORDER");return m},invertBatch:h=>GK(d,h),cmov:(h,g,m)=>m?g:h});return Object.freeze(d)}function YK(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function JK(e){const t=YK(e);return t+Math.ceil(t/2)}function Ube(e,t,r=!1){const n=e.length,i=YK(t),s=JK(t);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const o=r?$m(e):m4(e),a=Fn(o,t-Hi)+Hi;return r?zK(a,i):RC(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Np=BigInt(0),ud=BigInt(1);function Nv(e,t){const r=t.negate();return e?r:t}function ld(e,t){const r=GK(e.Fp,t.map(n=>n.Z));return t.map((n,i)=>e.fromAffine(n.toAffine(r[i])))}function XK(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function E8(e,t){XK(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1),i=2**e,s=X2(e),o=BigInt(e);return{windows:r,windowSize:n,mask:s,maxNumber:i,shiftBy:o}}function gj(e,t,r){const{windowSize:n,mask:i,maxNumber:s,shiftBy:o}=r;let a=Number(e&i),c=e>>o;a>n&&(a-=s,c+=ud);const u=t*n,l=u+Math.abs(a)-1,d=a===0,h=a<0,g=t%2!==0;return{nextN:c,offset:l,isZero:d,isNeg:h,isNegF:g,offsetF:u}}function qbe(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function Hbe(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}const k8=new WeakMap,QK=new WeakMap;function A8(e){return QK.get(e)||1}function mj(e){if(e!==Np)throw new Error("invalid wNAF")}let eG=class{constructor(t,r){this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=r}_unsafeLadder(t,r,n=this.ZERO){let i=t;for(;r>Np;)r&ud&&(n=n.add(i)),i=i.double(),r>>=ud;return n}precomputeWindow(t,r){const{windows:n,windowSize:i}=E8(r,this.bits),s=[];let o=t,a=o;for(let c=0;c<n;c++){a=o,s.push(a);for(let u=1;u<i;u++)a=a.add(o),s.push(a);o=a.double()}return s}wNAF(t,r,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let i=this.ZERO,s=this.BASE;const o=E8(t,this.bits);for(let a=0;a<o.windows;a++){const{nextN:c,offset:u,isZero:l,isNeg:d,isNegF:h,offsetF:g}=gj(n,a,o);n=c,l?s=s.add(Nv(h,r[g])):i=i.add(Nv(d,r[u]))}return mj(n),{p:i,f:s}}wNAFUnsafe(t,r,n,i=this.ZERO){const s=E8(t,this.bits);for(let o=0;o<s.windows&&n!==Np;o++){const{nextN:a,offset:c,isZero:u,isNeg:l}=gj(n,o,s);if(n=a,!u){const d=r[c];i=i.add(l?d.negate():d)}}return mj(n),i}getPrecomputes(t,r,n){let i=k8.get(r);return i||(i=this.precomputeWindow(r,t),t!==1&&(typeof n=="function"&&(i=n(i)),k8.set(r,i))),i}cached(t,r,n){const i=A8(t);return this.wNAF(i,this.getPrecomputes(i,t,n),r)}unsafe(t,r,n,i){const s=A8(t);return s===1?this._unsafeLadder(t,r,i):this.wNAFUnsafe(s,this.getPrecomputes(s,t,n),r,i)}createCache(t,r){XK(r,this.bits),QK.set(t,r),k8.delete(t)}hasCache(t){return A8(t)!==1}};function Wbe(e,t,r,n){let i=t,s=e.ZERO,o=e.ZERO;for(;r>Np||n>Np;)r&ud&&(s=s.add(i)),n&ud&&(o=o.add(i)),i=i.double(),r>>=ud,n>>=ud;return{p1:s,p2:o}}function tG(e,t,r,n){qbe(r,e),Hbe(n,t);const i=r.length,s=n.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,a=BK(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const u=X2(c),l=new Array(Number(u)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c;let h=o;for(let g=d;g>=0;g-=c){l.fill(o);for(let b=0;b<s;b++){const k=n[b],w=Number(k>>BigInt(g)&u);l[w]=l[w].add(r[b])}let m=o;for(let b=l.length-1,k=o;b>0;b--)k=k.add(l[b]),m=m.add(k);if(h=h.add(m),g!==0)for(let b=0;b<c;b++)h=h.double()}return h}function bj(e,t,r){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Bbe(t),t}else return lh(e,{isLE:r})}function rG(e,t,r={},n){if(n===void 0&&(n=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(const c of["p","n","h"]){const u=t[c];if(!(typeof u=="bigint"&&u>Np))throw new Error(`CURVE.${c} must be positive bigint`)}const i=bj(t.p,r.Fp,n),s=bj(t.n,r.Fn,n),a=["Gx","Gy","a",e==="weierstrass"?"b":"d"];for(const c of a)if(!i.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wl=BigInt(0),hi=BigInt(1),S8=BigInt(2),Vbe=BigInt(8);function Kbe(e,t,r,n){const i=e.sqr(r),s=e.sqr(n),o=e.add(e.mul(t.a,i),s),a=e.add(e.ONE,e.mul(t.d,e.mul(i,s)));return e.eql(o,a)}function Gbe(e,t={}){const r=rG("edwards",e,t,t.FpFnLE),{Fp:n,Fn:i}=r;let s=r.CURVE;const{h:o}=s;Q2(t,{},{uvRatio:"function"});const a=S8<<BigInt(i.BYTES*8)-hi,c=k=>n.create(k),u=t.uvRatio||((k,w)=>{try{return{isValid:!0,value:n.sqrt(n.div(k,w))}}catch{return{isValid:!1,value:wl}}});if(!Kbe(n,s,s.Gx,s.Gy))throw new Error("bad curve params: generator point");function l(k,w,E=!1){const A=E?hi:wl;return VE("coordinate "+k,w,A,a),w}function d(k){if(!(k instanceof m))throw new Error("ExtendedPoint expected")}const h=Tv((k,w)=>{const{X:E,Y:A,Z:M}=k,R=k.is0();w==null&&(w=R?Vbe:n.inv(M));const N=c(E*w),z=c(A*w),F=n.mul(M,w);if(R)return{x:wl,y:hi};if(F!==hi)throw new Error("invZ was invalid");return{x:N,y:z}}),g=Tv(k=>{const{a:w,d:E}=s;if(k.is0())throw new Error("bad point: ZERO");const{X:A,Y:M,Z:R,T:N}=k,z=c(A*A),F=c(M*M),L=c(R*R),B=c(L*L),D=c(z*w),x=c(L*c(D+F)),y=c(B+c(E*c(z*F)));if(x!==y)throw new Error("bad point: equation left != right (1)");const f=c(A*M),p=c(R*N);if(f!==p)throw new Error("bad point: equation left != right (2)");return!0});class m{constructor(w,E,A,M){this.X=l("x",w),this.Y=l("y",E),this.Z=l("z",A,!0),this.T=l("t",M),Object.freeze(this)}static CURVE(){return s}static fromAffine(w){if(w instanceof m)throw new Error("extended point not allowed");const{x:E,y:A}=w||{};return l("x",E),l("y",A),new m(E,A,hi,c(E*A))}static fromBytes(w,E=!1){const A=n.BYTES,{a:M,d:R}=s;w=dj(Fa(w,A,"point")),Pd(E,"zip215");const N=dj(w),z=w[A-1];N[A-1]=z&-129;const F=$m(N),L=E?a:n.ORDER;VE("point.y",F,wl,L);const B=c(F*F),D=c(B-hi),x=c(R*B-M);let{isValid:y,value:f}=u(D,x);if(!y)throw new Error("bad point: invalid y coordinate");const p=(f&hi)===hi,v=(z&128)!==0;if(!E&&f===wl&&v)throw new Error("bad point: x=0 and x_0=1");return v!==p&&(f=c(-f)),m.fromAffine({x:f,y:F})}static fromHex(w,E=!1){return m.fromBytes(xn("point",w),E)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(w=8,E=!0){return b.createCache(this,w),E||this.multiply(S8),this}assertValidity(){g(this)}equals(w){d(w);const{X:E,Y:A,Z:M}=this,{X:R,Y:N,Z:z}=w,F=c(E*z),L=c(R*M),B=c(A*z),D=c(N*M);return F===L&&B===D}is0(){return this.equals(m.ZERO)}negate(){return new m(c(-this.X),this.Y,this.Z,c(-this.T))}double(){const{a:w}=s,{X:E,Y:A,Z:M}=this,R=c(E*E),N=c(A*A),z=c(S8*c(M*M)),F=c(w*R),L=E+A,B=c(c(L*L)-R-N),D=F+N,x=D-z,y=F-N,f=c(B*x),p=c(D*y),v=c(B*y),I=c(x*D);return new m(f,p,I,v)}add(w){d(w);const{a:E,d:A}=s,{X:M,Y:R,Z:N,T:z}=this,{X:F,Y:L,Z:B,T:D}=w,x=c(M*F),y=c(R*L),f=c(z*A*D),p=c(N*B),v=c((M+R)*(F+L)-x-y),I=p-f,j=p+f,$=c(y-E*x),C=c(v*I),O=c(j*$),_=c(v*$),P=c(I*j);return new m(C,O,P,_)}subtract(w){return this.add(w.negate())}multiply(w){if(!i.isValidNot0(w))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:E,f:A}=b.cached(this,w,M=>ld(m,M));return ld(m,[E,A])[0]}multiplyUnsafe(w,E=m.ZERO){if(!i.isValid(w))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return w===wl?m.ZERO:this.is0()||w===hi?this:b.unsafe(this,w,A=>ld(m,A),E)}isSmallOrder(){return this.multiplyUnsafe(o).is0()}isTorsionFree(){return b.unsafe(this,s.n).is0()}toAffine(w){return h(this,w)}clearCofactor(){return o===hi?this:this.multiplyUnsafe(o)}toBytes(){const{x:w,y:E}=this.toAffine(),A=n.toBytes(E);return A[A.length-1]|=w&hi?128:0,A}toHex(){return Ed(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(w){return ld(m,w)}static msm(w,E){return tG(m,i,w,E)}_setWindowSize(w){this.precompute(w)}toRawBytes(){return this.toBytes()}}m.BASE=new m(s.Gx,s.Gy,hi,c(s.Gx*s.Gy)),m.ZERO=new m(wl,hi,hi,wl),m.Fp=n,m.Fn=i;const b=new eG(m,i.BITS);return m.BASE.precompute(8),m}function Zbe(e,t,r={}){if(typeof t!="function")throw new Error('"hash" function param is required');Q2(r,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:n}=r,{BASE:i,Fp:s,Fn:o}=e,a=r.randomBytes||PC,c=r.adjustScalarBytes||(L=>L),u=r.domain||((L,B,D)=>{if(Pd(D,"phflag"),B.length||D)throw new Error("Contexts/pre-hash are not supported");return L});function l(L){return o.create($m(L))}function d(L){const B=A.secretKey;L=xn("private key",L,B);const D=xn("hashed private key",t(L),2*B),x=c(D.slice(0,B)),y=D.slice(B,2*B),f=l(x);return{head:x,prefix:y,scalar:f}}function h(L){const{head:B,prefix:D,scalar:x}=d(L),y=i.multiply(x),f=y.toBytes();return{head:B,prefix:D,scalar:x,point:y,pointBytes:f}}function g(L){return h(L).pointBytes}function m(L=Uint8Array.of(),...B){const D=Ic(...B);return l(t(u(D,xn("context",L),!!n)))}function b(L,B,D={}){L=xn("message",L),n&&(L=n(L));const{prefix:x,scalar:y,pointBytes:f}=h(B),p=m(D.context,x,L),v=i.multiply(p).toBytes(),I=m(D.context,v,f,L),j=o.create(p+I*y);if(!o.isValid(j))throw new Error("sign failed: invalid s");const $=Ic(v,o.toBytes(j));return Fa($,A.signature,"result")}const k={zip215:!0};function w(L,B,D,x=k){const{context:y,zip215:f}=x,p=A.signature;L=xn("signature",L,p),B=xn("message",B),D=xn("publicKey",D,A.publicKey),f!==void 0&&Pd(f,"zip215"),n&&(B=n(B));const v=p/2,I=L.subarray(0,v),j=$m(L.subarray(v,p));let $,C,O;try{$=e.fromBytes(D,f),C=e.fromBytes(I,f),O=i.multiplyUnsafe(j)}catch{return!1}if(!f&&$.isSmallOrder())return!1;const _=m(y,C.toBytes(),$.toBytes(),B);return C.add($.multiplyUnsafe(_)).subtract(O).clearCofactor().is0()}const E=s.BYTES,A={secretKey:E,publicKey:E,signature:2*E,seed:E};function M(L=a(A.seed)){return Fa(L,A.seed,"seed")}function R(L){const B=F.randomSecretKey(L);return{secretKey:B,publicKey:g(B)}}function N(L){return J2(L)&&L.length===o.BYTES}function z(L,B){try{return!!e.fromBytes(L,B)}catch{return!1}}const F={getExtendedPublicKey:h,randomSecretKey:M,isValidSecretKey:N,isValidPublicKey:z,toMontgomery(L){const{y:B}=e.fromBytes(L),D=A.publicKey,x=D===32;if(!x&&D!==57)throw new Error("only defined for 25519 and 448");const y=x?s.div(hi+B,hi-B):s.div(B-hi,B+hi);return s.toBytes(y)},toMontgomerySecret(L){const B=A.secretKey;Fa(L,B);const D=t(L.subarray(0,B));return c(D).subarray(0,B)},randomPrivateKey:M,precompute(L=8,B=e.BASE){return B.precompute(L,!1)}};return Object.freeze({keygen:R,getPublicKey:g,sign:b,verify:w,utils:F,Point:e,lengths:A})}function Ybe(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp,n=lh(t.n,e.nBitLength,!0),i={Fp:r,Fn:n,uvRatio:e.uvRatio},s={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:i,hash:e.hash,eddsaOpts:s}}function Jbe(e,t){const r=t.Point;return Object.assign({},t,{ExtendedPoint:r,CURVE:e,nBitLength:r.Fn.BITS,nByteLength:r.Fn.BYTES})}function Xbe(e){const{CURVE:t,curveOpts:r,hash:n,eddsaOpts:i}=Ybe(e),s=Gbe(t,r),o=Zbe(s,n,i);return Jbe(e,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Qbe=BigInt(1),yj=BigInt(2);BigInt(3);const eye=BigInt(5),tye=BigInt(8),zC=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),nG={p:zC,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:tye,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function rye(e){const t=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=zC,a=e*e%s*e%s,c=_n(a,yj,s)*a%s,u=_n(c,Qbe,s)*e%s,l=_n(u,eye,s)*u%s,d=_n(l,t,s)*l%s,h=_n(d,r,s)*d%s,g=_n(h,n,s)*h%s,m=_n(g,i,s)*g%s,b=_n(m,i,s)*g%s,k=_n(b,t,s)*l%s;return{pow_p_5_8:_n(k,yj,s)*e%s,b2:a}}function nye(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const wj=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function iye(e,t){const r=zC,n=Fn(t*t*t,r),i=Fn(n*n*t,r),s=rye(e*i).pow_p_5_8;let o=Fn(e*n*s,r);const a=Fn(t*o*o,r),c=o,u=Fn(o*wj,r),l=a===e,d=a===Fn(-e,r),h=a===Fn(-e*wj,r);return l&&(o=c),(d||h)&&(o=u),Lbe(o,r)&&(o=Fn(-o,r)),{isValid:l||d,value:o}}const sye=lh(nG.p,{isLE:!0}),oye={...nG,Fp:sye,hash:$be,adjustScalarBytes:nye,uvRatio:iye},eb=Xbe(oye);var zw={exports:{}},aye=zw.exports,vj;function cye(){return vj||(vj=1,function(e){(function(t,r){function n(y,f){if(!y)throw new Error(f||"Assertion failed")}function i(y,f){y.super_=f;var p=function(){};p.prototype=f.prototype,y.prototype=new p,y.prototype.constructor=y}function s(y,f,p){if(s.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(y||0,f||10,p||"be"))}typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=U2.Buffer}catch{}s.isBN=function(f){return f instanceof s?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===s.wordSize&&Array.isArray(f.words)},s.max=function(f,p){return f.cmp(p)>0?f:p},s.min=function(f,p){return f.cmp(p)<0?f:p},s.prototype._init=function(f,p,v){if(typeof f=="number")return this._initNumber(f,p,v);if(typeof f=="object")return this._initArray(f,p,v);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var I=0;f[0]==="-"&&(I++,this.negative=1),I<f.length&&(p===16?this._parseHex(f,I,v):(this._parseBase(f,p,I),v==="le"&&this._initArray(this.toArray(),p,v)))},s.prototype._initNumber=function(f,p,v){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(n(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),p,v)},s.prototype._initArray=function(f,p,v){if(n(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var j,$,C=0;if(v==="be")for(I=f.length-1,j=0;I>=0;I-=3)$=f[I]|f[I-1]<<8|f[I-2]<<16,this.words[j]|=$<<C&67108863,this.words[j+1]=$>>>26-C&67108863,C+=24,C>=26&&(C-=26,j++);else if(v==="le")for(I=0,j=0;I<f.length;I+=3)$=f[I]|f[I+1]<<8|f[I+2]<<16,this.words[j]|=$<<C&67108863,this.words[j+1]=$>>>26-C&67108863,C+=24,C>=26&&(C-=26,j++);return this._strip()};function a(y,f){var p=y.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+y)}function c(y,f,p){var v=a(y,p);return p-1>=f&&(v|=a(y,p-1)<<4),v}s.prototype._parseHex=function(f,p,v){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var j=0,$=0,C;if(v==="be")for(I=f.length-1;I>=p;I-=2)C=c(f,p,I)<<j,this.words[$]|=C&67108863,j>=18?(j-=18,$+=1,this.words[$]|=C>>>26):j+=8;else{var O=f.length-p;for(I=O%2===0?p+1:p;I<f.length;I+=2)C=c(f,p,I)<<j,this.words[$]|=C&67108863,j>=18?(j-=18,$+=1,this.words[$]|=C>>>26):j+=8}this._strip()};function u(y,f,p,v){for(var I=0,j=0,$=Math.min(y.length,p),C=f;C<$;C++){var O=y.charCodeAt(C)-48;I*=v,O>=49?j=O-49+10:O>=17?j=O-17+10:j=O,n(O>=0&&j<v,"Invalid character"),I+=j}return I}s.prototype._parseBase=function(f,p,v){this.words=[0],this.length=1;for(var I=0,j=1;j<=67108863;j*=p)I++;I--,j=j/p|0;for(var $=f.length-v,C=$%I,O=Math.min($,$-C)+v,_=0,P=v;P<O;P+=I)_=u(f,P,P+I,p),this.imuln(j),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_);if(C!==0){var q=1;for(_=u(f,P,f.length,p),P=0;P<C;P++)q*=p;this.imuln(q),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_)}this._strip()},s.prototype.copy=function(f){f.words=new Array(this.length);for(var p=0;p<this.length;p++)f.words[p]=this.words[p];f.length=this.length,f.negative=this.negative,f.red=this.red};function l(y,f){y.words=f.words,y.length=f.length,y.negative=f.negative,y.red=f.red}if(s.prototype._move=function(f){l(f,this)},s.prototype.clone=function(){var f=new s(null);return this.copy(f),f},s.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(f,p){f=f||10,p=p|0||1;var v;if(f===16||f==="hex"){v="";for(var I=0,j=0,$=0;$<this.length;$++){var C=this.words[$],O=((C<<I|j)&16777215).toString(16);j=C>>>24-I&16777215,I+=2,I>=26&&(I-=26,$--),j!==0||$!==this.length-1?v=h[6-O.length]+O+v:v=O+v}for(j!==0&&(v=j.toString(16)+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(f===(f|0)&&f>=2&&f<=36){var _=g[f],P=m[f];v="";var q=this.clone();for(q.negative=0;!q.isZero();){var W=q.modrn(P).toString(f);q=q.idivn(P),q.isZero()?v=W+v:v=h[_-W.length]+W+v}for(this.isZero()&&(v="0"+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(f,p){return this.toArrayLike(o,f,p)}),s.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var b=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};s.prototype.toArrayLike=function(f,p,v){this._strip();var I=this.byteLength(),j=v||Math.max(1,I);n(I<=j,"byte array longer than desired length"),n(j>0,"Requested array length <= 0");var $=b(f,j),C=p==="le"?"LE":"BE";return this["_toArrayLike"+C]($,I),$},s.prototype._toArrayLikeLE=function(f,p){for(var v=0,I=0,j=0,$=0;j<this.length;j++){var C=this.words[j]<<$|I;f[v++]=C&255,v<f.length&&(f[v++]=C>>8&255),v<f.length&&(f[v++]=C>>16&255),$===6?(v<f.length&&(f[v++]=C>>24&255),I=0,$=0):(I=C>>>24,$+=2)}if(v<f.length)for(f[v++]=I;v<f.length;)f[v++]=0},s.prototype._toArrayLikeBE=function(f,p){for(var v=f.length-1,I=0,j=0,$=0;j<this.length;j++){var C=this.words[j]<<$|I;f[v--]=C&255,v>=0&&(f[v--]=C>>8&255),v>=0&&(f[v--]=C>>16&255),$===6?(v>=0&&(f[v--]=C>>24&255),I=0,$=0):(I=C>>>24,$+=2)}if(v>=0)for(f[v--]=I;v>=0;)f[v--]=0},Math.clz32?s.prototype._countBits=function(f){return 32-Math.clz32(f)}:s.prototype._countBits=function(f){var p=f,v=0;return p>=4096&&(v+=13,p>>>=13),p>=64&&(v+=7,p>>>=7),p>=8&&(v+=4,p>>>=4),p>=2&&(v+=2,p>>>=2),v+p},s.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,v=0;return(p&8191)===0&&(v+=13,p>>>=13),(p&127)===0&&(v+=7,p>>>=7),(p&15)===0&&(v+=4,p>>>=4),(p&3)===0&&(v+=2,p>>>=2),(p&1)===0&&v++,v},s.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function k(y){for(var f=new Array(y.bitLength()),p=0;p<f.length;p++){var v=p/26|0,I=p%26;f[p]=y.words[v]>>>I&1}return f}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;p<this.length;p++){var v=this._zeroBits(this.words[p]);if(f+=v,v!==26)break}return f},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},s.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var p=0;p<f.length;p++)this.words[p]=this.words[p]|f.words[p];return this._strip()},s.prototype.ior=function(f){return n((this.negative|f.negative)===0),this.iuor(f)},s.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},s.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},s.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var v=0;v<p.length;v++)this.words[v]=this.words[v]&f.words[v];return this.length=p.length,this._strip()},s.prototype.iand=function(f){return n((this.negative|f.negative)===0),this.iuand(f)},s.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},s.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},s.prototype.iuxor=function(f){var p,v;this.length>f.length?(p=this,v=f):(p=f,v=this);for(var I=0;I<v.length;I++)this.words[I]=p.words[I]^v.words[I];if(this!==p)for(;I<p.length;I++)this.words[I]=p.words[I];return this.length=p.length,this._strip()},s.prototype.ixor=function(f){return n((this.negative|f.negative)===0),this.iuxor(f)},s.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},s.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},s.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,v=f%26;this._expand(p),v>0&&p--;for(var I=0;I<p;I++)this.words[I]=~this.words[I]&67108863;return v>0&&(this.words[I]=~this.words[I]&67108863>>26-v),this._strip()},s.prototype.notn=function(f){return this.clone().inotn(f)},s.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var v=f/26|0,I=f%26;return this._expand(v+1),p?this.words[v]=this.words[v]|1<<I:this.words[v]=this.words[v]&~(1<<I),this._strip()},s.prototype.iadd=function(f){var p;if(this.negative!==0&&f.negative===0)return this.negative=0,p=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,p=this.isub(f),f.negative=1,p._normSign();var v,I;this.length>f.length?(v=this,I=f):(v=f,I=this);for(var j=0,$=0;$<I.length;$++)p=(v.words[$]|0)+(I.words[$]|0)+j,this.words[$]=p&67108863,j=p>>>26;for(;j!==0&&$<v.length;$++)p=(v.words[$]|0)+j,this.words[$]=p&67108863,j=p>>>26;if(this.length=v.length,j!==0)this.words[this.length]=j,this.length++;else if(v!==this)for(;$<v.length;$++)this.words[$]=v.words[$];return this},s.prototype.add=function(f){var p;return f.negative!==0&&this.negative===0?(f.negative=0,p=this.sub(f),f.negative^=1,p):f.negative===0&&this.negative!==0?(this.negative=0,p=f.sub(this),this.negative=1,p):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},s.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var v=this.cmp(f);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,j;v>0?(I=this,j=f):(I=f,j=this);for(var $=0,C=0;C<j.length;C++)p=(I.words[C]|0)-(j.words[C]|0)+$,$=p>>26,this.words[C]=p&67108863;for(;$!==0&&C<I.length;C++)p=(I.words[C]|0)+$,$=p>>26,this.words[C]=p&67108863;if($===0&&C<I.length&&I!==this)for(;C<I.length;C++)this.words[C]=I.words[C];return this.length=Math.max(this.length,C),I!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(f){return this.clone().isub(f)};function w(y,f,p){p.negative=f.negative^y.negative;var v=y.length+f.length|0;p.length=v,v=v-1|0;var I=y.words[0]|0,j=f.words[0]|0,$=I*j,C=$&67108863,O=$/67108864|0;p.words[0]=C;for(var _=1;_<v;_++){for(var P=O>>>26,q=O&67108863,W=Math.min(_,f.length-1),K=Math.max(0,_-y.length+1);K<=W;K++){var Y=_-K|0;I=y.words[Y]|0,j=f.words[K]|0,$=I*j+q,P+=$/67108864|0,q=$&67108863}p.words[_]=q|0,O=P|0}return O!==0?p.words[_]=O|0:p.length--,p._strip()}var E=function(f,p,v){var I=f.words,j=p.words,$=v.words,C=0,O,_,P,q=I[0]|0,W=q&8191,K=q>>>13,Y=I[1]|0,te=Y&8191,re=Y>>>13,be=I[2]|0,ve=be&8191,ye=be>>>13,Se=I[3]|0,_e=Se&8191,ke=Se>>>13,it=I[4]|0,Re=it&8191,J=it>>>13,ne=I[5]|0,le=ne&8191,he=ne>>>13,Pe=I[6]|0,xe=Pe&8191,oe=Pe>>>13,me=I[7]|0,je=me&8191,U=me>>>13,S=I[8]|0,T=S&8191,H=S>>>13,V=I[9]|0,G=V&8191,Z=V>>>13,Ee=j[0]|0,Ie=Ee&8191,ee=Ee>>>13,se=j[1]|0,we=se&8191,Te=se>>>13,yt=j[2]|0,De=yt&8191,Ke=yt>>>13,qt=j[3]|0,ut=qt&8191,We=qt>>>13,er=j[4]|0,wt=er&8191,qe=er>>>13,_r=j[5]|0,It=_r&8191,tt=_r>>>13,tr=j[6]|0,St=tr&8191,Ye=tr>>>13,rr=j[7]|0,mt=rr&8191,rt=rr>>>13,xr=j[8]|0,Ct=xr&8191,nt=xr>>>13,ar=j[9]|0,pt=ar&8191,Mt=ar>>>13;v.negative=f.negative^p.negative,v.length=19,O=Math.imul(W,Ie),_=Math.imul(W,ee),_=_+Math.imul(K,Ie)|0,P=Math.imul(K,ee);var Ii=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,O=Math.imul(te,Ie),_=Math.imul(te,ee),_=_+Math.imul(re,Ie)|0,P=Math.imul(re,ee),O=O+Math.imul(W,we)|0,_=_+Math.imul(W,Te)|0,_=_+Math.imul(K,we)|0,P=P+Math.imul(K,Te)|0;var Dn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,O=Math.imul(ve,Ie),_=Math.imul(ve,ee),_=_+Math.imul(ye,Ie)|0,P=Math.imul(ye,ee),O=O+Math.imul(te,we)|0,_=_+Math.imul(te,Te)|0,_=_+Math.imul(re,we)|0,P=P+Math.imul(re,Te)|0,O=O+Math.imul(W,De)|0,_=_+Math.imul(W,Ke)|0,_=_+Math.imul(K,De)|0,P=P+Math.imul(K,Ke)|0;var si=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(si>>>26)|0,si&=67108863,O=Math.imul(_e,Ie),_=Math.imul(_e,ee),_=_+Math.imul(ke,Ie)|0,P=Math.imul(ke,ee),O=O+Math.imul(ve,we)|0,_=_+Math.imul(ve,Te)|0,_=_+Math.imul(ye,we)|0,P=P+Math.imul(ye,Te)|0,O=O+Math.imul(te,De)|0,_=_+Math.imul(te,Ke)|0,_=_+Math.imul(re,De)|0,P=P+Math.imul(re,Ke)|0,O=O+Math.imul(W,ut)|0,_=_+Math.imul(W,We)|0,_=_+Math.imul(K,ut)|0,P=P+Math.imul(K,We)|0;var ms=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ms>>>26)|0,ms&=67108863,O=Math.imul(Re,Ie),_=Math.imul(Re,ee),_=_+Math.imul(J,Ie)|0,P=Math.imul(J,ee),O=O+Math.imul(_e,we)|0,_=_+Math.imul(_e,Te)|0,_=_+Math.imul(ke,we)|0,P=P+Math.imul(ke,Te)|0,O=O+Math.imul(ve,De)|0,_=_+Math.imul(ve,Ke)|0,_=_+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0,O=O+Math.imul(te,ut)|0,_=_+Math.imul(te,We)|0,_=_+Math.imul(re,ut)|0,P=P+Math.imul(re,We)|0,O=O+Math.imul(W,wt)|0,_=_+Math.imul(W,qe)|0,_=_+Math.imul(K,wt)|0,P=P+Math.imul(K,qe)|0;var wn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(wn>>>26)|0,wn&=67108863,O=Math.imul(le,Ie),_=Math.imul(le,ee),_=_+Math.imul(he,Ie)|0,P=Math.imul(he,ee),O=O+Math.imul(Re,we)|0,_=_+Math.imul(Re,Te)|0,_=_+Math.imul(J,we)|0,P=P+Math.imul(J,Te)|0,O=O+Math.imul(_e,De)|0,_=_+Math.imul(_e,Ke)|0,_=_+Math.imul(ke,De)|0,P=P+Math.imul(ke,Ke)|0,O=O+Math.imul(ve,ut)|0,_=_+Math.imul(ve,We)|0,_=_+Math.imul(ye,ut)|0,P=P+Math.imul(ye,We)|0,O=O+Math.imul(te,wt)|0,_=_+Math.imul(te,qe)|0,_=_+Math.imul(re,wt)|0,P=P+Math.imul(re,qe)|0,O=O+Math.imul(W,It)|0,_=_+Math.imul(W,tt)|0,_=_+Math.imul(K,It)|0,P=P+Math.imul(K,tt)|0;var ro=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ro>>>26)|0,ro&=67108863,O=Math.imul(xe,Ie),_=Math.imul(xe,ee),_=_+Math.imul(oe,Ie)|0,P=Math.imul(oe,ee),O=O+Math.imul(le,we)|0,_=_+Math.imul(le,Te)|0,_=_+Math.imul(he,we)|0,P=P+Math.imul(he,Te)|0,O=O+Math.imul(Re,De)|0,_=_+Math.imul(Re,Ke)|0,_=_+Math.imul(J,De)|0,P=P+Math.imul(J,Ke)|0,O=O+Math.imul(_e,ut)|0,_=_+Math.imul(_e,We)|0,_=_+Math.imul(ke,ut)|0,P=P+Math.imul(ke,We)|0,O=O+Math.imul(ve,wt)|0,_=_+Math.imul(ve,qe)|0,_=_+Math.imul(ye,wt)|0,P=P+Math.imul(ye,qe)|0,O=O+Math.imul(te,It)|0,_=_+Math.imul(te,tt)|0,_=_+Math.imul(re,It)|0,P=P+Math.imul(re,tt)|0,O=O+Math.imul(W,St)|0,_=_+Math.imul(W,Ye)|0,_=_+Math.imul(K,St)|0,P=P+Math.imul(K,Ye)|0;var no=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(no>>>26)|0,no&=67108863,O=Math.imul(je,Ie),_=Math.imul(je,ee),_=_+Math.imul(U,Ie)|0,P=Math.imul(U,ee),O=O+Math.imul(xe,we)|0,_=_+Math.imul(xe,Te)|0,_=_+Math.imul(oe,we)|0,P=P+Math.imul(oe,Te)|0,O=O+Math.imul(le,De)|0,_=_+Math.imul(le,Ke)|0,_=_+Math.imul(he,De)|0,P=P+Math.imul(he,Ke)|0,O=O+Math.imul(Re,ut)|0,_=_+Math.imul(Re,We)|0,_=_+Math.imul(J,ut)|0,P=P+Math.imul(J,We)|0,O=O+Math.imul(_e,wt)|0,_=_+Math.imul(_e,qe)|0,_=_+Math.imul(ke,wt)|0,P=P+Math.imul(ke,qe)|0,O=O+Math.imul(ve,It)|0,_=_+Math.imul(ve,tt)|0,_=_+Math.imul(ye,It)|0,P=P+Math.imul(ye,tt)|0,O=O+Math.imul(te,St)|0,_=_+Math.imul(te,Ye)|0,_=_+Math.imul(re,St)|0,P=P+Math.imul(re,Ye)|0,O=O+Math.imul(W,mt)|0,_=_+Math.imul(W,rt)|0,_=_+Math.imul(K,mt)|0,P=P+Math.imul(K,rt)|0;var io=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(io>>>26)|0,io&=67108863,O=Math.imul(T,Ie),_=Math.imul(T,ee),_=_+Math.imul(H,Ie)|0,P=Math.imul(H,ee),O=O+Math.imul(je,we)|0,_=_+Math.imul(je,Te)|0,_=_+Math.imul(U,we)|0,P=P+Math.imul(U,Te)|0,O=O+Math.imul(xe,De)|0,_=_+Math.imul(xe,Ke)|0,_=_+Math.imul(oe,De)|0,P=P+Math.imul(oe,Ke)|0,O=O+Math.imul(le,ut)|0,_=_+Math.imul(le,We)|0,_=_+Math.imul(he,ut)|0,P=P+Math.imul(he,We)|0,O=O+Math.imul(Re,wt)|0,_=_+Math.imul(Re,qe)|0,_=_+Math.imul(J,wt)|0,P=P+Math.imul(J,qe)|0,O=O+Math.imul(_e,It)|0,_=_+Math.imul(_e,tt)|0,_=_+Math.imul(ke,It)|0,P=P+Math.imul(ke,tt)|0,O=O+Math.imul(ve,St)|0,_=_+Math.imul(ve,Ye)|0,_=_+Math.imul(ye,St)|0,P=P+Math.imul(ye,Ye)|0,O=O+Math.imul(te,mt)|0,_=_+Math.imul(te,rt)|0,_=_+Math.imul(re,mt)|0,P=P+Math.imul(re,rt)|0,O=O+Math.imul(W,Ct)|0,_=_+Math.imul(W,nt)|0,_=_+Math.imul(K,Ct)|0,P=P+Math.imul(K,nt)|0;var so=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(so>>>26)|0,so&=67108863,O=Math.imul(G,Ie),_=Math.imul(G,ee),_=_+Math.imul(Z,Ie)|0,P=Math.imul(Z,ee),O=O+Math.imul(T,we)|0,_=_+Math.imul(T,Te)|0,_=_+Math.imul(H,we)|0,P=P+Math.imul(H,Te)|0,O=O+Math.imul(je,De)|0,_=_+Math.imul(je,Ke)|0,_=_+Math.imul(U,De)|0,P=P+Math.imul(U,Ke)|0,O=O+Math.imul(xe,ut)|0,_=_+Math.imul(xe,We)|0,_=_+Math.imul(oe,ut)|0,P=P+Math.imul(oe,We)|0,O=O+Math.imul(le,wt)|0,_=_+Math.imul(le,qe)|0,_=_+Math.imul(he,wt)|0,P=P+Math.imul(he,qe)|0,O=O+Math.imul(Re,It)|0,_=_+Math.imul(Re,tt)|0,_=_+Math.imul(J,It)|0,P=P+Math.imul(J,tt)|0,O=O+Math.imul(_e,St)|0,_=_+Math.imul(_e,Ye)|0,_=_+Math.imul(ke,St)|0,P=P+Math.imul(ke,Ye)|0,O=O+Math.imul(ve,mt)|0,_=_+Math.imul(ve,rt)|0,_=_+Math.imul(ye,mt)|0,P=P+Math.imul(ye,rt)|0,O=O+Math.imul(te,Ct)|0,_=_+Math.imul(te,nt)|0,_=_+Math.imul(re,Ct)|0,P=P+Math.imul(re,nt)|0,O=O+Math.imul(W,pt)|0,_=_+Math.imul(W,Mt)|0,_=_+Math.imul(K,pt)|0,P=P+Math.imul(K,Mt)|0;var oo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(oo>>>26)|0,oo&=67108863,O=Math.imul(G,we),_=Math.imul(G,Te),_=_+Math.imul(Z,we)|0,P=Math.imul(Z,Te),O=O+Math.imul(T,De)|0,_=_+Math.imul(T,Ke)|0,_=_+Math.imul(H,De)|0,P=P+Math.imul(H,Ke)|0,O=O+Math.imul(je,ut)|0,_=_+Math.imul(je,We)|0,_=_+Math.imul(U,ut)|0,P=P+Math.imul(U,We)|0,O=O+Math.imul(xe,wt)|0,_=_+Math.imul(xe,qe)|0,_=_+Math.imul(oe,wt)|0,P=P+Math.imul(oe,qe)|0,O=O+Math.imul(le,It)|0,_=_+Math.imul(le,tt)|0,_=_+Math.imul(he,It)|0,P=P+Math.imul(he,tt)|0,O=O+Math.imul(Re,St)|0,_=_+Math.imul(Re,Ye)|0,_=_+Math.imul(J,St)|0,P=P+Math.imul(J,Ye)|0,O=O+Math.imul(_e,mt)|0,_=_+Math.imul(_e,rt)|0,_=_+Math.imul(ke,mt)|0,P=P+Math.imul(ke,rt)|0,O=O+Math.imul(ve,Ct)|0,_=_+Math.imul(ve,nt)|0,_=_+Math.imul(ye,Ct)|0,P=P+Math.imul(ye,nt)|0,O=O+Math.imul(te,pt)|0,_=_+Math.imul(te,Mt)|0,_=_+Math.imul(re,pt)|0,P=P+Math.imul(re,Mt)|0;var Ji=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Ji>>>26)|0,Ji&=67108863,O=Math.imul(G,De),_=Math.imul(G,Ke),_=_+Math.imul(Z,De)|0,P=Math.imul(Z,Ke),O=O+Math.imul(T,ut)|0,_=_+Math.imul(T,We)|0,_=_+Math.imul(H,ut)|0,P=P+Math.imul(H,We)|0,O=O+Math.imul(je,wt)|0,_=_+Math.imul(je,qe)|0,_=_+Math.imul(U,wt)|0,P=P+Math.imul(U,qe)|0,O=O+Math.imul(xe,It)|0,_=_+Math.imul(xe,tt)|0,_=_+Math.imul(oe,It)|0,P=P+Math.imul(oe,tt)|0,O=O+Math.imul(le,St)|0,_=_+Math.imul(le,Ye)|0,_=_+Math.imul(he,St)|0,P=P+Math.imul(he,Ye)|0,O=O+Math.imul(Re,mt)|0,_=_+Math.imul(Re,rt)|0,_=_+Math.imul(J,mt)|0,P=P+Math.imul(J,rt)|0,O=O+Math.imul(_e,Ct)|0,_=_+Math.imul(_e,nt)|0,_=_+Math.imul(ke,Ct)|0,P=P+Math.imul(ke,nt)|0,O=O+Math.imul(ve,pt)|0,_=_+Math.imul(ve,Mt)|0,_=_+Math.imul(ye,pt)|0,P=P+Math.imul(ye,Mt)|0;var ao=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ao>>>26)|0,ao&=67108863,O=Math.imul(G,ut),_=Math.imul(G,We),_=_+Math.imul(Z,ut)|0,P=Math.imul(Z,We),O=O+Math.imul(T,wt)|0,_=_+Math.imul(T,qe)|0,_=_+Math.imul(H,wt)|0,P=P+Math.imul(H,qe)|0,O=O+Math.imul(je,It)|0,_=_+Math.imul(je,tt)|0,_=_+Math.imul(U,It)|0,P=P+Math.imul(U,tt)|0,O=O+Math.imul(xe,St)|0,_=_+Math.imul(xe,Ye)|0,_=_+Math.imul(oe,St)|0,P=P+Math.imul(oe,Ye)|0,O=O+Math.imul(le,mt)|0,_=_+Math.imul(le,rt)|0,_=_+Math.imul(he,mt)|0,P=P+Math.imul(he,rt)|0,O=O+Math.imul(Re,Ct)|0,_=_+Math.imul(Re,nt)|0,_=_+Math.imul(J,Ct)|0,P=P+Math.imul(J,nt)|0,O=O+Math.imul(_e,pt)|0,_=_+Math.imul(_e,Mt)|0,_=_+Math.imul(ke,pt)|0,P=P+Math.imul(ke,Mt)|0;var co=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(co>>>26)|0,co&=67108863,O=Math.imul(G,wt),_=Math.imul(G,qe),_=_+Math.imul(Z,wt)|0,P=Math.imul(Z,qe),O=O+Math.imul(T,It)|0,_=_+Math.imul(T,tt)|0,_=_+Math.imul(H,It)|0,P=P+Math.imul(H,tt)|0,O=O+Math.imul(je,St)|0,_=_+Math.imul(je,Ye)|0,_=_+Math.imul(U,St)|0,P=P+Math.imul(U,Ye)|0,O=O+Math.imul(xe,mt)|0,_=_+Math.imul(xe,rt)|0,_=_+Math.imul(oe,mt)|0,P=P+Math.imul(oe,rt)|0,O=O+Math.imul(le,Ct)|0,_=_+Math.imul(le,nt)|0,_=_+Math.imul(he,Ct)|0,P=P+Math.imul(he,nt)|0,O=O+Math.imul(Re,pt)|0,_=_+Math.imul(Re,Mt)|0,_=_+Math.imul(J,pt)|0,P=P+Math.imul(J,Mt)|0;var Rn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Rn>>>26)|0,Rn&=67108863,O=Math.imul(G,It),_=Math.imul(G,tt),_=_+Math.imul(Z,It)|0,P=Math.imul(Z,tt),O=O+Math.imul(T,St)|0,_=_+Math.imul(T,Ye)|0,_=_+Math.imul(H,St)|0,P=P+Math.imul(H,Ye)|0,O=O+Math.imul(je,mt)|0,_=_+Math.imul(je,rt)|0,_=_+Math.imul(U,mt)|0,P=P+Math.imul(U,rt)|0,O=O+Math.imul(xe,Ct)|0,_=_+Math.imul(xe,nt)|0,_=_+Math.imul(oe,Ct)|0,P=P+Math.imul(oe,nt)|0,O=O+Math.imul(le,pt)|0,_=_+Math.imul(le,Mt)|0,_=_+Math.imul(he,pt)|0,P=P+Math.imul(he,Mt)|0;var uo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(uo>>>26)|0,uo&=67108863,O=Math.imul(G,St),_=Math.imul(G,Ye),_=_+Math.imul(Z,St)|0,P=Math.imul(Z,Ye),O=O+Math.imul(T,mt)|0,_=_+Math.imul(T,rt)|0,_=_+Math.imul(H,mt)|0,P=P+Math.imul(H,rt)|0,O=O+Math.imul(je,Ct)|0,_=_+Math.imul(je,nt)|0,_=_+Math.imul(U,Ct)|0,P=P+Math.imul(U,nt)|0,O=O+Math.imul(xe,pt)|0,_=_+Math.imul(xe,Mt)|0,_=_+Math.imul(oe,pt)|0,P=P+Math.imul(oe,Mt)|0;var lo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(lo>>>26)|0,lo&=67108863,O=Math.imul(G,mt),_=Math.imul(G,rt),_=_+Math.imul(Z,mt)|0,P=Math.imul(Z,rt),O=O+Math.imul(T,Ct)|0,_=_+Math.imul(T,nt)|0,_=_+Math.imul(H,Ct)|0,P=P+Math.imul(H,nt)|0,O=O+Math.imul(je,pt)|0,_=_+Math.imul(je,Mt)|0,_=_+Math.imul(U,pt)|0,P=P+Math.imul(U,Mt)|0;var fo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(fo>>>26)|0,fo&=67108863,O=Math.imul(G,Ct),_=Math.imul(G,nt),_=_+Math.imul(Z,Ct)|0,P=Math.imul(Z,nt),O=O+Math.imul(T,pt)|0,_=_+Math.imul(T,Mt)|0,_=_+Math.imul(H,pt)|0,P=P+Math.imul(H,Mt)|0;var ru=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ru>>>26)|0,ru&=67108863,O=Math.imul(G,pt),_=Math.imul(G,Mt),_=_+Math.imul(Z,pt)|0,P=Math.imul(Z,Mt);var nu=(C+O|0)+((_&8191)<<13)|0;return C=(P+(_>>>13)|0)+(nu>>>26)|0,nu&=67108863,$[0]=Ii,$[1]=Dn,$[2]=si,$[3]=ms,$[4]=wn,$[5]=ro,$[6]=no,$[7]=io,$[8]=so,$[9]=oo,$[10]=Ji,$[11]=ao,$[12]=co,$[13]=Rn,$[14]=uo,$[15]=lo,$[16]=fo,$[17]=ru,$[18]=nu,C!==0&&($[19]=C,v.length++),v};Math.imul||(E=w);function A(y,f,p){p.negative=f.negative^y.negative,p.length=y.length+f.length;for(var v=0,I=0,j=0;j<p.length-1;j++){var $=I;I=0;for(var C=v&67108863,O=Math.min(j,f.length-1),_=Math.max(0,j-y.length+1);_<=O;_++){var P=j-_,q=y.words[P]|0,W=f.words[_]|0,K=q*W,Y=K&67108863;$=$+(K/67108864|0)|0,Y=Y+C|0,C=Y&67108863,$=$+(Y>>>26)|0,I+=$>>>26,$&=67108863}p.words[j]=C,v=$,$=I}return v!==0?p.words[j]=v:p.length--,p._strip()}function M(y,f,p){return A(y,f,p)}s.prototype.mulTo=function(f,p){var v,I=this.length+f.length;return this.length===10&&f.length===10?v=E(this,f,p):I<63?v=w(this,f,p):I<1024?v=A(this,f,p):v=M(this,f,p),v},s.prototype.mul=function(f){var p=new s(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},s.prototype.mulf=function(f){var p=new s(null);return p.words=new Array(this.length+f.length),M(this,f,p)},s.prototype.imul=function(f){return this.clone().mulTo(f,this)},s.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var v=0,I=0;I<this.length;I++){var j=(this.words[I]|0)*f,$=(j&67108863)+(v&67108863);v>>=26,v+=j/67108864|0,v+=$>>>26,this.words[I]=$&67108863}return v!==0&&(this.words[I]=v,this.length++),this.length=f===0?1:this.length,p?this.ineg():this},s.prototype.muln=function(f){return this.clone().imuln(f)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(f){var p=k(f);if(p.length===0)return new s(1);for(var v=this,I=0;I<p.length&&p[I]===0;I++,v=v.sqr());if(++I<p.length)for(var j=v.sqr();I<p.length;I++,j=j.sqr())p[I]!==0&&(v=v.mul(j));return v},s.prototype.iushln=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26,I=67108863>>>26-p<<26-p,j;if(p!==0){var $=0;for(j=0;j<this.length;j++){var C=this.words[j]&I,O=(this.words[j]|0)-C<<p;this.words[j]=O|$,$=C>>>26-p}$&&(this.words[j]=$,this.length++)}if(v!==0){for(j=this.length-1;j>=0;j--)this.words[j+v]=this.words[j];for(j=0;j<v;j++)this.words[j]=0;this.length+=v}return this._strip()},s.prototype.ishln=function(f){return n(this.negative===0),this.iushln(f)},s.prototype.iushrn=function(f,p,v){n(typeof f=="number"&&f>=0);var I;p?I=(p-p%26)/26:I=0;var j=f%26,$=Math.min((f-j)/26,this.length),C=67108863^67108863>>>j<<j,O=v;if(I-=$,I=Math.max(0,I),O){for(var _=0;_<$;_++)O.words[_]=this.words[_];O.length=$}if($!==0)if(this.length>$)for(this.length-=$,_=0;_<this.length;_++)this.words[_]=this.words[_+$];else this.words[0]=0,this.length=1;var P=0;for(_=this.length-1;_>=0&&(P!==0||_>=I);_--){var q=this.words[_]|0;this.words[_]=P<<26-j|q>>>j,P=q&C}return O&&P!==0&&(O.words[O.length++]=P),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(f,p,v){return n(this.negative===0),this.iushrn(f,p,v)},s.prototype.shln=function(f){return this.clone().ishln(f)},s.prototype.ushln=function(f){return this.clone().iushln(f)},s.prototype.shrn=function(f){return this.clone().ishrn(f)},s.prototype.ushrn=function(f){return this.clone().iushrn(f)},s.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26,I=1<<p;if(this.length<=v)return!1;var j=this.words[v];return!!(j&I)},s.prototype.imaskn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(p!==0&&v++,this.length=Math.min(v,this.length),p!==0){var I=67108863^67108863>>>p<<p;this.words[this.length-1]&=I}return this._strip()},s.prototype.maskn=function(f){return this.clone().imaskn(f)},s.prototype.iaddn=function(f){return n(typeof f=="number"),n(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},s.prototype._iaddn=function(f){this.words[0]+=f;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},s.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this._strip()},s.prototype.addn=function(f){return this.clone().iaddn(f)},s.prototype.subn=function(f){return this.clone().isubn(f)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(f,p,v){var I=f.length+v,j;this._expand(I);var $,C=0;for(j=0;j<f.length;j++){$=(this.words[j+v]|0)+C;var O=(f.words[j]|0)*p;$-=O&67108863,C=($>>26)-(O/67108864|0),this.words[j+v]=$&67108863}for(;j<this.length-v;j++)$=(this.words[j+v]|0)+C,C=$>>26,this.words[j+v]=$&67108863;if(C===0)return this._strip();for(n(C===-1),C=0,j=0;j<this.length;j++)$=-(this.words[j]|0)+C,C=$>>26,this.words[j]=$&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(f,p){var v=this.length-f.length,I=this.clone(),j=f,$=j.words[j.length-1]|0,C=this._countBits($);v=26-C,v!==0&&(j=j.ushln(v),I.iushln(v),$=j.words[j.length-1]|0);var O=I.length-j.length,_;if(p!=="mod"){_=new s(null),_.length=O+1,_.words=new Array(_.length);for(var P=0;P<_.length;P++)_.words[P]=0}var q=I.clone()._ishlnsubmul(j,1,O);q.negative===0&&(I=q,_&&(_.words[O]=1));for(var W=O-1;W>=0;W--){var K=(I.words[j.length+W]|0)*67108864+(I.words[j.length+W-1]|0);for(K=Math.min(K/$|0,67108863),I._ishlnsubmul(j,K,W);I.negative!==0;)K--,I.negative=0,I._ishlnsubmul(j,1,W),I.isZero()||(I.negative^=1);_&&(_.words[W]=K)}return _&&_._strip(),I._strip(),p!=="div"&&v!==0&&I.iushrn(v),{div:_||null,mod:I}},s.prototype.divmod=function(f,p,v){if(n(!f.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var I,j,$;return this.negative!==0&&f.negative===0?($=this.neg().divmod(f,p),p!=="mod"&&(I=$.div.neg()),p!=="div"&&(j=$.mod.neg(),v&&j.negative!==0&&j.iadd(f)),{div:I,mod:j}):this.negative===0&&f.negative!==0?($=this.divmod(f.neg(),p),p!=="mod"&&(I=$.div.neg()),{div:I,mod:$.mod}):(this.negative&f.negative)!==0?($=this.neg().divmod(f.neg(),p),p!=="div"&&(j=$.mod.neg(),v&&j.negative!==0&&j.isub(f)),{div:$.div,mod:j}):f.length>this.length||this.cmp(f)<0?{div:new s(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new s(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new s(this.modrn(f.words[0]))}:this._wordDiv(f,p)},s.prototype.div=function(f){return this.divmod(f,"div",!1).div},s.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},s.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},s.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var v=p.div.negative!==0?p.mod.isub(f):p.mod,I=f.ushrn(1),j=f.andln(1),$=v.cmp(I);return $<0||j===1&&$===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},s.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var v=(1<<26)%f,I=0,j=this.length-1;j>=0;j--)I=(v*I+(this.words[j]|0))%f;return p?-I:I},s.prototype.modn=function(f){return this.modrn(f)},s.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var v=0,I=this.length-1;I>=0;I--){var j=(this.words[I]|0)+v*67108864;this.words[I]=j/f|0,v=j%f}return this._strip(),p?this.ineg():this},s.prototype.divn=function(f){return this.clone().idivn(f)},s.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,v=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var I=new s(1),j=new s(0),$=new s(0),C=new s(1),O=0;p.isEven()&&v.isEven();)p.iushrn(1),v.iushrn(1),++O;for(var _=v.clone(),P=p.clone();!p.isZero();){for(var q=0,W=1;(p.words[0]&W)===0&&q<26;++q,W<<=1);if(q>0)for(p.iushrn(q);q-- >0;)(I.isOdd()||j.isOdd())&&(I.iadd(_),j.isub(P)),I.iushrn(1),j.iushrn(1);for(var K=0,Y=1;(v.words[0]&Y)===0&&K<26;++K,Y<<=1);if(K>0)for(v.iushrn(K);K-- >0;)($.isOdd()||C.isOdd())&&($.iadd(_),C.isub(P)),$.iushrn(1),C.iushrn(1);p.cmp(v)>=0?(p.isub(v),I.isub($),j.isub(C)):(v.isub(p),$.isub(I),C.isub(j))}return{a:$,b:C,gcd:v.iushln(O)}},s.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,v=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var I=new s(1),j=new s(0),$=v.clone();p.cmpn(1)>0&&v.cmpn(1)>0;){for(var C=0,O=1;(p.words[0]&O)===0&&C<26;++C,O<<=1);if(C>0)for(p.iushrn(C);C-- >0;)I.isOdd()&&I.iadd($),I.iushrn(1);for(var _=0,P=1;(v.words[0]&P)===0&&_<26;++_,P<<=1);if(_>0)for(v.iushrn(_);_-- >0;)j.isOdd()&&j.iadd($),j.iushrn(1);p.cmp(v)>=0?(p.isub(v),I.isub(j)):(v.isub(p),j.isub(I))}var q;return p.cmpn(1)===0?q=I:q=j,q.cmpn(0)<0&&q.iadd(f),q},s.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),v=f.clone();p.negative=0,v.negative=0;for(var I=0;p.isEven()&&v.isEven();I++)p.iushrn(1),v.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;v.isEven();)v.iushrn(1);var j=p.cmp(v);if(j<0){var $=p;p=v,v=$}else if(j===0||v.cmpn(1)===0)break;p.isub(v)}while(!0);return v.iushln(I)},s.prototype.invm=function(f){return this.egcd(f).a.umod(f)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(f){return this.words[0]&f},s.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,v=(f-p)/26,I=1<<p;if(this.length<=v)return this._expand(v+1),this.words[v]|=I,this;for(var j=I,$=v;j!==0&&$<this.length;$++){var C=this.words[$]|0;C+=j,j=C>>>26,C&=67108863,this.words[$]=C}return j!==0&&(this.words[$]=j,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var v;if(this.length>1)v=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var I=this.words[0]|0;v=I===f?0:I<f?-1:1}return this.negative!==0?-v|0:v},s.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var p=this.ucmp(f);return this.negative!==0?-p|0:p},s.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var p=0,v=this.length-1;v>=0;v--){var I=this.words[v]|0,j=f.words[v]|0;if(I!==j){I<j?p=-1:I>j&&(p=1);break}}return p},s.prototype.gtn=function(f){return this.cmpn(f)===1},s.prototype.gt=function(f){return this.cmp(f)===1},s.prototype.gten=function(f){return this.cmpn(f)>=0},s.prototype.gte=function(f){return this.cmp(f)>=0},s.prototype.ltn=function(f){return this.cmpn(f)===-1},s.prototype.lt=function(f){return this.cmp(f)===-1},s.prototype.lten=function(f){return this.cmpn(f)<=0},s.prototype.lte=function(f){return this.cmp(f)<=0},s.prototype.eqn=function(f){return this.cmpn(f)===0},s.prototype.eq=function(f){return this.cmp(f)===0},s.red=function(f){return new D(f)},s.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(f){return this.red=f,this},s.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},s.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},s.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},s.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},s.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},s.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},s.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},s.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var R={k256:null,p224:null,p192:null,p25519:null};function N(y,f){this.name=y,this.p=new s(f,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var f=new s(null);return f.words=new Array(Math.ceil(this.n/13)),f},N.prototype.ireduce=function(f){var p=f,v;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),v=p.bitLength();while(v>this.n);var I=v<this.n?-1:p.ucmp(this.p);return I===0?(p.words[0]=0,p.length=1):I>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},N.prototype.split=function(f,p){f.iushrn(this.n,0,p)},N.prototype.imulK=function(f){return f.imul(this.k)};function z(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(z,N),z.prototype.split=function(f,p){for(var v=4194303,I=Math.min(f.length,9),j=0;j<I;j++)p.words[j]=f.words[j];if(p.length=I,f.length<=9){f.words[0]=0,f.length=1;return}var $=f.words[9];for(p.words[p.length++]=$&v,j=10;j<f.length;j++){var C=f.words[j]|0;f.words[j-10]=(C&v)<<4|$>>>22,$=C}$>>>=22,f.words[j-10]=$,$===0&&f.length>10?f.length-=10:f.length-=9},z.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,v=0;v<f.length;v++){var I=f.words[v]|0;p+=I*977,f.words[v]=p&67108863,p=I*64+(p/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function F(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(F,N);function L(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(L,N);function B(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(B,N),B.prototype.imulK=function(f){for(var p=0,v=0;v<f.length;v++){var I=(f.words[v]|0)*19+p,j=I&67108863;I>>>=26,f.words[v]=j,p=I}return p!==0&&(f.words[f.length++]=p),f},s._prime=function(f){if(R[f])return R[f];var p;if(f==="k256")p=new z;else if(f==="p224")p=new F;else if(f==="p192")p=new L;else if(f==="p25519")p=new B;else throw new Error("Unknown prime "+f);return R[f]=p,p};function D(y){if(typeof y=="string"){var f=s._prime(y);this.m=f.p,this.prime=f}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}D.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},D.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},D.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(l(f,f.umod(this.m)._forceRed(this)),f)},D.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},D.prototype.add=function(f,p){this._verify2(f,p);var v=f.add(p);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},D.prototype.iadd=function(f,p){this._verify2(f,p);var v=f.iadd(p);return v.cmp(this.m)>=0&&v.isub(this.m),v},D.prototype.sub=function(f,p){this._verify2(f,p);var v=f.sub(p);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},D.prototype.isub=function(f,p){this._verify2(f,p);var v=f.isub(p);return v.cmpn(0)<0&&v.iadd(this.m),v},D.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},D.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},D.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},D.prototype.isqr=function(f){return this.imul(f,f.clone())},D.prototype.sqr=function(f){return this.mul(f,f)},D.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var v=this.m.add(new s(1)).iushrn(2);return this.pow(f,v)}for(var I=this.m.subn(1),j=0;!I.isZero()&&I.andln(1)===0;)j++,I.iushrn(1);n(!I.isZero());var $=new s(1).toRed(this),C=$.redNeg(),O=this.m.subn(1).iushrn(1),_=this.m.bitLength();for(_=new s(2*_*_).toRed(this);this.pow(_,O).cmp(C)!==0;)_.redIAdd(C);for(var P=this.pow(_,I),q=this.pow(f,I.addn(1).iushrn(1)),W=this.pow(f,I),K=j;W.cmp($)!==0;){for(var Y=W,te=0;Y.cmp($)!==0;te++)Y=Y.redSqr();n(te<K);var re=this.pow(P,new s(1).iushln(K-te-1));q=q.redMul(re),P=re.redSqr(),W=W.redMul(P),K=te}return q},D.prototype.invm=function(f){var p=f._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},D.prototype.pow=function(f,p){if(p.isZero())return new s(1).toRed(this);if(p.cmpn(1)===0)return f.clone();var v=4,I=new Array(1<<v);I[0]=new s(1).toRed(this),I[1]=f;for(var j=2;j<I.length;j++)I[j]=this.mul(I[j-1],f);var $=I[0],C=0,O=0,_=p.bitLength()%26;for(_===0&&(_=26),j=p.length-1;j>=0;j--){for(var P=p.words[j],q=_-1;q>=0;q--){var W=P>>q&1;if($!==I[0]&&($=this.sqr($)),W===0&&C===0){O=0;continue}C<<=1,C|=W,O++,!(O!==v&&(j!==0||q!==0))&&($=this.mul($,I[C]),O=0,C=0)}_=26}return $},D.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},D.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},s.mont=function(f){return new x(f)};function x(y){D.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(x,D),x.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},x.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},x.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var v=f.imul(p),I=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=v.isub(I).iushrn(this.shift),$=j;return j.cmp(this.m)>=0?$=j.isub(this.m):j.cmpn(0)<0&&($=j.iadd(this.m)),$._forceRed(this)},x.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new s(0)._forceRed(this);var v=f.mul(p),I=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=v.isub(I).iushrn(this.shift),$=j;return j.cmp(this.m)>=0?$=j.isub(this.m):j.cmpn(0)<0&&($=j.iadd(this.m)),$._forceRed(this)},x.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(e,aye)}(zw)),zw.exports}var uye=cye();const _j=Js(uye);var vy={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var xj;function iG(){return xj||(xj=1,function(e,t){var r=OC(),n=r.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=n(o);return a!==void 0?typeof c=="string"?u.fill(a,c):u.fill(a):u.fill(0),u},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 r.SlowBuffer(o)}}(vy,vy.exports)),vy.exports}var C8,Ej;function lye(){if(Ej)return C8;Ej=1;var e=iG().Buffer;function t(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),i=0;i<n.length;i++)n[i]=255;for(var s=0;s<r.length;s++){var o=r.charAt(s),a=o.charCodeAt(0);if(n[a]!==255)throw new TypeError(o+" is ambiguous");n[a]=s}var c=r.length,u=r.charAt(0),l=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function h(b){if((Array.isArray(b)||b instanceof Uint8Array)&&(b=e.from(b)),!e.isBuffer(b))throw new TypeError("Expected Buffer");if(b.length===0)return"";for(var k=0,w=0,E=0,A=b.length;E!==A&&b[E]===0;)E++,k++;for(var M=(A-E)*d+1>>>0,R=new Uint8Array(M);E!==A;){for(var N=b[E],z=0,F=M-1;(N!==0||z<w)&&F!==-1;F--,z++)N+=256*R[F]>>>0,R[F]=N%c>>>0,N=N/c>>>0;if(N!==0)throw new Error("Non-zero carry");w=z,E++}for(var L=M-w;L!==M&&R[L]===0;)L++;for(var B=u.repeat(k);L<M;++L)B+=r.charAt(R[L]);return B}function g(b){if(typeof b!="string")throw new TypeError("Expected String");if(b.length===0)return e.alloc(0);for(var k=0,w=0,E=0;b[k]===u;)w++,k++;for(var A=(b.length-k)*l+1>>>0,M=new Uint8Array(A);k<b.length;){var R=b.charCodeAt(k);if(R>255)return;var N=n[R];if(N===255)return;for(var z=0,F=A-1;(N!==0||z<E)&&F!==-1;F--,z++)N+=c*M[F]>>>0,M[F]=N%256>>>0,N=N/256>>>0;if(N!==0)throw new Error("Non-zero carry");E=z,k++}for(var L=A-E;L!==A&&M[L]===0;)L++;var B=e.allocUnsafe(w+(A-L));B.fill(0,0,w);for(var D=w;L!==A;)B[D++]=M[L++];return B}function m(b){var k=g(b);if(k)return k;throw new Error("Non-base"+c+" character")}return{encode:h,decodeUnsafe:g,decode:m}}return C8=t,C8}var I8,kj;function fye(){if(kj)return I8;kj=1;var e=lye(),t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";return I8=e(t),I8}var dye=fye();const vs=Js(dye),Aj=RK;var Tr={},Bw={exports:{}},hye=Bw.exports,Sj;function pye(){return Sj||(Sj=1,function(e){(function(t,r){function n(y,f){if(!y)throw new Error(f||"Assertion failed")}function i(y,f){y.super_=f;var p=function(){};p.prototype=f.prototype,y.prototype=new p,y.prototype.constructor=y}function s(y,f,p){if(s.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(y||0,f||10,p||"be"))}typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=U2.Buffer}catch{}s.isBN=function(f){return f instanceof s?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===s.wordSize&&Array.isArray(f.words)},s.max=function(f,p){return f.cmp(p)>0?f:p},s.min=function(f,p){return f.cmp(p)<0?f:p},s.prototype._init=function(f,p,v){if(typeof f=="number")return this._initNumber(f,p,v);if(typeof f=="object")return this._initArray(f,p,v);p==="hex"&&(p=16),n(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var I=0;f[0]==="-"&&(I++,this.negative=1),I<f.length&&(p===16?this._parseHex(f,I,v):(this._parseBase(f,p,I),v==="le"&&this._initArray(this.toArray(),p,v)))},s.prototype._initNumber=function(f,p,v){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(n(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),p,v)},s.prototype._initArray=function(f,p,v){if(n(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var j,$,C=0;if(v==="be")for(I=f.length-1,j=0;I>=0;I-=3)$=f[I]|f[I-1]<<8|f[I-2]<<16,this.words[j]|=$<<C&67108863,this.words[j+1]=$>>>26-C&67108863,C+=24,C>=26&&(C-=26,j++);else if(v==="le")for(I=0,j=0;I<f.length;I+=3)$=f[I]|f[I+1]<<8|f[I+2]<<16,this.words[j]|=$<<C&67108863,this.words[j+1]=$>>>26-C&67108863,C+=24,C>=26&&(C-=26,j++);return this._strip()};function a(y,f){var p=y.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;n(!1,"Invalid character in "+y)}function c(y,f,p){var v=a(y,p);return p-1>=f&&(v|=a(y,p-1)<<4),v}s.prototype._parseHex=function(f,p,v){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var j=0,$=0,C;if(v==="be")for(I=f.length-1;I>=p;I-=2)C=c(f,p,I)<<j,this.words[$]|=C&67108863,j>=18?(j-=18,$+=1,this.words[$]|=C>>>26):j+=8;else{var O=f.length-p;for(I=O%2===0?p+1:p;I<f.length;I+=2)C=c(f,p,I)<<j,this.words[$]|=C&67108863,j>=18?(j-=18,$+=1,this.words[$]|=C>>>26):j+=8}this._strip()};function u(y,f,p,v){for(var I=0,j=0,$=Math.min(y.length,p),C=f;C<$;C++){var O=y.charCodeAt(C)-48;I*=v,O>=49?j=O-49+10:O>=17?j=O-17+10:j=O,n(O>=0&&j<v,"Invalid character"),I+=j}return I}s.prototype._parseBase=function(f,p,v){this.words=[0],this.length=1;for(var I=0,j=1;j<=67108863;j*=p)I++;I--,j=j/p|0;for(var $=f.length-v,C=$%I,O=Math.min($,$-C)+v,_=0,P=v;P<O;P+=I)_=u(f,P,P+I,p),this.imuln(j),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_);if(C!==0){var q=1;for(_=u(f,P,f.length,p),P=0;P<C;P++)q*=p;this.imuln(q),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_)}this._strip()},s.prototype.copy=function(f){f.words=new Array(this.length);for(var p=0;p<this.length;p++)f.words[p]=this.words[p];f.length=this.length,f.negative=this.negative,f.red=this.red};function l(y,f){y.words=f.words,y.length=f.length,y.negative=f.negative,y.red=f.red}if(s.prototype._move=function(f){l(f,this)},s.prototype.clone=function(){var f=new s(null);return this.copy(f),f},s.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(f,p){f=f||10,p=p|0||1;var v;if(f===16||f==="hex"){v="";for(var I=0,j=0,$=0;$<this.length;$++){var C=this.words[$],O=((C<<I|j)&16777215).toString(16);j=C>>>24-I&16777215,I+=2,I>=26&&(I-=26,$--),j!==0||$!==this.length-1?v=h[6-O.length]+O+v:v=O+v}for(j!==0&&(v=j.toString(16)+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(f===(f|0)&&f>=2&&f<=36){var _=g[f],P=m[f];v="";var q=this.clone();for(q.negative=0;!q.isZero();){var W=q.modrn(P).toString(f);q=q.idivn(P),q.isZero()?v=W+v:v=h[_-W.length]+W+v}for(this.isZero()&&(v="0"+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(f,p){return this.toArrayLike(o,f,p)}),s.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var b=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};s.prototype.toArrayLike=function(f,p,v){this._strip();var I=this.byteLength(),j=v||Math.max(1,I);n(I<=j,"byte array longer than desired length"),n(j>0,"Requested array length <= 0");var $=b(f,j),C=p==="le"?"LE":"BE";return this["_toArrayLike"+C]($,I),$},s.prototype._toArrayLikeLE=function(f,p){for(var v=0,I=0,j=0,$=0;j<this.length;j++){var C=this.words[j]<<$|I;f[v++]=C&255,v<f.length&&(f[v++]=C>>8&255),v<f.length&&(f[v++]=C>>16&255),$===6?(v<f.length&&(f[v++]=C>>24&255),I=0,$=0):(I=C>>>24,$+=2)}if(v<f.length)for(f[v++]=I;v<f.length;)f[v++]=0},s.prototype._toArrayLikeBE=function(f,p){for(var v=f.length-1,I=0,j=0,$=0;j<this.length;j++){var C=this.words[j]<<$|I;f[v--]=C&255,v>=0&&(f[v--]=C>>8&255),v>=0&&(f[v--]=C>>16&255),$===6?(v>=0&&(f[v--]=C>>24&255),I=0,$=0):(I=C>>>24,$+=2)}if(v>=0)for(f[v--]=I;v>=0;)f[v--]=0},Math.clz32?s.prototype._countBits=function(f){return 32-Math.clz32(f)}:s.prototype._countBits=function(f){var p=f,v=0;return p>=4096&&(v+=13,p>>>=13),p>=64&&(v+=7,p>>>=7),p>=8&&(v+=4,p>>>=4),p>=2&&(v+=2,p>>>=2),v+p},s.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,v=0;return(p&8191)===0&&(v+=13,p>>>=13),(p&127)===0&&(v+=7,p>>>=7),(p&15)===0&&(v+=4,p>>>=4),(p&3)===0&&(v+=2,p>>>=2),(p&1)===0&&v++,v},s.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function k(y){for(var f=new Array(y.bitLength()),p=0;p<f.length;p++){var v=p/26|0,I=p%26;f[p]=y.words[v]>>>I&1}return f}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;p<this.length;p++){var v=this._zeroBits(this.words[p]);if(f+=v,v!==26)break}return f},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},s.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var p=0;p<f.length;p++)this.words[p]=this.words[p]|f.words[p];return this._strip()},s.prototype.ior=function(f){return n((this.negative|f.negative)===0),this.iuor(f)},s.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},s.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},s.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var v=0;v<p.length;v++)this.words[v]=this.words[v]&f.words[v];return this.length=p.length,this._strip()},s.prototype.iand=function(f){return n((this.negative|f.negative)===0),this.iuand(f)},s.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},s.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},s.prototype.iuxor=function(f){var p,v;this.length>f.length?(p=this,v=f):(p=f,v=this);for(var I=0;I<v.length;I++)this.words[I]=p.words[I]^v.words[I];if(this!==p)for(;I<p.length;I++)this.words[I]=p.words[I];return this.length=p.length,this._strip()},s.prototype.ixor=function(f){return n((this.negative|f.negative)===0),this.iuxor(f)},s.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},s.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},s.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,v=f%26;this._expand(p),v>0&&p--;for(var I=0;I<p;I++)this.words[I]=~this.words[I]&67108863;return v>0&&(this.words[I]=~this.words[I]&67108863>>26-v),this._strip()},s.prototype.notn=function(f){return this.clone().inotn(f)},s.prototype.setn=function(f,p){n(typeof f=="number"&&f>=0);var v=f/26|0,I=f%26;return this._expand(v+1),p?this.words[v]=this.words[v]|1<<I:this.words[v]=this.words[v]&~(1<<I),this._strip()},s.prototype.iadd=function(f){var p;if(this.negative!==0&&f.negative===0)return this.negative=0,p=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,p=this.isub(f),f.negative=1,p._normSign();var v,I;this.length>f.length?(v=this,I=f):(v=f,I=this);for(var j=0,$=0;$<I.length;$++)p=(v.words[$]|0)+(I.words[$]|0)+j,this.words[$]=p&67108863,j=p>>>26;for(;j!==0&&$<v.length;$++)p=(v.words[$]|0)+j,this.words[$]=p&67108863,j=p>>>26;if(this.length=v.length,j!==0)this.words[this.length]=j,this.length++;else if(v!==this)for(;$<v.length;$++)this.words[$]=v.words[$];return this},s.prototype.add=function(f){var p;return f.negative!==0&&this.negative===0?(f.negative=0,p=this.sub(f),f.negative^=1,p):f.negative===0&&this.negative!==0?(this.negative=0,p=f.sub(this),this.negative=1,p):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},s.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var v=this.cmp(f);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,j;v>0?(I=this,j=f):(I=f,j=this);for(var $=0,C=0;C<j.length;C++)p=(I.words[C]|0)-(j.words[C]|0)+$,$=p>>26,this.words[C]=p&67108863;for(;$!==0&&C<I.length;C++)p=(I.words[C]|0)+$,$=p>>26,this.words[C]=p&67108863;if($===0&&C<I.length&&I!==this)for(;C<I.length;C++)this.words[C]=I.words[C];return this.length=Math.max(this.length,C),I!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(f){return this.clone().isub(f)};function w(y,f,p){p.negative=f.negative^y.negative;var v=y.length+f.length|0;p.length=v,v=v-1|0;var I=y.words[0]|0,j=f.words[0]|0,$=I*j,C=$&67108863,O=$/67108864|0;p.words[0]=C;for(var _=1;_<v;_++){for(var P=O>>>26,q=O&67108863,W=Math.min(_,f.length-1),K=Math.max(0,_-y.length+1);K<=W;K++){var Y=_-K|0;I=y.words[Y]|0,j=f.words[K]|0,$=I*j+q,P+=$/67108864|0,q=$&67108863}p.words[_]=q|0,O=P|0}return O!==0?p.words[_]=O|0:p.length--,p._strip()}var E=function(f,p,v){var I=f.words,j=p.words,$=v.words,C=0,O,_,P,q=I[0]|0,W=q&8191,K=q>>>13,Y=I[1]|0,te=Y&8191,re=Y>>>13,be=I[2]|0,ve=be&8191,ye=be>>>13,Se=I[3]|0,_e=Se&8191,ke=Se>>>13,it=I[4]|0,Re=it&8191,J=it>>>13,ne=I[5]|0,le=ne&8191,he=ne>>>13,Pe=I[6]|0,xe=Pe&8191,oe=Pe>>>13,me=I[7]|0,je=me&8191,U=me>>>13,S=I[8]|0,T=S&8191,H=S>>>13,V=I[9]|0,G=V&8191,Z=V>>>13,Ee=j[0]|0,Ie=Ee&8191,ee=Ee>>>13,se=j[1]|0,we=se&8191,Te=se>>>13,yt=j[2]|0,De=yt&8191,Ke=yt>>>13,qt=j[3]|0,ut=qt&8191,We=qt>>>13,er=j[4]|0,wt=er&8191,qe=er>>>13,_r=j[5]|0,It=_r&8191,tt=_r>>>13,tr=j[6]|0,St=tr&8191,Ye=tr>>>13,rr=j[7]|0,mt=rr&8191,rt=rr>>>13,xr=j[8]|0,Ct=xr&8191,nt=xr>>>13,ar=j[9]|0,pt=ar&8191,Mt=ar>>>13;v.negative=f.negative^p.negative,v.length=19,O=Math.imul(W,Ie),_=Math.imul(W,ee),_=_+Math.imul(K,Ie)|0,P=Math.imul(K,ee);var Ii=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,O=Math.imul(te,Ie),_=Math.imul(te,ee),_=_+Math.imul(re,Ie)|0,P=Math.imul(re,ee),O=O+Math.imul(W,we)|0,_=_+Math.imul(W,Te)|0,_=_+Math.imul(K,we)|0,P=P+Math.imul(K,Te)|0;var Dn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,O=Math.imul(ve,Ie),_=Math.imul(ve,ee),_=_+Math.imul(ye,Ie)|0,P=Math.imul(ye,ee),O=O+Math.imul(te,we)|0,_=_+Math.imul(te,Te)|0,_=_+Math.imul(re,we)|0,P=P+Math.imul(re,Te)|0,O=O+Math.imul(W,De)|0,_=_+Math.imul(W,Ke)|0,_=_+Math.imul(K,De)|0,P=P+Math.imul(K,Ke)|0;var si=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(si>>>26)|0,si&=67108863,O=Math.imul(_e,Ie),_=Math.imul(_e,ee),_=_+Math.imul(ke,Ie)|0,P=Math.imul(ke,ee),O=O+Math.imul(ve,we)|0,_=_+Math.imul(ve,Te)|0,_=_+Math.imul(ye,we)|0,P=P+Math.imul(ye,Te)|0,O=O+Math.imul(te,De)|0,_=_+Math.imul(te,Ke)|0,_=_+Math.imul(re,De)|0,P=P+Math.imul(re,Ke)|0,O=O+Math.imul(W,ut)|0,_=_+Math.imul(W,We)|0,_=_+Math.imul(K,ut)|0,P=P+Math.imul(K,We)|0;var ms=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ms>>>26)|0,ms&=67108863,O=Math.imul(Re,Ie),_=Math.imul(Re,ee),_=_+Math.imul(J,Ie)|0,P=Math.imul(J,ee),O=O+Math.imul(_e,we)|0,_=_+Math.imul(_e,Te)|0,_=_+Math.imul(ke,we)|0,P=P+Math.imul(ke,Te)|0,O=O+Math.imul(ve,De)|0,_=_+Math.imul(ve,Ke)|0,_=_+Math.imul(ye,De)|0,P=P+Math.imul(ye,Ke)|0,O=O+Math.imul(te,ut)|0,_=_+Math.imul(te,We)|0,_=_+Math.imul(re,ut)|0,P=P+Math.imul(re,We)|0,O=O+Math.imul(W,wt)|0,_=_+Math.imul(W,qe)|0,_=_+Math.imul(K,wt)|0,P=P+Math.imul(K,qe)|0;var wn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(wn>>>26)|0,wn&=67108863,O=Math.imul(le,Ie),_=Math.imul(le,ee),_=_+Math.imul(he,Ie)|0,P=Math.imul(he,ee),O=O+Math.imul(Re,we)|0,_=_+Math.imul(Re,Te)|0,_=_+Math.imul(J,we)|0,P=P+Math.imul(J,Te)|0,O=O+Math.imul(_e,De)|0,_=_+Math.imul(_e,Ke)|0,_=_+Math.imul(ke,De)|0,P=P+Math.imul(ke,Ke)|0,O=O+Math.imul(ve,ut)|0,_=_+Math.imul(ve,We)|0,_=_+Math.imul(ye,ut)|0,P=P+Math.imul(ye,We)|0,O=O+Math.imul(te,wt)|0,_=_+Math.imul(te,qe)|0,_=_+Math.imul(re,wt)|0,P=P+Math.imul(re,qe)|0,O=O+Math.imul(W,It)|0,_=_+Math.imul(W,tt)|0,_=_+Math.imul(K,It)|0,P=P+Math.imul(K,tt)|0;var ro=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ro>>>26)|0,ro&=67108863,O=Math.imul(xe,Ie),_=Math.imul(xe,ee),_=_+Math.imul(oe,Ie)|0,P=Math.imul(oe,ee),O=O+Math.imul(le,we)|0,_=_+Math.imul(le,Te)|0,_=_+Math.imul(he,we)|0,P=P+Math.imul(he,Te)|0,O=O+Math.imul(Re,De)|0,_=_+Math.imul(Re,Ke)|0,_=_+Math.imul(J,De)|0,P=P+Math.imul(J,Ke)|0,O=O+Math.imul(_e,ut)|0,_=_+Math.imul(_e,We)|0,_=_+Math.imul(ke,ut)|0,P=P+Math.imul(ke,We)|0,O=O+Math.imul(ve,wt)|0,_=_+Math.imul(ve,qe)|0,_=_+Math.imul(ye,wt)|0,P=P+Math.imul(ye,qe)|0,O=O+Math.imul(te,It)|0,_=_+Math.imul(te,tt)|0,_=_+Math.imul(re,It)|0,P=P+Math.imul(re,tt)|0,O=O+Math.imul(W,St)|0,_=_+Math.imul(W,Ye)|0,_=_+Math.imul(K,St)|0,P=P+Math.imul(K,Ye)|0;var no=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(no>>>26)|0,no&=67108863,O=Math.imul(je,Ie),_=Math.imul(je,ee),_=_+Math.imul(U,Ie)|0,P=Math.imul(U,ee),O=O+Math.imul(xe,we)|0,_=_+Math.imul(xe,Te)|0,_=_+Math.imul(oe,we)|0,P=P+Math.imul(oe,Te)|0,O=O+Math.imul(le,De)|0,_=_+Math.imul(le,Ke)|0,_=_+Math.imul(he,De)|0,P=P+Math.imul(he,Ke)|0,O=O+Math.imul(Re,ut)|0,_=_+Math.imul(Re,We)|0,_=_+Math.imul(J,ut)|0,P=P+Math.imul(J,We)|0,O=O+Math.imul(_e,wt)|0,_=_+Math.imul(_e,qe)|0,_=_+Math.imul(ke,wt)|0,P=P+Math.imul(ke,qe)|0,O=O+Math.imul(ve,It)|0,_=_+Math.imul(ve,tt)|0,_=_+Math.imul(ye,It)|0,P=P+Math.imul(ye,tt)|0,O=O+Math.imul(te,St)|0,_=_+Math.imul(te,Ye)|0,_=_+Math.imul(re,St)|0,P=P+Math.imul(re,Ye)|0,O=O+Math.imul(W,mt)|0,_=_+Math.imul(W,rt)|0,_=_+Math.imul(K,mt)|0,P=P+Math.imul(K,rt)|0;var io=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(io>>>26)|0,io&=67108863,O=Math.imul(T,Ie),_=Math.imul(T,ee),_=_+Math.imul(H,Ie)|0,P=Math.imul(H,ee),O=O+Math.imul(je,we)|0,_=_+Math.imul(je,Te)|0,_=_+Math.imul(U,we)|0,P=P+Math.imul(U,Te)|0,O=O+Math.imul(xe,De)|0,_=_+Math.imul(xe,Ke)|0,_=_+Math.imul(oe,De)|0,P=P+Math.imul(oe,Ke)|0,O=O+Math.imul(le,ut)|0,_=_+Math.imul(le,We)|0,_=_+Math.imul(he,ut)|0,P=P+Math.imul(he,We)|0,O=O+Math.imul(Re,wt)|0,_=_+Math.imul(Re,qe)|0,_=_+Math.imul(J,wt)|0,P=P+Math.imul(J,qe)|0,O=O+Math.imul(_e,It)|0,_=_+Math.imul(_e,tt)|0,_=_+Math.imul(ke,It)|0,P=P+Math.imul(ke,tt)|0,O=O+Math.imul(ve,St)|0,_=_+Math.imul(ve,Ye)|0,_=_+Math.imul(ye,St)|0,P=P+Math.imul(ye,Ye)|0,O=O+Math.imul(te,mt)|0,_=_+Math.imul(te,rt)|0,_=_+Math.imul(re,mt)|0,P=P+Math.imul(re,rt)|0,O=O+Math.imul(W,Ct)|0,_=_+Math.imul(W,nt)|0,_=_+Math.imul(K,Ct)|0,P=P+Math.imul(K,nt)|0;var so=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(so>>>26)|0,so&=67108863,O=Math.imul(G,Ie),_=Math.imul(G,ee),_=_+Math.imul(Z,Ie)|0,P=Math.imul(Z,ee),O=O+Math.imul(T,we)|0,_=_+Math.imul(T,Te)|0,_=_+Math.imul(H,we)|0,P=P+Math.imul(H,Te)|0,O=O+Math.imul(je,De)|0,_=_+Math.imul(je,Ke)|0,_=_+Math.imul(U,De)|0,P=P+Math.imul(U,Ke)|0,O=O+Math.imul(xe,ut)|0,_=_+Math.imul(xe,We)|0,_=_+Math.imul(oe,ut)|0,P=P+Math.imul(oe,We)|0,O=O+Math.imul(le,wt)|0,_=_+Math.imul(le,qe)|0,_=_+Math.imul(he,wt)|0,P=P+Math.imul(he,qe)|0,O=O+Math.imul(Re,It)|0,_=_+Math.imul(Re,tt)|0,_=_+Math.imul(J,It)|0,P=P+Math.imul(J,tt)|0,O=O+Math.imul(_e,St)|0,_=_+Math.imul(_e,Ye)|0,_=_+Math.imul(ke,St)|0,P=P+Math.imul(ke,Ye)|0,O=O+Math.imul(ve,mt)|0,_=_+Math.imul(ve,rt)|0,_=_+Math.imul(ye,mt)|0,P=P+Math.imul(ye,rt)|0,O=O+Math.imul(te,Ct)|0,_=_+Math.imul(te,nt)|0,_=_+Math.imul(re,Ct)|0,P=P+Math.imul(re,nt)|0,O=O+Math.imul(W,pt)|0,_=_+Math.imul(W,Mt)|0,_=_+Math.imul(K,pt)|0,P=P+Math.imul(K,Mt)|0;var oo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(oo>>>26)|0,oo&=67108863,O=Math.imul(G,we),_=Math.imul(G,Te),_=_+Math.imul(Z,we)|0,P=Math.imul(Z,Te),O=O+Math.imul(T,De)|0,_=_+Math.imul(T,Ke)|0,_=_+Math.imul(H,De)|0,P=P+Math.imul(H,Ke)|0,O=O+Math.imul(je,ut)|0,_=_+Math.imul(je,We)|0,_=_+Math.imul(U,ut)|0,P=P+Math.imul(U,We)|0,O=O+Math.imul(xe,wt)|0,_=_+Math.imul(xe,qe)|0,_=_+Math.imul(oe,wt)|0,P=P+Math.imul(oe,qe)|0,O=O+Math.imul(le,It)|0,_=_+Math.imul(le,tt)|0,_=_+Math.imul(he,It)|0,P=P+Math.imul(he,tt)|0,O=O+Math.imul(Re,St)|0,_=_+Math.imul(Re,Ye)|0,_=_+Math.imul(J,St)|0,P=P+Math.imul(J,Ye)|0,O=O+Math.imul(_e,mt)|0,_=_+Math.imul(_e,rt)|0,_=_+Math.imul(ke,mt)|0,P=P+Math.imul(ke,rt)|0,O=O+Math.imul(ve,Ct)|0,_=_+Math.imul(ve,nt)|0,_=_+Math.imul(ye,Ct)|0,P=P+Math.imul(ye,nt)|0,O=O+Math.imul(te,pt)|0,_=_+Math.imul(te,Mt)|0,_=_+Math.imul(re,pt)|0,P=P+Math.imul(re,Mt)|0;var Ji=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Ji>>>26)|0,Ji&=67108863,O=Math.imul(G,De),_=Math.imul(G,Ke),_=_+Math.imul(Z,De)|0,P=Math.imul(Z,Ke),O=O+Math.imul(T,ut)|0,_=_+Math.imul(T,We)|0,_=_+Math.imul(H,ut)|0,P=P+Math.imul(H,We)|0,O=O+Math.imul(je,wt)|0,_=_+Math.imul(je,qe)|0,_=_+Math.imul(U,wt)|0,P=P+Math.imul(U,qe)|0,O=O+Math.imul(xe,It)|0,_=_+Math.imul(xe,tt)|0,_=_+Math.imul(oe,It)|0,P=P+Math.imul(oe,tt)|0,O=O+Math.imul(le,St)|0,_=_+Math.imul(le,Ye)|0,_=_+Math.imul(he,St)|0,P=P+Math.imul(he,Ye)|0,O=O+Math.imul(Re,mt)|0,_=_+Math.imul(Re,rt)|0,_=_+Math.imul(J,mt)|0,P=P+Math.imul(J,rt)|0,O=O+Math.imul(_e,Ct)|0,_=_+Math.imul(_e,nt)|0,_=_+Math.imul(ke,Ct)|0,P=P+Math.imul(ke,nt)|0,O=O+Math.imul(ve,pt)|0,_=_+Math.imul(ve,Mt)|0,_=_+Math.imul(ye,pt)|0,P=P+Math.imul(ye,Mt)|0;var ao=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ao>>>26)|0,ao&=67108863,O=Math.imul(G,ut),_=Math.imul(G,We),_=_+Math.imul(Z,ut)|0,P=Math.imul(Z,We),O=O+Math.imul(T,wt)|0,_=_+Math.imul(T,qe)|0,_=_+Math.imul(H,wt)|0,P=P+Math.imul(H,qe)|0,O=O+Math.imul(je,It)|0,_=_+Math.imul(je,tt)|0,_=_+Math.imul(U,It)|0,P=P+Math.imul(U,tt)|0,O=O+Math.imul(xe,St)|0,_=_+Math.imul(xe,Ye)|0,_=_+Math.imul(oe,St)|0,P=P+Math.imul(oe,Ye)|0,O=O+Math.imul(le,mt)|0,_=_+Math.imul(le,rt)|0,_=_+Math.imul(he,mt)|0,P=P+Math.imul(he,rt)|0,O=O+Math.imul(Re,Ct)|0,_=_+Math.imul(Re,nt)|0,_=_+Math.imul(J,Ct)|0,P=P+Math.imul(J,nt)|0,O=O+Math.imul(_e,pt)|0,_=_+Math.imul(_e,Mt)|0,_=_+Math.imul(ke,pt)|0,P=P+Math.imul(ke,Mt)|0;var co=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(co>>>26)|0,co&=67108863,O=Math.imul(G,wt),_=Math.imul(G,qe),_=_+Math.imul(Z,wt)|0,P=Math.imul(Z,qe),O=O+Math.imul(T,It)|0,_=_+Math.imul(T,tt)|0,_=_+Math.imul(H,It)|0,P=P+Math.imul(H,tt)|0,O=O+Math.imul(je,St)|0,_=_+Math.imul(je,Ye)|0,_=_+Math.imul(U,St)|0,P=P+Math.imul(U,Ye)|0,O=O+Math.imul(xe,mt)|0,_=_+Math.imul(xe,rt)|0,_=_+Math.imul(oe,mt)|0,P=P+Math.imul(oe,rt)|0,O=O+Math.imul(le,Ct)|0,_=_+Math.imul(le,nt)|0,_=_+Math.imul(he,Ct)|0,P=P+Math.imul(he,nt)|0,O=O+Math.imul(Re,pt)|0,_=_+Math.imul(Re,Mt)|0,_=_+Math.imul(J,pt)|0,P=P+Math.imul(J,Mt)|0;var Rn=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(Rn>>>26)|0,Rn&=67108863,O=Math.imul(G,It),_=Math.imul(G,tt),_=_+Math.imul(Z,It)|0,P=Math.imul(Z,tt),O=O+Math.imul(T,St)|0,_=_+Math.imul(T,Ye)|0,_=_+Math.imul(H,St)|0,P=P+Math.imul(H,Ye)|0,O=O+Math.imul(je,mt)|0,_=_+Math.imul(je,rt)|0,_=_+Math.imul(U,mt)|0,P=P+Math.imul(U,rt)|0,O=O+Math.imul(xe,Ct)|0,_=_+Math.imul(xe,nt)|0,_=_+Math.imul(oe,Ct)|0,P=P+Math.imul(oe,nt)|0,O=O+Math.imul(le,pt)|0,_=_+Math.imul(le,Mt)|0,_=_+Math.imul(he,pt)|0,P=P+Math.imul(he,Mt)|0;var uo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(uo>>>26)|0,uo&=67108863,O=Math.imul(G,St),_=Math.imul(G,Ye),_=_+Math.imul(Z,St)|0,P=Math.imul(Z,Ye),O=O+Math.imul(T,mt)|0,_=_+Math.imul(T,rt)|0,_=_+Math.imul(H,mt)|0,P=P+Math.imul(H,rt)|0,O=O+Math.imul(je,Ct)|0,_=_+Math.imul(je,nt)|0,_=_+Math.imul(U,Ct)|0,P=P+Math.imul(U,nt)|0,O=O+Math.imul(xe,pt)|0,_=_+Math.imul(xe,Mt)|0,_=_+Math.imul(oe,pt)|0,P=P+Math.imul(oe,Mt)|0;var lo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(lo>>>26)|0,lo&=67108863,O=Math.imul(G,mt),_=Math.imul(G,rt),_=_+Math.imul(Z,mt)|0,P=Math.imul(Z,rt),O=O+Math.imul(T,Ct)|0,_=_+Math.imul(T,nt)|0,_=_+Math.imul(H,Ct)|0,P=P+Math.imul(H,nt)|0,O=O+Math.imul(je,pt)|0,_=_+Math.imul(je,Mt)|0,_=_+Math.imul(U,pt)|0,P=P+Math.imul(U,Mt)|0;var fo=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(fo>>>26)|0,fo&=67108863,O=Math.imul(G,Ct),_=Math.imul(G,nt),_=_+Math.imul(Z,Ct)|0,P=Math.imul(Z,nt),O=O+Math.imul(T,pt)|0,_=_+Math.imul(T,Mt)|0,_=_+Math.imul(H,pt)|0,P=P+Math.imul(H,Mt)|0;var ru=(C+O|0)+((_&8191)<<13)|0;C=(P+(_>>>13)|0)+(ru>>>26)|0,ru&=67108863,O=Math.imul(G,pt),_=Math.imul(G,Mt),_=_+Math.imul(Z,pt)|0,P=Math.imul(Z,Mt);var nu=(C+O|0)+((_&8191)<<13)|0;return C=(P+(_>>>13)|0)+(nu>>>26)|0,nu&=67108863,$[0]=Ii,$[1]=Dn,$[2]=si,$[3]=ms,$[4]=wn,$[5]=ro,$[6]=no,$[7]=io,$[8]=so,$[9]=oo,$[10]=Ji,$[11]=ao,$[12]=co,$[13]=Rn,$[14]=uo,$[15]=lo,$[16]=fo,$[17]=ru,$[18]=nu,C!==0&&($[19]=C,v.length++),v};Math.imul||(E=w);function A(y,f,p){p.negative=f.negative^y.negative,p.length=y.length+f.length;for(var v=0,I=0,j=0;j<p.length-1;j++){var $=I;I=0;for(var C=v&67108863,O=Math.min(j,f.length-1),_=Math.max(0,j-y.length+1);_<=O;_++){var P=j-_,q=y.words[P]|0,W=f.words[_]|0,K=q*W,Y=K&67108863;$=$+(K/67108864|0)|0,Y=Y+C|0,C=Y&67108863,$=$+(Y>>>26)|0,I+=$>>>26,$&=67108863}p.words[j]=C,v=$,$=I}return v!==0?p.words[j]=v:p.length--,p._strip()}function M(y,f,p){return A(y,f,p)}s.prototype.mulTo=function(f,p){var v,I=this.length+f.length;return this.length===10&&f.length===10?v=E(this,f,p):I<63?v=w(this,f,p):I<1024?v=A(this,f,p):v=M(this,f,p),v},s.prototype.mul=function(f){var p=new s(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},s.prototype.mulf=function(f){var p=new s(null);return p.words=new Array(this.length+f.length),M(this,f,p)},s.prototype.imul=function(f){return this.clone().mulTo(f,this)},s.prototype.imuln=function(f){var p=f<0;p&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var v=0,I=0;I<this.length;I++){var j=(this.words[I]|0)*f,$=(j&67108863)+(v&67108863);v>>=26,v+=j/67108864|0,v+=$>>>26,this.words[I]=$&67108863}return v!==0&&(this.words[I]=v,this.length++),this.length=f===0?1:this.length,p?this.ineg():this},s.prototype.muln=function(f){return this.clone().imuln(f)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(f){var p=k(f);if(p.length===0)return new s(1);for(var v=this,I=0;I<p.length&&p[I]===0;I++,v=v.sqr());if(++I<p.length)for(var j=v.sqr();I<p.length;I++,j=j.sqr())p[I]!==0&&(v=v.mul(j));return v},s.prototype.iushln=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26,I=67108863>>>26-p<<26-p,j;if(p!==0){var $=0;for(j=0;j<this.length;j++){var C=this.words[j]&I,O=(this.words[j]|0)-C<<p;this.words[j]=O|$,$=C>>>26-p}$&&(this.words[j]=$,this.length++)}if(v!==0){for(j=this.length-1;j>=0;j--)this.words[j+v]=this.words[j];for(j=0;j<v;j++)this.words[j]=0;this.length+=v}return this._strip()},s.prototype.ishln=function(f){return n(this.negative===0),this.iushln(f)},s.prototype.iushrn=function(f,p,v){n(typeof f=="number"&&f>=0);var I;p?I=(p-p%26)/26:I=0;var j=f%26,$=Math.min((f-j)/26,this.length),C=67108863^67108863>>>j<<j,O=v;if(I-=$,I=Math.max(0,I),O){for(var _=0;_<$;_++)O.words[_]=this.words[_];O.length=$}if($!==0)if(this.length>$)for(this.length-=$,_=0;_<this.length;_++)this.words[_]=this.words[_+$];else this.words[0]=0,this.length=1;var P=0;for(_=this.length-1;_>=0&&(P!==0||_>=I);_--){var q=this.words[_]|0;this.words[_]=P<<26-j|q>>>j,P=q&C}return O&&P!==0&&(O.words[O.length++]=P),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(f,p,v){return n(this.negative===0),this.iushrn(f,p,v)},s.prototype.shln=function(f){return this.clone().ishln(f)},s.prototype.ushln=function(f){return this.clone().iushln(f)},s.prototype.shrn=function(f){return this.clone().ishrn(f)},s.prototype.ushrn=function(f){return this.clone().iushrn(f)},s.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26,I=1<<p;if(this.length<=v)return!1;var j=this.words[v];return!!(j&I)},s.prototype.imaskn=function(f){n(typeof f=="number"&&f>=0);var p=f%26,v=(f-p)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(p!==0&&v++,this.length=Math.min(v,this.length),p!==0){var I=67108863^67108863>>>p<<p;this.words[this.length-1]&=I}return this._strip()},s.prototype.maskn=function(f){return this.clone().imaskn(f)},s.prototype.iaddn=function(f){return n(typeof f=="number"),n(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},s.prototype._iaddn=function(f){this.words[0]+=f;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},s.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this._strip()},s.prototype.addn=function(f){return this.clone().iaddn(f)},s.prototype.subn=function(f){return this.clone().isubn(f)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(f,p,v){var I=f.length+v,j;this._expand(I);var $,C=0;for(j=0;j<f.length;j++){$=(this.words[j+v]|0)+C;var O=(f.words[j]|0)*p;$-=O&67108863,C=($>>26)-(O/67108864|0),this.words[j+v]=$&67108863}for(;j<this.length-v;j++)$=(this.words[j+v]|0)+C,C=$>>26,this.words[j+v]=$&67108863;if(C===0)return this._strip();for(n(C===-1),C=0,j=0;j<this.length;j++)$=-(this.words[j]|0)+C,C=$>>26,this.words[j]=$&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(f,p){var v=this.length-f.length,I=this.clone(),j=f,$=j.words[j.length-1]|0,C=this._countBits($);v=26-C,v!==0&&(j=j.ushln(v),I.iushln(v),$=j.words[j.length-1]|0);var O=I.length-j.length,_;if(p!=="mod"){_=new s(null),_.length=O+1,_.words=new Array(_.length);for(var P=0;P<_.length;P++)_.words[P]=0}var q=I.clone()._ishlnsubmul(j,1,O);q.negative===0&&(I=q,_&&(_.words[O]=1));for(var W=O-1;W>=0;W--){var K=(I.words[j.length+W]|0)*67108864+(I.words[j.length+W-1]|0);for(K=Math.min(K/$|0,67108863),I._ishlnsubmul(j,K,W);I.negative!==0;)K--,I.negative=0,I._ishlnsubmul(j,1,W),I.isZero()||(I.negative^=1);_&&(_.words[W]=K)}return _&&_._strip(),I._strip(),p!=="div"&&v!==0&&I.iushrn(v),{div:_||null,mod:I}},s.prototype.divmod=function(f,p,v){if(n(!f.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var I,j,$;return this.negative!==0&&f.negative===0?($=this.neg().divmod(f,p),p!=="mod"&&(I=$.div.neg()),p!=="div"&&(j=$.mod.neg(),v&&j.negative!==0&&j.iadd(f)),{div:I,mod:j}):this.negative===0&&f.negative!==0?($=this.divmod(f.neg(),p),p!=="mod"&&(I=$.div.neg()),{div:I,mod:$.mod}):(this.negative&f.negative)!==0?($=this.neg().divmod(f.neg(),p),p!=="div"&&(j=$.mod.neg(),v&&j.negative!==0&&j.isub(f)),{div:$.div,mod:j}):f.length>this.length||this.cmp(f)<0?{div:new s(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new s(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new s(this.modrn(f.words[0]))}:this._wordDiv(f,p)},s.prototype.div=function(f){return this.divmod(f,"div",!1).div},s.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},s.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},s.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var v=p.div.negative!==0?p.mod.isub(f):p.mod,I=f.ushrn(1),j=f.andln(1),$=v.cmp(I);return $<0||j===1&&$===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},s.prototype.modrn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var v=(1<<26)%f,I=0,j=this.length-1;j>=0;j--)I=(v*I+(this.words[j]|0))%f;return p?-I:I},s.prototype.modn=function(f){return this.modrn(f)},s.prototype.idivn=function(f){var p=f<0;p&&(f=-f),n(f<=67108863);for(var v=0,I=this.length-1;I>=0;I--){var j=(this.words[I]|0)+v*67108864;this.words[I]=j/f|0,v=j%f}return this._strip(),p?this.ineg():this},s.prototype.divn=function(f){return this.clone().idivn(f)},s.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var p=this,v=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var I=new s(1),j=new s(0),$=new s(0),C=new s(1),O=0;p.isEven()&&v.isEven();)p.iushrn(1),v.iushrn(1),++O;for(var _=v.clone(),P=p.clone();!p.isZero();){for(var q=0,W=1;(p.words[0]&W)===0&&q<26;++q,W<<=1);if(q>0)for(p.iushrn(q);q-- >0;)(I.isOdd()||j.isOdd())&&(I.iadd(_),j.isub(P)),I.iushrn(1),j.iushrn(1);for(var K=0,Y=1;(v.words[0]&Y)===0&&K<26;++K,Y<<=1);if(K>0)for(v.iushrn(K);K-- >0;)($.isOdd()||C.isOdd())&&($.iadd(_),C.isub(P)),$.iushrn(1),C.iushrn(1);p.cmp(v)>=0?(p.isub(v),I.isub($),j.isub(C)):(v.isub(p),$.isub(I),C.isub(j))}return{a:$,b:C,gcd:v.iushln(O)}},s.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var p=this,v=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var I=new s(1),j=new s(0),$=v.clone();p.cmpn(1)>0&&v.cmpn(1)>0;){for(var C=0,O=1;(p.words[0]&O)===0&&C<26;++C,O<<=1);if(C>0)for(p.iushrn(C);C-- >0;)I.isOdd()&&I.iadd($),I.iushrn(1);for(var _=0,P=1;(v.words[0]&P)===0&&_<26;++_,P<<=1);if(_>0)for(v.iushrn(_);_-- >0;)j.isOdd()&&j.iadd($),j.iushrn(1);p.cmp(v)>=0?(p.isub(v),I.isub(j)):(v.isub(p),j.isub(I))}var q;return p.cmpn(1)===0?q=I:q=j,q.cmpn(0)<0&&q.iadd(f),q},s.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),v=f.clone();p.negative=0,v.negative=0;for(var I=0;p.isEven()&&v.isEven();I++)p.iushrn(1),v.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;v.isEven();)v.iushrn(1);var j=p.cmp(v);if(j<0){var $=p;p=v,v=$}else if(j===0||v.cmpn(1)===0)break;p.isub(v)}while(!0);return v.iushln(I)},s.prototype.invm=function(f){return this.egcd(f).a.umod(f)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(f){return this.words[0]&f},s.prototype.bincn=function(f){n(typeof f=="number");var p=f%26,v=(f-p)/26,I=1<<p;if(this.length<=v)return this._expand(v+1),this.words[v]|=I,this;for(var j=I,$=v;j!==0&&$<this.length;$++){var C=this.words[$]|0;C+=j,j=C>>>26,C&=67108863,this.words[$]=C}return j!==0&&(this.words[$]=j,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var v;if(this.length>1)v=1;else{p&&(f=-f),n(f<=67108863,"Number is too big");var I=this.words[0]|0;v=I===f?0:I<f?-1:1}return this.negative!==0?-v|0:v},s.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var p=this.ucmp(f);return this.negative!==0?-p|0:p},s.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var p=0,v=this.length-1;v>=0;v--){var I=this.words[v]|0,j=f.words[v]|0;if(I!==j){I<j?p=-1:I>j&&(p=1);break}}return p},s.prototype.gtn=function(f){return this.cmpn(f)===1},s.prototype.gt=function(f){return this.cmp(f)===1},s.prototype.gten=function(f){return this.cmpn(f)>=0},s.prototype.gte=function(f){return this.cmp(f)>=0},s.prototype.ltn=function(f){return this.cmpn(f)===-1},s.prototype.lt=function(f){return this.cmp(f)===-1},s.prototype.lten=function(f){return this.cmpn(f)<=0},s.prototype.lte=function(f){return this.cmp(f)<=0},s.prototype.eqn=function(f){return this.cmpn(f)===0},s.prototype.eq=function(f){return this.cmp(f)===0},s.red=function(f){return new D(f)},s.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(f){return this.red=f,this},s.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},s.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},s.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},s.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},s.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},s.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},s.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},s.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var R={k256:null,p224:null,p192:null,p25519:null};function N(y,f){this.name=y,this.p=new s(f,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var f=new s(null);return f.words=new Array(Math.ceil(this.n/13)),f},N.prototype.ireduce=function(f){var p=f,v;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),v=p.bitLength();while(v>this.n);var I=v<this.n?-1:p.ucmp(this.p);return I===0?(p.words[0]=0,p.length=1):I>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},N.prototype.split=function(f,p){f.iushrn(this.n,0,p)},N.prototype.imulK=function(f){return f.imul(this.k)};function z(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(z,N),z.prototype.split=function(f,p){for(var v=4194303,I=Math.min(f.length,9),j=0;j<I;j++)p.words[j]=f.words[j];if(p.length=I,f.length<=9){f.words[0]=0,f.length=1;return}var $=f.words[9];for(p.words[p.length++]=$&v,j=10;j<f.length;j++){var C=f.words[j]|0;f.words[j-10]=(C&v)<<4|$>>>22,$=C}$>>>=22,f.words[j-10]=$,$===0&&f.length>10?f.length-=10:f.length-=9},z.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,v=0;v<f.length;v++){var I=f.words[v]|0;p+=I*977,f.words[v]=p&67108863,p=I*64+(p/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function F(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(F,N);function L(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(L,N);function B(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(B,N),B.prototype.imulK=function(f){for(var p=0,v=0;v<f.length;v++){var I=(f.words[v]|0)*19+p,j=I&67108863;I>>>=26,f.words[v]=j,p=I}return p!==0&&(f.words[f.length++]=p),f},s._prime=function(f){if(R[f])return R[f];var p;if(f==="k256")p=new z;else if(f==="p224")p=new F;else if(f==="p192")p=new L;else if(f==="p25519")p=new B;else throw new Error("Unknown prime "+f);return R[f]=p,p};function D(y){if(typeof y=="string"){var f=s._prime(y);this.m=f.p,this.prime=f}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}D.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},D.prototype._verify2=function(f,p){n((f.negative|p.negative)===0,"red works only with positives"),n(f.red&&f.red===p.red,"red works only with red numbers")},D.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(l(f,f.umod(this.m)._forceRed(this)),f)},D.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},D.prototype.add=function(f,p){this._verify2(f,p);var v=f.add(p);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},D.prototype.iadd=function(f,p){this._verify2(f,p);var v=f.iadd(p);return v.cmp(this.m)>=0&&v.isub(this.m),v},D.prototype.sub=function(f,p){this._verify2(f,p);var v=f.sub(p);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},D.prototype.isub=function(f,p){this._verify2(f,p);var v=f.isub(p);return v.cmpn(0)<0&&v.iadd(this.m),v},D.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},D.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},D.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},D.prototype.isqr=function(f){return this.imul(f,f.clone())},D.prototype.sqr=function(f){return this.mul(f,f)},D.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(n(p%2===1),p===3){var v=this.m.add(new s(1)).iushrn(2);return this.pow(f,v)}for(var I=this.m.subn(1),j=0;!I.isZero()&&I.andln(1)===0;)j++,I.iushrn(1);n(!I.isZero());var $=new s(1).toRed(this),C=$.redNeg(),O=this.m.subn(1).iushrn(1),_=this.m.bitLength();for(_=new s(2*_*_).toRed(this);this.pow(_,O).cmp(C)!==0;)_.redIAdd(C);for(var P=this.pow(_,I),q=this.pow(f,I.addn(1).iushrn(1)),W=this.pow(f,I),K=j;W.cmp($)!==0;){for(var Y=W,te=0;Y.cmp($)!==0;te++)Y=Y.redSqr();n(te<K);var re=this.pow(P,new s(1).iushln(K-te-1));q=q.redMul(re),P=re.redSqr(),W=W.redMul(P),K=te}return q},D.prototype.invm=function(f){var p=f._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},D.prototype.pow=function(f,p){if(p.isZero())return new s(1).toRed(this);if(p.cmpn(1)===0)return f.clone();var v=4,I=new Array(1<<v);I[0]=new s(1).toRed(this),I[1]=f;for(var j=2;j<I.length;j++)I[j]=this.mul(I[j-1],f);var $=I[0],C=0,O=0,_=p.bitLength()%26;for(_===0&&(_=26),j=p.length-1;j>=0;j--){for(var P=p.words[j],q=_-1;q>=0;q--){var W=P>>q&1;if($!==I[0]&&($=this.sqr($)),W===0&&C===0){O=0;continue}C<<=1,C|=W,O++,!(O!==v&&(j!==0||q!==0))&&($=this.mul($,I[C]),O=0,C=0)}_=26}return $},D.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},D.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},s.mont=function(f){return new x(f)};function x(y){D.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(x,D),x.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},x.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},x.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var v=f.imul(p),I=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=v.isub(I).iushrn(this.shift),$=j;return j.cmp(this.m)>=0?$=j.isub(this.m):j.cmpn(0)<0&&($=j.iadd(this.m)),$._forceRed(this)},x.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new s(0)._forceRed(this);var v=f.mul(p),I=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=v.isub(I).iushrn(this.shift),$=j;return j.cmp(this.m)>=0?$=j.isub(this.m):j.cmpn(0)<0&&($=j.iadd(this.m)),$._forceRed(this)},x.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(e,hye)}(Bw)),Bw.exports}var M8,Cj;function gye(){if(Cj)return M8;Cj=1;var e=iG().Buffer;function t(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),i=0;i<n.length;i++)n[i]=255;for(var s=0;s<r.length;s++){var o=r.charAt(s),a=o.charCodeAt(0);if(n[a]!==255)throw new TypeError(o+" is ambiguous");n[a]=s}var c=r.length,u=r.charAt(0),l=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function h(b){if((Array.isArray(b)||b instanceof Uint8Array)&&(b=e.from(b)),!e.isBuffer(b))throw new TypeError("Expected Buffer");if(b.length===0)return"";for(var k=0,w=0,E=0,A=b.length;E!==A&&b[E]===0;)E++,k++;for(var M=(A-E)*d+1>>>0,R=new Uint8Array(M);E!==A;){for(var N=b[E],z=0,F=M-1;(N!==0||z<w)&&F!==-1;F--,z++)N+=256*R[F]>>>0,R[F]=N%c>>>0,N=N/c>>>0;if(N!==0)throw new Error("Non-zero carry");w=z,E++}for(var L=M-w;L!==M&&R[L]===0;)L++;for(var B=u.repeat(k);L<M;++L)B+=r.charAt(R[L]);return B}function g(b){if(typeof b!="string")throw new TypeError("Expected String");if(b.length===0)return e.alloc(0);for(var k=0,w=0,E=0;b[k]===u;)w++,k++;for(var A=(b.length-k)*l+1>>>0,M=new Uint8Array(A);k<b.length;){var R=b.charCodeAt(k);if(R>255)return;var N=n[R];if(N===255)return;for(var z=0,F=A-1;(N!==0||z<E)&&F!==-1;F--,z++)N+=c*M[F]>>>0,M[F]=N%256>>>0,N=N/256>>>0;if(N!==0)throw new Error("Non-zero carry");E=z,k++}for(var L=A-E;L!==A&&M[L]===0;)L++;var B=e.allocUnsafe(w+(A-L));B.fill(0,0,w);for(var D=w;L!==A;)B[D++]=M[L++];return B}function m(b){var k=g(b);if(k)return k;throw new Error("Non-base"+c+" character")}return{encode:h,decodeUnsafe:g,decode:m}}return M8=t,M8}var $8,Ij;function mye(){if(Ij)return $8;Ij=1;var e=gye(),t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";return $8=e(t),$8}function Nu(e,t,r){return t<=e&&e<=r}function b4(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function bye(e){for(var t=String(e),r=t.length,n=0,i=[];n<r;){var s=t.charCodeAt(n);if(s<55296||s>57343)i.push(s);else if(56320<=s&&s<=57343)i.push(65533);else if(55296<=s&&s<=56319)if(n===r-1)i.push(65533);else{var o=e.charCodeAt(n+1);if(56320<=o&&o<=57343){var a=s&1023,c=o&1023;i.push(65536+(a<<10)+c),n+=1}else i.push(65533)}n+=1}return i}function yye(e){for(var t="",r=0;r<e.length;++r){var n=e[r];n<=65535?t+=String.fromCharCode(n):(n-=65536,t+=String.fromCharCode((n>>10)+55296,(n&1023)+56320))}return t}var Ov=-1;function BC(e){this.tokens=[].slice.call(e)}BC.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():Ov},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var Op=-1;function T8(e,t){if(e)throw TypeError("Decoder error");return t||65533}var jv="utf-8";function Pv(e,t){if(!(this instanceof Pv))return new Pv(e,t);if(e=e!==void 0?String(e).toLowerCase():jv,e!==jv)throw new Error("Encoding not supported. Only utf-8 is supported");t=b4(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}Pv.prototype={decode:function(t,r){var n;typeof t=="object"&&t instanceof ArrayBuffer?n=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):n=new Uint8Array(0),r=b4(r),this._streaming||(this._decoder=new wye({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!r.stream;for(var i=new BC(n),s=[],o;!i.endOfStream()&&(o=this._decoder.handler(i,i.read()),o!==Op);)o!==null&&(Array.isArray(o)?s.push.apply(s,o):s.push(o));if(!this._streaming){do{if(o=this._decoder.handler(i,i.read()),o===Op)break;o!==null&&(Array.isArray(o)?s.push.apply(s,o):s.push(o))}while(!i.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),yye(s)}};function Dv(e,t){if(!(this instanceof Dv))return new Dv(e,t);if(e=e!==void 0?String(e).toLowerCase():jv,e!==jv)throw new Error("Encoding not supported. Only utf-8 is supported");t=b4(t),this._streaming=!1,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}Dv.prototype={encode:function(t,r){t=t?String(t):"",r=b4(r),this._streaming||(this._encoder=new vye(this._options)),this._streaming=!!r.stream;for(var n=[],i=new BC(bye(t)),s;!i.endOfStream()&&(s=this._encoder.handler(i,i.read()),s!==Op);)Array.isArray(s)?n.push.apply(n,s):n.push(s);if(!this._streaming){for(;s=this._encoder.handler(i,i.read()),s!==Op;)Array.isArray(s)?n.push.apply(n,s):n.push(s);this._encoder=null}return new Uint8Array(n)}};function wye(e){var t=e.fatal,r=0,n=0,i=0,s=128,o=191;this.handler=function(a,c){if(c===Ov&&i!==0)return i=0,T8(t);if(c===Ov)return Op;if(i===0){if(Nu(c,0,127))return c;if(Nu(c,194,223))i=1,r=c-192;else if(Nu(c,224,239))c===224&&(s=160),c===237&&(o=159),i=2,r=c-224;else if(Nu(c,240,244))c===240&&(s=144),c===244&&(o=143),i=3,r=c-240;else return T8(t);return r=r<<6*i,null}if(!Nu(c,s,o))return r=i=n=0,s=128,o=191,a.prepend(c),T8(t);if(s=128,o=191,n+=1,r+=c-128<<6*(i-n),n!==i)return null;var u=r;return r=i=n=0,u}}function vye(e){e.fatal,this.handler=function(t,r){if(r===Ov)return Op;if(Nu(r,0,127))return r;var n,i;Nu(r,128,2047)?(n=1,i=192):Nu(r,2048,65535)?(n=2,i=224):Nu(r,65536,1114111)&&(n=3,i=240);for(var s=[(r>>6*n)+i];n>0;){var o=r>>6*(n-1);s.push(128|o&63),n-=1}return s}}const _ye=Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:Pv,TextEncoder:Dv},Symbol.toStringTag,{value:"Module"})),xye=F2(_ye);var Mj;function Eye(){if(Mj)return Tr;Mj=1;var e=Tr&&Tr.__createBinding||(Object.create?function(L,B,D,x){x===void 0&&(x=D),Object.defineProperty(L,x,{enumerable:!0,get:function(){return B[D]}})}:function(L,B,D,x){x===void 0&&(x=D),L[x]=B[D]}),t=Tr&&Tr.__setModuleDefault||(Object.create?function(L,B){Object.defineProperty(L,"default",{enumerable:!0,value:B})}:function(L,B){L.default=B}),r=Tr&&Tr.__decorate||function(L,B,D,x){var y=arguments.length,f=y<3?B:x===null?x=Object.getOwnPropertyDescriptor(B,D):x,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(L,B,D,x);else for(var v=L.length-1;v>=0;v--)(p=L[v])&&(f=(y<3?p(f):y>3?p(B,D,f):p(B,D))||f);return y>3&&f&&Object.defineProperty(B,D,f),f},n=Tr&&Tr.__importStar||function(L){if(L&&L.__esModule)return L;var B={};if(L!=null)for(var D in L)D!=="default"&&Object.hasOwnProperty.call(L,D)&&e(B,L,D);return t(B,L),B},i=Tr&&Tr.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.deserializeUnchecked=Tr.deserialize=Tr.serialize=Tr.BinaryReader=Tr.BinaryWriter=Tr.BorshError=Tr.baseDecode=Tr.baseEncode=void 0;const s=i(pye()),o=i(mye()),a=n(xye),c=typeof TextDecoder!="function"?a.TextDecoder:TextDecoder,u=new c("utf-8",{fatal:!0});function l(L){return typeof L=="string"&&(L=Buffer.from(L,"utf8")),o.default.encode(Buffer.from(L))}Tr.baseEncode=l;function d(L){return Buffer.from(o.default.decode(L))}Tr.baseDecode=d;const h=1024;class g extends Error{constructor(B){super(B),this.fieldPath=[],this.originalMessage=B}addToFieldPath(B){this.fieldPath.splice(0,0,B),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}Tr.BorshError=g;class m{constructor(){this.buf=Buffer.alloc(h),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(h)]))}writeU8(B){this.maybeResize(),this.buf.writeUInt8(B,this.length),this.length+=1}writeU16(B){this.maybeResize(),this.buf.writeUInt16LE(B,this.length),this.length+=2}writeU32(B){this.maybeResize(),this.buf.writeUInt32LE(B,this.length),this.length+=4}writeU64(B){this.maybeResize(),this.writeBuffer(Buffer.from(new s.default(B).toArray("le",8)))}writeU128(B){this.maybeResize(),this.writeBuffer(Buffer.from(new s.default(B).toArray("le",16)))}writeU256(B){this.maybeResize(),this.writeBuffer(Buffer.from(new s.default(B).toArray("le",32)))}writeU512(B){this.maybeResize(),this.writeBuffer(Buffer.from(new s.default(B).toArray("le",64)))}writeBuffer(B){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),B,Buffer.alloc(h)]),this.length+=B.length}writeString(B){this.maybeResize();const D=Buffer.from(B,"utf8");this.writeU32(D.length),this.writeBuffer(D)}writeFixedArray(B){this.writeBuffer(Buffer.from(B))}writeArray(B,D){this.maybeResize(),this.writeU32(B.length);for(const x of B)this.maybeResize(),D(x)}toArray(){return this.buf.subarray(0,this.length)}}Tr.BinaryWriter=m;function b(L,B,D){const x=D.value;D.value=function(...y){try{return x.apply(this,y)}catch(f){if(f instanceof RangeError){const p=f.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(p)>=0)throw new g("Reached the end of buffer when deserializing")}throw f}}}class k{constructor(B){this.buf=B,this.offset=0}readU8(){const B=this.buf.readUInt8(this.offset);return this.offset+=1,B}readU16(){const B=this.buf.readUInt16LE(this.offset);return this.offset+=2,B}readU32(){const B=this.buf.readUInt32LE(this.offset);return this.offset+=4,B}readU64(){const B=this.readBuffer(8);return new s.default(B,"le")}readU128(){const B=this.readBuffer(16);return new s.default(B,"le")}readU256(){const B=this.readBuffer(32);return new s.default(B,"le")}readU512(){const B=this.readBuffer(64);return new s.default(B,"le")}readBuffer(B){if(this.offset+B>this.buf.length)throw new g(`Expected buffer length ${B} isn't within bounds`);const D=this.buf.slice(this.offset,this.offset+B);return this.offset+=B,D}readString(){const B=this.readU32(),D=this.readBuffer(B);try{return u.decode(D)}catch(x){throw new g(`Error decoding UTF-8 string: ${x}`)}}readFixedArray(B){return new Uint8Array(this.readBuffer(B))}readArray(B){const D=this.readU32(),x=Array();for(let y=0;y<D;++y)x.push(B());return x}}r([b],k.prototype,"readU8",null),r([b],k.prototype,"readU16",null),r([b],k.prototype,"readU32",null),r([b],k.prototype,"readU64",null),r([b],k.prototype,"readU128",null),r([b],k.prototype,"readU256",null),r([b],k.prototype,"readU512",null),r([b],k.prototype,"readString",null),r([b],k.prototype,"readFixedArray",null),r([b],k.prototype,"readArray",null),Tr.BinaryReader=k;function w(L){return L.charAt(0).toUpperCase()+L.slice(1)}function E(L,B,D,x,y){try{if(typeof x=="string")y[`write${w(x)}`](D);else if(x instanceof Array)if(typeof x[0]=="number"){if(D.length!==x[0])throw new g(`Expecting byte array of length ${x[0]}, but got ${D.length} bytes`);y.writeFixedArray(D)}else if(x.length===2&&typeof x[1]=="number"){if(D.length!==x[1])throw new g(`Expecting byte array of length ${x[1]}, but got ${D.length} bytes`);for(let f=0;f<x[1];f++)E(L,null,D[f],x[0],y)}else y.writeArray(D,f=>{E(L,B,f,x[0],y)});else if(x.kind!==void 0)switch(x.kind){case"option":{D==null?y.writeU8(0):(y.writeU8(1),E(L,B,D,x.type,y));break}case"map":{y.writeU32(D.size),D.forEach((f,p)=>{E(L,B,p,x.key,y),E(L,B,f,x.value,y)});break}default:throw new g(`FieldType ${x} unrecognized`)}else A(L,D,y)}catch(f){throw f instanceof g&&f.addToFieldPath(B),f}}function A(L,B,D){if(typeof B.borshSerialize=="function"){B.borshSerialize(D);return}const x=L.get(B.constructor);if(!x)throw new g(`Class ${B.constructor.name} is missing in schema`);if(x.kind==="struct")x.fields.map(([y,f])=>{E(L,y,B[y],f,D)});else if(x.kind==="enum"){const y=B[x.field];for(let f=0;f<x.values.length;++f){const[p,v]=x.values[f];if(p===y){D.writeU8(f),E(L,p,B[p],v,D);break}}}else throw new g(`Unexpected schema kind: ${x.kind} for ${B.constructor.name}`)}function M(L,B,D=m){const x=new D;return A(L,B,x),x.toArray()}Tr.serialize=M;function R(L,B,D,x){try{if(typeof D=="string")return x[`read${w(D)}`]();if(D instanceof Array){if(typeof D[0]=="number")return x.readFixedArray(D[0]);if(typeof D[1]=="number"){const y=[];for(let f=0;f<D[1];f++)y.push(R(L,null,D[0],x));return y}else return x.readArray(()=>R(L,B,D[0],x))}if(D.kind==="option")return x.readU8()?R(L,B,D.type,x):void 0;if(D.kind==="map"){let y=new Map;const f=x.readU32();for(let p=0;p<f;p++){const v=R(L,B,D.key,x),I=R(L,B,D.value,x);y.set(v,I)}return y}return N(L,D,x)}catch(y){throw y instanceof g&&y.addToFieldPath(B),y}}function N(L,B,D){if(typeof B.borshDeserialize=="function")return B.borshDeserialize(D);const x=L.get(B);if(!x)throw new g(`Class ${B.name} is missing in schema`);if(x.kind==="struct"){const y={};for(const[f,p]of L.get(B).fields)y[f]=R(L,f,p,D);return new B(y)}if(x.kind==="enum"){const y=D.readU8();if(y>=x.values.length)throw new g(`Enum index: ${y} is out of range`);const[f,p]=x.values[y],v=R(L,f,p,D);return new B({[f]:v})}throw new g(`Unexpected schema kind: ${x.kind} for ${B.constructor.name}`)}function z(L,B,D,x=k){const y=new x(D),f=N(L,B,y);if(y.offset<D.length)throw new g(`Unexpected ${D.length-y.offset} bytes after deserialized data`);return f}Tr.deserialize=z;function F(L,B,D,x=k){const y=new x(D);return N(L,B,y)}return Tr.deserializeUnchecked=F,Tr}var N8=Eye(),ge={},$j;function kye(){if($j)return ge;$j=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.s16=ge.s8=ge.nu64be=ge.u48be=ge.u40be=ge.u32be=ge.u24be=ge.u16be=ge.nu64=ge.u48=ge.u40=ge.u32=ge.u24=ge.u16=ge.u8=ge.offset=ge.greedy=ge.Constant=ge.UTF8=ge.CString=ge.Blob=ge.Boolean=ge.BitField=ge.BitStructure=ge.VariantLayout=ge.Union=ge.UnionLayoutDiscriminator=ge.UnionDiscriminator=ge.Structure=ge.Sequence=ge.DoubleBE=ge.Double=ge.FloatBE=ge.Float=ge.NearInt64BE=ge.NearInt64=ge.NearUInt64BE=ge.NearUInt64=ge.IntBE=ge.Int=ge.UIntBE=ge.UInt=ge.OffsetLayout=ge.GreedyCount=ge.ExternalLayout=ge.bindConstructorLayout=ge.nameWithProperty=ge.Layout=ge.uint8ArrayToBuffer=ge.checkUint8Array=void 0,ge.constant=ge.utf8=ge.cstr=ge.blob=ge.unionLayoutDiscriminator=ge.union=ge.seq=ge.bits=ge.struct=ge.f64be=ge.f64=ge.f32be=ge.f32=ge.ns64be=ge.s48be=ge.s40be=ge.s32be=ge.s24be=ge.s16be=ge.ns64=ge.s48=ge.s40=ge.s32=ge.s24=void 0;const e=OC();function t(_){if(!(_ instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}ge.checkUint8Array=t;function r(_){return t(_),e.Buffer.from(_.buffer,_.byteOffset,_.length)}ge.uint8ArrayToBuffer=r;let n=class{constructor(P,q){if(!Number.isInteger(P))throw new TypeError("span must be an integer");this.span=P,this.property=q}makeDestinationObject(){return{}}getSpan(P,q){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(P){const q=Object.create(this.constructor.prototype);return Object.assign(q,this),q.property=P,q}fromArray(P){}};ge.Layout=n;function i(_,P){return P.property?_+"["+P.property+"]":_}ge.nameWithProperty=i;function s(_,P){if(typeof _!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(_,"layout_"))throw new Error("Class is already bound to a layout");if(!(P&&P instanceof n))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(P,"boundConstructor_"))throw new Error("layout is already bound to a constructor");_.layout_=P,P.boundConstructor_=_,P.makeDestinationObject=()=>new _,Object.defineProperty(_.prototype,"encode",{value(q,W){return P.encode(this,q,W)},writable:!0}),Object.defineProperty(_,"decode",{value(q,W){return P.decode(q,W)},writable:!0})}ge.bindConstructorLayout=s;class o extends n{isCount(){throw new Error("ExternalLayout is abstract")}}ge.ExternalLayout=o;class a extends o{constructor(P=1,q){if(!Number.isInteger(P)||0>=P)throw new TypeError("elementSpan must be a (positive) integer");super(-1,q),this.elementSpan=P}isCount(){return!0}decode(P,q=0){t(P);const W=P.length-q;return Math.floor(W/this.elementSpan)}encode(P,q,W){return 0}}ge.GreedyCount=a;class c extends o{constructor(P,q=0,W){if(!(P instanceof n))throw new TypeError("layout must be a Layout");if(!Number.isInteger(q))throw new TypeError("offset must be integer or undefined");super(P.span,W||P.property),this.layout=P,this.offset=q}isCount(){return this.layout instanceof u||this.layout instanceof l}decode(P,q=0){return this.layout.decode(P,q+this.offset)}encode(P,q,W=0){return this.layout.encode(P,q,W+this.offset)}}ge.OffsetLayout=c;class u extends n{constructor(P,q){if(super(P,q),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(P,q=0){return r(P).readUIntLE(q,this.span)}encode(P,q,W=0){return r(q).writeUIntLE(P,W,this.span),this.span}}ge.UInt=u;class l extends n{constructor(P,q){if(super(P,q),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(P,q=0){return r(P).readUIntBE(q,this.span)}encode(P,q,W=0){return r(q).writeUIntBE(P,W,this.span),this.span}}ge.UIntBE=l;class d extends n{constructor(P,q){if(super(P,q),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(P,q=0){return r(P).readIntLE(q,this.span)}encode(P,q,W=0){return r(q).writeIntLE(P,W,this.span),this.span}}ge.Int=d;class h extends n{constructor(P,q){if(super(P,q),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(P,q=0){return r(P).readIntBE(q,this.span)}encode(P,q,W=0){return r(q).writeIntBE(P,W,this.span),this.span}}ge.IntBE=h;const g=Math.pow(2,32);function m(_){const P=Math.floor(_/g),q=_-P*g;return{hi32:P,lo32:q}}function b(_,P){return _*g+P}class k extends n{constructor(P){super(8,P)}decode(P,q=0){const W=r(P),K=W.readUInt32LE(q),Y=W.readUInt32LE(q+4);return b(Y,K)}encode(P,q,W=0){const K=m(P),Y=r(q);return Y.writeUInt32LE(K.lo32,W),Y.writeUInt32LE(K.hi32,W+4),8}}ge.NearUInt64=k;class w extends n{constructor(P){super(8,P)}decode(P,q=0){const W=r(P),K=W.readUInt32BE(q),Y=W.readUInt32BE(q+4);return b(K,Y)}encode(P,q,W=0){const K=m(P),Y=r(q);return Y.writeUInt32BE(K.hi32,W),Y.writeUInt32BE(K.lo32,W+4),8}}ge.NearUInt64BE=w;class E extends n{constructor(P){super(8,P)}decode(P,q=0){const W=r(P),K=W.readUInt32LE(q),Y=W.readInt32LE(q+4);return b(Y,K)}encode(P,q,W=0){const K=m(P),Y=r(q);return Y.writeUInt32LE(K.lo32,W),Y.writeInt32LE(K.hi32,W+4),8}}ge.NearInt64=E;class A extends n{constructor(P){super(8,P)}decode(P,q=0){const W=r(P),K=W.readInt32BE(q),Y=W.readUInt32BE(q+4);return b(K,Y)}encode(P,q,W=0){const K=m(P),Y=r(q);return Y.writeInt32BE(K.hi32,W),Y.writeUInt32BE(K.lo32,W+4),8}}ge.NearInt64BE=A;class M extends n{constructor(P){super(4,P)}decode(P,q=0){return r(P).readFloatLE(q)}encode(P,q,W=0){return r(q).writeFloatLE(P,W),4}}ge.Float=M;class R extends n{constructor(P){super(4,P)}decode(P,q=0){return r(P).readFloatBE(q)}encode(P,q,W=0){return r(q).writeFloatBE(P,W),4}}ge.FloatBE=R;class N extends n{constructor(P){super(8,P)}decode(P,q=0){return r(P).readDoubleLE(q)}encode(P,q,W=0){return r(q).writeDoubleLE(P,W),8}}ge.Double=N;class z extends n{constructor(P){super(8,P)}decode(P,q=0){return r(P).readDoubleBE(q)}encode(P,q,W=0){return r(q).writeDoubleBE(P,W),8}}ge.DoubleBE=z;class F extends n{constructor(P,q,W){if(!(P instanceof n))throw new TypeError("elementLayout must be a Layout");if(!(q instanceof o&&q.isCount()||Number.isInteger(q)&&0<=q))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let K=-1;!(q instanceof o)&&0<P.span&&(K=q*P.span),super(K,W),this.elementLayout=P,this.count=q}getSpan(P,q=0){if(0<=this.span)return this.span;let W=0,K=this.count;if(K instanceof o&&(K=K.decode(P,q)),0<this.elementLayout.span)W=K*this.elementLayout.span;else{let Y=0;for(;Y<K;)W+=this.elementLayout.getSpan(P,q+W),++Y}return W}decode(P,q=0){const W=[];let K=0,Y=this.count;for(Y instanceof o&&(Y=Y.decode(P,q));K<Y;)W.push(this.elementLayout.decode(P,q)),q+=this.elementLayout.getSpan(P,q),K+=1;return W}encode(P,q,W=0){const K=this.elementLayout,Y=P.reduce((te,re)=>te+K.encode(re,q,W+te),0);return this.count instanceof o&&this.count.encode(P.length,q,W),Y}}ge.Sequence=F;class L extends n{constructor(P,q,W){if(!(Array.isArray(P)&&P.reduce((Y,te)=>Y&&te instanceof n,!0)))throw new TypeError("fields must be array of Layout instances");typeof q=="boolean"&&W===void 0&&(W=q,q=void 0);for(const Y of P)if(0>Y.span&&Y.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let K=-1;try{K=P.reduce((Y,te)=>Y+te.getSpan(),0)}catch{}super(K,q),this.fields=P,this.decodePrefixes=!!W}getSpan(P,q=0){if(0<=this.span)return this.span;let W=0;try{W=this.fields.reduce((K,Y)=>{const te=Y.getSpan(P,q);return q+=te,K+te},0)}catch{throw new RangeError("indeterminate span")}return W}decode(P,q=0){t(P);const W=this.makeDestinationObject();for(const K of this.fields)if(K.property!==void 0&&(W[K.property]=K.decode(P,q)),q+=K.getSpan(P,q),this.decodePrefixes&&P.length===q)break;return W}encode(P,q,W=0){const K=W;let Y=0,te=0;for(const re of this.fields){let be=re.span;if(te=0<be?be:0,re.property!==void 0){const ve=P[re.property];ve!==void 0&&(te=re.encode(ve,q,W),0>be&&(be=re.getSpan(q,W)))}Y=W,W+=be}return Y+te-K}fromArray(P){const q=this.makeDestinationObject();for(const W of this.fields)W.property!==void 0&&0<P.length&&(q[W.property]=P.shift());return q}layoutFor(P){if(typeof P!="string")throw new TypeError("property must be string");for(const q of this.fields)if(q.property===P)return q}offsetOf(P){if(typeof P!="string")throw new TypeError("property must be string");let q=0;for(const W of this.fields){if(W.property===P)return q;0>W.span?q=-1:0<=q&&(q+=W.span)}}}ge.Structure=L;class B{constructor(P){this.property=P}decode(P,q){throw new Error("UnionDiscriminator is abstract")}encode(P,q,W){throw new Error("UnionDiscriminator is abstract")}}ge.UnionDiscriminator=B;class D extends B{constructor(P,q){if(!(P instanceof o&&P.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(q||P.property||"variant"),this.layout=P}decode(P,q){return this.layout.decode(P,q)}encode(P,q,W){return this.layout.encode(P,q,W)}}ge.UnionLayoutDiscriminator=D;class x extends n{constructor(P,q,W){let K;if(P instanceof u||P instanceof l)K=new D(new c(P));else if(P instanceof o&&P.isCount())K=new D(P);else if(P instanceof B)K=P;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(q===void 0&&(q=null),!(q===null||q instanceof n))throw new TypeError("defaultLayout must be null or a Layout");if(q!==null){if(0>q.span)throw new Error("defaultLayout must have constant span");q.property===void 0&&(q=q.replicate("content"))}let Y=-1;q&&(Y=q.span,0<=Y&&(P instanceof u||P instanceof l)&&(Y+=K.layout.span)),super(Y,W),this.discriminator=K,this.usesPrefixDiscriminator=P instanceof u||P instanceof l,this.defaultLayout=q,this.registry={};let te=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(re){return te(re)},this.configGetSourceVariant=function(re){te=re.bind(this)}}getSpan(P,q=0){if(0<=this.span)return this.span;const W=this.getVariant(P,q);if(!W)throw new Error("unable to determine span for unrecognized variant");return W.getSpan(P,q)}defaultGetSourceVariant(P){if(Object.prototype.hasOwnProperty.call(P,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(P,this.defaultLayout.property))return;const q=this.registry[P[this.discriminator.property]];if(q&&(!q.layout||q.property&&Object.prototype.hasOwnProperty.call(P,q.property)))return q}else for(const q in this.registry){const W=this.registry[q];if(W.property&&Object.prototype.hasOwnProperty.call(P,W.property))return W}throw new Error("unable to infer src variant")}decode(P,q=0){let W;const K=this.discriminator,Y=K.decode(P,q),te=this.registry[Y];if(te===void 0){const re=this.defaultLayout;let be=0;this.usesPrefixDiscriminator&&(be=K.layout.span),W=this.makeDestinationObject(),W[K.property]=Y,W[re.property]=re.decode(P,q+be)}else W=te.decode(P,q);return W}encode(P,q,W=0){const K=this.getSourceVariant(P);if(K===void 0){const Y=this.discriminator,te=this.defaultLayout;let re=0;return this.usesPrefixDiscriminator&&(re=Y.layout.span),Y.encode(P[Y.property],q,W),re+te.encode(P[te.property],q,W+re)}return K.encode(P,q,W)}addVariant(P,q,W){const K=new y(this,P,q,W);return this.registry[P]=K,K}getVariant(P,q=0){let W;return P instanceof Uint8Array?W=this.discriminator.decode(P,q):W=P,this.registry[W]}}ge.Union=x;class y extends n{constructor(P,q,W,K){if(!(P instanceof x))throw new TypeError("union must be a Union");if(!Number.isInteger(q)||0>q)throw new TypeError("variant must be a (non-negative) integer");if(typeof W=="string"&&K===void 0&&(K=W,W=null),W){if(!(W instanceof n))throw new TypeError("layout must be a Layout");if(P.defaultLayout!==null&&0<=W.span&&W.span>P.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof K!="string")throw new TypeError("variant must have a String property")}let Y=P.span;0>P.span&&(Y=W?W.span:0,0<=Y&&P.usesPrefixDiscriminator&&(Y+=P.discriminator.layout.span)),super(Y,K),this.union=P,this.variant=q,this.layout=W||null}getSpan(P,q=0){if(0<=this.span)return this.span;let W=0;this.union.usesPrefixDiscriminator&&(W=this.union.discriminator.layout.span);let K=0;return this.layout&&(K=this.layout.getSpan(P,q+W)),W+K}decode(P,q=0){const W=this.makeDestinationObject();if(this!==this.union.getVariant(P,q))throw new Error("variant mismatch");let K=0;return this.union.usesPrefixDiscriminator&&(K=this.union.discriminator.layout.span),this.layout?W[this.property]=this.layout.decode(P,q+K):this.property?W[this.property]=!0:this.union.usesPrefixDiscriminator&&(W[this.union.discriminator.property]=this.variant),W}encode(P,q,W=0){let K=0;if(this.union.usesPrefixDiscriminator&&(K=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(P,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,q,W);let Y=K;if(this.layout&&(this.layout.encode(P[this.property],q,W+K),Y+=this.layout.getSpan(q,W+K),0<=this.union.span&&Y>this.union.span))throw new Error("encoded variant overruns containing union");return Y}fromArray(P){if(this.layout)return this.layout.fromArray(P)}}ge.VariantLayout=y;function f(_){return 0>_&&(_+=4294967296),_}class p extends n{constructor(P,q,W){if(!(P instanceof u||P instanceof l))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof q=="string"&&W===void 0&&(W=q,q=!1),4<P.span)throw new RangeError("word cannot exceed 32 bits");super(P.span,W),this.word=P,this.msb=!!q,this.fields=[];let K=0;this._packedSetValue=function(Y){return K=f(Y),this},this._packedGetValue=function(){return K}}decode(P,q=0){const W=this.makeDestinationObject(),K=this.word.decode(P,q);this._packedSetValue(K);for(const Y of this.fields)Y.property!==void 0&&(W[Y.property]=Y.decode(P));return W}encode(P,q,W=0){const K=this.word.decode(q,W);this._packedSetValue(K);for(const Y of this.fields)if(Y.property!==void 0){const te=P[Y.property];te!==void 0&&Y.encode(te)}return this.word.encode(this._packedGetValue(),q,W)}addField(P,q){const W=new v(this,P,q);return this.fields.push(W),W}addBoolean(P){const q=new I(this,P);return this.fields.push(q),q}fieldFor(P){if(typeof P!="string")throw new TypeError("property must be string");for(const q of this.fields)if(q.property===P)return q}}ge.BitStructure=p;class v{constructor(P,q,W){if(!(P instanceof p))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(q)||0>=q)throw new TypeError("bits must be positive integer");const K=8*P.span,Y=P.fields.reduce((te,re)=>te+re.bits,0);if(q+Y>K)throw new Error("bits too long for span remainder ("+(K-Y)+" of "+K+" remain)");this.container=P,this.bits=q,this.valueMask=(1<<q)-1,q===32&&(this.valueMask=4294967295),this.start=Y,this.container.msb&&(this.start=K-Y-q),this.wordMask=f(this.valueMask<<this.start),this.property=W}decode(P,q){const W=this.container._packedGetValue();return f(W&this.wordMask)>>>this.start}encode(P){if(typeof P!="number"||!Number.isInteger(P)||P!==f(P&this.valueMask))throw new TypeError(i("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const q=this.container._packedGetValue(),W=f(P<<this.start);this.container._packedSetValue(f(q&~this.wordMask)|W)}}ge.BitField=v;class I extends v{constructor(P,q){super(P,1,q)}decode(P,q){return!!super.decode(P,q)}encode(P){typeof P=="boolean"&&(P=+P),super.encode(P)}}ge.Boolean=I;class j extends n{constructor(P,q){if(!(P instanceof o&&P.isCount()||Number.isInteger(P)&&0<=P))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let W=-1;P instanceof o||(W=P),super(W,q),this.length=P}getSpan(P,q){let W=this.span;return 0>W&&(W=this.length.decode(P,q)),W}decode(P,q=0){let W=this.span;return 0>W&&(W=this.length.decode(P,q)),r(P).slice(q,q+W)}encode(P,q,W){let K=this.length;if(this.length instanceof o&&(K=P.length),!(P instanceof Uint8Array&&K===P.length))throw new TypeError(i("Blob.encode",this)+" requires (length "+K+") Uint8Array as src");if(W+K>q.length)throw new RangeError("encoding overruns Uint8Array");const Y=r(P);return r(q).write(Y.toString("hex"),W,K,"hex"),this.length instanceof o&&this.length.encode(K,q,W),K}}ge.Blob=j;class $ extends n{constructor(P){super(-1,P)}getSpan(P,q=0){t(P);let W=q;for(;W<P.length&&P[W]!==0;)W+=1;return 1+W-q}decode(P,q=0){const W=this.getSpan(P,q);return r(P).slice(q,q+W-1).toString("utf-8")}encode(P,q,W=0){typeof P!="string"&&(P=String(P));const K=e.Buffer.from(P,"utf8"),Y=K.length;if(W+Y>q.length)throw new RangeError("encoding overruns Buffer");const te=r(q);return K.copy(te,W),te[W+Y]=0,Y+1}}ge.CString=$;class C extends n{constructor(P,q){if(typeof P=="string"&&q===void 0&&(q=P,P=void 0),P===void 0)P=-1;else if(!Number.isInteger(P))throw new TypeError("maxSpan must be an integer");super(-1,q),this.maxSpan=P}getSpan(P,q=0){return t(P),P.length-q}decode(P,q=0){const W=this.getSpan(P,q);if(0<=this.maxSpan&&this.maxSpan<W)throw new RangeError("text length exceeds maxSpan");return r(P).slice(q,q+W).toString("utf-8")}encode(P,q,W=0){typeof P!="string"&&(P=String(P));const K=e.Buffer.from(P,"utf8"),Y=K.length;if(0<=this.maxSpan&&this.maxSpan<Y)throw new RangeError("text length exceeds maxSpan");if(W+Y>q.length)throw new RangeError("encoding overruns Buffer");return K.copy(r(q),W),Y}}ge.UTF8=C;class O extends n{constructor(P,q){super(0,q),this.value=P}decode(P,q){return this.value}encode(P,q,W){return 0}}return ge.Constant=O,ge.greedy=(_,P)=>new a(_,P),ge.offset=(_,P,q)=>new c(_,P,q),ge.u8=_=>new u(1,_),ge.u16=_=>new u(2,_),ge.u24=_=>new u(3,_),ge.u32=_=>new u(4,_),ge.u40=_=>new u(5,_),ge.u48=_=>new u(6,_),ge.nu64=_=>new k(_),ge.u16be=_=>new l(2,_),ge.u24be=_=>new l(3,_),ge.u32be=_=>new l(4,_),ge.u40be=_=>new l(5,_),ge.u48be=_=>new l(6,_),ge.nu64be=_=>new w(_),ge.s8=_=>new d(1,_),ge.s16=_=>new d(2,_),ge.s24=_=>new d(3,_),ge.s32=_=>new d(4,_),ge.s40=_=>new d(5,_),ge.s48=_=>new d(6,_),ge.ns64=_=>new E(_),ge.s16be=_=>new h(2,_),ge.s24be=_=>new h(3,_),ge.s32be=_=>new h(4,_),ge.s40be=_=>new h(5,_),ge.s48be=_=>new h(6,_),ge.ns64be=_=>new A(_),ge.f32=_=>new M(_),ge.f32be=_=>new R(_),ge.f64=_=>new N(_),ge.f64be=_=>new z(_),ge.struct=(_,P,q)=>new L(_,P,q),ge.bits=(_,P,q)=>new p(_,P,q),ge.seq=(_,P,q)=>new F(_,P,q),ge.union=(_,P,q)=>new x(_,P,q),ge.unionLayoutDiscriminator=(_,P)=>new D(_,P),ge.blob=(_,P)=>new j(_,P),ge.cstr=_=>new $(_),ge.utf8=(_,P)=>new C(_,P),ge.constant=(_,P)=>new O(_,P),ge}var ie=kye(),Aye=8078e3,Sye=8078001,Cye=8078004,Iye=8078005,Mye=8078006,$ye=8078011;function sG(e){return Array.isArray(e)?"%5B"+e.map(sG).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function Tye([e,t]){return`${e}=${sG(t)}`}function Nye(e){const t=Object.entries(e).map(Tye).join("&");return btoa(t)}function Oye(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${Nye(t)}'`),`${r}\``}}var pp=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,n;if(t){const{cause:s,...o}=t;s&&(n={cause:s}),Object.keys(o).length>0&&(r=o)}const i=Oye(e,r);super(i,n),this.context={__code:e,...r},this.name="SolanaError"}};function jye(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function Pye(e){return Object.freeze({...e,encode:t=>{const r=new Uint8Array(jye(t,e));return e.write(t,r,0),r}})}function Dye(e){return Object.freeze({...e,decode:(t,r=0)=>e.read(t,r)[0]})}function Hh(e){return"fixedSize"in e&&typeof e.fixedSize=="number"}function Rye(e,t){if(Hh(e)!==Hh(t))throw new pp(Cye);if(Hh(e)&&Hh(t)&&e.fixedSize!==t.fixedSize)throw new pp(Iye,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Hh(e)&&!Hh(t)&&e.maxSize!==t.maxSize)throw new pp(Mye,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function Lye(e,t,r=0){if(t.length-r<=0)throw new pp(Aye,{codecDescription:e})}function zye(e,t,r,n=0){const i=r.length-n;if(i<t)throw new pp(Sye,{bytesLength:i,codecDescription:e,expected:t})}function Bye(e,t,r,n){if(n<t||n>r)throw new pp($ye,{codecDescription:e,max:r,min:t,value:n})}function oG(e){return e?.endian!==1}function Fye(e){return Pye({fixedSize:e.size,write(t,r,n){e.range&&Bye(e.name,e.range[0],e.range[1],t);const i=new ArrayBuffer(e.size);return e.set(new DataView(i),t,oG(e.config)),r.set(new Uint8Array(i),n),n+e.size}})}function Uye(e){return Dye({fixedSize:e.size,read(t,r=0){Lye(e.name,t,r),zye(e.name,e.size,t,r);const n=new DataView(qye(t,r,e.size));return[e.get(n,oG(e.config)),r+e.size]}})}function qye(e,t,r){const n=e.byteOffset+(t??0),i=r??e.byteLength;return e.buffer.slice(n,n+i)}var Hye=(e={})=>Fye({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,r,n)=>t.setBigUint64(0,BigInt(r),n),size:8}),Wye=(e={})=>Uye({config:e,get:(t,r)=>t.getBigUint64(0,r),name:"u64",size:8}),Vye=(e={})=>Rye(Hye(e),Wye(e));class Kye extends TypeError{constructor(t,r){let n;const{message:i,explanation:s,...o}=t,{path:a}=t,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function Gye(e){return tb(e)&&typeof e[Symbol.iterator]=="function"}function tb(e){return typeof e=="object"&&e!=null}function Rv(e){return tb(e)&&!Array.isArray(e)}function Wa(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Zye(e){const{done:t,value:r}=e.next();return t?void 0:r}function Yye(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${Wa(n)}\``}=e;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...e,message:c}}function*Tj(e,t,r,n){Gye(e)||(e=[e]);for(const i of e){const s=Yye(i,t,r,n);s&&(yield s)}}function*FC(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i,mask:o};s&&(e=t.coercer(e,a));let c="valid";for(const u of t.validator(e,a))u.explanation=r.message,c="not_valid",yield[u,void 0];for(let[u,l,d]of t.entries(e,a)){const h=FC(l,d,{path:u===void 0?n:[...n,u],branch:u===void 0?i:[...i,l],coerce:s,mask:o,message:r.message});for(const g of h)g[0]?(c=g[0].refinement!=null?"not_refined":"not_valid",yield[g[0],void 0]):s&&(l=g[1],u===void 0?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):tb(e)&&(l!==void 0||u in e)&&(e[u]=l))}if(c!=="not_valid")for(const u of t.refiner(e,a))u.explanation=r.message,c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,e])}let Zc=class{constructor(t){const{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,u)=>{const l=i(c,u);return Tj(l,u,this,c)}:this.validator=()=>[],s?this.refiner=(c,u)=>{const l=s(c,u);return Tj(l,u,this,c)}:this.refiner=()=>[]}assert(t,r){return Jye(t,this,r)}create(t,r){return Tm(t,this,r)}is(t){return aG(t,this)}mask(t,r){return Xye(t,this,r)}validate(t,r={}){return rb(t,this,r)}};function Jye(e,t,r){const n=rb(e,t,{message:r});if(n[0])throw n[0]}function Tm(e,t,r){const n=rb(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Xye(e,t,r){const n=rb(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function aG(e,t){return!rb(e,t)[0]}function rb(e,t,r={}){const n=FC(e,t,r),i=Zye(n);return i[0]?[new Kye(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function fh(e,t){return new Zc({type:e,schema:null,validator:t})}function Qye(){return fh("any",()=>!0)}function Qe(e){return new Zc({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${Wa(t)}`}})}function Fc(){return fh("boolean",e=>typeof e=="boolean")}function UC(e){return fh("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${Wa(t)}`)}function yn(e){const t=Wa(e),r=typeof e;return new Zc({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${Wa(n)}`}})}function ewe(){return fh("never",()=>!1)}function et(e){return new Zc({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function pe(){return fh("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${Wa(e)}`)}function _t(e){return new Zc({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function cG(e,t){return new Zc({type:"record",schema:null,*entries(r){if(tb(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return Rv(r)||`Expected an object, but received: ${Wa(r)}`},coercer(r){return Rv(r)?{...r}:r}})}function ze(){return fh("string",e=>typeof e=="string"||`Expected a string, but received: ${Wa(e)}`)}function qC(e){const t=ewe();return new Zc({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${Wa(r)}`},coercer(r){return Array.isArray(r)?r.slice():r}})}function Ce(e){const t=Object.keys(e);return new Zc({type:"type",schema:e,*entries(r){if(tb(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return Rv(r)||`Expected an object, but received: ${Wa(r)}`},coercer(r){return Rv(r)?{...r}:r}})}function Ss(e){const t=e.map(r=>r.type).join(" | ");return new Zc({type:"union",schema:null,coercer(r,n){for(const i of e){const[s,o]=i.validate(r,{coerce:!0,mask:n.mask});if(!s)return o}return r},validator(r,n){const i=[];for(const s of e){const[...o]=FC(r,s,n),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${Wa(r)}`,...i]}})}function E1(){return fh("unknown",()=>!0)}function nb(e,t,r){return new Zc({...e,coercer:(n,i)=>aG(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}const uG=F2(V0e);var O8,Nj;function twe(){if(Nj)return O8;Nj=1;const e=uG.v4;return O8=function(r,n,i,s){if(typeof r!="string")throw new TypeError(r+" must be a string");s=s||{};const o=typeof s.version=="number"?s.version:2;if(o!==1&&o!==2)throw new TypeError(o+" must be 1 or 2");const a={method:r};if(o===2&&(a.jsonrpc="2.0"),n){if(typeof n!="object"&&!Array.isArray(n))throw new TypeError(n+" must be an object, array or omitted");a.params=n}if(typeof i>"u"){const c=typeof s.generator=="function"?s.generator:function(){return e()};a.id=c(a,s)}else o===2&&i===null?s.notificationIdNull&&(a.id=null):a.id=i;return a},O8}var j8,Oj;function rwe(){if(Oj)return j8;Oj=1;const e=uG.v4,t=twe(),r=function(n,i){if(!(this instanceof r))return new r(n,i);i||(i={}),this.options={reviver:typeof i.reviver<"u"?i.reviver:null,replacer:typeof i.replacer<"u"?i.replacer:null,generator:typeof i.generator<"u"?i.generator:function(){return e()},version:typeof i.version<"u"?i.version:2,notificationIdNull:typeof i.notificationIdNull=="boolean"?i.notificationIdNull:!1},this.callServer=n};return j8=r,r.prototype.request=function(n,i,s,o){const a=this;let c=null;const u=Array.isArray(n)&&typeof i=="function";if(this.options.version===1&&u)throw new TypeError("JSON-RPC 1.0 does not support batching");if(u||!u&&n&&typeof n=="object"&&typeof i=="function")o=i,c=n;else{typeof s=="function"&&(o=s,s=void 0);const h=typeof o=="function";try{c=t(n,i,s,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(g){if(h){o(g);return}throw g}if(!h)return c}let d;try{d=JSON.stringify(c,this.options.replacer)}catch(h){o(h);return}return this.callServer(d,function(h,g){a._parseResponse(h,g,o)}),c},r.prototype._parseResponse=function(n,i,s){if(n){s(n);return}if(!i){s();return}let o;try{o=JSON.parse(i,this.options.reviver)}catch(a){s(a);return}if(s.length===3)if(Array.isArray(o)){const a=function(u){return typeof u.error<"u"},c=function(u){return!a(u)};s(null,o.filter(a),o.filter(c));return}else{s(null,o.error,o.result);return}s(null,o)},j8}rwe();let lG=class extends OK{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,TK(t);const n=jC(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?t.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=t.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),Tp(s)}update(t){return Mv(this),this.iHash.update(t),this}digestInto(t){Mv(this),uh(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return t=t,t.finished=i,t.destroyed=s,t.blockLen=o,t.outputLen=a,t.oHash=r._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const fG=(e,t,r)=>new lG(e,t).update(r).digest();fG.create=(e,t)=>new lG(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const jj=(e,t)=>(e+(e>=0?t:-t)/dG)/t;function nwe(e,t,r){const[[n,i],[s,o]]=t,a=jj(o*e,r),c=jj(-i*e,r);let u=e-a*n-c*s,l=-a*i-c*o;const d=u<Bu,h=l<Bu;d&&(u=-u),h&&(l=-l);const g=X2(Math.ceil(BK(r)/2))+gp;if(u<Bu||u>=g||l<Bu||l>=g)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:d,k1:u,k2neg:h,k2:l}}function KE(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function P8(e,t){const r={};for(let n of Object.keys(t))r[n]=e[n]===void 0?t[n]:e[n];return Pd(r.lowS,"lowS"),Pd(r.prehash,"prehash"),r.format!==void 0&&KE(r.format),r}let iwe=class extends Error{constructor(t=""){super(t)}};const Cu={Err:iwe,_tlv:{encode:(e,t)=>{const{Err:r}=Cu;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");const n=t.length/2,i=wy(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const s=n>127?wy(i.length/2|128):"";return wy(e)+s+i+t},decode(e,t){const{Err:r}=Cu;let n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");const i=t[n++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const u=t.subarray(n,n+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const l of u)o=o<<8|l;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const a=t.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:t.subarray(n+o)}}},_int:{encode(e){const{Err:t}=Cu;if(e<Bu)throw new t("integer: negative integers are not allowed");let r=wy(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:t}=Cu;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return m4(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=Cu,i=xn("signature",e),{v:s,l:o}=n.decode(48,i);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=n.decode(2,s),{v:u,l}=n.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(u)}},hexFromSig(e){const{_tlv:t,_int:r}=Cu,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s)),s=n+i;return t.encode(48,s)}},Bu=BigInt(0),gp=BigInt(1),dG=BigInt(2),_y=BigInt(3),swe=BigInt(4);function ep(e,t){const{BYTES:r}=e;let n;if(typeof t=="bigint")n=t;else{let i=xn("private key",t);try{n=e.fromBytes(i)}catch{throw new Error(`invalid private key: expected ui8a of size ${r}, got ${typeof t}`)}}if(!e.isValidNot0(n))throw new Error("invalid private key: out of range [1..N-1]");return n}function owe(e,t={}){const r=rG("weierstrass",e,t),{Fp:n,Fn:i}=r;let s=r.CURVE;const{h:o,n:a}=s;Q2(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:c}=t;if(c&&(!n.is0(s.a)||typeof c.beta!="bigint"||!Array.isArray(c.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const u=pG(n,i);function l(){if(!n.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function d(x,y,f){const{x:p,y:v}=y.toAffine(),I=n.toBytes(p);if(Pd(f,"isCompressed"),f){l();const j=!n.isOdd(v);return Ic(hG(j),I)}else return Ic(Uint8Array.of(4),I,n.toBytes(v))}function h(x){Fa(x,void 0,"Point");const{publicKey:y,publicKeyUncompressed:f}=u,p=x.length,v=x[0],I=x.subarray(1);if(p===y&&(v===2||v===3)){const j=n.fromBytes(I);if(!n.isValid(j))throw new Error("bad point: is not on curve, wrong x");const $=b(j);let C;try{C=n.sqrt($)}catch(P){const q=P instanceof Error?": "+P.message:"";throw new Error("bad point: is not on curve, sqrt error"+q)}l();const O=n.isOdd(C);return(v&1)===1!==O&&(C=n.neg(C)),{x:j,y:C}}else if(p===f&&v===4){const j=n.BYTES,$=n.fromBytes(I.subarray(0,j)),C=n.fromBytes(I.subarray(j,j*2));if(!k($,C))throw new Error("bad point: is not on curve");return{x:$,y:C}}else throw new Error(`bad point: got length ${p}, expected compressed=${y} or uncompressed=${f}`)}const g=t.toBytes||d,m=t.fromBytes||h;function b(x){const y=n.sqr(x),f=n.mul(y,x);return n.add(n.add(f,n.mul(x,s.a)),s.b)}function k(x,y){const f=n.sqr(y),p=b(x);return n.eql(f,p)}if(!k(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const w=n.mul(n.pow(s.a,_y),swe),E=n.mul(n.sqr(s.b),BigInt(27));if(n.is0(n.add(w,E)))throw new Error("bad curve params: a or b");function A(x,y,f=!1){if(!n.isValid(y)||f&&n.is0(y))throw new Error(`bad point coordinate ${x}`);return y}function M(x){if(!(x instanceof L))throw new Error("ProjectivePoint expected")}function R(x){if(!c||!c.basises)throw new Error("no endo");return nwe(x,c.basises,i.ORDER)}const N=Tv((x,y)=>{const{X:f,Y:p,Z:v}=x;if(n.eql(v,n.ONE))return{x:f,y:p};const I=x.is0();y==null&&(y=I?n.ONE:n.inv(v));const j=n.mul(f,y),$=n.mul(p,y),C=n.mul(v,y);if(I)return{x:n.ZERO,y:n.ZERO};if(!n.eql(C,n.ONE))throw new Error("invZ was invalid");return{x:j,y:$}}),z=Tv(x=>{if(x.is0()){if(t.allowInfinityPoint&&!n.is0(x.Y))return;throw new Error("bad point: ZERO")}const{x:y,y:f}=x.toAffine();if(!n.isValid(y)||!n.isValid(f))throw new Error("bad point: x or y not field elements");if(!k(y,f))throw new Error("bad point: equation left != right");if(!x.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function F(x,y,f,p,v){return f=new L(n.mul(f.X,x),f.Y,f.Z),y=Nv(p,y),f=Nv(v,f),y.add(f)}class L{constructor(y,f,p){this.X=A("x",y),this.Y=A("y",f,!0),this.Z=A("z",p),Object.freeze(this)}static CURVE(){return s}static fromAffine(y){const{x:f,y:p}=y||{};if(!y||!n.isValid(f)||!n.isValid(p))throw new Error("invalid affine point");if(y instanceof L)throw new Error("projective point not allowed");return n.is0(f)&&n.is0(p)?L.ZERO:new L(f,p,n.ONE)}static fromBytes(y){const f=L.fromAffine(m(Fa(y,void 0,"point")));return f.assertValidity(),f}static fromHex(y){return L.fromBytes(xn("pointHex",y))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(y=8,f=!0){return D.createCache(this,y),f||this.multiply(_y),this}assertValidity(){z(this)}hasEvenY(){const{y}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(y)}equals(y){M(y);const{X:f,Y:p,Z:v}=this,{X:I,Y:j,Z:$}=y,C=n.eql(n.mul(f,$),n.mul(I,v)),O=n.eql(n.mul(p,$),n.mul(j,v));return C&&O}negate(){return new L(this.X,n.neg(this.Y),this.Z)}double(){const{a:y,b:f}=s,p=n.mul(f,_y),{X:v,Y:I,Z:j}=this;let $=n.ZERO,C=n.ZERO,O=n.ZERO,_=n.mul(v,v),P=n.mul(I,I),q=n.mul(j,j),W=n.mul(v,I);return W=n.add(W,W),O=n.mul(v,j),O=n.add(O,O),$=n.mul(y,O),C=n.mul(p,q),C=n.add($,C),$=n.sub(P,C),C=n.add(P,C),C=n.mul($,C),$=n.mul(W,$),O=n.mul(p,O),q=n.mul(y,q),W=n.sub(_,q),W=n.mul(y,W),W=n.add(W,O),O=n.add(_,_),_=n.add(O,_),_=n.add(_,q),_=n.mul(_,W),C=n.add(C,_),q=n.mul(I,j),q=n.add(q,q),_=n.mul(q,W),$=n.sub($,_),O=n.mul(q,P),O=n.add(O,O),O=n.add(O,O),new L($,C,O)}add(y){M(y);const{X:f,Y:p,Z:v}=this,{X:I,Y:j,Z:$}=y;let C=n.ZERO,O=n.ZERO,_=n.ZERO;const P=s.a,q=n.mul(s.b,_y);let W=n.mul(f,I),K=n.mul(p,j),Y=n.mul(v,$),te=n.add(f,p),re=n.add(I,j);te=n.mul(te,re),re=n.add(W,K),te=n.sub(te,re),re=n.add(f,v);let be=n.add(I,$);return re=n.mul(re,be),be=n.add(W,Y),re=n.sub(re,be),be=n.add(p,v),C=n.add(j,$),be=n.mul(be,C),C=n.add(K,Y),be=n.sub(be,C),_=n.mul(P,re),C=n.mul(q,Y),_=n.add(C,_),C=n.sub(K,_),_=n.add(K,_),O=n.mul(C,_),K=n.add(W,W),K=n.add(K,W),Y=n.mul(P,Y),re=n.mul(q,re),K=n.add(K,Y),Y=n.sub(W,Y),Y=n.mul(P,Y),re=n.add(re,Y),W=n.mul(K,re),O=n.add(O,W),W=n.mul(be,re),C=n.mul(te,C),C=n.sub(C,W),W=n.mul(te,K),_=n.mul(be,_),_=n.add(_,W),new L(C,O,_)}subtract(y){return this.add(y.negate())}is0(){return this.equals(L.ZERO)}multiply(y){const{endo:f}=t;if(!i.isValidNot0(y))throw new Error("invalid scalar: out of range");let p,v;const I=j=>D.cached(this,j,$=>ld(L,$));if(f){const{k1neg:j,k1:$,k2neg:C,k2:O}=R(y),{p:_,f:P}=I($),{p:q,f:W}=I(O);v=P.add(W),p=F(f.beta,_,q,j,C)}else{const{p:j,f:$}=I(y);p=j,v=$}return ld(L,[p,v])[0]}multiplyUnsafe(y){const{endo:f}=t,p=this;if(!i.isValid(y))throw new Error("invalid scalar: out of range");if(y===Bu||p.is0())return L.ZERO;if(y===gp)return p;if(D.hasCache(this))return this.multiply(y);if(f){const{k1neg:v,k1:I,k2neg:j,k2:$}=R(y),{p1:C,p2:O}=Wbe(L,p,I,$);return F(f.beta,C,O,v,j)}else return D.unsafe(p,y)}multiplyAndAddUnsafe(y,f,p){const v=this.multiplyUnsafe(f).add(y.multiplyUnsafe(p));return v.is0()?void 0:v}toAffine(y){return N(this,y)}isTorsionFree(){const{isTorsionFree:y}=t;return o===gp?!0:y?y(L,this):D.unsafe(this,a).is0()}clearCofactor(){const{clearCofactor:y}=t;return o===gp?this:y?y(L,this):this.multiplyUnsafe(o)}isSmallOrder(){return this.multiplyUnsafe(o).is0()}toBytes(y=!0){return Pd(y,"isCompressed"),this.assertValidity(),g(L,this,y)}toHex(y=!0){return Ed(this.toBytes(y))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(y=!0){return this.toBytes(y)}_setWindowSize(y){this.precompute(y)}static normalizeZ(y){return ld(L,y)}static msm(y,f){return tG(L,i,y,f)}static fromPrivateKey(y){return L.BASE.multiply(ep(i,y))}}L.BASE=new L(s.Gx,s.Gy,n.ONE),L.ZERO=new L(n.ZERO,n.ONE,n.ZERO),L.Fp=n,L.Fn=i;const B=i.BITS,D=new eG(L,t.endo?Math.ceil(B/2):B);return L.BASE.precompute(8),L}function hG(e){return Uint8Array.of(e?2:3)}function pG(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function awe(e,t={}){const{Fn:r}=e,n=t.randomBytes||PC,i=Object.assign(pG(e.Fp,r),{seed:JK(r.ORDER)});function s(g){try{return!!ep(r,g)}catch{return!1}}function o(g,m){const{publicKey:b,publicKeyUncompressed:k}=i;try{const w=g.length;return m===!0&&w!==b||m===!1&&w!==k?!1:!!e.fromBytes(g)}catch{return!1}}function a(g=n(i.seed)){return Ube(Fa(g,i.seed,"seed"),r.ORDER)}function c(g,m=!0){return e.BASE.multiply(ep(r,g)).toBytes(m)}function u(g){const m=a(g);return{secretKey:m,publicKey:c(m)}}function l(g){if(typeof g=="bigint")return!1;if(g instanceof e)return!0;const{secretKey:m,publicKey:b,publicKeyUncompressed:k}=i;if(r.allowedLengths||m===b)return;const w=xn("key",g).length;return w===b||w===k}function d(g,m,b=!0){if(l(g)===!0)throw new Error("first arg must be private key");if(l(m)===!1)throw new Error("second arg must be public key");const k=ep(r,g);return e.fromHex(m).multiply(k).toBytes(b)}return Object.freeze({getPublicKey:c,getSharedSecret:d,keygen:u,Point:e,utils:{isValidSecretKey:s,isValidPublicKey:o,randomSecretKey:a,isValidPrivateKey:s,randomPrivateKey:a,normPrivateKeyToScalar:g=>ep(r,g),precompute(g=8,m=e.BASE){return m.precompute(g,!1)}},lengths:i})}function cwe(e,t,r={}){TK(t),Q2(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const n=r.randomBytes||PC,i=r.hmac||((f,...p)=>fG(t,f,Ic(...p))),{Fp:s,Fn:o}=e,{ORDER:a,BITS:c}=o,{keygen:u,getPublicKey:l,getSharedSecret:d,utils:h,lengths:g}=awe(e,r),m={prehash:!1,lowS:typeof r.lowS=="boolean"?r.lowS:!1,format:void 0,extraEntropy:!1},b="compact";function k(f){const p=a>>gp;return f>p}function w(f,p){if(!o.isValidNot0(p))throw new Error(`invalid signature ${f}: out of range 1..Point.Fn.ORDER`);return p}function E(f,p){KE(p);const v=g.signature,I=p==="compact"?v:p==="recovered"?v+1:void 0;return Fa(f,I,`${p} signature`)}class A{constructor(p,v,I){this.r=w("r",p),this.s=w("s",v),I!=null&&(this.recovery=I),Object.freeze(this)}static fromBytes(p,v=b){E(p,v);let I;if(v==="der"){const{r:O,s:_}=Cu.toSig(Fa(p));return new A(O,_)}v==="recovered"&&(I=p[0],v="compact",p=p.subarray(1));const j=o.BYTES,$=p.subarray(0,j),C=p.subarray(j,j*2);return new A(o.fromBytes($),o.fromBytes(C),I)}static fromHex(p,v){return this.fromBytes($v(p),v)}addRecoveryBit(p){return new A(this.r,this.s,p)}recoverPublicKey(p){const v=s.ORDER,{r:I,s:j,recovery:$}=this;if($==null||![0,1,2,3].includes($))throw new Error("recovery id invalid");if(a*dG<v&&$>1)throw new Error("recovery id is ambiguous for h>1 curve");const O=$===2||$===3?I+a:I;if(!s.isValid(O))throw new Error("recovery id 2 or 3 invalid");const _=s.toBytes(O),P=e.fromBytes(Ic(hG(($&1)===0),_)),q=o.inv(O),W=R(xn("msgHash",p)),K=o.create(-W*q),Y=o.create(j*q),te=e.BASE.multiplyUnsafe(K).add(P.multiplyUnsafe(Y));if(te.is0())throw new Error("point at infinify");return te.assertValidity(),te}hasHighS(){return k(this.s)}toBytes(p=b){if(KE(p),p==="der")return $v(Cu.hexFromSig(this));const v=o.toBytes(this.r),I=o.toBytes(this.s);if(p==="recovered"){if(this.recovery==null)throw new Error("recovery bit must be present");return Ic(Uint8Array.of(this.recovery),v,I)}return Ic(v,I)}toHex(p){return Ed(this.toBytes(p))}assertValidity(){}static fromCompact(p){return A.fromBytes(xn("sig",p),"compact")}static fromDER(p){return A.fromBytes(xn("sig",p),"der")}normalizeS(){return this.hasHighS()?new A(this.r,o.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Ed(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Ed(this.toBytes("compact"))}}const M=r.bits2int||function(p){if(p.length>8192)throw new Error("input is too large");const v=m4(p),I=p.length*8-c;return I>0?v>>BigInt(I):v},R=r.bits2int_modN||function(p){return o.create(M(p))},N=X2(c);function z(f){return VE("num < 2^"+c,f,Bu,N),o.toBytes(f)}function F(f,p){return Fa(f,void 0,"message"),p?Fa(t(f),void 0,"prehashed message"):f}function L(f,p,v){if(["recovered","canonical"].some(K=>K in v))throw new Error("sign() legacy options not supported");const{lowS:I,prehash:j,extraEntropy:$}=P8(v,m);f=F(f,j);const C=R(f),O=ep(o,p),_=[z(O),z(C)];if($!=null&&$!==!1){const K=$===!0?n(g.secretKey):$;_.push(xn("extraEntropy",K))}const P=Ic(..._),q=C;function W(K){const Y=M(K);if(!o.isValidNot0(Y))return;const te=o.inv(Y),re=e.BASE.multiply(Y).toAffine(),be=o.create(re.x);if(be===Bu)return;const ve=o.create(te*o.create(q+be*O));if(ve===Bu)return;let ye=(re.x===be?0:2)|Number(re.y&gp),Se=ve;return I&&k(ve)&&(Se=o.neg(ve),ye^=1),new A(be,Se,ye)}return{seed:P,k2sig:W}}function B(f,p,v={}){f=xn("message",f);const{seed:I,k2sig:j}=L(f,p,v);return Nbe(t.outputLen,o.BYTES,i)(I,j)}function D(f){let p;const v=typeof f=="string"||J2(f),I=!v&&f!==null&&typeof f=="object"&&typeof f.r=="bigint"&&typeof f.s=="bigint";if(!v&&!I)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(I)p=new A(f.r,f.s);else if(v){try{p=A.fromBytes(xn("sig",f),"der")}catch(j){if(!(j instanceof Cu.Err))throw j}if(!p)try{p=A.fromBytes(xn("sig",f),"compact")}catch{return!1}}return p||!1}function x(f,p,v,I={}){const{lowS:j,prehash:$,format:C}=P8(I,m);if(v=xn("publicKey",v),p=F(xn("message",p),$),"strict"in I)throw new Error("options.strict was renamed to lowS");const O=C===void 0?D(f):A.fromBytes(xn("sig",f),C);if(O===!1)return!1;try{const _=e.fromBytes(v);if(j&&O.hasHighS())return!1;const{r:P,s:q}=O,W=R(p),K=o.inv(q),Y=o.create(W*K),te=o.create(P*K),re=e.BASE.multiplyUnsafe(Y).add(_.multiplyUnsafe(te));return re.is0()?!1:o.create(re.x)===P}catch{return!1}}function y(f,p,v={}){const{prehash:I}=P8(v,m);return p=F(p,I),A.fromBytes(f,"recovered").recoverPublicKey(p).toBytes()}return Object.freeze({keygen:u,getPublicKey:l,getSharedSecret:d,utils:h,lengths:g,Point:e,sign:B,verify:x,recoverPublicKey:y,Signature:A,hash:t})}function uwe(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp;let n=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(o=>Math.ceil(o/2)))):void 0;const i=lh(t.n,{BITS:e.nBitLength,allowedLengths:n,modFromBytes:e.wrapPrivateKey}),s={Fp:r,Fn:i,allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:s}}function lwe(e){const{CURVE:t,curveOpts:r}=uwe(e),n={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:r,hash:e.hash,ecdsaOpts:n}}function fwe(e,t){const r=t.Point;return Object.assign({},t,{ProjectivePoint:r,CURVE:Object.assign({},e,ZK(r.Fn.ORDER,r.Fn.BITS))})}function dwe(e){const{CURVE:t,curveOpts:r,hash:n,ecdsaOpts:i}=lwe(e),s=owe(t,r),o=cwe(s,n,i);return fwe(e,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function hwe(e,t){const r=n=>dwe({...e,hash:n});return{...r(t),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const HC={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},pwe={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Pj=BigInt(2);function gwe(e){const t=HC.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=_n(l,r,t)*l%t,h=_n(d,r,t)*l%t,g=_n(h,Pj,t)*u%t,m=_n(g,i,t)*g%t,b=_n(m,s,t)*m%t,k=_n(b,a,t)*b%t,w=_n(k,c,t)*k%t,E=_n(w,a,t)*b%t,A=_n(E,r,t)*l%t,M=_n(A,o,t)*m%t,R=_n(M,n,t)*u%t,N=_n(R,Pj,t);if(!GE.eql(GE.sqr(N),e))throw new Error("Cannot find square root");return N}const GE=lh(HC.p,{sqrt:gwe}),mwe=hwe({...HC,Fp:GE,lowS:!0,endo:pwe},RK);eb.utils.randomPrivateKey;eb.getPublicKey;function Dj(e){try{return eb.ExtendedPoint.fromHex(e),!0}catch{return!1}}const gG=(e,t)=>eb.sign(e,t.slice(0,32)),bwe=eb.verify,WC=e=>Ft.Buffer.isBuffer(e)?e:e instanceof Uint8Array?Ft.Buffer.from(e.buffer,e.byteOffset,e.byteLength):Ft.Buffer.from(e);class mG{constructor(t){Object.assign(this,t)}encode(){return Ft.Buffer.from(N8.serialize(Gg,this))}static decode(t){return N8.deserialize(Gg,this,t)}static decodeUnchecked(t){return N8.deserializeUnchecked(Gg,this,t)}}const Gg=new Map;var bG;const yG=32,Uu=32;function ywe(e){return e._bn!==void 0}let Rj=1;class bt extends mG{constructor(t){if(super({}),this._bn=void 0,ywe(t))this._bn=t._bn;else{if(typeof t=="string"){const r=vs.decode(t);if(r.length!=Uu)throw new Error("Invalid public key input");this._bn=new _j(r)}else this._bn=new _j(t);if(this._bn.byteLength()>Uu)throw new Error("Invalid public key input")}}static unique(){const t=new bt(Rj);return Rj+=1,new bt(t.toBuffer())}equals(t){return this._bn.eq(t._bn)}toBase58(){return vs.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const t=this.toBuffer();return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}toBuffer(){const t=this._bn.toArrayLike(Ft.Buffer);if(t.length===Uu)return t;const r=Ft.Buffer.alloc(32);return t.copy(r,32-t.length),r}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(t,r,n){const i=Ft.Buffer.concat([t.toBuffer(),Ft.Buffer.from(r),n.toBuffer()]),s=Aj(i);return new bt(s)}static createProgramAddressSync(t,r){let n=Ft.Buffer.alloc(0);t.forEach(function(s){if(s.length>yG)throw new TypeError("Max seed length exceeded");n=Ft.Buffer.concat([n,WC(s)])}),n=Ft.Buffer.concat([n,r.toBuffer(),Ft.Buffer.from("ProgramDerivedAddress")]);const i=Aj(n);if(Dj(i))throw new Error("Invalid seeds, address must fall off the curve");return new bt(i)}static async createProgramAddress(t,r){return this.createProgramAddressSync(t,r)}static findProgramAddressSync(t,r){let n=255,i;for(;n!=0;){try{const s=t.concat(Ft.Buffer.from([n]));i=this.createProgramAddressSync(s,r)}catch(s){if(s instanceof TypeError)throw s;n--;continue}return[i,n]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,r){return this.findProgramAddressSync(t,r)}static isOnCurve(t){const r=new bt(t);return Dj(r.toBytes())}}bG=bt;bt.default=new bG("11111111111111111111111111111111");Gg.set(bt,{kind:"struct",fields:[["_bn","u256"]]});new bt("BPFLoader1111111111111111111111111111111111");const kd=1232,y4=127,jp=64;class Nm{constructor(t,r){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=r}keySegments(){const t=[this.staticAccountKeys];return this.accountKeysFromLookups&&(t.push(this.accountKeysFromLookups.writable),t.push(this.accountKeysFromLookups.readonly)),t}get(t){for(const r of this.keySegments()){if(t<r.length)return r[t];t-=r.length}}get length(){return this.keySegments().flat().length}compileInstructions(t){if(this.length>256)throw new Error("Account index overflow encountered during compilation");const n=new Map;this.keySegments().flat().forEach((s,o)=>{n.set(s.toBase58(),o)});const i=s=>{const o=n.get(s.toBase58());if(o===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return o};return t.map(s=>({programIdIndex:i(s.programId),accountKeyIndexes:s.keys.map(o=>i(o.pubkey)),data:s.data}))}}const Gt=(e="publicKey")=>ie.blob(32,e),wwe=(e="signature")=>ie.blob(64,e),tp=(e="string")=>{const t=ie.struct([ie.u32("length"),ie.u32("lengthPadding"),ie.blob(ie.offset(ie.u32(),-8),"chars")],e),r=t.decode.bind(t),n=t.encode.bind(t),i=t;return i.decode=(s,o)=>r(s,o).chars.toString(),i.encode=(s,o,a)=>{const c={chars:Ft.Buffer.from(s,"utf8")};return n(c,o,a)},i.alloc=s=>ie.u32().span+ie.u32().span+Ft.Buffer.from(s,"utf8").length,i},vwe=(e="authorized")=>ie.struct([Gt("staker"),Gt("withdrawer")],e),_we=(e="lockup")=>ie.struct([ie.ns64("unixTimestamp"),ie.ns64("epoch"),Gt("custodian")],e),xwe=(e="voteInit")=>ie.struct([Gt("nodePubkey"),Gt("authorizedVoter"),Gt("authorizedWithdrawer"),ie.u8("commission")],e),Ewe=(e="voteAuthorizeWithSeedArgs")=>ie.struct([ie.u32("voteAuthorizationType"),Gt("currentAuthorityDerivedKeyOwnerPubkey"),tp("currentAuthorityDerivedKeySeed"),Gt("newAuthorized")],e);function wG(e,t){const r=i=>{if(i.span>=0)return i.span;if(typeof i.alloc=="function")return i.alloc(t[i.property]);if("count"in i&&"elementLayout"in i){const s=t[i.property];if(Array.isArray(s))return s.length*r(i.elementLayout)}else if("fields"in i)return wG({layout:i},t[i.property]);return 0};let n=0;return e.layout.fields.forEach(i=>{n+=r(i)}),n}function xo(e){let t=0,r=0;for(;;){let n=e.shift();if(t|=(n&127)<<r*7,r+=1,(n&128)===0)break}return t}function Eo(e,t){let r=t;for(;;){let n=r&127;if(r>>=7,r==0){e.push(n);break}else n|=128,e.push(n)}}function Zn(e,t){if(!e)throw new Error(t||"Assertion failed")}class w4{constructor(t,r){this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=r}static compile(t,r){const n=new Map,i=o=>{const a=o.toBase58();let c=n.get(a);return c===void 0&&(c={isSigner:!1,isWritable:!1,isInvoked:!1},n.set(a,c)),c},s=i(r);s.isSigner=!0,s.isWritable=!0;for(const o of t){i(o.programId).isInvoked=!0;for(const a of o.keys){const c=i(a.pubkey);c.isSigner||=a.isSigner,c.isWritable||=a.isWritable}}return new w4(r,n)}getMessageComponents(){const t=[...this.keyMetaMap.entries()];Zn(t.length<=256,"Max static account keys length exceeded");const r=t.filter(([,c])=>c.isSigner&&c.isWritable),n=t.filter(([,c])=>c.isSigner&&!c.isWritable),i=t.filter(([,c])=>!c.isSigner&&c.isWritable),s=t.filter(([,c])=>!c.isSigner&&!c.isWritable),o={numRequiredSignatures:r.length+n.length,numReadonlySignedAccounts:n.length,numReadonlyUnsignedAccounts:s.length};{Zn(r.length>0,"Expected at least one writable signer key");const[c]=r[0];Zn(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}const a=[...r.map(([c])=>new bt(c)),...n.map(([c])=>new bt(c)),...i.map(([c])=>new bt(c)),...s.map(([c])=>new bt(c))];return[o,a]}extractTableLookup(t){const[r,n]=this.drainKeysFoundInLookupTable(t.state.addresses,o=>!o.isSigner&&!o.isInvoked&&o.isWritable),[i,s]=this.drainKeysFoundInLookupTable(t.state.addresses,o=>!o.isSigner&&!o.isInvoked&&!o.isWritable);if(!(r.length===0&&i.length===0))return[{accountKey:t.key,writableIndexes:r,readonlyIndexes:i},{writable:n,readonly:s}]}drainKeysFoundInLookupTable(t,r){const n=new Array,i=new Array;for(const[s,o]of this.keyMetaMap.entries())if(r(o)){const a=new bt(s),c=t.findIndex(u=>u.equals(a));c>=0&&(Zn(c<256,"Max lookup table index exceeded"),n.push(c),i.push(a),this.keyMetaMap.delete(s))}return[n,i]}}const vG="Reached end of buffer unexpectedly";function Ou(e){if(e.length===0)throw new Error(vG);return e.shift()}function ko(e,...t){const[r]=t;if(t.length===2?r+(t[1]??0)>e.length:r>=e.length)throw new Error(vG);return e.splice(...t)}class Dd{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map(r=>new bt(r)),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach(r=>this.indexToProgramIds.set(r.programIdIndex,this.accountKeys[r.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:vs.decode(t.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new Nm(this.staticAccountKeys)}static compile(t){const r=w4.compile(t.instructions,t.payerKey),[n,i]=r.getMessageComponents(),o=new Nm(i).compileInstructions(t.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:vs.encode(a.data)}));return new Dd({header:n,accountKeys:i,recentBlockhash:t.recentBlockhash,instructions:o})}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){const r=this.header.numRequiredSignatures;if(t>=this.header.numRequiredSignatures){const n=t-r,s=this.accountKeys.length-r-this.header.numReadonlyUnsignedAccounts;return n<s}else{const n=r-this.header.numReadonlySignedAccounts;return t<n}}isProgramId(t){return this.indexToProgramIds.has(t)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((t,r)=>!this.isProgramId(r))}serialize(){const t=this.accountKeys.length;let r=[];Eo(r,t);const n=this.instructions.map(d=>{const{accounts:h,programIdIndex:g}=d,m=Array.from(vs.decode(d.data));let b=[];Eo(b,h.length);let k=[];return Eo(k,m.length),{programIdIndex:g,keyIndicesCount:Ft.Buffer.from(b),keyIndices:h,dataLength:Ft.Buffer.from(k),data:m}});let i=[];Eo(i,n.length);let s=Ft.Buffer.alloc(kd);Ft.Buffer.from(i).copy(s);let o=i.length;n.forEach(d=>{const g=ie.struct([ie.u8("programIdIndex"),ie.blob(d.keyIndicesCount.length,"keyIndicesCount"),ie.seq(ie.u8("keyIndex"),d.keyIndices.length,"keyIndices"),ie.blob(d.dataLength.length,"dataLength"),ie.seq(ie.u8("userdatum"),d.data.length,"data")]).encode(d,s,o);o+=g}),s=s.slice(0,o);const a=ie.struct([ie.blob(1,"numRequiredSignatures"),ie.blob(1,"numReadonlySignedAccounts"),ie.blob(1,"numReadonlyUnsignedAccounts"),ie.blob(r.length,"keyCount"),ie.seq(Gt("key"),t,"keys"),Gt("recentBlockhash")]),c={numRequiredSignatures:Ft.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:Ft.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:Ft.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:Ft.Buffer.from(r),keys:this.accountKeys.map(d=>WC(d.toBytes())),recentBlockhash:vs.decode(this.recentBlockhash)};let u=Ft.Buffer.alloc(2048);const l=a.encode(c,u);return s.copy(u,l),u.slice(0,l+s.length)}static from(t){let r=[...t];const n=Ou(r);if(n!==(n&y4))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const i=Ou(r),s=Ou(r),o=xo(r);let a=[];for(let h=0;h<o;h++){const g=ko(r,0,Uu);a.push(new bt(Ft.Buffer.from(g)))}const c=ko(r,0,Uu),u=xo(r);let l=[];for(let h=0;h<u;h++){const g=Ou(r),m=xo(r),b=ko(r,0,m),k=xo(r),w=ko(r,0,k),E=vs.encode(Ft.Buffer.from(w));l.push({programIdIndex:g,accounts:b,data:E})}const d={header:{numRequiredSignatures:n,numReadonlySignedAccounts:i,numReadonlyUnsignedAccounts:s},recentBlockhash:vs.encode(Ft.Buffer.from(c)),accountKeys:a,instructions:l};return new Dd(d)}}class Om{constructor(t){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=t.header,this.staticAccountKeys=t.staticAccountKeys,this.recentBlockhash=t.recentBlockhash,this.compiledInstructions=t.compiledInstructions,this.addressTableLookups=t.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let t=0;for(const r of this.addressTableLookups)t+=r.readonlyIndexes.length+r.writableIndexes.length;return t}getAccountKeys(t){let r;if(t&&"accountKeysFromLookups"in t&&t.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=t.accountKeysFromLookups.writable.length+t.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");r=t.accountKeysFromLookups}else if(t&&"addressLookupTableAccounts"in t&&t.addressLookupTableAccounts)r=this.resolveAddressTableLookups(t.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Nm(this.staticAccountKeys,r)}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){const r=this.header.numRequiredSignatures,n=this.staticAccountKeys.length;if(t>=n){const i=t-n,s=this.addressTableLookups.reduce((o,a)=>o+a.writableIndexes.length,0);return i<s}else if(t>=this.header.numRequiredSignatures){const i=t-r,o=n-r-this.header.numReadonlyUnsignedAccounts;return i<o}else{const i=r-this.header.numReadonlySignedAccounts;return t<i}}resolveAddressTableLookups(t){const r={writable:[],readonly:[]};for(const n of this.addressTableLookups){const i=t.find(s=>s.key.equals(n.accountKey));if(!i)throw new Error(`Failed to find address lookup table account for table key ${n.accountKey.toBase58()}`);for(const s of n.writableIndexes)if(s<i.state.addresses.length)r.writable.push(i.state.addresses[s]);else throw new Error(`Failed to find address for index ${s} in address lookup table ${n.accountKey.toBase58()}`);for(const s of n.readonlyIndexes)if(s<i.state.addresses.length)r.readonly.push(i.state.addresses[s]);else throw new Error(`Failed to find address for index ${s} in address lookup table ${n.accountKey.toBase58()}`)}return r}static compile(t){const r=w4.compile(t.instructions,t.payerKey),n=new Array,i={writable:new Array,readonly:new Array},s=t.addressLookupTableAccounts||[];for(const l of s){const d=r.extractTableLookup(l);if(d!==void 0){const[h,{writable:g,readonly:m}]=d;n.push(h),i.writable.push(...g),i.readonly.push(...m)}}const[o,a]=r.getMessageComponents(),u=new Nm(a,i).compileInstructions(t.instructions);return new Om({header:o,staticAccountKeys:a,recentBlockhash:t.recentBlockhash,compiledInstructions:u,addressTableLookups:n})}serialize(){const t=Array();Eo(t,this.staticAccountKeys.length);const r=this.serializeInstructions(),n=Array();Eo(n,this.compiledInstructions.length);const i=this.serializeAddressTableLookups(),s=Array();Eo(s,this.addressTableLookups.length);const o=ie.struct([ie.u8("prefix"),ie.struct([ie.u8("numRequiredSignatures"),ie.u8("numReadonlySignedAccounts"),ie.u8("numReadonlyUnsignedAccounts")],"header"),ie.blob(t.length,"staticAccountKeysLength"),ie.seq(Gt(),this.staticAccountKeys.length,"staticAccountKeys"),Gt("recentBlockhash"),ie.blob(n.length,"instructionsLength"),ie.blob(r.length,"serializedInstructions"),ie.blob(s.length,"addressTableLookupsLength"),ie.blob(i.length,"serializedAddressTableLookups")]),a=new Uint8Array(kd),u=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(t),staticAccountKeys:this.staticAccountKeys.map(l=>l.toBytes()),recentBlockhash:vs.decode(this.recentBlockhash),instructionsLength:new Uint8Array(n),serializedInstructions:r,addressTableLookupsLength:new Uint8Array(s),serializedAddressTableLookups:i},a);return a.slice(0,u)}serializeInstructions(){let t=0;const r=new Uint8Array(kd);for(const n of this.compiledInstructions){const i=Array();Eo(i,n.accountKeyIndexes.length);const s=Array();Eo(s,n.data.length);const o=ie.struct([ie.u8("programIdIndex"),ie.blob(i.length,"encodedAccountKeyIndexesLength"),ie.seq(ie.u8(),n.accountKeyIndexes.length,"accountKeyIndexes"),ie.blob(s.length,"encodedDataLength"),ie.blob(n.data.length,"data")]);t+=o.encode({programIdIndex:n.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(i),accountKeyIndexes:n.accountKeyIndexes,encodedDataLength:new Uint8Array(s),data:n.data},r,t)}return r.slice(0,t)}serializeAddressTableLookups(){let t=0;const r=new Uint8Array(kd);for(const n of this.addressTableLookups){const i=Array();Eo(i,n.writableIndexes.length);const s=Array();Eo(s,n.readonlyIndexes.length);const o=ie.struct([Gt("accountKey"),ie.blob(i.length,"encodedWritableIndexesLength"),ie.seq(ie.u8(),n.writableIndexes.length,"writableIndexes"),ie.blob(s.length,"encodedReadonlyIndexesLength"),ie.seq(ie.u8(),n.readonlyIndexes.length,"readonlyIndexes")]);t+=o.encode({accountKey:n.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(i),writableIndexes:n.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(s),readonlyIndexes:n.readonlyIndexes},r,t)}return r.slice(0,t)}static deserialize(t){let r=[...t];const n=Ou(r),i=n&y4;Zn(n!==i,"Expected versioned message but received legacy message");const s=i;Zn(s===0,`Expected versioned message with version 0 but found version ${s}`);const o={numRequiredSignatures:Ou(r),numReadonlySignedAccounts:Ou(r),numReadonlyUnsignedAccounts:Ou(r)},a=[],c=xo(r);for(let m=0;m<c;m++)a.push(new bt(ko(r,0,Uu)));const u=vs.encode(ko(r,0,Uu)),l=xo(r),d=[];for(let m=0;m<l;m++){const b=Ou(r),k=xo(r),w=ko(r,0,k),E=xo(r),A=new Uint8Array(ko(r,0,E));d.push({programIdIndex:b,accountKeyIndexes:w,data:A})}const h=xo(r),g=[];for(let m=0;m<h;m++){const b=new bt(ko(r,0,Uu)),k=xo(r),w=ko(r,0,k),E=xo(r),A=ko(r,0,E);g.push({accountKey:b,writableIndexes:w,readonlyIndexes:A})}return new Om({header:o,staticAccountKeys:a,recentBlockhash:u,compiledInstructions:d,addressTableLookups:g})}}const v4={deserializeMessageVersion(e){const t=e[0],r=t&y4;return r===t?"legacy":r},deserialize:e=>{const t=v4.deserializeMessageVersion(e);if(t==="legacy")return Dd.from(e);if(t===0)return Om.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}},kwe=Ft.Buffer.alloc(jp).fill(0);class fd{constructor(t){this.keys=void 0,this.programId=void 0,this.data=Ft.Buffer.alloc(0),this.programId=t.programId,this.keys=t.keys,t.data&&(this.data=t.data)}toJSON(){return{keys:this.keys.map(({pubkey:t,isSigner:r,isWritable:n})=>({pubkey:t.toJSON(),isSigner:r,isWritable:n})),programId:this.programId.toJSON(),data:[...this.data]}}}class ua{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"nonceInfo")){const{minContextSlot:r,nonceInfo:n}=t;this.minNonceContextSlot=r,this.nonceInfo=n}else if(Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){const{blockhash:r,lastValidBlockHeight:n}=t;this.recentBlockhash=r,this.lastValidBlockHeight=n}else{const{recentBlockhash:r,nonceInfo:n}=t;n&&(this.nonceInfo=n),this.recentBlockhash=r}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(t=>t.toJSON()),signers:this.signatures.map(({publicKey:t})=>t.toJSON())}}add(...t){if(t.length===0)throw new Error("No instructions");return t.forEach(r=>{"instructions"in r?this.instructions=this.instructions.concat(r.instructions):"data"in r&&"programId"in r&&"keys"in r?this.instructions.push(r):this.instructions.push(new fd(r))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,r;if(this.nonceInfo?(t=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?r=[this.nonceInfo.nonceInstruction,...this.instructions]:r=this.instructions):(t=this.recentBlockhash,r=this.instructions),!t)throw new Error("Transaction recentBlockhash required");r.length<1&&console.warn("No instructions provided");let n;if(this.feePayer)n=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)n=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let b=0;b<r.length;b++)if(r[b].programId===void 0)throw new Error(`Transaction instruction index ${b} has undefined program id`);const i=[],s=[];r.forEach(b=>{b.keys.forEach(w=>{s.push({...w})});const k=b.programId.toString();i.includes(k)||i.push(k)}),i.forEach(b=>{s.push({pubkey:new bt(b),isSigner:!1,isWritable:!1})});const o=[];s.forEach(b=>{const k=b.pubkey.toString(),w=o.findIndex(E=>E.pubkey.toString()===k);w>-1?(o[w].isWritable=o[w].isWritable||b.isWritable,o[w].isSigner=o[w].isSigner||b.isSigner):o.push(b)}),o.sort(function(b,k){if(b.isSigner!==k.isSigner)return b.isSigner?-1:1;if(b.isWritable!==k.isWritable)return b.isWritable?-1:1;const w={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"};return b.pubkey.toBase58().localeCompare(k.pubkey.toBase58(),"en",w)});const a=o.findIndex(b=>b.pubkey.equals(n));if(a>-1){const[b]=o.splice(a,1);b.isSigner=!0,b.isWritable=!0,o.unshift(b)}else o.unshift({pubkey:n,isSigner:!0,isWritable:!0});for(const b of this.signatures){const k=o.findIndex(w=>w.pubkey.equals(b.publicKey));if(k>-1)o[k].isSigner||(o[k].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${b.publicKey.toString()}`)}let c=0,u=0,l=0;const d=[],h=[];o.forEach(({pubkey:b,isSigner:k,isWritable:w})=>{k?(d.push(b.toString()),c+=1,w||(u+=1)):(h.push(b.toString()),w||(l+=1))});const g=d.concat(h),m=r.map(b=>{const{data:k,programId:w}=b;return{programIdIndex:g.indexOf(w.toString()),accounts:b.keys.map(E=>g.indexOf(E.pubkey.toString())),data:vs.encode(k)}});return m.forEach(b=>{Zn(b.programIdIndex>=0),b.accounts.forEach(k=>Zn(k>=0))}),new Dd({header:{numRequiredSignatures:c,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:l},accountKeys:g,recentBlockhash:t,instructions:m})}_compile(){const t=this.compileMessage(),r=t.accountKeys.slice(0,t.header.numRequiredSignatures);return this.signatures.length===r.length&&this.signatures.every((i,s)=>r[s].equals(i.publicKey))||(this.signatures=r.map(n=>({signature:null,publicKey:n}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return(await t.getFeeForMessage(this.compileMessage())).value}setSigners(...t){if(t.length===0)throw new Error("No signers");const r=new Set;this.signatures=t.filter(n=>{const i=n.toString();return r.has(i)?!1:(r.add(i),!0)}).map(n=>({signature:null,publicKey:n}))}sign(...t){if(t.length===0)throw new Error("No signers");const r=new Set,n=[];for(const s of t){const o=s.publicKey.toString();r.has(o)||(r.add(o),n.push(s))}this.signatures=n.map(s=>({signature:null,publicKey:s.publicKey}));const i=this._compile();this._partialSign(i,...n)}partialSign(...t){if(t.length===0)throw new Error("No signers");const r=new Set,n=[];for(const s of t){const o=s.publicKey.toString();r.has(o)||(r.add(o),n.push(s))}const i=this._compile();this._partialSign(i,...n)}_partialSign(t,...r){const n=t.serialize();r.forEach(i=>{const s=gG(n,i.secretKey);this._addSignature(i.publicKey,WC(s))})}addSignature(t,r){this._compile(),this._addSignature(t,r)}_addSignature(t,r){Zn(r.length===64);const n=this.signatures.findIndex(i=>t.equals(i.publicKey));if(n<0)throw new Error(`unknown signer: ${t.toString()}`);this.signatures[n].signature=Ft.Buffer.from(r)}verifySignatures(t=!0){return!this._getMessageSignednessErrors(this.serializeMessage(),t)}_getMessageSignednessErrors(t,r){const n={};for(const{signature:i,publicKey:s}of this.signatures)i===null?r&&(n.missing||=[]).push(s):bwe(i,t,s.toBytes())||(n.invalid||=[]).push(s);return n.invalid||n.missing?n:void 0}serialize(t){const{requireAllSignatures:r,verifySignatures:n}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},t),i=this.serializeMessage();if(n){const s=this._getMessageSignednessErrors(i,r);if(s){let o="Signature verification failed.";throw s.invalid&&(o+=`
641
641
  Invalid signature for public key${s.invalid.length===1?"":"(s)"} [\`${s.invalid.map(a=>a.toBase58()).join("`, `")}\`].`),s.missing&&(o+=`
642
- Missing signature for public key${s.missing.length===1?"":"(s)"} [\`${s.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(o)}}return this._serialize(i)}_serialize(t){const{signatures:r}=this,n=[];Eo(n,r.length);const i=n.length+r.length*64+t.length,s=Ft.Buffer.alloc(i);return Zn(r.length<256),Ft.Buffer.from(n).copy(s,0),r.forEach(({signature:o},a)=>{o!==null&&(Zn(o.length===64,"signature has invalid length"),Ft.Buffer.from(o).copy(s,n.length+a*64))}),t.copy(s,n.length+r.length*64),Zn(s.length<=kd,`Transaction too large: ${s.length} > ${kd}`),s}get keys(){return Zn(this.instructions.length===1),this.instructions[0].keys.map(t=>t.pubkey)}get programId(){return Zn(this.instructions.length===1),this.instructions[0].programId}get data(){return Zn(this.instructions.length===1),this.instructions[0].data}static from(t){let r=[...t];const n=xo(r);let i=[];for(let s=0;s<n;s++){const o=ko(r,0,jp);i.push(vs.encode(Ft.Buffer.from(o)))}return ua.populate(Dd.from(r),i)}static populate(t,r=[]){const n=new ua;return n.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(n.feePayer=t.accountKeys[0]),r.forEach((i,s)=>{const o={signature:i==vs.encode(kwe)?null:vs.decode(i),publicKey:t.accountKeys[s]};n.signatures.push(o)}),t.instructions.forEach(i=>{const s=i.accounts.map(o=>{const a=t.accountKeys[o];return{pubkey:a,isSigner:n.signatures.some(c=>c.publicKey.toString()===a.toString())||t.isAccountSigner(o),isWritable:t.isAccountWritable(o)}});n.instructions.push(new fd({keys:s,programId:t.accountKeys[i.programIdIndex],data:vs.decode(i.data)}))}),n._message=t,n._json=n.toJSON(),n}}class Hs{get version(){return this.message.version}constructor(t,r){if(this.signatures=void 0,this.message=void 0,r!==void 0)Zn(r.length===t.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=r;else{const n=[];for(let i=0;i<t.header.numRequiredSignatures;i++)n.push(new Uint8Array(jp));this.signatures=n}this.message=t}serialize(){const t=this.message.serialize(),r=Array();Eo(r,this.signatures.length);const n=ie.struct([ie.blob(r.length,"encodedSignaturesLength"),ie.seq(wwe(),this.signatures.length,"signatures"),ie.blob(t.length,"serializedMessage")]),i=new Uint8Array(2048),s=n.encode({encodedSignaturesLength:new Uint8Array(r),signatures:this.signatures,serializedMessage:t},i);return i.slice(0,s)}static deserialize(t){let r=[...t];const n=[],i=xo(r);for(let o=0;o<i;o++)n.push(new Uint8Array(ko(r,0,jp)));const s=v4.deserialize(new Uint8Array(r));return new Hs(s,n)}sign(t){const r=this.message.serialize(),n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(const i of t){const s=n.findIndex(o=>o.equals(i.publicKey));Zn(s>=0,`Cannot sign with non signer key ${i.publicKey.toBase58()}`),this.signatures[s]=gG(r,i.secretKey)}}addSignature(t,r){Zn(r.byteLength===64,"Signature must be 64 bytes long");const i=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(s=>s.equals(t));Zn(i>=0,`Can not add signature; \`${t.toBase58()}\` is not required to sign this transaction`),this.signatures[i]=r}}new bt("SysvarC1ock11111111111111111111111111111111");new bt("SysvarEpochSchedu1e111111111111111111111111");new bt("Sysvar1nstructions1111111111111111111111111");new bt("SysvarRecentB1ockHashes11111111111111111111");new bt("SysvarRent111111111111111111111111111111111");new bt("SysvarRewards111111111111111111111111111111");new bt("SysvarS1otHashes111111111111111111111111111");new bt("SysvarS1otHistory11111111111111111111111111");new bt("SysvarStakeHistory1111111111111111111111111");function xy(e,t){const r=e.layout.span>=0?e.layout.span:wG(e,t),n=Ft.Buffer.alloc(r),i=Object.assign({instruction:e.index},t);return e.layout.encode(i,n),n}const _G=ie.nu64("lamportsPerSignature"),Awe=ie.struct([ie.u32("version"),ie.u32("state"),Gt("authorizedPubkey"),Gt("nonce"),ie.struct([_G],"feeCalculator")]);Awe.span;function Pp(e){const t=ie.blob(8,e),r=t.decode.bind(t),n=t.encode.bind(t),i=t,s=Vye();return i.decode=(o,a)=>{const c=r(o,a);return s.decode(c)},i.encode=(o,a,c)=>{const u=s.encode(o);return n(u,a,c)},i}Object.freeze({Create:{index:0,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports"),ie.ns64("space"),Gt("programId")])},Assign:{index:1,layout:ie.struct([ie.u32("instruction"),Gt("programId")])},Transfer:{index:2,layout:ie.struct([ie.u32("instruction"),Pp("lamports")])},CreateWithSeed:{index:3,layout:ie.struct([ie.u32("instruction"),Gt("base"),tp("seed"),ie.ns64("lamports"),ie.ns64("space"),Gt("programId")])},AdvanceNonceAccount:{index:4,layout:ie.struct([ie.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:ie.struct([ie.u32("instruction"),Gt("authorized")])},AuthorizeNonceAccount:{index:7,layout:ie.struct([ie.u32("instruction"),Gt("authorized")])},Allocate:{index:8,layout:ie.struct([ie.u32("instruction"),ie.ns64("space")])},AllocateWithSeed:{index:9,layout:ie.struct([ie.u32("instruction"),Gt("base"),tp("seed"),ie.ns64("space"),Gt("programId")])},AssignWithSeed:{index:10,layout:ie.struct([ie.u32("instruction"),Gt("base"),tp("seed"),Gt("programId")])},TransferWithSeed:{index:11,layout:ie.struct([ie.u32("instruction"),Pp("lamports"),tp("seed"),Gt("programId")])},UpgradeNonceAccount:{index:12,layout:ie.struct([ie.u32("instruction")])}});new bt("11111111111111111111111111111111");new bt("BPFLoader2111111111111111111111111111111111");ie.struct([ie.u32("typeIndex"),Pp("deactivationSlot"),ie.nu64("lastExtendedSlot"),ie.u8("lastExtendedStartIndex"),ie.u8(),ie.seq(Gt(),ie.offset(ie.u8(),-1),"authority")]);const Sn=nb(UC(bt),ze(),e=>new bt(e)),xG=qC([ze(),yn("base64")]),VC=nb(UC(Ft.Buffer),xG,e=>Ft.Buffer.from(e[0],"base64"));function EG(e){return Ss([Ce({jsonrpc:yn("2.0"),id:ze(),result:e}),Ce({jsonrpc:yn("2.0"),id:ze(),error:Ce({code:E1(),message:ze(),data:_t(Qye())})})])}const Swe=EG(E1());function tn(e){return nb(EG(e),Swe,t=>"error"in t?t:{...t,result:Tm(t.result,e)})}function Qa(e){return tn(Ce({context:Ce({slot:pe()}),value:e}))}function _4(e){return Ce({context:Ce({slot:pe()}),value:e})}const Cwe=Ce({foundation:pe(),foundationTerm:pe(),initial:pe(),taper:pe(),terminal:pe()});tn(Qe(et(Ce({epoch:pe(),effectiveSlot:pe(),amount:pe(),postBalance:pe(),commission:_t(et(pe()))}))));const Iwe=Qe(Ce({slot:pe(),prioritizationFee:pe()})),Mwe=Ce({total:pe(),validator:pe(),foundation:pe(),epoch:pe()}),$we=Ce({epoch:pe(),slotIndex:pe(),slotsInEpoch:pe(),absoluteSlot:pe(),blockHeight:_t(pe()),transactionCount:_t(pe())}),Twe=Ce({slotsPerEpoch:pe(),leaderScheduleSlotOffset:pe(),warmup:Fc(),firstNormalEpoch:pe(),firstNormalSlot:pe()}),Nwe=cG(ze(),Qe(pe())),dh=et(Ss([Ce({}),ze()])),Owe=Ce({err:dh}),jwe=yn("receivedSignature");Ce({"solana-core":ze(),"feature-set":_t(pe())});const Pwe=Ce({program:ze(),programId:Sn,parsed:E1()}),Dwe=Ce({programId:Sn,accounts:Qe(Sn),data:ze()});Qa(Ce({err:et(Ss([Ce({}),ze()])),logs:et(Qe(ze())),accounts:_t(et(Qe(et(Ce({executable:Fc(),owner:ze(),lamports:pe(),data:Qe(ze()),rentEpoch:_t(pe())}))))),unitsConsumed:_t(pe()),returnData:_t(et(Ce({programId:ze(),data:qC([ze(),yn("base64")])}))),innerInstructions:_t(et(Qe(Ce({index:pe(),instructions:Qe(Ss([Pwe,Dwe]))}))))}));Qa(Ce({byIdentity:cG(ze(),Qe(pe())),range:Ce({firstSlot:pe(),lastSlot:pe()})}));tn(Cwe);tn(Mwe);tn(Iwe);tn($we);tn(Twe);tn(Nwe);tn(pe());Qa(Ce({total:pe(),circulating:pe(),nonCirculating:pe(),nonCirculatingAccounts:Qe(Sn)}));const Rwe=Ce({amount:ze(),uiAmount:et(pe()),decimals:pe(),uiAmountString:_t(ze())});Qa(Qe(Ce({address:Sn,amount:ze(),uiAmount:et(pe()),decimals:pe(),uiAmountString:_t(ze())})));Qa(Qe(Ce({pubkey:Sn,account:Ce({executable:Fc(),owner:Sn,lamports:pe(),data:VC,rentEpoch:pe()})})));const ZE=Ce({program:ze(),parsed:E1(),space:pe()});Qa(Qe(Ce({pubkey:Sn,account:Ce({executable:Fc(),owner:Sn,lamports:pe(),data:ZE,rentEpoch:pe()})})));Qa(Qe(Ce({lamports:pe(),address:Sn})));const KC=Ce({executable:Fc(),owner:Sn,lamports:pe(),data:VC,rentEpoch:pe()});Ce({pubkey:Sn,account:KC});const Lwe=nb(Ss([UC(Ft.Buffer),ZE]),Ss([xG,ZE]),e=>Array.isArray(e)?Tm(e,VC):e),zwe=Ce({executable:Fc(),owner:Sn,lamports:pe(),data:Lwe,rentEpoch:pe()});Ce({pubkey:Sn,account:zwe});Ce({state:Ss([yn("active"),yn("inactive"),yn("activating"),yn("deactivating")]),active:pe(),inactive:pe()});tn(Qe(Ce({signature:ze(),slot:pe(),err:dh,memo:et(ze()),blockTime:_t(et(pe()))})));tn(Qe(Ce({signature:ze(),slot:pe(),err:dh,memo:et(ze()),blockTime:_t(et(pe()))})));Ce({subscription:pe(),result:_4(KC)});const Bwe=Ce({pubkey:Sn,account:KC});Ce({subscription:pe(),result:_4(Bwe)});const Fwe=Ce({parent:pe(),slot:pe(),root:pe()});Ce({subscription:pe(),result:Fwe});const Uwe=Ss([Ce({type:Ss([yn("firstShredReceived"),yn("completed"),yn("optimisticConfirmation"),yn("root")]),slot:pe(),timestamp:pe()}),Ce({type:yn("createdBank"),parent:pe(),slot:pe(),timestamp:pe()}),Ce({type:yn("frozen"),slot:pe(),timestamp:pe(),stats:Ce({numTransactionEntries:pe(),numSuccessfulTransactions:pe(),numFailedTransactions:pe(),maxTransactionsPerEntry:pe()})}),Ce({type:yn("dead"),slot:pe(),timestamp:pe(),err:ze()})]);Ce({subscription:pe(),result:Uwe});Ce({subscription:pe(),result:_4(Ss([Owe,jwe]))});Ce({subscription:pe(),result:pe()});Ce({pubkey:ze(),gossip:et(ze()),tpu:et(ze()),rpc:et(ze()),version:et(ze())});const Lj=Ce({votePubkey:ze(),nodePubkey:ze(),activatedStake:pe(),epochVoteAccount:Fc(),epochCredits:Qe(qC([pe(),pe(),pe()])),commission:pe(),lastVote:pe(),rootSlot:et(pe())});tn(Ce({current:Qe(Lj),delinquent:Qe(Lj)}));const qwe=Ss([yn("processed"),yn("confirmed"),yn("finalized")]),Hwe=Ce({slot:pe(),confirmations:et(pe()),err:dh,confirmationStatus:_t(qwe)});Qa(Qe(et(Hwe)));tn(pe());const kG=Ce({accountKey:Sn,writableIndexes:Qe(pe()),readonlyIndexes:Qe(pe())}),GC=Ce({signatures:Qe(ze()),message:Ce({accountKeys:Qe(ze()),header:Ce({numRequiredSignatures:pe(),numReadonlySignedAccounts:pe(),numReadonlyUnsignedAccounts:pe()}),instructions:Qe(Ce({accounts:Qe(pe()),data:ze(),programIdIndex:pe()})),recentBlockhash:ze(),addressTableLookups:_t(Qe(kG))})}),AG=Ce({pubkey:Sn,signer:Fc(),writable:Fc(),source:_t(Ss([yn("transaction"),yn("lookupTable")]))}),SG=Ce({accountKeys:Qe(AG),signatures:Qe(ze())}),CG=Ce({parsed:E1(),program:ze(),programId:Sn}),IG=Ce({accounts:Qe(Sn),data:ze(),programId:Sn}),Wwe=Ss([IG,CG]),Vwe=Ss([Ce({parsed:E1(),program:ze(),programId:ze()}),Ce({accounts:Qe(ze()),data:ze(),programId:ze()})]),MG=nb(Wwe,Vwe,e=>"accounts"in e?Tm(e,IG):Tm(e,CG)),$G=Ce({signatures:Qe(ze()),message:Ce({accountKeys:Qe(AG),instructions:Qe(MG),recentBlockhash:ze(),addressTableLookups:_t(et(Qe(kG)))})}),Lv=Ce({accountIndex:pe(),mint:ze(),owner:_t(ze()),programId:_t(ze()),uiTokenAmount:Rwe}),TG=Ce({writable:Qe(Sn),readonly:Qe(Sn)}),x4=Ce({err:dh,fee:pe(),innerInstructions:_t(et(Qe(Ce({index:pe(),instructions:Qe(Ce({accounts:Qe(pe()),data:ze(),programIdIndex:pe()}))})))),preBalances:Qe(pe()),postBalances:Qe(pe()),logMessages:_t(et(Qe(ze()))),preTokenBalances:_t(et(Qe(Lv))),postTokenBalances:_t(et(Qe(Lv))),loadedAddresses:_t(TG),computeUnitsConsumed:_t(pe()),costUnits:_t(pe())}),ZC=Ce({err:dh,fee:pe(),innerInstructions:_t(et(Qe(Ce({index:pe(),instructions:Qe(MG)})))),preBalances:Qe(pe()),postBalances:Qe(pe()),logMessages:_t(et(Qe(ze()))),preTokenBalances:_t(et(Qe(Lv))),postTokenBalances:_t(et(Qe(Lv))),loadedAddresses:_t(TG),computeUnitsConsumed:_t(pe()),costUnits:_t(pe())}),k1=Ss([yn(0),yn("legacy")]),hh=Ce({pubkey:ze(),lamports:pe(),postBalance:et(pe()),rewardType:et(ze()),commission:_t(et(pe()))});tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:GC,meta:et(x4),version:_t(k1)})),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:SG,meta:et(x4),version:_t(k1)})),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:$G,meta:et(ZC),version:_t(k1)})),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:SG,meta:et(ZC),version:_t(k1)})),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:GC,meta:et(x4)})),rewards:_t(Qe(hh)),blockTime:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),signatures:Qe(ze()),blockTime:et(pe())})));tn(et(Ce({slot:pe(),meta:et(x4),blockTime:_t(et(pe())),transaction:GC,version:_t(k1)})));tn(et(Ce({slot:pe(),transaction:$G,meta:et(ZC),blockTime:_t(et(pe())),version:_t(k1)})));Qa(Ce({blockhash:ze(),lastValidBlockHeight:pe()}));Qa(Fc());const Kwe=Ce({slot:pe(),numTransactions:pe(),numSlots:pe(),samplePeriodSecs:pe()});tn(Qe(Kwe));Qa(et(Ce({feeCalculator:Ce({lamportsPerSignature:pe()})})));tn(ze());tn(ze());const Gwe=Ce({err:dh,logs:Qe(ze()),signature:ze()});Ce({result:_4(Gwe),subscription:pe()});Object.freeze({CreateLookupTable:{index:0,layout:ie.struct([ie.u32("instruction"),Pp("recentSlot"),ie.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:ie.struct([ie.u32("instruction")])},ExtendLookupTable:{index:2,layout:ie.struct([ie.u32("instruction"),Pp(),ie.seq(Gt(),ie.offset(ie.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:ie.struct([ie.u32("instruction")])},CloseLookupTable:{index:4,layout:ie.struct([ie.u32("instruction")])}});new bt("AddressLookupTab1e1111111111111111111111111");const Mg=Object.freeze({RequestUnits:{index:0,layout:ie.struct([ie.u8("instruction"),ie.u32("units"),ie.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:ie.struct([ie.u8("instruction"),ie.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:ie.struct([ie.u8("instruction"),ie.u32("units")])},SetComputeUnitPrice:{index:3,layout:ie.struct([ie.u8("instruction"),Pp("microLamports")])}});class NG{constructor(){}static requestUnits(t){const r=Mg.RequestUnits,n=xy(r,t);return new fd({keys:[],programId:this.programId,data:n})}static requestHeapFrame(t){const r=Mg.RequestHeapFrame,n=xy(r,t);return new fd({keys:[],programId:this.programId,data:n})}static setComputeUnitLimit(t){const r=Mg.SetComputeUnitLimit,n=xy(r,t);return new fd({keys:[],programId:this.programId,data:n})}static setComputeUnitPrice(t){const r=Mg.SetComputeUnitPrice,n=xy(r,{microLamports:BigInt(t.microLamports)});return new fd({keys:[],programId:this.programId,data:n})}}NG.programId=new bt("ComputeBudget111111111111111111111111111111");ie.struct([ie.u8("numSignatures"),ie.u8("padding"),ie.u16("signatureOffset"),ie.u16("signatureInstructionIndex"),ie.u16("publicKeyOffset"),ie.u16("publicKeyInstructionIndex"),ie.u16("messageDataOffset"),ie.u16("messageDataSize"),ie.u16("messageInstructionIndex")]);new bt("Ed25519SigVerify111111111111111111111111111");mwe.utils.isValidPrivateKey;ie.struct([ie.u8("numSignatures"),ie.u16("signatureOffset"),ie.u8("signatureInstructionIndex"),ie.u16("ethAddressOffset"),ie.u8("ethAddressInstructionIndex"),ie.u16("messageDataOffset"),ie.u16("messageDataSize"),ie.u8("messageInstructionIndex"),ie.blob(20,"ethAddress"),ie.blob(64,"signature"),ie.u8("recoveryId")]);new bt("KeccakSecp256k11111111111111111111111111111");var OG;new bt("StakeConfig11111111111111111111111111111111");class YC{constructor(t,r,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=r,this.custodian=n}}OG=YC;YC.default=new OG(0,0,bt.default);Object.freeze({Initialize:{index:0,layout:ie.struct([ie.u32("instruction"),vwe(),_we()])},Authorize:{index:1,layout:ie.struct([ie.u32("instruction"),Gt("newAuthorized"),ie.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:ie.struct([ie.u32("instruction")])},Split:{index:3,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports")])},Withdraw:{index:4,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports")])},Deactivate:{index:5,layout:ie.struct([ie.u32("instruction")])},Merge:{index:7,layout:ie.struct([ie.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:ie.struct([ie.u32("instruction"),Gt("newAuthorized"),ie.u32("stakeAuthorizationType"),tp("authoritySeed"),Gt("authorityOwner")])}});new bt("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:ie.struct([ie.u32("instruction"),xwe()])},Authorize:{index:1,layout:ie.struct([ie.u32("instruction"),Gt("newAuthorized"),ie.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:ie.struct([ie.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:ie.struct([ie.u32("instruction"),Ewe()])}});new bt("Vote111111111111111111111111111111111111111");new bt("Va1idator1nfo111111111111111111111111111111");Ce({name:ze(),website:_t(ze()),details:_t(ze()),iconUrl:_t(ze()),keybaseUsername:_t(ze())});new bt("Vote111111111111111111111111111111111111111");ie.struct([Gt("nodePubkey"),Gt("authorizedWithdrawer"),ie.u8("commission"),ie.nu64(),ie.seq(ie.struct([ie.nu64("slot"),ie.u32("confirmationCount")]),ie.offset(ie.u32(),-8),"votes"),ie.u8("rootSlotValid"),ie.nu64("rootSlot"),ie.nu64(),ie.seq(ie.struct([ie.nu64("epoch"),Gt("authorizedVoter")]),ie.offset(ie.u32(),-8),"authorizedVoters"),ie.struct([ie.seq(ie.struct([Gt("authorizedPubkey"),ie.nu64("epochOfLastAuthorizedSwitch"),ie.nu64("targetEpoch")]),32,"buf"),ie.nu64("idx"),ie.u8("isEmpty")],"priorVoters"),ie.nu64(),ie.seq(ie.struct([ie.nu64("epoch"),ie.nu64("credits"),ie.nu64("prevCredits")]),ie.offset(ie.u32(),-8),"epochCredits"),ie.struct([ie.nu64("slot"),ie.nu64("timestamp")],"lastTimestamp")]);const i1t=Object.freeze(Object.defineProperty({__proto__:null,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:Mg,ComputeBudgetProgram:NG,FeeCalculatorLayout:_G,Lockup:YC,MAX_SEED_LENGTH:yG,Message:Dd,MessageAccountKeys:Nm,MessageV0:Om,PACKET_DATA_SIZE:kd,PUBLIC_KEY_LENGTH:Uu,PublicKey:bt,SIGNATURE_LENGTH_IN_BYTES:jp,SOLANA_SCHEMA:Gg,Struct:mG,Transaction:ua,TransactionInstruction:fd,VERSION_PREFIX_MASK:y4,VersionedMessage:v4,VersionedTransaction:Hs},Symbol.toStringTag,{value:"Module"}));function Zwe(e){return wH()?(vH(e),!0):!1}const Ywe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Jwe=Object.prototype.toString,Xwe=e=>Jwe.call(e)==="[object Object]",Qwe=()=>{};function eve(e,t){function r(...n){return new Promise((i,s)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(i).catch(s)})}return r}const jG=e=>e();function tve(e=jG,t={}){const{initialState:r="active"}=t,n=nve(r==="active");function i(){n.value=!1}function s(){n.value=!0}const o=(...a)=>{n.value&&e(...a)};return{isActive:yH(n),pause:i,resume:s,eventFilter:o}}function rve(e){return bf()}function D8(e){return Array.isArray(e)?e:[e]}function nve(...e){if(e.length!==1)return Ane(...e);const t=e[0];return typeof t=="function"?yH(Sne(()=>({get:t,set:Qwe}))):An(t)}function ive(e,t,r={}){const{eventFilter:n=jG,...i}=r;return dn(e,eve(n,t),i)}function sve(e,t,r={}){const{eventFilter:n,initialState:i="active",...s}=r,{eventFilter:o,pause:a,resume:c,isActive:u}=tve(n,{initialState:i});return{stop:ive(e,t,{...s,eventFilter:o}),pause:a,resume:c,isActive:u}}function ove(e,t=!0,r){rve()?SS(e,r):t?e():bH(e)}function ave(e,t,r){return dn(e,t,{...r,immediate:!0})}const zv=Ywe?window:void 0;function cve(e){var t;const r=qa(e);return(t=r?.$el)!=null?t:r}function zj(...e){const t=[],r=()=>{t.forEach(a=>a()),t.length=0},n=(a,c,u,l)=>(a.addEventListener(c,u,l),()=>a.removeEventListener(c,u,l)),i=ir(()=>{const a=D8(qa(e[0])).filter(c=>c!=null);return a.every(c=>typeof c!="string")?a:void 0}),s=ave(()=>{var a,c;return[(c=(a=i.value)==null?void 0:a.map(u=>cve(u)))!=null?c:[zv].filter(u=>u!=null),D8(qa(i.value?e[1]:e[0])),D8(Ef(i.value?e[2]:e[1])),qa(i.value?e[3]:e[2])]},([a,c,u,l])=>{if(r(),!a?.length||!c?.length||!u?.length)return;const d=Xwe(l)?{...l}:l;t.push(...a.flatMap(h=>c.flatMap(g=>u.map(m=>n(h,g,m,d)))))},{flush:"post"}),o=()=>{s(),r()};return Zwe(r),o}const Ey=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ky="__vueuse_ssr_handlers__",uve=lve();function lve(){return ky in Ey||(Ey[ky]=Ey[ky]||{}),Ey[ky]}function fve(e,t){return uve[e]||t}function dve(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const hve={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Bj="vueuse-storage";function pve(e,t,r,n={}){var i;const{flush:s="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:l,window:d=zv,eventFilter:h,onError:g=D=>{console.error(D)},initOnMounted:m}=n,b=(l?xf:An)(typeof t=="function"?t():t),k=ir(()=>qa(e));if(!r)try{r=fve("getDefaultStorage",()=>{var D;return(D=zv)==null?void 0:D.localStorage})()}catch(D){g(D)}if(!r)return b;const w=qa(t),E=dve(w),A=(i=n.serializer)!=null?i:hve[E],{pause:M,resume:R}=sve(b,()=>z(b.value),{flush:s,deep:o,eventFilter:h});dn(k,()=>L(),{flush:s}),d&&a&&ove(()=>{r instanceof Storage?zj(d,"storage",L,{passive:!0}):zj(d,Bj,B),m&&L()}),m||L();function N(D,x){if(d){const y={key:k.value,oldValue:D,newValue:x,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",y):new CustomEvent(Bj,{detail:y}))}}function z(D){try{const x=r.getItem(k.value);if(D==null)N(x,null),r.removeItem(k.value);else{const y=A.write(D);x!==y&&(r.setItem(k.value,y),N(x,y))}}catch(x){g(x)}}function F(D){const x=D?D.newValue:r.getItem(k.value);if(x==null)return c&&w!=null&&r.setItem(k.value,A.write(w)),w;if(!D&&u){const y=A.read(x);return typeof u=="function"?u(y,w):E==="object"&&!Array.isArray(y)?{...w,...y}:y}else return typeof x!="string"?x:A.read(x)}function L(D){if(!(D&&D.storageArea!==r)){if(D&&D.key==null){b.value=w;return}if(!(D&&D.key!==k.value)){M();try{D?.newValue!==A.write(b.value)&&(b.value=F(D))}catch(x){g(x)}finally{D?bH(R):R()}}}}function B(D){L(D.detail)}return b}function gve(e,t,r={}){const{window:n=zv}=r;return pve(e,t,n?.localStorage,r)}var mve=Object.defineProperty,bve=(e,t,r)=>t in e?mve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,PG=(e,t,r)=>bve(e,t+"",r);class DG extends Wn{constructor(){super(...arguments),PG(this,"name","WalletNotSelectedError")}}class yve extends Wn{constructor(){super(...arguments),PG(this,"name","WalletNotSelectedError")}}function R8(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}const Fj="solana:mainnet",wve="solana:devnet",vve="solana:testnet",_ve="solana:localnet",xve="https://api.mainnet-beta.solana.com";function Eve(e){return e.includes(xve)?Fj:/\bdevnet\b/i.test(e)?wve:/\btestnet\b/i.test(e)?vve:/\blocalhost\b/i.test(e)||/\b127\.0\.0\.1\b/.test(e)?_ve:Fj}function kve(e){let t=`${e.domain} wants you to sign in with your Solana account:
642
+ Missing signature for public key${s.missing.length===1?"":"(s)"} [\`${s.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(o)}}return this._serialize(i)}_serialize(t){const{signatures:r}=this,n=[];Eo(n,r.length);const i=n.length+r.length*64+t.length,s=Ft.Buffer.alloc(i);return Zn(r.length<256),Ft.Buffer.from(n).copy(s,0),r.forEach(({signature:o},a)=>{o!==null&&(Zn(o.length===64,"signature has invalid length"),Ft.Buffer.from(o).copy(s,n.length+a*64))}),t.copy(s,n.length+r.length*64),Zn(s.length<=kd,`Transaction too large: ${s.length} > ${kd}`),s}get keys(){return Zn(this.instructions.length===1),this.instructions[0].keys.map(t=>t.pubkey)}get programId(){return Zn(this.instructions.length===1),this.instructions[0].programId}get data(){return Zn(this.instructions.length===1),this.instructions[0].data}static from(t){let r=[...t];const n=xo(r);let i=[];for(let s=0;s<n;s++){const o=ko(r,0,jp);i.push(vs.encode(Ft.Buffer.from(o)))}return ua.populate(Dd.from(r),i)}static populate(t,r=[]){const n=new ua;return n.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(n.feePayer=t.accountKeys[0]),r.forEach((i,s)=>{const o={signature:i==vs.encode(kwe)?null:vs.decode(i),publicKey:t.accountKeys[s]};n.signatures.push(o)}),t.instructions.forEach(i=>{const s=i.accounts.map(o=>{const a=t.accountKeys[o];return{pubkey:a,isSigner:n.signatures.some(c=>c.publicKey.toString()===a.toString())||t.isAccountSigner(o),isWritable:t.isAccountWritable(o)}});n.instructions.push(new fd({keys:s,programId:t.accountKeys[i.programIdIndex],data:vs.decode(i.data)}))}),n._message=t,n._json=n.toJSON(),n}}class Hs{get version(){return this.message.version}constructor(t,r){if(this.signatures=void 0,this.message=void 0,r!==void 0)Zn(r.length===t.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=r;else{const n=[];for(let i=0;i<t.header.numRequiredSignatures;i++)n.push(new Uint8Array(jp));this.signatures=n}this.message=t}serialize(){const t=this.message.serialize(),r=Array();Eo(r,this.signatures.length);const n=ie.struct([ie.blob(r.length,"encodedSignaturesLength"),ie.seq(wwe(),this.signatures.length,"signatures"),ie.blob(t.length,"serializedMessage")]),i=new Uint8Array(2048),s=n.encode({encodedSignaturesLength:new Uint8Array(r),signatures:this.signatures,serializedMessage:t},i);return i.slice(0,s)}static deserialize(t){let r=[...t];const n=[],i=xo(r);for(let o=0;o<i;o++)n.push(new Uint8Array(ko(r,0,jp)));const s=v4.deserialize(new Uint8Array(r));return new Hs(s,n)}sign(t){const r=this.message.serialize(),n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(const i of t){const s=n.findIndex(o=>o.equals(i.publicKey));Zn(s>=0,`Cannot sign with non signer key ${i.publicKey.toBase58()}`),this.signatures[s]=gG(r,i.secretKey)}}addSignature(t,r){Zn(r.byteLength===64,"Signature must be 64 bytes long");const i=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(s=>s.equals(t));Zn(i>=0,`Can not add signature; \`${t.toBase58()}\` is not required to sign this transaction`),this.signatures[i]=r}}new bt("SysvarC1ock11111111111111111111111111111111");new bt("SysvarEpochSchedu1e111111111111111111111111");new bt("Sysvar1nstructions1111111111111111111111111");new bt("SysvarRecentB1ockHashes11111111111111111111");new bt("SysvarRent111111111111111111111111111111111");new bt("SysvarRewards111111111111111111111111111111");new bt("SysvarS1otHashes111111111111111111111111111");new bt("SysvarS1otHistory11111111111111111111111111");new bt("SysvarStakeHistory1111111111111111111111111");function xy(e,t){const r=e.layout.span>=0?e.layout.span:wG(e,t),n=Ft.Buffer.alloc(r),i=Object.assign({instruction:e.index},t);return e.layout.encode(i,n),n}const _G=ie.nu64("lamportsPerSignature"),Awe=ie.struct([ie.u32("version"),ie.u32("state"),Gt("authorizedPubkey"),Gt("nonce"),ie.struct([_G],"feeCalculator")]);Awe.span;function Pp(e){const t=ie.blob(8,e),r=t.decode.bind(t),n=t.encode.bind(t),i=t,s=Vye();return i.decode=(o,a)=>{const c=r(o,a);return s.decode(c)},i.encode=(o,a,c)=>{const u=s.encode(o);return n(u,a,c)},i}Object.freeze({Create:{index:0,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports"),ie.ns64("space"),Gt("programId")])},Assign:{index:1,layout:ie.struct([ie.u32("instruction"),Gt("programId")])},Transfer:{index:2,layout:ie.struct([ie.u32("instruction"),Pp("lamports")])},CreateWithSeed:{index:3,layout:ie.struct([ie.u32("instruction"),Gt("base"),tp("seed"),ie.ns64("lamports"),ie.ns64("space"),Gt("programId")])},AdvanceNonceAccount:{index:4,layout:ie.struct([ie.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:ie.struct([ie.u32("instruction"),Gt("authorized")])},AuthorizeNonceAccount:{index:7,layout:ie.struct([ie.u32("instruction"),Gt("authorized")])},Allocate:{index:8,layout:ie.struct([ie.u32("instruction"),ie.ns64("space")])},AllocateWithSeed:{index:9,layout:ie.struct([ie.u32("instruction"),Gt("base"),tp("seed"),ie.ns64("space"),Gt("programId")])},AssignWithSeed:{index:10,layout:ie.struct([ie.u32("instruction"),Gt("base"),tp("seed"),Gt("programId")])},TransferWithSeed:{index:11,layout:ie.struct([ie.u32("instruction"),Pp("lamports"),tp("seed"),Gt("programId")])},UpgradeNonceAccount:{index:12,layout:ie.struct([ie.u32("instruction")])}});new bt("11111111111111111111111111111111");new bt("BPFLoader2111111111111111111111111111111111");ie.struct([ie.u32("typeIndex"),Pp("deactivationSlot"),ie.nu64("lastExtendedSlot"),ie.u8("lastExtendedStartIndex"),ie.u8(),ie.seq(Gt(),ie.offset(ie.u8(),-1),"authority")]);const Sn=nb(UC(bt),ze(),e=>new bt(e)),xG=qC([ze(),yn("base64")]),VC=nb(UC(Ft.Buffer),xG,e=>Ft.Buffer.from(e[0],"base64"));function EG(e){return Ss([Ce({jsonrpc:yn("2.0"),id:ze(),result:e}),Ce({jsonrpc:yn("2.0"),id:ze(),error:Ce({code:E1(),message:ze(),data:_t(Qye())})})])}const Swe=EG(E1());function tn(e){return nb(EG(e),Swe,t=>"error"in t?t:{...t,result:Tm(t.result,e)})}function Qa(e){return tn(Ce({context:Ce({slot:pe()}),value:e}))}function _4(e){return Ce({context:Ce({slot:pe()}),value:e})}const Cwe=Ce({foundation:pe(),foundationTerm:pe(),initial:pe(),taper:pe(),terminal:pe()});tn(Qe(et(Ce({epoch:pe(),effectiveSlot:pe(),amount:pe(),postBalance:pe(),commission:_t(et(pe()))}))));const Iwe=Qe(Ce({slot:pe(),prioritizationFee:pe()})),Mwe=Ce({total:pe(),validator:pe(),foundation:pe(),epoch:pe()}),$we=Ce({epoch:pe(),slotIndex:pe(),slotsInEpoch:pe(),absoluteSlot:pe(),blockHeight:_t(pe()),transactionCount:_t(pe())}),Twe=Ce({slotsPerEpoch:pe(),leaderScheduleSlotOffset:pe(),warmup:Fc(),firstNormalEpoch:pe(),firstNormalSlot:pe()}),Nwe=cG(ze(),Qe(pe())),dh=et(Ss([Ce({}),ze()])),Owe=Ce({err:dh}),jwe=yn("receivedSignature");Ce({"solana-core":ze(),"feature-set":_t(pe())});const Pwe=Ce({program:ze(),programId:Sn,parsed:E1()}),Dwe=Ce({programId:Sn,accounts:Qe(Sn),data:ze()});Qa(Ce({err:et(Ss([Ce({}),ze()])),logs:et(Qe(ze())),accounts:_t(et(Qe(et(Ce({executable:Fc(),owner:ze(),lamports:pe(),data:Qe(ze()),rentEpoch:_t(pe())}))))),unitsConsumed:_t(pe()),returnData:_t(et(Ce({programId:ze(),data:qC([ze(),yn("base64")])}))),innerInstructions:_t(et(Qe(Ce({index:pe(),instructions:Qe(Ss([Pwe,Dwe]))}))))}));Qa(Ce({byIdentity:cG(ze(),Qe(pe())),range:Ce({firstSlot:pe(),lastSlot:pe()})}));tn(Cwe);tn(Mwe);tn(Iwe);tn($we);tn(Twe);tn(Nwe);tn(pe());Qa(Ce({total:pe(),circulating:pe(),nonCirculating:pe(),nonCirculatingAccounts:Qe(Sn)}));const Rwe=Ce({amount:ze(),uiAmount:et(pe()),decimals:pe(),uiAmountString:_t(ze())});Qa(Qe(Ce({address:Sn,amount:ze(),uiAmount:et(pe()),decimals:pe(),uiAmountString:_t(ze())})));Qa(Qe(Ce({pubkey:Sn,account:Ce({executable:Fc(),owner:Sn,lamports:pe(),data:VC,rentEpoch:pe()})})));const ZE=Ce({program:ze(),parsed:E1(),space:pe()});Qa(Qe(Ce({pubkey:Sn,account:Ce({executable:Fc(),owner:Sn,lamports:pe(),data:ZE,rentEpoch:pe()})})));Qa(Qe(Ce({lamports:pe(),address:Sn})));const KC=Ce({executable:Fc(),owner:Sn,lamports:pe(),data:VC,rentEpoch:pe()});Ce({pubkey:Sn,account:KC});const Lwe=nb(Ss([UC(Ft.Buffer),ZE]),Ss([xG,ZE]),e=>Array.isArray(e)?Tm(e,VC):e),zwe=Ce({executable:Fc(),owner:Sn,lamports:pe(),data:Lwe,rentEpoch:pe()});Ce({pubkey:Sn,account:zwe});Ce({state:Ss([yn("active"),yn("inactive"),yn("activating"),yn("deactivating")]),active:pe(),inactive:pe()});tn(Qe(Ce({signature:ze(),slot:pe(),err:dh,memo:et(ze()),blockTime:_t(et(pe()))})));tn(Qe(Ce({signature:ze(),slot:pe(),err:dh,memo:et(ze()),blockTime:_t(et(pe()))})));Ce({subscription:pe(),result:_4(KC)});const Bwe=Ce({pubkey:Sn,account:KC});Ce({subscription:pe(),result:_4(Bwe)});const Fwe=Ce({parent:pe(),slot:pe(),root:pe()});Ce({subscription:pe(),result:Fwe});const Uwe=Ss([Ce({type:Ss([yn("firstShredReceived"),yn("completed"),yn("optimisticConfirmation"),yn("root")]),slot:pe(),timestamp:pe()}),Ce({type:yn("createdBank"),parent:pe(),slot:pe(),timestamp:pe()}),Ce({type:yn("frozen"),slot:pe(),timestamp:pe(),stats:Ce({numTransactionEntries:pe(),numSuccessfulTransactions:pe(),numFailedTransactions:pe(),maxTransactionsPerEntry:pe()})}),Ce({type:yn("dead"),slot:pe(),timestamp:pe(),err:ze()})]);Ce({subscription:pe(),result:Uwe});Ce({subscription:pe(),result:_4(Ss([Owe,jwe]))});Ce({subscription:pe(),result:pe()});Ce({pubkey:ze(),gossip:et(ze()),tpu:et(ze()),rpc:et(ze()),version:et(ze())});const Lj=Ce({votePubkey:ze(),nodePubkey:ze(),activatedStake:pe(),epochVoteAccount:Fc(),epochCredits:Qe(qC([pe(),pe(),pe()])),commission:pe(),lastVote:pe(),rootSlot:et(pe())});tn(Ce({current:Qe(Lj),delinquent:Qe(Lj)}));const qwe=Ss([yn("processed"),yn("confirmed"),yn("finalized")]),Hwe=Ce({slot:pe(),confirmations:et(pe()),err:dh,confirmationStatus:_t(qwe)});Qa(Qe(et(Hwe)));tn(pe());const kG=Ce({accountKey:Sn,writableIndexes:Qe(pe()),readonlyIndexes:Qe(pe())}),GC=Ce({signatures:Qe(ze()),message:Ce({accountKeys:Qe(ze()),header:Ce({numRequiredSignatures:pe(),numReadonlySignedAccounts:pe(),numReadonlyUnsignedAccounts:pe()}),instructions:Qe(Ce({accounts:Qe(pe()),data:ze(),programIdIndex:pe()})),recentBlockhash:ze(),addressTableLookups:_t(Qe(kG))})}),AG=Ce({pubkey:Sn,signer:Fc(),writable:Fc(),source:_t(Ss([yn("transaction"),yn("lookupTable")]))}),SG=Ce({accountKeys:Qe(AG),signatures:Qe(ze())}),CG=Ce({parsed:E1(),program:ze(),programId:Sn}),IG=Ce({accounts:Qe(Sn),data:ze(),programId:Sn}),Wwe=Ss([IG,CG]),Vwe=Ss([Ce({parsed:E1(),program:ze(),programId:ze()}),Ce({accounts:Qe(ze()),data:ze(),programId:ze()})]),MG=nb(Wwe,Vwe,e=>"accounts"in e?Tm(e,IG):Tm(e,CG)),$G=Ce({signatures:Qe(ze()),message:Ce({accountKeys:Qe(AG),instructions:Qe(MG),recentBlockhash:ze(),addressTableLookups:_t(et(Qe(kG)))})}),Lv=Ce({accountIndex:pe(),mint:ze(),owner:_t(ze()),programId:_t(ze()),uiTokenAmount:Rwe}),TG=Ce({writable:Qe(Sn),readonly:Qe(Sn)}),x4=Ce({err:dh,fee:pe(),innerInstructions:_t(et(Qe(Ce({index:pe(),instructions:Qe(Ce({accounts:Qe(pe()),data:ze(),programIdIndex:pe()}))})))),preBalances:Qe(pe()),postBalances:Qe(pe()),logMessages:_t(et(Qe(ze()))),preTokenBalances:_t(et(Qe(Lv))),postTokenBalances:_t(et(Qe(Lv))),loadedAddresses:_t(TG),computeUnitsConsumed:_t(pe()),costUnits:_t(pe())}),ZC=Ce({err:dh,fee:pe(),innerInstructions:_t(et(Qe(Ce({index:pe(),instructions:Qe(MG)})))),preBalances:Qe(pe()),postBalances:Qe(pe()),logMessages:_t(et(Qe(ze()))),preTokenBalances:_t(et(Qe(Lv))),postTokenBalances:_t(et(Qe(Lv))),loadedAddresses:_t(TG),computeUnitsConsumed:_t(pe()),costUnits:_t(pe())}),k1=Ss([yn(0),yn("legacy")]),hh=Ce({pubkey:ze(),lamports:pe(),postBalance:et(pe()),rewardType:et(ze()),commission:_t(et(pe()))});tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:GC,meta:et(x4),version:_t(k1)})),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:SG,meta:et(x4),version:_t(k1)})),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:$G,meta:et(ZC),version:_t(k1)})),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:SG,meta:et(ZC),version:_t(k1)})),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),rewards:_t(Qe(hh)),blockTime:et(pe()),blockHeight:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),transactions:Qe(Ce({transaction:GC,meta:et(x4)})),rewards:_t(Qe(hh)),blockTime:et(pe())})));tn(et(Ce({blockhash:ze(),previousBlockhash:ze(),parentSlot:pe(),signatures:Qe(ze()),blockTime:et(pe())})));tn(et(Ce({slot:pe(),meta:et(x4),blockTime:_t(et(pe())),transaction:GC,version:_t(k1)})));tn(et(Ce({slot:pe(),transaction:$G,meta:et(ZC),blockTime:_t(et(pe())),version:_t(k1)})));Qa(Ce({blockhash:ze(),lastValidBlockHeight:pe()}));Qa(Fc());const Kwe=Ce({slot:pe(),numTransactions:pe(),numSlots:pe(),samplePeriodSecs:pe()});tn(Qe(Kwe));Qa(et(Ce({feeCalculator:Ce({lamportsPerSignature:pe()})})));tn(ze());tn(ze());const Gwe=Ce({err:dh,logs:Qe(ze()),signature:ze()});Ce({result:_4(Gwe),subscription:pe()});Object.freeze({CreateLookupTable:{index:0,layout:ie.struct([ie.u32("instruction"),Pp("recentSlot"),ie.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:ie.struct([ie.u32("instruction")])},ExtendLookupTable:{index:2,layout:ie.struct([ie.u32("instruction"),Pp(),ie.seq(Gt(),ie.offset(ie.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:ie.struct([ie.u32("instruction")])},CloseLookupTable:{index:4,layout:ie.struct([ie.u32("instruction")])}});new bt("AddressLookupTab1e1111111111111111111111111");const Mg=Object.freeze({RequestUnits:{index:0,layout:ie.struct([ie.u8("instruction"),ie.u32("units"),ie.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:ie.struct([ie.u8("instruction"),ie.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:ie.struct([ie.u8("instruction"),ie.u32("units")])},SetComputeUnitPrice:{index:3,layout:ie.struct([ie.u8("instruction"),Pp("microLamports")])}});class NG{constructor(){}static requestUnits(t){const r=Mg.RequestUnits,n=xy(r,t);return new fd({keys:[],programId:this.programId,data:n})}static requestHeapFrame(t){const r=Mg.RequestHeapFrame,n=xy(r,t);return new fd({keys:[],programId:this.programId,data:n})}static setComputeUnitLimit(t){const r=Mg.SetComputeUnitLimit,n=xy(r,t);return new fd({keys:[],programId:this.programId,data:n})}static setComputeUnitPrice(t){const r=Mg.SetComputeUnitPrice,n=xy(r,{microLamports:BigInt(t.microLamports)});return new fd({keys:[],programId:this.programId,data:n})}}NG.programId=new bt("ComputeBudget111111111111111111111111111111");ie.struct([ie.u8("numSignatures"),ie.u8("padding"),ie.u16("signatureOffset"),ie.u16("signatureInstructionIndex"),ie.u16("publicKeyOffset"),ie.u16("publicKeyInstructionIndex"),ie.u16("messageDataOffset"),ie.u16("messageDataSize"),ie.u16("messageInstructionIndex")]);new bt("Ed25519SigVerify111111111111111111111111111");mwe.utils.isValidPrivateKey;ie.struct([ie.u8("numSignatures"),ie.u16("signatureOffset"),ie.u8("signatureInstructionIndex"),ie.u16("ethAddressOffset"),ie.u8("ethAddressInstructionIndex"),ie.u16("messageDataOffset"),ie.u16("messageDataSize"),ie.u8("messageInstructionIndex"),ie.blob(20,"ethAddress"),ie.blob(64,"signature"),ie.u8("recoveryId")]);new bt("KeccakSecp256k11111111111111111111111111111");var OG;new bt("StakeConfig11111111111111111111111111111111");class YC{constructor(t,r,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=r,this.custodian=n}}OG=YC;YC.default=new OG(0,0,bt.default);Object.freeze({Initialize:{index:0,layout:ie.struct([ie.u32("instruction"),vwe(),_we()])},Authorize:{index:1,layout:ie.struct([ie.u32("instruction"),Gt("newAuthorized"),ie.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:ie.struct([ie.u32("instruction")])},Split:{index:3,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports")])},Withdraw:{index:4,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports")])},Deactivate:{index:5,layout:ie.struct([ie.u32("instruction")])},Merge:{index:7,layout:ie.struct([ie.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:ie.struct([ie.u32("instruction"),Gt("newAuthorized"),ie.u32("stakeAuthorizationType"),tp("authoritySeed"),Gt("authorityOwner")])}});new bt("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:ie.struct([ie.u32("instruction"),xwe()])},Authorize:{index:1,layout:ie.struct([ie.u32("instruction"),Gt("newAuthorized"),ie.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:ie.struct([ie.u32("instruction"),ie.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:ie.struct([ie.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:ie.struct([ie.u32("instruction"),Ewe()])}});new bt("Vote111111111111111111111111111111111111111");new bt("Va1idator1nfo111111111111111111111111111111");Ce({name:ze(),website:_t(ze()),details:_t(ze()),iconUrl:_t(ze()),keybaseUsername:_t(ze())});new bt("Vote111111111111111111111111111111111111111");ie.struct([Gt("nodePubkey"),Gt("authorizedWithdrawer"),ie.u8("commission"),ie.nu64(),ie.seq(ie.struct([ie.nu64("slot"),ie.u32("confirmationCount")]),ie.offset(ie.u32(),-8),"votes"),ie.u8("rootSlotValid"),ie.nu64("rootSlot"),ie.nu64(),ie.seq(ie.struct([ie.nu64("epoch"),Gt("authorizedVoter")]),ie.offset(ie.u32(),-8),"authorizedVoters"),ie.struct([ie.seq(ie.struct([Gt("authorizedPubkey"),ie.nu64("epochOfLastAuthorizedSwitch"),ie.nu64("targetEpoch")]),32,"buf"),ie.nu64("idx"),ie.u8("isEmpty")],"priorVoters"),ie.nu64(),ie.seq(ie.struct([ie.nu64("epoch"),ie.nu64("credits"),ie.nu64("prevCredits")]),ie.offset(ie.u32(),-8),"epochCredits"),ie.struct([ie.nu64("slot"),ie.nu64("timestamp")],"lastTimestamp")]);const s1t=Object.freeze(Object.defineProperty({__proto__:null,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:Mg,ComputeBudgetProgram:NG,FeeCalculatorLayout:_G,Lockup:YC,MAX_SEED_LENGTH:yG,Message:Dd,MessageAccountKeys:Nm,MessageV0:Om,PACKET_DATA_SIZE:kd,PUBLIC_KEY_LENGTH:Uu,PublicKey:bt,SIGNATURE_LENGTH_IN_BYTES:jp,SOLANA_SCHEMA:Gg,Struct:mG,Transaction:ua,TransactionInstruction:fd,VERSION_PREFIX_MASK:y4,VersionedMessage:v4,VersionedTransaction:Hs},Symbol.toStringTag,{value:"Module"}));function Zwe(e){return wH()?(vH(e),!0):!1}const Ywe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Jwe=Object.prototype.toString,Xwe=e=>Jwe.call(e)==="[object Object]",Qwe=()=>{};function eve(e,t){function r(...n){return new Promise((i,s)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(i).catch(s)})}return r}const jG=e=>e();function tve(e=jG,t={}){const{initialState:r="active"}=t,n=nve(r==="active");function i(){n.value=!1}function s(){n.value=!0}const o=(...a)=>{n.value&&e(...a)};return{isActive:yH(n),pause:i,resume:s,eventFilter:o}}function rve(e){return bf()}function D8(e){return Array.isArray(e)?e:[e]}function nve(...e){if(e.length!==1)return Ane(...e);const t=e[0];return typeof t=="function"?yH(Sne(()=>({get:t,set:Qwe}))):An(t)}function ive(e,t,r={}){const{eventFilter:n=jG,...i}=r;return dn(e,eve(n,t),i)}function sve(e,t,r={}){const{eventFilter:n,initialState:i="active",...s}=r,{eventFilter:o,pause:a,resume:c,isActive:u}=tve(n,{initialState:i});return{stop:ive(e,t,{...s,eventFilter:o}),pause:a,resume:c,isActive:u}}function ove(e,t=!0,r){rve()?SS(e,r):t?e():bH(e)}function ave(e,t,r){return dn(e,t,{...r,immediate:!0})}const zv=Ywe?window:void 0;function cve(e){var t;const r=qa(e);return(t=r?.$el)!=null?t:r}function zj(...e){const t=[],r=()=>{t.forEach(a=>a()),t.length=0},n=(a,c,u,l)=>(a.addEventListener(c,u,l),()=>a.removeEventListener(c,u,l)),i=ir(()=>{const a=D8(qa(e[0])).filter(c=>c!=null);return a.every(c=>typeof c!="string")?a:void 0}),s=ave(()=>{var a,c;return[(c=(a=i.value)==null?void 0:a.map(u=>cve(u)))!=null?c:[zv].filter(u=>u!=null),D8(qa(i.value?e[1]:e[0])),D8(Ef(i.value?e[2]:e[1])),qa(i.value?e[3]:e[2])]},([a,c,u,l])=>{if(r(),!a?.length||!c?.length||!u?.length)return;const d=Xwe(l)?{...l}:l;t.push(...a.flatMap(h=>c.flatMap(g=>u.map(m=>n(h,g,m,d)))))},{flush:"post"}),o=()=>{s(),r()};return Zwe(r),o}const Ey=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ky="__vueuse_ssr_handlers__",uve=lve();function lve(){return ky in Ey||(Ey[ky]=Ey[ky]||{}),Ey[ky]}function fve(e,t){return uve[e]||t}function dve(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const hve={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Bj="vueuse-storage";function pve(e,t,r,n={}){var i;const{flush:s="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:l,window:d=zv,eventFilter:h,onError:g=D=>{console.error(D)},initOnMounted:m}=n,b=(l?xf:An)(typeof t=="function"?t():t),k=ir(()=>qa(e));if(!r)try{r=fve("getDefaultStorage",()=>{var D;return(D=zv)==null?void 0:D.localStorage})()}catch(D){g(D)}if(!r)return b;const w=qa(t),E=dve(w),A=(i=n.serializer)!=null?i:hve[E],{pause:M,resume:R}=sve(b,()=>z(b.value),{flush:s,deep:o,eventFilter:h});dn(k,()=>L(),{flush:s}),d&&a&&ove(()=>{r instanceof Storage?zj(d,"storage",L,{passive:!0}):zj(d,Bj,B),m&&L()}),m||L();function N(D,x){if(d){const y={key:k.value,oldValue:D,newValue:x,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",y):new CustomEvent(Bj,{detail:y}))}}function z(D){try{const x=r.getItem(k.value);if(D==null)N(x,null),r.removeItem(k.value);else{const y=A.write(D);x!==y&&(r.setItem(k.value,y),N(x,y))}}catch(x){g(x)}}function F(D){const x=D?D.newValue:r.getItem(k.value);if(x==null)return c&&w!=null&&r.setItem(k.value,A.write(w)),w;if(!D&&u){const y=A.read(x);return typeof u=="function"?u(y,w):E==="object"&&!Array.isArray(y)?{...w,...y}:y}else return typeof x!="string"?x:A.read(x)}function L(D){if(!(D&&D.storageArea!==r)){if(D&&D.key==null){b.value=w;return}if(!(D&&D.key!==k.value)){M();try{D?.newValue!==A.write(b.value)&&(b.value=F(D))}catch(x){g(x)}finally{D?bH(R):R()}}}}function B(D){L(D.detail)}return b}function gve(e,t,r={}){const{window:n=zv}=r;return pve(e,t,n?.localStorage,r)}var mve=Object.defineProperty,bve=(e,t,r)=>t in e?mve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,PG=(e,t,r)=>bve(e,t+"",r);class DG extends Wn{constructor(){super(...arguments),PG(this,"name","WalletNotSelectedError")}}class yve extends Wn{constructor(){super(...arguments),PG(this,"name","WalletNotSelectedError")}}function R8(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}const Fj="solana:mainnet",wve="solana:devnet",vve="solana:testnet",_ve="solana:localnet",xve="https://api.mainnet-beta.solana.com";function Eve(e){return e.includes(xve)?Fj:/\bdevnet\b/i.test(e)?wve:/\btestnet\b/i.test(e)?vve:/\blocalhost\b/i.test(e)||/\b127\.0\.0\.1\b/.test(e)?_ve:Fj}function kve(e){let t=`${e.domain} wants you to sign in with your Solana account:
643
643
  `;t+=`${e.address}`,e.statement&&(t+=`
644
644
 
645
645
  ${e.statement}`);const r=[];if(e.uri&&r.push(`URI: ${e.uri}`),e.version&&r.push(`Version: ${e.version}`),e.chainId&&r.push(`Chain ID: ${e.chainId}`),e.nonce&&r.push(`Nonce: ${e.nonce}`),e.issuedAt&&r.push(`Issued At: ${e.issuedAt}`),e.expirationTime&&r.push(`Expiration Time: ${e.expirationTime}`),e.notBefore&&r.push(`Not Before: ${e.notBefore}`),e.requestId&&r.push(`Request ID: ${e.requestId}`),e.resources){r.push("Resources:");for(const n of e.resources)r.push(`- ${n}`)}return r.length&&(t+=`
@@ -659,9 +659,9 @@ Minimum version required to store current data is: `+D+`.
659
659
  * @license MIT
660
660
  */var CP;function t4e(){return CP||(CP=1,function(e){const t=Q3e(),r=e4e(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const U=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(U,S),U.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(U){if(U>i)throw new RangeError('The value "'+U+'" is invalid for option "size"');const S=new Uint8Array(U);return Object.setPrototypeOf(S,a.prototype),S}function a(U,S,T){if(typeof U=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(U)}return c(U,S,T)}a.poolSize=8192;function c(U,S,T){if(typeof U=="string")return h(U,S);if(ArrayBuffer.isView(U))return m(U);if(U==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(Pe(U,ArrayBuffer)||U&&Pe(U.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(U,SharedArrayBuffer)||U&&Pe(U.buffer,SharedArrayBuffer)))return b(U,S,T);if(typeof U=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const H=U.valueOf&&U.valueOf();if(H!=null&&H!==U)return a.from(H,S,T);const V=k(U);if(V)return V;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof U[Symbol.toPrimitive]=="function")return a.from(U[Symbol.toPrimitive]("string"),S,T);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U)}a.from=function(U,S,T){return c(U,S,T)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function u(U){if(typeof U!="number")throw new TypeError('"size" argument must be of type number');if(U<0)throw new RangeError('The value "'+U+'" is invalid for option "size"')}function l(U,S,T){return u(U),U<=0?o(U):S!==void 0?typeof T=="string"?o(U).fill(S,T):o(U).fill(S):o(U)}a.alloc=function(U,S,T){return l(U,S,T)};function d(U){return u(U),o(U<0?0:w(U)|0)}a.allocUnsafe=function(U){return d(U)},a.allocUnsafeSlow=function(U){return d(U)};function h(U,S){if((typeof S!="string"||S==="")&&(S="utf8"),!a.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const T=A(U,S)|0;let H=o(T);const V=H.write(U,S);return V!==T&&(H=H.slice(0,V)),H}function g(U){const S=U.length<0?0:w(U.length)|0,T=o(S);for(let H=0;H<S;H+=1)T[H]=U[H]&255;return T}function m(U){if(Pe(U,Uint8Array)){const S=new Uint8Array(U);return b(S.buffer,S.byteOffset,S.byteLength)}return g(U)}function b(U,S,T){if(S<0||U.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if(U.byteLength<S+(T||0))throw new RangeError('"length" is outside of buffer bounds');let H;return S===void 0&&T===void 0?H=new Uint8Array(U):T===void 0?H=new Uint8Array(U,S):H=new Uint8Array(U,S,T),Object.setPrototypeOf(H,a.prototype),H}function k(U){if(a.isBuffer(U)){const S=w(U.length)|0,T=o(S);return T.length===0||U.copy(T,0,0,S),T}if(U.length!==void 0)return typeof U.length!="number"||xe(U.length)?o(0):g(U);if(U.type==="Buffer"&&Array.isArray(U.data))return g(U.data)}function w(U){if(U>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return U|0}function E(U){return+U!=U&&(U=0),a.alloc(+U)}a.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==a.prototype},a.compare=function(S,T){if(Pe(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),Pe(T,Uint8Array)&&(T=a.from(T,T.offset,T.byteLength)),!a.isBuffer(S)||!a.isBuffer(T))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===T)return 0;let H=S.length,V=T.length;for(let G=0,Z=Math.min(H,V);G<Z;++G)if(S[G]!==T[G]){H=S[G],V=T[G];break}return H<V?-1:V<H?1:0},a.isEncoding=function(S){switch(String(S).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(S,T){if(!Array.isArray(S))throw new TypeError('"list" argument must be an Array of Buffers');if(S.length===0)return a.alloc(0);let H;if(T===void 0)for(T=0,H=0;H<S.length;++H)T+=S[H].length;const V=a.allocUnsafe(T);let G=0;for(H=0;H<S.length;++H){let Z=S[H];if(Pe(Z,Uint8Array))G+Z.length>V.length?(a.isBuffer(Z)||(Z=a.from(Z)),Z.copy(V,G)):Uint8Array.prototype.set.call(V,Z,G);else if(a.isBuffer(Z))Z.copy(V,G);else throw new TypeError('"list" argument must be an Array of Buffers');G+=Z.length}return V};function A(U,S){if(a.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||Pe(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);const T=U.length,H=arguments.length>2&&arguments[2]===!0;if(!H&&T===0)return 0;let V=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":return Re(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return le(U).length;default:if(V)return H?-1:Re(U).length;S=(""+S).toLowerCase(),V=!0}}a.byteLength=A;function M(U,S,T){let H=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((T===void 0||T>this.length)&&(T=this.length),T<=0)||(T>>>=0,S>>>=0,T<=S))return"";for(U||(U="utf8");;)switch(U){case"hex":return $(this,S,T);case"utf8":case"utf-8":return f(this,S,T);case"ascii":return I(this,S,T);case"latin1":case"binary":return j(this,S,T);case"base64":return y(this,S,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,S,T);default:if(H)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),H=!0}}a.prototype._isBuffer=!0;function R(U,S,T){const H=U[S];U[S]=U[T],U[T]=H}a.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let T=0;T<S;T+=2)R(this,T,T+1);return this},a.prototype.swap32=function(){const S=this.length;if(S%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let T=0;T<S;T+=4)R(this,T,T+3),R(this,T+1,T+2);return this},a.prototype.swap64=function(){const S=this.length;if(S%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let T=0;T<S;T+=8)R(this,T,T+7),R(this,T+1,T+6),R(this,T+2,T+5),R(this,T+3,T+4);return this},a.prototype.toString=function(){const S=this.length;return S===0?"":arguments.length===0?f(this,0,S):M.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(S){if(!a.isBuffer(S))throw new TypeError("Argument must be a Buffer");return this===S?!0:a.compare(this,S)===0},a.prototype.inspect=function(){let S="";const T=e.INSPECT_MAX_BYTES;return S=this.toString("hex",0,T).replace(/(.{2})/g,"$1 ").trim(),this.length>T&&(S+=" ... "),"<Buffer "+S+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(S,T,H,V,G){if(Pe(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),!a.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(T===void 0&&(T=0),H===void 0&&(H=S?S.length:0),V===void 0&&(V=0),G===void 0&&(G=this.length),T<0||H>S.length||V<0||G>this.length)throw new RangeError("out of range index");if(V>=G&&T>=H)return 0;if(V>=G)return-1;if(T>=H)return 1;if(T>>>=0,H>>>=0,V>>>=0,G>>>=0,this===S)return 0;let Z=G-V,Ee=H-T;const Ie=Math.min(Z,Ee),ee=this.slice(V,G),se=S.slice(T,H);for(let we=0;we<Ie;++we)if(ee[we]!==se[we]){Z=ee[we],Ee=se[we];break}return Z<Ee?-1:Ee<Z?1:0};function N(U,S,T,H,V){if(U.length===0)return-1;if(typeof T=="string"?(H=T,T=0):T>2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,xe(T)&&(T=V?0:U.length-1),T<0&&(T=U.length+T),T>=U.length){if(V)return-1;T=U.length-1}else if(T<0)if(V)T=0;else return-1;if(typeof S=="string"&&(S=a.from(S,H)),a.isBuffer(S))return S.length===0?-1:z(U,S,T,H,V);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(U,S,T):Uint8Array.prototype.lastIndexOf.call(U,S,T):z(U,[S],T,H,V);throw new TypeError("val must be string, number or Buffer")}function z(U,S,T,H,V){let G=1,Z=U.length,Ee=S.length;if(H!==void 0&&(H=String(H).toLowerCase(),H==="ucs2"||H==="ucs-2"||H==="utf16le"||H==="utf-16le")){if(U.length<2||S.length<2)return-1;G=2,Z/=2,Ee/=2,T/=2}function Ie(se,we){return G===1?se[we]:se.readUInt16BE(we*G)}let ee;if(V){let se=-1;for(ee=T;ee<Z;ee++)if(Ie(U,ee)===Ie(S,se===-1?0:ee-se)){if(se===-1&&(se=ee),ee-se+1===Ee)return se*G}else se!==-1&&(ee-=ee-se),se=-1}else for(T+Ee>Z&&(T=Z-Ee),ee=T;ee>=0;ee--){let se=!0;for(let we=0;we<Ee;we++)if(Ie(U,ee+we)!==Ie(S,we)){se=!1;break}if(se)return ee}return-1}a.prototype.includes=function(S,T,H){return this.indexOf(S,T,H)!==-1},a.prototype.indexOf=function(S,T,H){return N(this,S,T,H,!0)},a.prototype.lastIndexOf=function(S,T,H){return N(this,S,T,H,!1)};function F(U,S,T,H){T=Number(T)||0;const V=U.length-T;H?(H=Number(H),H>V&&(H=V)):H=V;const G=S.length;H>G/2&&(H=G/2);let Z;for(Z=0;Z<H;++Z){const Ee=parseInt(S.substr(Z*2,2),16);if(xe(Ee))return Z;U[T+Z]=Ee}return Z}function L(U,S,T,H){return he(Re(S,U.length-T),U,T,H)}function B(U,S,T,H){return he(J(S),U,T,H)}function D(U,S,T,H){return he(le(S),U,T,H)}function x(U,S,T,H){return he(ne(S,U.length-T),U,T,H)}a.prototype.write=function(S,T,H,V){if(T===void 0)V="utf8",H=this.length,T=0;else if(H===void 0&&typeof T=="string")V=T,H=this.length,T=0;else if(isFinite(T))T=T>>>0,isFinite(H)?(H=H>>>0,V===void 0&&(V="utf8")):(V=H,H=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const G=this.length-T;if((H===void 0||H>G)&&(H=G),S.length>0&&(H<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");let Z=!1;for(;;)switch(V){case"hex":return F(this,S,T,H);case"utf8":case"utf-8":return L(this,S,T,H);case"ascii":case"latin1":case"binary":return B(this,S,T,H);case"base64":return D(this,S,T,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,S,T,H);default:if(Z)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),Z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(U,S,T){return S===0&&T===U.length?t.fromByteArray(U):t.fromByteArray(U.slice(S,T))}function f(U,S,T){T=Math.min(U.length,T);const H=[];let V=S;for(;V<T;){const G=U[V];let Z=null,Ee=G>239?4:G>223?3:G>191?2:1;if(V+Ee<=T){let Ie,ee,se,we;switch(Ee){case 1:G<128&&(Z=G);break;case 2:Ie=U[V+1],(Ie&192)===128&&(we=(G&31)<<6|Ie&63,we>127&&(Z=we));break;case 3:Ie=U[V+1],ee=U[V+2],(Ie&192)===128&&(ee&192)===128&&(we=(G&15)<<12|(Ie&63)<<6|ee&63,we>2047&&(we<55296||we>57343)&&(Z=we));break;case 4:Ie=U[V+1],ee=U[V+2],se=U[V+3],(Ie&192)===128&&(ee&192)===128&&(se&192)===128&&(we=(G&15)<<18|(Ie&63)<<12|(ee&63)<<6|se&63,we>65535&&we<1114112&&(Z=we))}}Z===null?(Z=65533,Ee=1):Z>65535&&(Z-=65536,H.push(Z>>>10&1023|55296),Z=56320|Z&1023),H.push(Z),V+=Ee}return v(H)}const p=4096;function v(U){const S=U.length;if(S<=p)return String.fromCharCode.apply(String,U);let T="",H=0;for(;H<S;)T+=String.fromCharCode.apply(String,U.slice(H,H+=p));return T}function I(U,S,T){let H="";T=Math.min(U.length,T);for(let V=S;V<T;++V)H+=String.fromCharCode(U[V]&127);return H}function j(U,S,T){let H="";T=Math.min(U.length,T);for(let V=S;V<T;++V)H+=String.fromCharCode(U[V]);return H}function $(U,S,T){const H=U.length;(!S||S<0)&&(S=0),(!T||T<0||T>H)&&(T=H);let V="";for(let G=S;G<T;++G)V+=oe[U[G]];return V}function C(U,S,T){const H=U.slice(S,T);let V="";for(let G=0;G<H.length-1;G+=2)V+=String.fromCharCode(H[G]+H[G+1]*256);return V}a.prototype.slice=function(S,T){const H=this.length;S=~~S,T=T===void 0?H:~~T,S<0?(S+=H,S<0&&(S=0)):S>H&&(S=H),T<0?(T+=H,T<0&&(T=0)):T>H&&(T=H),T<S&&(T=S);const V=this.subarray(S,T);return Object.setPrototypeOf(V,a.prototype),V};function O(U,S,T){if(U%1!==0||U<0)throw new RangeError("offset is not uint");if(U+S>T)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=this[S],G=1,Z=0;for(;++Z<T&&(G*=256);)V+=this[S+Z]*G;return V},a.prototype.readUintBE=a.prototype.readUIntBE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=this[S+--T],G=1;for(;T>0&&(G*=256);)V+=this[S+--T]*G;return V},a.prototype.readUint8=a.prototype.readUInt8=function(S,T){return S=S>>>0,T||O(S,1,this.length),this[S]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(S,T){return S=S>>>0,T||O(S,2,this.length),this[S]|this[S+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(S,T){return S=S>>>0,T||O(S,2,this.length),this[S]<<8|this[S+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(S,T){return S=S>>>0,T||O(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(S,T){return S=S>>>0,T||O(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},a.prototype.readBigUInt64LE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=T+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,G=this[++S]+this[++S]*2**8+this[++S]*2**16+H*2**24;return BigInt(V)+(BigInt(G)<<BigInt(32))}),a.prototype.readBigUInt64BE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=T*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],G=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+H;return(BigInt(V)<<BigInt(32))+BigInt(G)}),a.prototype.readIntLE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=this[S],G=1,Z=0;for(;++Z<T&&(G*=256);)V+=this[S+Z]*G;return G*=128,V>=G&&(V-=Math.pow(2,8*T)),V},a.prototype.readIntBE=function(S,T,H){S=S>>>0,T=T>>>0,H||O(S,T,this.length);let V=T,G=1,Z=this[S+--V];for(;V>0&&(G*=256);)Z+=this[S+--V]*G;return G*=128,Z>=G&&(Z-=Math.pow(2,8*T)),Z},a.prototype.readInt8=function(S,T){return S=S>>>0,T||O(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},a.prototype.readInt16LE=function(S,T){S=S>>>0,T||O(S,2,this.length);const H=this[S]|this[S+1]<<8;return H&32768?H|4294901760:H},a.prototype.readInt16BE=function(S,T){S=S>>>0,T||O(S,2,this.length);const H=this[S+1]|this[S]<<8;return H&32768?H|4294901760:H},a.prototype.readInt32LE=function(S,T){return S=S>>>0,T||O(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},a.prototype.readInt32BE=function(S,T){return S=S>>>0,T||O(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},a.prototype.readBigInt64LE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(H<<24);return(BigInt(V)<<BigInt(32))+BigInt(T+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24)}),a.prototype.readBigInt64BE=me(function(S){S=S>>>0,Se(S,"offset");const T=this[S],H=this[S+7];(T===void 0||H===void 0)&&_e(S,this.length-8);const V=(T<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(V)<<BigInt(32))+BigInt(this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+H)}),a.prototype.readFloatLE=function(S,T){return S=S>>>0,T||O(S,4,this.length),r.read(this,S,!0,23,4)},a.prototype.readFloatBE=function(S,T){return S=S>>>0,T||O(S,4,this.length),r.read(this,S,!1,23,4)},a.prototype.readDoubleLE=function(S,T){return S=S>>>0,T||O(S,8,this.length),r.read(this,S,!0,52,8)},a.prototype.readDoubleBE=function(S,T){return S=S>>>0,T||O(S,8,this.length),r.read(this,S,!1,52,8)};function _(U,S,T,H,V,G){if(!a.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>V||S<G)throw new RangeError('"value" argument is out of bounds');if(T+H>U.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(S,T,H,V){if(S=+S,T=T>>>0,H=H>>>0,!V){const Ee=Math.pow(2,8*H)-1;_(this,S,T,H,Ee,0)}let G=1,Z=0;for(this[T]=S&255;++Z<H&&(G*=256);)this[T+Z]=S/G&255;return T+H},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(S,T,H,V){if(S=+S,T=T>>>0,H=H>>>0,!V){const Ee=Math.pow(2,8*H)-1;_(this,S,T,H,Ee,0)}let G=H-1,Z=1;for(this[T+G]=S&255;--G>=0&&(Z*=256);)this[T+G]=S/Z&255;return T+H},a.prototype.writeUint8=a.prototype.writeUInt8=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,1,255,0),this[T]=S&255,T+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,65535,0),this[T]=S&255,this[T+1]=S>>>8,T+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,65535,0),this[T]=S>>>8,this[T+1]=S&255,T+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,4294967295,0),this[T+3]=S>>>24,this[T+2]=S>>>16,this[T+1]=S>>>8,this[T]=S&255,T+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,4294967295,0),this[T]=S>>>24,this[T+1]=S>>>16,this[T+2]=S>>>8,this[T+3]=S&255,T+4};function P(U,S,T,H,V){ye(S,H,V,U,T,7);let G=Number(S&BigInt(4294967295));U[T++]=G,G=G>>8,U[T++]=G,G=G>>8,U[T++]=G,G=G>>8,U[T++]=G;let Z=Number(S>>BigInt(32)&BigInt(4294967295));return U[T++]=Z,Z=Z>>8,U[T++]=Z,Z=Z>>8,U[T++]=Z,Z=Z>>8,U[T++]=Z,T}function q(U,S,T,H,V){ye(S,H,V,U,T,7);let G=Number(S&BigInt(4294967295));U[T+7]=G,G=G>>8,U[T+6]=G,G=G>>8,U[T+5]=G,G=G>>8,U[T+4]=G;let Z=Number(S>>BigInt(32)&BigInt(4294967295));return U[T+3]=Z,Z=Z>>8,U[T+2]=Z,Z=Z>>8,U[T+1]=Z,Z=Z>>8,U[T]=Z,T+8}a.prototype.writeBigUInt64LE=me(function(S,T=0){return P(this,S,T,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=me(function(S,T=0){return q(this,S,T,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(S,T,H,V){if(S=+S,T=T>>>0,!V){const Ie=Math.pow(2,8*H-1);_(this,S,T,H,Ie-1,-Ie)}let G=0,Z=1,Ee=0;for(this[T]=S&255;++G<H&&(Z*=256);)S<0&&Ee===0&&this[T+G-1]!==0&&(Ee=1),this[T+G]=(S/Z>>0)-Ee&255;return T+H},a.prototype.writeIntBE=function(S,T,H,V){if(S=+S,T=T>>>0,!V){const Ie=Math.pow(2,8*H-1);_(this,S,T,H,Ie-1,-Ie)}let G=H-1,Z=1,Ee=0;for(this[T+G]=S&255;--G>=0&&(Z*=256);)S<0&&Ee===0&&this[T+G+1]!==0&&(Ee=1),this[T+G]=(S/Z>>0)-Ee&255;return T+H},a.prototype.writeInt8=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,1,127,-128),S<0&&(S=255+S+1),this[T]=S&255,T+1},a.prototype.writeInt16LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,32767,-32768),this[T]=S&255,this[T+1]=S>>>8,T+2},a.prototype.writeInt16BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,2,32767,-32768),this[T]=S>>>8,this[T+1]=S&255,T+2},a.prototype.writeInt32LE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,2147483647,-2147483648),this[T]=S&255,this[T+1]=S>>>8,this[T+2]=S>>>16,this[T+3]=S>>>24,T+4},a.prototype.writeInt32BE=function(S,T,H){return S=+S,T=T>>>0,H||_(this,S,T,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[T]=S>>>24,this[T+1]=S>>>16,this[T+2]=S>>>8,this[T+3]=S&255,T+4},a.prototype.writeBigInt64LE=me(function(S,T=0){return P(this,S,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=me(function(S,T=0){return q(this,S,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function W(U,S,T,H,V,G){if(T+H>U.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function K(U,S,T,H,V){return S=+S,T=T>>>0,V||W(U,S,T,4),r.write(U,S,T,H,23,4),T+4}a.prototype.writeFloatLE=function(S,T,H){return K(this,S,T,!0,H)},a.prototype.writeFloatBE=function(S,T,H){return K(this,S,T,!1,H)};function Y(U,S,T,H,V){return S=+S,T=T>>>0,V||W(U,S,T,8),r.write(U,S,T,H,52,8),T+8}a.prototype.writeDoubleLE=function(S,T,H){return Y(this,S,T,!0,H)},a.prototype.writeDoubleBE=function(S,T,H){return Y(this,S,T,!1,H)},a.prototype.copy=function(S,T,H,V){if(!a.isBuffer(S))throw new TypeError("argument should be a Buffer");if(H||(H=0),!V&&V!==0&&(V=this.length),T>=S.length&&(T=S.length),T||(T=0),V>0&&V<H&&(V=H),V===H||S.length===0||this.length===0)return 0;if(T<0)throw new RangeError("targetStart out of bounds");if(H<0||H>=this.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),S.length-T<V-H&&(V=S.length-T+H);const G=V-H;return this===S&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(T,H,V):Uint8Array.prototype.set.call(S,this.subarray(H,V),T),G},a.prototype.fill=function(S,T,H,V){if(typeof S=="string"){if(typeof T=="string"?(V=T,T=0,H=this.length):typeof H=="string"&&(V=H,H=this.length),V!==void 0&&typeof V!="string")throw new TypeError("encoding must be a string");if(typeof V=="string"&&!a.isEncoding(V))throw new TypeError("Unknown encoding: "+V);if(S.length===1){const Z=S.charCodeAt(0);(V==="utf8"&&Z<128||V==="latin1")&&(S=Z)}}else typeof S=="number"?S=S&255:typeof S=="boolean"&&(S=Number(S));if(T<0||this.length<T||this.length<H)throw new RangeError("Out of range index");if(H<=T)return this;T=T>>>0,H=H===void 0?this.length:H>>>0,S||(S=0);let G;if(typeof S=="number")for(G=T;G<H;++G)this[G]=S;else{const Z=a.isBuffer(S)?S:a.from(S,V),Ee=Z.length;if(Ee===0)throw new TypeError('The value "'+S+'" is invalid for argument "value"');for(G=0;G<H-T;++G)this[G+T]=Z[G%Ee]}return this};const te={};function re(U,S,T){te[U]=class extends T{constructor(){super(),Object.defineProperty(this,"message",{value:S.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${U}]`,this.stack,delete this.name}get code(){return U}set code(V){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:V,writable:!0})}toString(){return`${this.name} [${U}]: ${this.message}`}}}re("ERR_BUFFER_OUT_OF_BOUNDS",function(U){return U?`${U} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),re("ERR_INVALID_ARG_TYPE",function(U,S){return`The "${U}" argument must be of type number. Received type ${typeof S}`},TypeError),re("ERR_OUT_OF_RANGE",function(U,S,T){let H=`The value of "${U}" is out of range.`,V=T;return Number.isInteger(T)&&Math.abs(T)>2**32?V=be(String(T)):typeof T=="bigint"&&(V=String(T),(T>BigInt(2)**BigInt(32)||T<-(BigInt(2)**BigInt(32)))&&(V=be(V)),V+="n"),H+=` It must be ${S}. Received ${V}`,H},RangeError);function be(U){let S="",T=U.length;const H=U[0]==="-"?1:0;for(;T>=H+4;T-=3)S=`_${U.slice(T-3,T)}${S}`;return`${U.slice(0,T)}${S}`}function ve(U,S,T){Se(S,"offset"),(U[S]===void 0||U[S+T]===void 0)&&_e(S,U.length-(T+1))}function ye(U,S,T,H,V,G){if(U>T||U<S){const Z=typeof S=="bigint"?"n":"";let Ee;throw S===0||S===BigInt(0)?Ee=`>= 0${Z} and < 2${Z} ** ${(G+1)*8}${Z}`:Ee=`>= -(2${Z} ** ${(G+1)*8-1}${Z}) and < 2 ** ${(G+1)*8-1}${Z}`,new te.ERR_OUT_OF_RANGE("value",Ee,U)}ve(H,V,G)}function Se(U,S){if(typeof U!="number")throw new te.ERR_INVALID_ARG_TYPE(S,"number",U)}function _e(U,S,T){throw Math.floor(U)!==U?(Se(U,T),new te.ERR_OUT_OF_RANGE("offset","an integer",U)):S<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${S}`,U)}const ke=/[^+/0-9A-Za-z-_]/g;function it(U){if(U=U.split("=")[0],U=U.trim().replace(ke,""),U.length<2)return"";for(;U.length%4!==0;)U=U+"=";return U}function Re(U,S){S=S||1/0;let T;const H=U.length;let V=null;const G=[];for(let Z=0;Z<H;++Z){if(T=U.charCodeAt(Z),T>55295&&T<57344){if(!V){if(T>56319){(S-=3)>-1&&G.push(239,191,189);continue}else if(Z+1===H){(S-=3)>-1&&G.push(239,191,189);continue}V=T;continue}if(T<56320){(S-=3)>-1&&G.push(239,191,189),V=T;continue}T=(V-55296<<10|T-56320)+65536}else V&&(S-=3)>-1&&G.push(239,191,189);if(V=null,T<128){if((S-=1)<0)break;G.push(T)}else if(T<2048){if((S-=2)<0)break;G.push(T>>6|192,T&63|128)}else if(T<65536){if((S-=3)<0)break;G.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((S-=4)<0)break;G.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return G}function J(U){const S=[];for(let T=0;T<U.length;++T)S.push(U.charCodeAt(T)&255);return S}function ne(U,S){let T,H,V;const G=[];for(let Z=0;Z<U.length&&!((S-=2)<0);++Z)T=U.charCodeAt(Z),H=T>>8,V=T%256,G.push(V),G.push(H);return G}function le(U){return t.toByteArray(it(U))}function he(U,S,T,H){let V;for(V=0;V<H&&!(V+T>=S.length||V>=U.length);++V)S[V+T]=U[V];return V}function Pe(U,S){return U instanceof S||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===S.name}function xe(U){return U!==U}const oe=function(){const U="0123456789abcdef",S=new Array(256);for(let T=0;T<16;++T){const H=T*16;for(let V=0;V<16;++V)S[H+V]=U[T]+U[V]}return S}();function me(U){return typeof BigInt>"u"?je:U}function je(){throw new Error("BigInt not supported")}}(b_)),b_}/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var IP;function r4e(){return IP||(IP=1,function(e,t){var r=t4e(),n=r.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=n(o);return a!==void 0?typeof c=="string"?u.fill(a,c):u.fill(a):u.fill(0),u},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 r.SlowBuffer(o)}}(Cy,Cy.exports)),Cy.exports}var y_,MP;function n4e(){if(MP)return y_;MP=1;var e=r4e().Buffer;function t(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),i=0;i<n.length;i++)n[i]=255;for(var s=0;s<r.length;s++){var o=r.charAt(s),a=o.charCodeAt(0);if(n[a]!==255)throw new TypeError(o+" is ambiguous");n[a]=s}var c=r.length,u=r.charAt(0),l=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function h(b){if((Array.isArray(b)||b instanceof Uint8Array)&&(b=e.from(b)),!e.isBuffer(b))throw new TypeError("Expected Buffer");if(b.length===0)return"";for(var k=0,w=0,E=0,A=b.length;E!==A&&b[E]===0;)E++,k++;for(var M=(A-E)*d+1>>>0,R=new Uint8Array(M);E!==A;){for(var N=b[E],z=0,F=M-1;(N!==0||z<w)&&F!==-1;F--,z++)N+=256*R[F]>>>0,R[F]=N%c>>>0,N=N/c>>>0;if(N!==0)throw new Error("Non-zero carry");w=z,E++}for(var L=M-w;L!==M&&R[L]===0;)L++;for(var B=u.repeat(k);L<M;++L)B+=r.charAt(R[L]);return B}function g(b){if(typeof b!="string")throw new TypeError("Expected String");if(b.length===0)return e.alloc(0);for(var k=0,w=0,E=0;b[k]===u;)w++,k++;for(var A=(b.length-k)*l+1>>>0,M=new Uint8Array(A);k<b.length;){var R=n[b.charCodeAt(k)];if(R===255)return;for(var N=0,z=A-1;(R!==0||N<E)&&z!==-1;z--,N++)R+=c*M[z]>>>0,M[z]=R%256>>>0,R=R/256>>>0;if(R!==0)throw new Error("Non-zero carry");E=N,k++}for(var F=A-E;F!==A&&M[F]===0;)F++;var L=e.allocUnsafe(w+(A-F));L.fill(0,0,w);for(var B=w;F!==A;)L[B++]=M[F++];return L}function m(b){var k=g(b);if(k)return k;throw new Error("Non-base"+c+" character")}return{encode:h,decodeUnsafe:g,decode:m}}return y_=t,y_}var w_,$P;function i4e(){if($P)return w_;$P=1;var e=n4e(),t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";return w_=e(t),w_}var s4e=i4e();const o4e=UG(s4e);var ft=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Bn=function(e,t,r,n,i){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r},Fi,zs,hd,pd,Kf,$g,Fv,mr,Uv,JE,Uw,XE,Zg,QE,TP,NP,OP,jP;class a4e extends SK{get name(){return ft(this,mr,"f").name}get url(){return"https://github.com/solana-labs/wallet-standard"}get icon(){return ft(this,mr,"f").icon}get readyState(){return ft(this,Uv,"f")}get publicKey(){return ft(this,hd,"f")}get connecting(){return ft(this,pd,"f")}get supportedTransactionVersions(){return ft(this,Fv,"f")}get wallet(){return ft(this,mr,"f")}get standard(){return!0}constructor({wallet:t}){super(),Fi.add(this),zs.set(this,void 0),hd.set(this,void 0),pd.set(this,void 0),Kf.set(this,void 0),$g.set(this,void 0),Fv.set(this,void 0),mr.set(this,void 0),Uv.set(this,typeof window>"u"||typeof document>"u"?jt.Unsupported:jt.Installed),QE.set(this,r=>{if("accounts"in r){const n=ft(this,mr,"f").accounts[0];ft(this,zs,"f")&&!ft(this,Kf,"f")&&n!==ft(this,zs,"f")&&(n?ft(this,Fi,"m",Uw).call(this,n):(this.emit("error",new Z2),ft(this,Fi,"m",XE).call(this)))}"features"in r&&ft(this,Fi,"m",Zg).call(this)}),Bn(this,mr,t),Bn(this,zs,null),Bn(this,hd,null),Bn(this,pd,!1),Bn(this,Kf,!1),Bn(this,$g,ft(this,mr,"f").features[J3e].on("change",ft(this,QE,"f"))),ft(this,Fi,"m",Zg).call(this)}destroy(){Bn(this,zs,null),Bn(this,hd,null),Bn(this,pd,!1),Bn(this,Kf,!1);const t=ft(this,$g,"f");t&&(Bn(this,$g,null),t())}async autoConnect(){return ft(this,Fi,"m",JE).call(this,{silent:!0})}async connect(){return ft(this,Fi,"m",JE).call(this)}async disconnect(){if(kP in ft(this,mr,"f").features)try{Bn(this,Kf,!0,"f"),await ft(this,mr,"f").features[kP].disconnect()}catch(t){this.emit("error",new p4(t?.message,t))}finally{Bn(this,Kf,!1)}ft(this,Fi,"m",XE).call(this)}async sendTransaction(t,r,n={}){try{const i=ft(this,zs,"f");if(!i)throw new Ur;let s;if(Jf in ft(this,mr,"f").features)if(i.features.includes(Jf))s=Jf;else if(ls in ft(this,mr,"f").features&&i.features.includes(ls))s=ls;else throw new Yl;else if(ls in ft(this,mr,"f").features){if(!i.features.includes(ls))throw new Yl;s=ls}else throw new Q0;const o=Eve(r.rpcEndpoint);if(!i.chains.includes(o))throw new zu;try{const{signers:a,...c}=n;let u;if(Ba(t)?(a?.length&&t.sign(a),u=t.serialize()):(t=await this.prepareTransaction(t,r,c),a?.length&&t.partialSign(...a),u=new Uint8Array(t.serialize({requireAllSignatures:!1,verifySignatures:!1}))),s===Jf){const[l]=await ft(this,mr,"f").features[Jf].signAndSendTransaction({account:i,chain:o,transaction:u,options:{preflightCommitment:R8(c.preflightCommitment||r.commitment),skipPreflight:c.skipPreflight,maxRetries:c.maxRetries,minContextSlot:c.minContextSlot}});return o4e.encode(l.signature)}else{const[l]=await ft(this,mr,"f").features[ls].signTransaction({account:i,chain:o,transaction:u,options:{preflightCommitment:R8(c.preflightCommitment||r.commitment),minContextSlot:c.minContextSlot}});return await r.sendRawTransaction(l.signedTransaction,{...c,preflightCommitment:R8(c.preflightCommitment||r.commitment)})}}catch(a){throw a instanceof Wn?a:new zu(a?.message,a)}}catch(i){throw this.emit("error",i),i}}}zs=new WeakMap,hd=new WeakMap,pd=new WeakMap,Kf=new WeakMap,$g=new WeakMap,Fv=new WeakMap,mr=new WeakMap,Uv=new WeakMap,QE=new WeakMap,Fi=new WeakSet,JE=async function(t){try{if(this.connected||this.connecting)return;if(ft(this,Uv,"f")!==jt.Installed)throw new Rc;if(Bn(this,pd,!0,"f"),!ft(this,mr,"f").accounts.length)try{await ft(this,mr,"f").features[Y3e].connect(t)}catch(n){throw new Nc(n?.message,n)}const r=ft(this,mr,"f").accounts[0];if(!r)throw new Yl;ft(this,Fi,"m",Uw).call(this,r)}catch(r){throw this.emit("error",r),r}finally{Bn(this,pd,!1)}},Uw=function(t){let r;try{r=new bt(t.address)}catch(n){throw new jd(n?.message,n)}Bn(this,zs,t),Bn(this,hd,r),ft(this,Fi,"m",Zg).call(this),this.emit("connect",r)},XE=function(){Bn(this,zs,null),Bn(this,hd,null),ft(this,Fi,"m",Zg).call(this),this.emit("disconnect")},Zg=function(){var t,r;const n=Jf in ft(this,mr,"f").features?ft(this,mr,"f").features[Jf].supportedTransactionVersions:ft(this,mr,"f").features[ls].supportedTransactionVersions;Bn(this,Fv,X3e(n,["legacy"])?null:new Set(n)),ls in ft(this,mr,"f").features&&((t=ft(this,zs,"f"))!=null&&t.features.includes(ls))?(this.signTransaction=ft(this,Fi,"m",TP),this.signAllTransactions=ft(this,Fi,"m",NP)):(delete this.signTransaction,delete this.signAllTransactions),K1 in ft(this,mr,"f").features&&((r=ft(this,zs,"f"))!=null&&r.features.includes(K1))?this.signMessage=ft(this,Fi,"m",OP):delete this.signMessage,m_ in ft(this,mr,"f").features?this.signIn=ft(this,Fi,"m",jP):delete this.signIn},TP=async function(t){try{const r=ft(this,zs,"f");if(!r)throw new Ur;if(!(ls in ft(this,mr,"f").features))throw new Q0;if(!r.features.includes(ls))throw new Yl;try{const i=(await ft(this,mr,"f").features[ls].signTransaction({account:r,transaction:Ba(t)?t.serialize():new Uint8Array(t.serialize({requireAllSignatures:!1,verifySignatures:!1}))}))[0].signedTransaction;return Ba(t)?Hs.deserialize(i):ua.from(i)}catch(n){throw n instanceof Wn?n:new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}},NP=async function(t){try{const r=ft(this,zs,"f");if(!r)throw new Ur;if(!(ls in ft(this,mr,"f").features))throw new Q0;if(!r.features.includes(ls))throw new Yl;try{const n=await ft(this,mr,"f").features[ls].signTransaction(...t.map(i=>({account:r,transaction:Ba(i)?i.serialize():new Uint8Array(i.serialize({requireAllSignatures:!1,verifySignatures:!1}))})));return t.map((i,s)=>{const o=n[s].signedTransaction;return Ba(i)?Hs.deserialize(o):ua.from(o)})}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}},OP=async function(t){try{const r=ft(this,zs,"f");if(!r)throw new Ur;if(!(K1 in ft(this,mr,"f").features))throw new Q0;if(!r.features.includes(K1))throw new Yl;try{return(await ft(this,mr,"f").features[K1].signMessage({account:r,message:t}))[0].signature}catch(n){throw new Y2(n?.message,n)}}catch(r){throw this.emit("error",r),r}},jP=async function(t={}){try{if(!(m_ in ft(this,mr,"f").features))throw new Q0;let r;try{[r]=await ft(this,mr,"f").features[m_].signIn(t)}catch(n){throw new ij(n?.message,n)}if(!r)throw new ij;return ft(this,Fi,"m",Uw).call(this,r.account),r}catch(r){throw this.emit("error",r),r}};const c4e=cbe;var u4e=function(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},l4e=function(e,t,r,n,i){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r},qw;let _o;const E4=new Set;function f4e(e){Yg=void 0,E4.add(e)}function d4e(e){Yg=void 0,E4.delete(e)}const rp={};function h4e(){if(_o||(_o=Object.freeze({register:PP,get:p4e,on:g4e}),typeof window>"u"))return _o;const e=Object.freeze({register:PP});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(t){console.error(`wallet-standard:register-wallet event listener could not be added
661
661
  `,t)}try{window.dispatchEvent(new m4e(e))}catch(t){console.error(`wallet-standard:app-ready event could not be dispatched
662
- `,t)}return _o}function PP(...e){var t;return e=e.filter(r=>!E4.has(r)),e.length?(e.forEach(r=>f4e(r)),(t=rp.register)==null||t.forEach(r=>ek(()=>r(...e))),function(){var n;e.forEach(i=>d4e(i)),(n=rp.unregister)==null||n.forEach(i=>ek(()=>i(...e)))}):()=>{}}let Yg;function p4e(){return Yg||(Yg=[...E4]),Yg}function g4e(e,t){var r;return(r=rp[e])!=null&&r.push(t)||(rp[e]=[t]),function(){var i;rp[e]=(i=rp[e])==null?void 0:i.filter(s=>t!==s)}}function ek(e){try{e()}catch(t){console.error(t)}}class m4e extends Event{get detail(){return u4e(this,qw,"f")}get type(){return"wallet-standard:app-ready"}constructor(t){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),qw.set(this,void 0),l4e(this,qw,t)}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}qw=new WeakMap;function b4e(){if(_o||(_o=h4e(),typeof window>"u"))return _o;const e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),_o;const{register:t}=_o,r=(...n)=>n.forEach(i=>ek(()=>i({register:t})));try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:r})})}catch{return console.error("window.navigator.wallets could not be set"),_o}return r(...e),_o}function y4e(e){const t=new Set,{get:r,on:n}=b4e(),i=xf(DP(r()));return rh(s=>{const o=[n("register",(...a)=>i.value=[...i.value,...DP(a)]),n("unregister",(...a)=>i.value=i.value.filter(c=>a.some(u=>u===c.wallet)))];s(()=>o.forEach(a=>a()))}),ir(()=>[...i.value,...e.value.filter(({name:s})=>i.value.some(o=>o.name===s)?(t.has(s)||(t.add(s),console.warn(`${s} was registered as a Standard Wallet. The Wallet Adapter for ${s} can be removed from your app.`)),!1):!0)])}function DP(e){return e.filter(c4e).map(t=>new a4e({wallet:t}))}function w4e(e,t){const r=async(o,a,c)=>{var u;const l=(u=e.value)==null?void 0:u.adapter;if(!l)throw t(new DG);if(!l.connected)throw t(new Ur,l);return await l.sendTransaction(o,a,c)},n=ir(()=>{var o;const a=(o=e.value)==null?void 0:o.adapter;if(a&&"signTransaction"in a)return async c=>{if(!a.connected)throw t(new Ur);return await a.signTransaction(c)}}),i=ir(()=>{var o;const a=(o=e.value)==null?void 0:o.adapter;if(a&&"signAllTransactions"in a)return async c=>{if(!a.connected)throw t(new Ur);return await a.signAllTransactions(c)}}),s=ir(()=>{var o;const a=(o=e.value)==null?void 0:o.adapter;if(a&&"signMessage"in a)return async c=>{if(!a.connected)throw t(new Ur);return await a.signMessage(c)}});return{sendTransaction:r,signTransaction:n,signAllTransactions:i,signMessage:s}}function v4e(e){const t=An(!1);return typeof window>"u"||rh(r=>{if(e.value)return;const n=()=>t.value=!0;window.addEventListener("beforeunload",n),r(()=>window.removeEventListener("beforeunload",n))}),t}function _4e(e,t){const r=xf(null),n=An(null),i=An(!1),s=An(jt.Unsupported),o=ir(()=>s.value===jt.Installed||s.value===jt.Loadable),a=()=>{var c,u,l;n.value=((c=r.value)==null?void 0:c.adapter.publicKey)??null,i.value=((u=r.value)==null?void 0:u.adapter.connected)??!1,s.value=((l=r.value)==null?void 0:l.readyState)??jt.Unsupported};return rh(()=>{r.value=t.value?e.value.find(({adapter:c})=>c.name===t.value)??null:null,a()}),{wallet:r,publicKey:n,connected:i,readyState:s,ready:o,refreshWalletState:a}}function x4e(e){const t=xf([]);return rh(()=>{t.value=e.value.map(r=>({adapter:r,readyState:r.readyState}))}),t}const E4e=({wallets:e=[],autoConnect:t=!1,cluster:r="mainnet-beta",onError:n,localStorageKey:i="walletName"})=>{const s=An(r),o=An(!1),a=An(!1),c=xf(e),u=y4e(c),{isMobile:l,uriForAppIdentity:d}=B3e(u),h=K3e(u,l,d,s),g=x4e(h),{name:m,isUsingMwaAdapterOnMobile:b,select:k,deselect:w}=Z3e(i,l),{wallet:E,publicKey:A,connected:M,readyState:R,ready:N,refreshWalletState:z}=_4e(g,m),F=v4e(b),L=V3e(F,n);G3e(g),L3e(E,F,b,w,z,L);const B=z3e(t,E,b,o,M,N,w),{sendTransaction:D,signTransaction:x,signAllTransactions:y,signMessage:f}=w4e(E,L);return{wallets:g,autoConnect:B,cluster:s,wallet:E,publicKey:A,readyState:R,ready:N,connected:M,connecting:o,disconnecting:a,select:k,connect:async()=>{if(M.value||o.value||a.value)return;if(!E.value)throw L(new DG);const I=E.value.adapter;if(!N.value)throw L(new Rc,I);try{o.value=!0,await I.connect()}catch(j){throw w(),j}finally{o.value=!1}},disconnect:async()=>{if(!(a.value||!E.value))try{a.value=!0,await E.value.adapter.disconnect()}finally{a.value=!1}},sendTransaction:D,signTransaction:x,signAllTransactions:y,signMessage:f}};let tk=null;const k4e=()=>{if(tk)return tk;throw new yve("Wallet not initialized. Please use the `initWallet` method to initialize the wallet.")},A4e=e=>{tk=E4e(e)},o1t={install:(e,t={})=>{A4e(t),e.config.globalProperties.$wallet=k4e()}};function v_(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function rk(e,t,r=".",n){if(!v_(t))return rk(e,{},r,n);const i=Object.assign({},t);for(const s in e){if(s==="__proto__"||s==="constructor")continue;const o=e[s];o!=null&&(n&&n(i,s,o,r)||(Array.isArray(o)&&Array.isArray(i[s])?i[s]=[...o,...i[s]]:v_(o)&&v_(i[s])?i[s]=rk(o,i[s],(r?`${r}.`:"")+s.toString(),n):i[s]=o))}return i}function S4e(e){return(...t)=>t.reduce((r,n)=>rk(r,n,"",e),{})}const GG=S4e();function ZG(e){return wH()?(vH(e),!0):!1}const C4e=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const I4e=e=>e!=null,M4e=Object.prototype.toString,qv=e=>M4e.call(e)==="[object Object]",__=()=>{};function Hw(e){return Array.isArray(e)?e:[e]}function $4e(e){return bf()}function T4e(e,t){$4e()&&mH(e,t)}function N4e(e,t,r){return dn(e,t,{...r,immediate:!0})}const YG=C4e?window:void 0;function Jg(e){var t;const r=qa(e);return(t=r?.$el)!=null?t:r}function cc(...e){const t=[],r=()=>{t.forEach(a=>a()),t.length=0},n=(a,c,u,l)=>(a.addEventListener(c,u,l),()=>a.removeEventListener(c,u,l)),i=ir(()=>{const a=Hw(qa(e[0])).filter(c=>c!=null);return a.every(c=>typeof c!="string")?a:void 0}),s=N4e(()=>{var a,c;return[(c=(a=i.value)==null?void 0:a.map(u=>Jg(u)))!=null?c:[YG].filter(u=>u!=null),Hw(qa(i.value?e[1]:e[0])),Hw(Ef(i.value?e[2]:e[1])),qa(i.value?e[3]:e[2])]},([a,c,u,l])=>{if(r(),!a?.length||!c?.length||!u?.length)return;const d=qv(l)?{...l}:l;t.push(...a.flatMap(h=>c.flatMap(g=>u.map(m=>n(h,g,m,d)))))},{flush:"post"}),o=()=>{s(),r()};return ZG(r),o}function O4e(){const e=xf(!1),t=bf();return t&&SS(()=>{e.value=!0},t),e}function j4e(e){const t=O4e();return ir(()=>(t.value,!!e()))}function P4e(e,t,r={}){const{root:n,rootMargin:i="0px",threshold:s=0,window:o=YG,immediate:a=!0}=r,c=j4e(()=>o&&"IntersectionObserver"in o),u=ir(()=>{const m=qa(e);return Hw(m).map(Jg).filter(I4e)});let l=__;const d=xf(a),h=c.value?dn(()=>[u.value,Jg(n),d.value],([m,b])=>{if(l(),!d.value||!m.length)return;const k=new IntersectionObserver(t,{root:Jg(b),rootMargin:i,threshold:s});m.forEach(w=>w&&k.observe(w)),l=()=>{k.disconnect(),l=__}},{immediate:a,flush:"post"}):__,g=()=>{l(),h(),d.value=!1};return ZG(g),{isSupported:c,isActive:d,pause(){l(),d.value=!1},resume(){d.value=!0},stop:g}}const JG=1/60*1e3,D4e=typeof performance<"u"?()=>performance.now():()=>Date.now(),XG=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(D4e()),JG);function R4e(e){let t=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(c,u=!1,l=!1)=>{const d=l&&i,h=d?t:r;return u&&o.add(c),h.indexOf(c)===-1&&(h.push(c),d&&i&&(n=t.length)),c},cancel:c=>{const u=r.indexOf(c);u!==-1&&r.splice(u,1),o.delete(c)},process:c=>{if(i){s=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let u=0;u<n;u++){const l=t[u];l(c),o.has(l)&&(a.schedule(l),e())}i=!1,s&&(s=!1,a.process(c))}};return a}const L4e=40;let nk=!0,jm=!1,ik=!1;const mp={delta:0,timestamp:0},ib=["read","update","preRender","render","postRender"],k4=ib.reduce((e,t)=>(e[t]=R4e(()=>jm=!0),e),{}),sk=ib.reduce((e,t)=>{const r=k4[t];return e[t]=(n,i=!1,s=!1)=>(jm||F4e(),r.schedule(n,i,s)),e},{}),z4e=ib.reduce((e,t)=>(e[t]=k4[t].cancel,e),{});ib.reduce((e,t)=>(e[t]=()=>k4[t].process(mp),e),{});const B4e=e=>k4[e].process(mp),QG=e=>{jm=!1,mp.delta=nk?JG:Math.max(Math.min(e-mp.timestamp,L4e),1),mp.timestamp=e,ik=!0,ib.forEach(B4e),ik=!1,jm&&(nk=!1,XG(QG))},F4e=()=>{jm=!0,nk=!0,ik||XG(QG)},eZ=()=>mp;function tZ(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}var RP=function(){};const ok=(e,t,r)=>Math.min(Math.max(r,e),t),x_=.001,U4e=.01,q4e=10,H4e=.05,W4e=1;function V4e({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,s,o=1-t;o=ok(H4e,W4e,o),e=ok(U4e,q4e,e/1e3),o<1?(i=u=>{const l=u*o,d=l*e,h=l-r,g=ak(u,o),m=Math.exp(-d);return x_-h/g*m},s=u=>{const d=u*o*e,h=d*r+r,g=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),b=ak(Math.pow(u,2),o);return(-i(u)+x_>0?-1:1)*((h-g)*m)/b}):(i=u=>{const l=Math.exp(-u*e),d=(u-r)*e+1;return-x_+l*d},s=u=>{const l=Math.exp(-u*e),d=(r-u)*(e*e);return l*d});const a=5/e,c=G4e(i,s,a);if(e=e*1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}const K4e=12;function G4e(e,t,r){let n=r;for(let i=1;i<K4e;i++)n=n-e(n)/t(n);return n}function ak(e,t){return e*Math.sqrt(1-t*t)}const Z4e=["duration","bounce"],Y4e=["stiffness","damping","mass"];function LP(e,t){return t.some(r=>e[r]!==void 0)}function J4e(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!LP(e,Y4e)&&LP(e,Z4e)){const r=V4e(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function XC(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:i}=e,s=tZ(e,["from","to","restSpeed","restDelta"]);const o={done:!1,value:t};let{stiffness:a,damping:c,mass:u,velocity:l,duration:d,isResolvedFromDuration:h}=J4e(s),g=zP,m=zP;function b(){const k=l?-(l/1e3):0,w=r-t,E=c/(2*Math.sqrt(a*u)),A=Math.sqrt(a/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-t)/100,.4)),E<1){const M=ak(A,E);g=R=>{const N=Math.exp(-E*A*R);return r-N*((k+E*A*w)/M*Math.sin(M*R)+w*Math.cos(M*R))},m=R=>{const N=Math.exp(-E*A*R);return E*A*N*(Math.sin(M*R)*(k+E*A*w)/M+w*Math.cos(M*R))-N*(Math.cos(M*R)*(k+E*A*w)-M*w*Math.sin(M*R))}}else if(E===1)g=M=>r-Math.exp(-A*M)*(w+(k+A*w)*M);else{const M=A*Math.sqrt(E*E-1);g=R=>{const N=Math.exp(-E*A*R),z=Math.min(M*R,300);return r-N*((k+E*A*w)*Math.sinh(z)+M*w*Math.cosh(z))/M}}}return b(),{next:k=>{const w=g(k);if(h)o.done=k>=d;else{const E=m(k)*1e3,A=Math.abs(E)<=n,M=Math.abs(r-w)<=i;o.done=A&&M}return o.value=o.done?r:w,o},flipTarget:()=>{l=-l,[t,r]=[r,t],b()}}}XC.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const zP=e=>0,rZ=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},QC=(e,t,r)=>-r*e+r*t+e,nZ=(e,t)=>r=>Math.max(Math.min(r,t),e),Xg=e=>e%1?Number(e.toFixed(5)):e,Pm=/(-)?([\d]*\.?[\d])+/g,ck=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,X4e=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function sb(e){return typeof e=="string"}const ob={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Qg=Object.assign(Object.assign({},ob),{transform:nZ(0,1)}),My=Object.assign(Object.assign({},ob),{default:1}),eI=e=>({test:t=>sb(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),jf=eI("deg"),em=eI("%"),zt=eI("px"),BP=Object.assign(Object.assign({},em),{parse:e=>em.parse(e)/100,transform:e=>em.transform(e*100)}),tI=(e,t)=>r=>!!(sb(r)&&X4e.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),iZ=(e,t,r)=>n=>{if(!sb(n))return n;const[i,s,o,a]=n.match(Pm);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},gd={test:tI("hsl","hue"),parse:iZ("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+em.transform(Xg(t))+", "+em.transform(Xg(r))+", "+Xg(Qg.transform(n))+")"},Q4e=nZ(0,255),E_=Object.assign(Object.assign({},ob),{transform:e=>Math.round(Q4e(e))}),Jl={test:tI("rgb","red"),parse:iZ("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+E_.transform(e)+", "+E_.transform(t)+", "+E_.transform(r)+", "+Xg(Qg.transform(n))+")"};function e6e(e){let t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const uk={test:tI("#"),parse:e6e,transform:Jl.transform},Ls={test:e=>Jl.test(e)||uk.test(e)||gd.test(e),parse:e=>Jl.test(e)?Jl.parse(e):gd.test(e)?gd.parse(e):uk.parse(e),transform:e=>sb(e)?e:e.hasOwnProperty("red")?Jl.transform(e):gd.transform(e)},sZ="${c}",oZ="${n}";function t6e(e){var t,r,n,i;return isNaN(e)&&sb(e)&&((r=(t=e.match(Pm))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((i=(n=e.match(ck))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function aZ(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match(ck);n&&(r=n.length,e=e.replace(ck,sZ),t.push(...n.map(Ls.parse)));const i=e.match(Pm);return i&&(e=e.replace(Pm,oZ),t.push(...i.map(ob.parse))),{values:t,numColors:r,tokenised:e}}function cZ(e){return aZ(e).values}function uZ(e){const{values:t,numColors:r,tokenised:n}=aZ(e),i=t.length;return s=>{let o=n;for(let a=0;a<i;a++)o=o.replace(a<r?sZ:oZ,a<r?Ls.transform(s[a]):Xg(s[a]));return o}}const r6e=e=>typeof e=="number"?0:e;function n6e(e){const t=cZ(e);return uZ(e)(t.map(r6e))}const ab={test:t6e,parse:cZ,createTransformer:uZ,getAnimatableNone:n6e},i6e=new Set(["brightness","contrast","saturate","opacity"]);function s6e(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Pm)||[];if(!n)return e;const i=r.replace(n,"");let s=i6e.has(t)?1:0;return n!==r&&(s*=100),t+"("+s+i+")"}const o6e=/([a-z-]*)\(.*?\)/g,lk=Object.assign(Object.assign({},ab),{getAnimatableNone:e=>{const t=e.match(o6e);return t?t.map(s6e).join(" "):e}});function k_(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function FP({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,o=0;if(!t)i=s=o=r;else{const a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;i=k_(c,a,e+1/3),s=k_(c,a,e),o=k_(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const a6e=(e,t,r)=>{const n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},c6e=[uk,Jl,gd],UP=e=>c6e.find(t=>t.test(e)),lZ=(e,t)=>{let r=UP(e),n=UP(t),i=r.parse(e),s=n.parse(t);r===gd&&(i=FP(i),r=Jl),n===gd&&(s=FP(s),n=Jl);const o=Object.assign({},i);return a=>{for(const c in o)c!=="alpha"&&(o[c]=a6e(i[c],s[c],a));return o.alpha=QC(i.alpha,s.alpha,a),r.transform(o)}},u6e=e=>typeof e=="number",l6e=(e,t)=>r=>t(e(r)),fZ=(...e)=>e.reduce(l6e);function dZ(e,t){return u6e(e)?r=>QC(e,t,r):Ls.test(e)?lZ(e,t):pZ(e,t)}const hZ=(e,t)=>{const r=[...e],n=r.length,i=e.map((s,o)=>dZ(s,t[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},f6e=(e,t)=>{const r=Object.assign(Object.assign({},e),t),n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=dZ(e[i],t[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}};function qP(e){const t=ab.parse(e),r=t.length;let n=0,i=0,s=0;for(let o=0;o<r;o++)n||typeof t[o]=="number"?n++:t[o].hue!==void 0?s++:i++;return{parsed:t,numNumbers:n,numRGB:i,numHSL:s}}const pZ=(e,t)=>{const r=ab.createTransformer(t),n=qP(e),i=qP(t);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?fZ(hZ(n.parsed,i.parsed),r):o=>`${o>0?t:e}`},d6e=(e,t)=>r=>QC(e,t,r);function h6e(e){if(typeof e=="number")return d6e;if(typeof e=="string")return Ls.test(e)?lZ:pZ;if(Array.isArray(e))return hZ;if(typeof e=="object")return f6e}function p6e(e,t,r){const n=[],i=r||h6e(e[0]),s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]:t;a=fZ(c,a)}n.push(a)}return n}function g6e([e,t],[r]){return n=>r(rZ(e,t,n))}function m6e(e,t){const r=e.length,n=r-1;return i=>{let s=0,o=!1;if(i<=e[0]?o=!0:i>=e[n]&&(s=n-1,o=!0),!o){let c=1;for(;c<r&&!(e[c]>i||c===n);c++);s=c-1}const a=rZ(e[s],e[s+1],i);return t[s](a)}}function gZ(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const s=e.length;RP(s===t.length),RP(!n||!Array.isArray(n)||n.length===s-1),e[0]>e[s-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const o=p6e(t,n,i),a=s===2?g6e(e,o):m6e(e,o);return r?c=>a(ok(e[0],e[s-1],c)):a}const A4=e=>t=>1-e(1-t),rI=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,b6e=e=>t=>Math.pow(t,e),mZ=e=>t=>t*t*((e+1)*t-e),y6e=e=>{const t=mZ(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},bZ=1.525,w6e=4/11,v6e=8/11,_6e=9/10,yZ=e=>e,nI=b6e(2),x6e=A4(nI),wZ=rI(nI),vZ=e=>1-Math.sin(Math.acos(e)),_Z=A4(vZ),E6e=rI(_Z),iI=mZ(bZ),k6e=A4(iI),A6e=rI(iI),S6e=y6e(bZ),C6e=4356/361,I6e=35442/1805,M6e=16061/1805,Hv=e=>{if(e===1||e===0)return e;const t=e*e;return e<w6e?7.5625*t:e<v6e?9.075*t-9.9*e+3.4:e<_6e?C6e*t-I6e*e+M6e:10.8*e*e-20.52*e+10.72},$6e=A4(Hv),T6e=e=>e<.5?.5*(1-Hv(1-e*2)):.5*Hv(e*2-1)+.5;function N6e(e,t){return e.map(()=>t||wZ).splice(0,e.length-1)}function O6e(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function j6e(e,t){return e.map(r=>r*t)}function Ww({from:e=0,to:t=1,ease:r,offset:n,duration:i=300}){const s={done:!1,value:e},o=Array.isArray(t)?t:[e,t],a=j6e(n&&n.length===o.length?n:O6e(o),i);function c(){return gZ(a,o,{ease:Array.isArray(r)?r:N6e(o,r)})}let u=c();return{next:l=>(s.value=u(l),s.done=l>=i,s),flipTarget:()=>{o.reverse(),u=c()}}}function P6e({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o={done:!1,value:t};let a=r*e;const c=t+a,u=s===void 0?c:s(c);return u!==c&&(a=u-t),{next:l=>{const d=-a*Math.exp(-l/n);return o.done=!(d>i||d<-i),o.value=o.done?u:u+d,o},flipTarget:()=>{}}}const HP={keyframes:Ww,spring:XC,decay:P6e};function D6e(e){if(Array.isArray(e.to))return Ww;if(HP[e.type])return HP[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Ww:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?XC:Ww}function xZ(e,t,r=0){return e-t-r}function R6e(e,t,r=0,n=!0){return n?xZ(t+-e,t,r):t-(e-t)+r}function L6e(e,t,r,n){return n?e>=t+r:e<=-r}const z6e=e=>{const t=({delta:r})=>e(r);return{start:()=>sk.update(t,!0),stop:()=>z4e.update(t)}};function EZ(e){var t,r,{from:n,autoplay:i=!0,driver:s=z6e,elapsed:o=0,repeat:a=0,repeatType:c="loop",repeatDelay:u=0,onPlay:l,onStop:d,onComplete:h,onRepeat:g,onUpdate:m}=e,b=tZ(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:k}=b,w,E=0,A=b.duration,M,R=!1,N=!0,z;const F=D6e(b);!((r=(t=F).needsInterpolation)===null||r===void 0)&&r.call(t,n,k)&&(z=gZ([0,100],[n,k],{clamp:!1}),n=0,k=100);const L=F(Object.assign(Object.assign({},b),{from:n,to:k}));function B(){E++,c==="reverse"?(N=E%2===0,o=R6e(o,A,u,N)):(o=xZ(o,A,u),c==="mirror"&&L.flipTarget()),R=!1,g&&g()}function D(){w.stop(),h&&h()}function x(f){if(N||(f=-f),o+=f,!R){const p=L.next(Math.max(0,o));M=p.value,z&&(M=z(M)),R=N?p.done:o<=0}m?.(M),R&&(E===0&&(A??(A=o)),E<a?L6e(o,A,u,N)&&B():D())}function y(){l?.(),w=s(x),w.start()}return i&&y(),{stop:()=>{d?.(),w.stop()}}}function kZ(e,t){return t?e*(1e3/t):0}function B6e({from:e=0,velocity:t=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:u,driver:l,onUpdate:d,onComplete:h,onStop:g}){let m;function b(A){return r!==void 0&&A<r||n!==void 0&&A>n}function k(A){return r===void 0?n:n===void 0||Math.abs(r-A)<Math.abs(n-A)?r:n}function w(A){m?.stop(),m=EZ(Object.assign(Object.assign({},A),{driver:l,onUpdate:M=>{var R;d?.(M),(R=A.onUpdate)===null||R===void 0||R.call(A,M)},onComplete:h,onStop:g}))}function E(A){w(Object.assign({type:"spring",stiffness:o,damping:a,restDelta:c},A))}if(b(e))E({from:e,velocity:t,to:k(e)});else{let A=i*t+e;typeof u<"u"&&(A=u(A));const M=k(A),R=M===r?-1:1;let N,z;const F=L=>{N=z,z=L,t=kZ(L-N,eZ().delta),(R===1&&L>M||R===-1&&L<M)&&E({from:L,to:M,velocity:t})};w({type:"decay",from:e,velocity:t,timeConstant:s,power:i,restDelta:c,modifyTarget:u,onUpdate:b(A)?F:void 0})}return{stop:()=>m?.stop()}}const AZ=(e,t)=>1-3*t+3*e,SZ=(e,t)=>3*t-6*e,CZ=e=>3*e,Wv=(e,t,r)=>((AZ(t,r)*e+SZ(t,r))*e+CZ(t))*e,IZ=(e,t,r)=>3*AZ(t,r)*e*e+2*SZ(t,r)*e+CZ(t),F6e=1e-7,U6e=10;function q6e(e,t,r,n,i){let s,o,a=0;do o=t+(r-t)/2,s=Wv(o,n,i)-e,s>0?r=o:t=o;while(Math.abs(s)>F6e&&++a<U6e);return o}const H6e=8,W6e=.001;function V6e(e,t,r,n){for(let i=0;i<H6e;++i){const s=IZ(t,r,n);if(s===0)return t;const o=Wv(t,r,n)-e;t-=o/s}return t}const Vw=11,$y=1/(Vw-1);function K6e(e,t,r,n){if(e===t&&r===n)return yZ;const i=new Float32Array(Vw);for(let o=0;o<Vw;++o)i[o]=Wv(o*$y,e,r);function s(o){let a=0,c=1;const u=Vw-1;for(;c!==u&&i[c]<=o;++c)a+=$y;--c;const l=(o-i[c])/(i[c+1]-i[c]),d=a+l*$y,h=IZ(d,e,r);return h>=W6e?V6e(o,d,e,r):h===0?d:q6e(o,a,a+$y,e,r)}return o=>o===0||o===1?o:Wv(s(o),t,n)}const sI={},A_={};class G6e{subscriptions=new Set;add(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}notify(t,r,n){if(this.subscriptions.size)for(const i of this.subscriptions)i(t,r,n)}clear(){this.subscriptions.clear()}}function WP(e){return!Number.isNaN(Number.parseFloat(e))}class Z6e{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new G6e;stopAnimation;canTrackVelocity=!1;constructor(t){this.prev=this.current=t,this.canTrackVelocity=WP(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}set(t){this.updateAndNotify(t)}updateAndNotify=t=>{this.prev=this.current,this.current=t;const{delta:r,timestamp:n}=eZ();this.lastUpdated!==n&&(this.timeDelta=r,this.lastUpdated=n),sk.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)};get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?kZ(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}scheduleVelocityCheck=()=>sk.postRender(this.velocityCheck);velocityCheck=({timestamp:t})=>{this.canTrackVelocity||(this.canTrackVelocity=WP(this.current)),t!==this.lastUpdated&&(this.prev=this.current)};start(t){return this.stop(),new Promise(r=>{const{stop:n}=t(r);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}}function Y6e(e){return new Z6e(e)}const{isArray:J6e}=Array;function X6e(){const e=An({}),t=n=>{const i=s=>{e.value[s]&&(e.value[s].stop(),e.value[s].destroy(),delete e.value[s])};n?J6e(n)?n.forEach(i):i(n):Object.keys(e.value).forEach(i)},r=(n,i,s)=>{if(e.value[n])return e.value[n];const o=Y6e(i);return o.onChange(a=>s[n]=a),e.value[n]=o,o};return T4e(t),{motionValues:e,get:r,stop:t}}function Q6e(e){return Array.isArray(e)}function Pf(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function S_(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function e5e(e){return{type:"spring",stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function C_(){return{type:"keyframes",ease:"linear",duration:300}}function t5e(e){return{type:"keyframes",duration:800,values:e}}const VP={default:e5e,x:Pf,y:Pf,z:Pf,rotate:Pf,rotateX:Pf,rotateY:Pf,rotateZ:Pf,scaleX:S_,scaleY:S_,scale:S_,backgroundColor:C_,color:C_,opacity:C_};function MZ(e,t){let r;return Q6e(t)?r=t5e:r=VP[e]||VP.default,{to:t,...r(t)}}const KP={...ob,transform:Math.round},$Z={color:Ls,backgroundColor:Ls,outlineColor:Ls,fill:Ls,stroke:Ls,borderColor:Ls,borderTopColor:Ls,borderRightColor:Ls,borderBottomColor:Ls,borderLeftColor:Ls,borderWidth:zt,borderTopWidth:zt,borderRightWidth:zt,borderBottomWidth:zt,borderLeftWidth:zt,borderRadius:zt,radius:zt,borderTopLeftRadius:zt,borderTopRightRadius:zt,borderBottomRightRadius:zt,borderBottomLeftRadius:zt,width:zt,maxWidth:zt,height:zt,maxHeight:zt,size:zt,top:zt,right:zt,bottom:zt,left:zt,padding:zt,paddingTop:zt,paddingRight:zt,paddingBottom:zt,paddingLeft:zt,margin:zt,marginTop:zt,marginRight:zt,marginBottom:zt,marginLeft:zt,rotate:jf,rotateX:jf,rotateY:jf,rotateZ:jf,scale:My,scaleX:My,scaleY:My,scaleZ:My,skew:jf,skewX:jf,skewY:jf,distance:zt,translateX:zt,translateY:zt,translateZ:zt,x:zt,y:zt,z:zt,perspective:zt,transformPerspective:zt,opacity:Qg,originX:BP,originY:BP,originZ:zt,zIndex:KP,filter:lk,WebkitFilter:lk,fillOpacity:Qg,strokeOpacity:Qg,numOctaves:KP},oI=e=>$Z[e];function fk(e,t){return t&&typeof e=="number"&&t.transform?t.transform(e):e}function r5e(e,t){let r=oI(e);return r!==lk&&(r=ab),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const n5e={linear:yZ,easeIn:nI,easeInOut:wZ,easeOut:x6e,circIn:vZ,circInOut:E6e,circOut:_Z,backIn:iI,backInOut:A6e,backOut:k6e,anticipate:S6e,bounceIn:$6e,bounceInOut:T6e,bounceOut:Hv};function GP(e){if(Array.isArray(e)){const[t,r,n,i]=e;return K6e(t,r,n,i)}else if(typeof e=="string")return n5e[e];return e}function i5e(e){return Array.isArray(e)&&typeof e[0]!="number"}function ZP(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ab.test(t)&&!t.startsWith("url("))}function s5e(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function o5e({ease:e,times:t,delay:r,...n}){const i={...n};return t&&(i.offset=t),e&&(i.ease=i5e(e)?e.map(GP):GP(e)),r&&(i.elapsed=-r),i}function a5e(e,t,r){return Array.isArray(t.to)&&(e.duration||(e.duration=800)),s5e(t),c5e(e)||(e={...e,...MZ(r,t.to)}),{...t,...o5e(e)}}function c5e({delay:e,repeat:t,repeatType:r,repeatDelay:n,from:i,...s}){return!!Object.keys(s).length}function u5e(e,t){return e[t]||e.default||e}function l5e(e,t,r,n,i){const s=u5e(n,e);let o=s.from===null||s.from===void 0?t.get():s.from;const a=ZP(e,r);o==="none"&&a&&typeof r=="string"&&(o=r5e(e,r));const c=ZP(e,o);function u(d){const h={from:o,to:r,velocity:n.velocity?n.velocity:t.getVelocity(),onUpdate:g=>t.set(g)};return s.type==="inertia"||s.type==="decay"?B6e({...h,...s}):EZ({...a5e(s,h,e),onUpdate:g=>{h.onUpdate(g),s.onUpdate&&s.onUpdate(g)},onComplete:()=>{i&&i(),d&&d()}})}function l(d){return t.set(r),i&&i(),d&&d(),{stop:()=>{}}}return!c||!a||s.type===!1?l:u}function f5e(){const{motionValues:e,stop:t,get:r}=X6e();return{motionValues:e,stop:t,push:(i,s,o,a={},c)=>{const u=o[i],l=r(i,u,o);if(a&&a.immediate){l.set(s);return}const d=l5e(i,l,s,a,c);l.start(d)}}}function d5e(e,t={},{motionValues:r,push:n,stop:i}=f5e()){const s=Ef(t),o=An(!1);dn(r,d=>{o.value=Object.values(d).filter(h=>h.isAnimating()).length>0},{immediate:!0,deep:!0});const a=d=>{if(!s||!s[d])throw new Error(`The variant ${d} does not exist.`);return s[d]},c=d=>{typeof d=="string"&&(d=a(d));const h=Object.entries(d).map(([m,b])=>{if(m!=="transition")return new Promise(k=>n(m,b,e,d.transition||MZ(m,d[m]),k))}).filter(Boolean);async function g(){await Promise.all(h),d.transition?.onComplete?.()}return Promise.all([g()])};return{isAnimating:o,apply:c,set:d=>{const h=qv(d)?d:a(d);Object.entries(h).forEach(([g,m])=>{g!=="transition"&&n(g,m,e,{immediate:!0})})},leave:async d=>{let h;if(s&&(s.leave&&(h=s.leave),!s.leave&&s.initial&&(h=s.initial)),!h){d();return}await c(h),d()},stop:i}}const aI=typeof window<"u",h5e=()=>aI&&(window.onpointerdown===null||sI?.TEST),p5e=()=>aI&&(window.ontouchstart===null||sI?.TEST),g5e=()=>aI&&(window.onmousedown===null||sI?.TEST);function m5e({target:e,state:t,variants:r,apply:n}){const i=Ef(r),s=An(!1),o=An(!1),a=An(!1),c=ir(()=>{let l=[...Object.keys(t.value||{})];return i&&(i.hovered&&(l=[...l,...Object.keys(i.hovered)]),i.tapped&&(l=[...l,...Object.keys(i.tapped)]),i.focused&&(l=[...l,...Object.keys(i.focused)])),l}),u=ir(()=>{const l={};Object.assign(l,t.value),s.value&&i.hovered&&Object.assign(l,i.hovered),o.value&&i.tapped&&Object.assign(l,i.tapped),a.value&&i.focused&&Object.assign(l,i.focused);for(const d in l)c.value.includes(d)||delete l[d];return l});i.hovered&&(cc(e,"mouseenter",()=>s.value=!0),cc(e,"mouseleave",()=>{s.value=!1,o.value=!1})),i.tapped&&(g5e()&&(cc(e,"mousedown",()=>o.value=!0),cc(e,"mouseup",()=>o.value=!1)),h5e()&&(cc(e,"pointerdown",()=>o.value=!0),cc(e,"pointerup",()=>o.value=!1)),p5e()&&(cc(e,"touchstart",()=>o.value=!0),cc(e,"touchend",()=>o.value=!1))),i.focused&&(cc(e,"focus",()=>a.value=!0),cc(e,"blur",()=>a.value=!1)),dn([s,o,a],()=>{n(u.value)})}function b5e({set:e,target:t,variants:r,variant:n}){const i=Ef(r);dn(()=>t,()=>{i&&(i.initial&&(e("initial"),n.value="initial"),i.enter&&(n.value="enter"))},{immediate:!0,flush:"pre"})}function y5e({state:e,apply:t}){dn(e,r=>{r&&t(r)},{immediate:!0})}function TZ({target:e,variants:t,variant:r}){const n=Ef(t);n&&(n.visible||n.visibleOnce)&&P4e(e,([{isIntersecting:i}])=>{n.visible?i?r.value="visible":r.value="initial":n.visibleOnce&&(i&&r.value!=="visibleOnce"?r.value="visibleOnce":r.value||(r.value="initial"))})}function w5e(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&b5e(e),t.syncVariants&&y5e(e),t.visibilityHooks&&TZ(e),t.eventListeners&&m5e(e)}function NZ(e={}){const t=P2({...e}),r=An({});return dn(t,()=>{const n={};for(const[i,s]of Object.entries(t)){const o=oI(i),a=fk(s,o);n[i]=a}r.value=n},{immediate:!0,deep:!0}),{state:t,style:r}}function cI(e,t){dn(()=>Jg(e),r=>{r&&t(r)},{immediate:!0})}const v5e={x:"translateX",y:"translateY",z:"translateZ"};function OZ(e={},t=!0){const r=P2({...e}),n=An("");return dn(r,i=>{let s="",o=!1;if(t&&(i.x||i.y||i.z)){const a=[i.x||0,i.y||0,i.z||0].map(c=>fk(c,zt)).join(",");s+=`translate3d(${a}) `,o=!0}for(const[a,c]of Object.entries(i)){if(t&&(a==="x"||a==="y"||a==="z"))continue;const u=oI(a),l=fk(c,u);s+=`${v5e[a]||a}(${l}) `}t&&!o&&(s+="translateZ(0px) "),n.value=s.trim()},{immediate:!0,deep:!0}),{state:r,transform:n}}const _5e=["","X","Y","Z"],x5e=["perspective","translate","scale","rotate","skew"],jZ=["transformPerspective","x","y","z"];x5e.forEach(e=>{_5e.forEach(t=>{const r=e+t;jZ.push(r)})});const E5e=new Set(jZ);function uI(e){return E5e.has(e)}const k5e=new Set(["originX","originY","originZ"]);function PZ(e){return k5e.has(e)}function A5e(e){const t={},r={};return Object.entries(e).forEach(([n,i])=>{uI(n)||PZ(n)?t[n]=i:r[n]=i}),{transform:t,style:r}}function S4(e){const{transform:t,style:r}=A5e(e),{transform:n}=OZ(t),{style:i}=NZ(r);return n.value&&(i.value.transform=n.value),i.value}function S5e(e,t){let r,n;const{state:i,style:s}=NZ();return cI(e,o=>{n=o;for(const a of Object.keys($Z))o.style[a]===null||o.style[a]===""||uI(a)||PZ(a)||(i[a]=o.style[a]);r&&Object.entries(r).forEach(([a,c])=>o.style[a]=c),t&&t(i)}),dn(s,o=>{if(!n){r=o;return}for(const a in o)n.style[a]=o[a]},{immediate:!0}),{style:i}}function C5e(e){const t=e.trim().split(/\) |\)/);if(t.length===1)return{};const r=n=>n.endsWith("px")||n.endsWith("deg")?Number.parseFloat(n):Number.isNaN(Number(n))?Number(n):n;return t.reduce((n,i)=>{if(!i)return n;const[s,o]=i.split("("),c=o.split(",").map(l=>r(l.endsWith(")")?l.replace(")",""):l.trim())),u=c.length===1?c[0]:c;return{...n,[s]:u}},{})}function I5e(e,t){Object.entries(C5e(t)).forEach(([r,n])=>{const i=["x","y","z"];if(r==="translate3d"){if(n===0){i.forEach(s=>e[s]=0);return}n.forEach((s,o)=>e[i[o]]=s);return}if(n=Number.parseFloat(`${n}`),r==="translateX"){e.x=n;return}if(r==="translateY"){e.y=n;return}if(r==="translateZ"){e.z=n;return}e[r]=n})}function M5e(e,t){let r,n;const{state:i,transform:s}=OZ();return cI(e,o=>{n=o,o.style.transform&&I5e(i,o.style.transform),r&&(o.style.transform=r),t&&t(i)}),dn(s,o=>{if(!n){r=o;return}n.style.transform=o},{immediate:!0}),{transform:i}}function $5e(e){return Object.entries(e)}function T5e(e,t){const r=P2({}),n=o=>Object.entries(o).forEach(([a,c])=>r[a]=c),{style:i}=S5e(e,n),{transform:s}=M5e(e,n);return dn(r,o=>{$5e(o).forEach(([a,c])=>{const u=uI(a)?s:i;u[a]&&u[a]===c||(u[a]=c)})},{immediate:!0,deep:!0}),cI(e,()=>t),{motionProperties:r,style:i,transform:s}}function N5e(e={}){const t=Ef(e),r=An();return{state:ir(()=>{if(r.value)return t[r.value]}),variant:r}}function DZ(e,t={},r){const{motionProperties:n}=T5e(e),{variant:i,state:s}=N5e(t),o=d5e(n,t),a={target:e,variant:i,variants:t,state:s,motionProperties:n,...o};return w5e(a,r),a}const RZ=["delay","duration"],O5e=["initial","enter","leave","visible","visible-once","visibleOnce","hovered","tapped","focused",...RZ];function j5e(e){return RZ.includes(e)}function P5e(e,t){const r=e.props?e.props:e.data&&e.data.attrs?e.data.attrs:{};if(r){r.variants&&qv(r.variants)&&(t.value={...t.value,...r.variants});for(let n of O5e)if(!(!r||!r[n])){if(j5e(n)&&typeof r[n]=="number"){for(const i of["enter","visible","visibleOnce"]){const s=t.value[i];s!=null&&(s.transition??={},s.transition[n]=r[n])}continue}if(qv(r[n])){const i=r[n];n==="visible-once"&&(n="visibleOnce"),t.value[n]=i}}}}function I_(e,t=!1){return{created:(i,s,o)=>{const a=s.value&&typeof s.value=="string"?s.value:o.key;a&&A_[a]&&A_[a].stop();const c=t?structuredClone(xH(e)||{}):e||{},u=An(c);typeof s.value=="object"&&(u.value=s.value),P5e(o,u);const d=DZ(i,u,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});i.motionInstance=d,a&&(A_[a]=d)},mounted:(i,s,o)=>{i.motionInstance&&TZ(i.motionInstance)},getSSRProps(i,s){let{initial:o}=i.value||s&&s?.props||{};o=Ef(o);const a=GG({},e?.initial||{},o||{});return!a||Object.keys(a).length===0?void 0:{style:S4(a)}}}}const D5e={initial:{opacity:0},enter:{opacity:1}},R5e={initial:{opacity:0},visible:{opacity:1}},L5e={initial:{opacity:0},visibleOnce:{opacity:1}},z5e={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},B5e={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},F5e={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},U5e={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},q5e={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},H5e={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},W5e={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},V5e={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},K5e={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},G5e={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Z5e={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Y5e={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},J5e={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},X5e={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Q5e={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},e8e={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},t8e={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},r8e={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},n8e={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},i8e={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},s8e={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},o8e={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},a8e={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},c8e={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},u8e={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},l8e={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},f8e={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Vv={__proto__:null,fade:D5e,fadeVisible:R5e,fadeVisibleOnce:L5e,pop:z5e,popVisible:B5e,popVisibleOnce:F5e,rollBottom:J5e,rollLeft:U5e,rollRight:W5e,rollTop:G5e,rollVisibleBottom:X5e,rollVisibleLeft:q5e,rollVisibleOnceBottom:Q5e,rollVisibleOnceLeft:H5e,rollVisibleOnceRight:K5e,rollVisibleOnceTop:Y5e,rollVisibleRight:V5e,rollVisibleTop:Z5e,slideBottom:u8e,slideLeft:e8e,slideRight:n8e,slideTop:o8e,slideVisibleBottom:l8e,slideVisibleLeft:t8e,slideVisibleOnceBottom:f8e,slideVisibleOnceLeft:r8e,slideVisibleOnceRight:s8e,slideVisibleOnceTop:c8e,slideVisibleRight:i8e,slideVisibleTop:a8e};function d8e(e){const t="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;",r="aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------",n=new RegExp(t.split("").join("|"),"g");return e.toString().replace(/[A-Z]/g,i=>`-${i}`).toLowerCase().replace(/\s+/g,"-").replace(n,i=>r.charAt(t.indexOf(i))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/-+$/,"")}const LZ=Symbol(""),zZ={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function h8e(e){return Object.prototype.toString.call(e)==="[object Object]"}function dk(e){if(Array.isArray(e))return e.map(dk);if(h8e(e)){const t={};for(const r in e)t[r]=dk(e[r]);return t}return e}function BZ(e){const t=P2({}),r=W3(LZ,{}),n=ir(()=>e.preset==null?{}:r!=null&&e.preset in r?structuredClone(xH(r)[e.preset]):e.preset in Vv?structuredClone(Vv[e.preset]):{}),i=ir(()=>({initial:e.initial,enter:e.enter,leave:e.leave,visible:e.visible,visibleOnce:e.visibleOnce,hovered:e.hovered,tapped:e.tapped,focused:e.focused}));function s(c,u){for(const l of["delay","duration"]){if(u[l]==null)continue;const d=Number.parseInt(u[l]);for(const h of["enter","visible","visibleOnce"]){const g=c[h];g!=null&&(g.transition??={},g.transition[l]=d)}}return c}const o=ir(()=>{const c=GG({},i.value,n.value,e.variants||{});return s({...c},e)});function a(c,u,l){c.props??={},c.props.style??={},c.props.style={...c.props.style,...l};const d=s(dk(o.value),c.props);return c.props.onVnodeMounted=({el:h})=>{t[u]=DZ(h,d)},c.props.onVnodeUpdated=({el:h})=>{const g=S4(t[u].state);for(const[m,b]of Object.entries(g))h.style[m]=b},c}return{motionConfig:o,setNodeInstance:a}}const p8e=Dt({name:"Motion",props:{...zZ,is:{type:[String,Object],default:"div"}},setup(e){const t=_H(),{motionConfig:r,setNodeInstance:n}=BZ(e);return()=>{const i=S4(r.value.initial||{}),s=g1(e.is,void 0,t);return n(s,0,i),s}}}),g8e=Dt({name:"MotionGroup",props:{...zZ,is:{type:[String,Object],required:!1}},setup(e){const t=_H(),{motionConfig:r,setNodeInstance:n}=BZ(e);return()=>{const i=S4(r.value.initial||{}),s=t.default?.()||[];for(let o=0;o<s.length;o++){const a=s[o];a.type===AS&&Array.isArray(a.children)?a.children.forEach(function c(u,l){if(u!=null){if(Array.isArray(u)){c(u,l);return}typeof u=="object"&&n(u,l,i)}}):n(a,o,i)}return e.is?g1(e.is,void 0,s):s}}}),a1t={install(e,t){if(e.directive("motion",I_()),!t||t&&!t.excludePresets)for(const r in Vv){const n=Vv[r];e.directive(`motion-${d8e(r)}`,I_(n,!0))}if(t&&t.directives)for(const r in t.directives){const n=t.directives[r];n.initial,e.directive(`motion-${r}`,I_(n,!0))}e.provide(LZ,t?.directives),e.component("Motion",p8e),e.component("MotionGroup",g8e)}};function m8e(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let u=0;u<t.length;u++)t[u]=255;for(let u=0;u<e.length;u++){const l=e.charAt(u),d=l.charCodeAt(0);if(t[d]!==255)throw new TypeError(l+" is ambiguous");t[d]=u}const r=e.length,n=e.charAt(0),i=Math.log(r)/Math.log(256),s=Math.log(256)/Math.log(r);function o(u){if(u instanceof Uint8Array||(ArrayBuffer.isView(u)?u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength):Array.isArray(u)&&(u=Uint8Array.from(u))),!(u instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(u.length===0)return"";let l=0,d=0,h=0;const g=u.length;for(;h!==g&&u[h]===0;)h++,l++;const m=(g-h)*s+1>>>0,b=new Uint8Array(m);for(;h!==g;){let E=u[h],A=0;for(let M=m-1;(E!==0||A<d)&&M!==-1;M--,A++)E+=256*b[M]>>>0,b[M]=E%r>>>0,E=E/r>>>0;if(E!==0)throw new Error("Non-zero carry");d=A,h++}let k=m-d;for(;k!==m&&b[k]===0;)k++;let w=n.repeat(l);for(;k<m;++k)w+=e.charAt(b[k]);return w}function a(u){if(typeof u!="string")throw new TypeError("Expected String");if(u.length===0)return new Uint8Array;let l=0,d=0,h=0;for(;u[l]===n;)d++,l++;const g=(u.length-l)*i+1>>>0,m=new Uint8Array(g);for(;l<u.length;){const E=u.charCodeAt(l);if(E>255)return;let A=t[E];if(A===255)return;let M=0;for(let R=g-1;(A!==0||M<h)&&R!==-1;R--,M++)A+=r*m[R]>>>0,m[R]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");h=M,l++}let b=g-h;for(;b!==g&&m[b]===0;)b++;const k=new Uint8Array(d+(g-b));let w=d;for(;b!==g;)k[w++]=m[b++];return k}function c(u){const l=a(u);if(l)return l;throw new Error("Non-base"+r+" character")}return{encode:o,decodeUnsafe:a,decode:c}}var b8e="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const tm=m8e(b8e);var Ty={exports:{}},YP;function y8e(){if(YP)return Ty.exports;YP=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(R,N,z){return Function.prototype.apply.call(R,N,z)},r;e&&typeof e.ownKeys=="function"?r=e.ownKeys:Object.getOwnPropertySymbols?r=function(R){return Object.getOwnPropertyNames(R).concat(Object.getOwnPropertySymbols(R))}:r=function(R){return Object.getOwnPropertyNames(R)};function n(M){console&&console.warn&&console.warn(M)}var i=Number.isNaN||function(R){return R!==R};function s(){s.init.call(this)}Ty.exports=s,Ty.exports.once=w,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(M){if(typeof M!="number"||M<0||i(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");o=M}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(R){if(typeof R!="number"||R<0||i(R))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+R+".");return this._maxListeners=R,this};function c(M){return M._maxListeners===void 0?s.defaultMaxListeners:M._maxListeners}s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(R){for(var N=[],z=1;z<arguments.length;z++)N.push(arguments[z]);var F=R==="error",L=this._events;if(L!==void 0)F=F&&L.error===void 0;else if(!F)return!1;if(F){var B;if(N.length>0&&(B=N[0]),B instanceof Error)throw B;var D=new Error("Unhandled error."+(B?" ("+B.message+")":""));throw D.context=B,D}var x=L[R];if(x===void 0)return!1;if(typeof x=="function")t(x,this,N);else for(var y=x.length,f=m(x,y),z=0;z<y;++z)t(f[z],this,N);return!0};function u(M,R,N,z){var F,L,B;if(a(N),L=M._events,L===void 0?(L=M._events=Object.create(null),M._eventsCount=0):(L.newListener!==void 0&&(M.emit("newListener",R,N.listener?N.listener:N),L=M._events),B=L[R]),B===void 0)B=L[R]=N,++M._eventsCount;else if(typeof B=="function"?B=L[R]=z?[N,B]:[B,N]:z?B.unshift(N):B.push(N),F=c(M),F>0&&B.length>F&&!B.warned){B.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+B.length+" "+String(R)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=M,D.type=R,D.count=B.length,n(D)}return M}s.prototype.addListener=function(R,N){return u(this,R,N,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(R,N){return u(this,R,N,!0)};function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(M,R,N){var z={fired:!1,wrapFn:void 0,target:M,type:R,listener:N},F=l.bind(z);return F.listener=N,z.wrapFn=F,F}s.prototype.once=function(R,N){return a(N),this.on(R,d(this,R,N)),this},s.prototype.prependOnceListener=function(R,N){return a(N),this.prependListener(R,d(this,R,N)),this},s.prototype.removeListener=function(R,N){var z,F,L,B,D;if(a(N),F=this._events,F===void 0)return this;if(z=F[R],z===void 0)return this;if(z===N||z.listener===N)--this._eventsCount===0?this._events=Object.create(null):(delete F[R],F.removeListener&&this.emit("removeListener",R,z.listener||N));else if(typeof z!="function"){for(L=-1,B=z.length-1;B>=0;B--)if(z[B]===N||z[B].listener===N){D=z[B].listener,L=B;break}if(L<0)return this;L===0?z.shift():b(z,L),z.length===1&&(F[R]=z[0]),F.removeListener!==void 0&&this.emit("removeListener",R,D||N)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(R){var N,z,F;if(z=this._events,z===void 0)return this;if(z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):z[R]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[R]),this;if(arguments.length===0){var L=Object.keys(z),B;for(F=0;F<L.length;++F)B=L[F],B!=="removeListener"&&this.removeAllListeners(B);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(N=z[R],typeof N=="function")this.removeListener(R,N);else if(N!==void 0)for(F=N.length-1;F>=0;F--)this.removeListener(R,N[F]);return this};function h(M,R,N){var z=M._events;if(z===void 0)return[];var F=z[R];return F===void 0?[]:typeof F=="function"?N?[F.listener||F]:[F]:N?k(F):m(F,F.length)}s.prototype.listeners=function(R){return h(this,R,!0)},s.prototype.rawListeners=function(R){return h(this,R,!1)},s.listenerCount=function(M,R){return typeof M.listenerCount=="function"?M.listenerCount(R):g.call(M,R)},s.prototype.listenerCount=g;function g(M){var R=this._events;if(R!==void 0){var N=R[M];if(typeof N=="function")return 1;if(N!==void 0)return N.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function m(M,R){for(var N=new Array(R),z=0;z<R;++z)N[z]=M[z];return N}function b(M,R){for(;R+1<M.length;R++)M[R]=M[R+1];M.pop()}function k(M){for(var R=new Array(M.length),N=0;N<R.length;++N)R[N]=M[N].listener||M[N];return R}function w(M,R){return new Promise(function(N,z){function F(B){M.removeListener(R,L),z(B)}function L(){typeof M.removeListener=="function"&&M.removeListener("error",F),N([].slice.call(arguments))}A(M,R,L,{once:!0}),R!=="error"&&E(M,F,{once:!0})})}function E(M,R,N){typeof M.on=="function"&&A(M,"error",R,N)}function A(M,R,N,z){if(typeof M.on=="function")z.once?M.once(R,N):M.on(R,N);else if(typeof M.addEventListener=="function")M.addEventListener(R,function F(L){z.once&&M.removeEventListener(R,F),N(L)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M)}return Ty.exports}var ii=y8e();const A1=Js(ii),w8e="Nightly";class c1t extends g4{constructor(){super(),this.name=w8e,this.url="https://nightly.app",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTYiIGhlaWdodD0iOTYiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQ4IDk2Qzc0LjUwOTcgOTYgOTYgNzQuNTA5NyA5NiA0OEM5NiAyMS40OTAzIDc0LjUwOTcgMCA0OCAwQzIxLjQ5MDMgMCAwIDIxLjQ5MDMgMCA0OEMwIDc0LjUwOTcgMjEuNDkwMyA5NiA0OCA5NloiIGZpbGw9IiM2RDczRjgiLz4KPHBhdGggZD0iTTQ4IDg1LjYzNTZDNDggODUuNjM1NiA1Mi40NTMzIDg1LjYzNTYgNTUuNDQgODIuNTg2N0M1OC45MTU1IDc5LjI4MDEgNTcuMzUxMSA3NS40MzEyIDYyLjI3NTUgNzEuNDMxMkM2Ni45ODY2IDY3LjY0NDUgNzIuOTI0NCA3MC4zMzc5IDcyLjkyNDQgNzAuMzM3OUM3Ny4wMjIyIDYyLjEyNDUgNzQuNzkxMSA1Mi41NjkgNzQuNzkxMSA1Mi41NjlDODEuNzY4OCAzNC4yNTc5IDc1Ljk2NDQgMjEuMTU1NyA3NC40NDQ0IDE3LjM2MDFDNjkuNDQ4OCAyNC4zMzc5IDYzLjE5MTEgMjkuMTczNCA1NS43OTU1IDMyLjQwOUM1My4yMjY2IDMxLjcwNjggNTAuNTk1NSAzMS4zMzM0IDQ4IDMxLjM2MDFDNDUuNDEzMyAzMS4zMzM0IDQyLjc3MzMgMzEuNzA2OCA0MC4yMDQ0IDMyLjQwOUMzMi44MTc3IDI5LjE2NDUgMjYuNTUxMSAyNC4zMzc5IDIxLjU1NTUgMTcuMzYwMUMyMC4wMzU1IDIxLjE1NTcgMTQuMjMxMSAzNC4yNTc5IDIxLjIwODkgNTIuNTY5QzIxLjIwODkgNTIuNTY5IDE4Ljk3NzggNjIuMTI0NSAyMy4wNzU1IDcwLjMzNzlDMjMuMDc1NSA3MC4zMzc5IDI5LjAxMzMgNjcuNjQ0NSAzMy43MjQ0IDcxLjQzMTJDMzguNjU3NyA3NS40MzEyIDM3LjA4NDQgNzkuMjgwMSA0MC41NiA4Mi41ODY3QzQzLjU0NjYgODUuNjM1NiA0OCA4NS42MzU2IDQ4IDg1LjYzNTZaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNDIuNDc5OSA2NS4yOThDNDIuMjkzMyA1OS4yMTggMzYuMzAyMSA1Ny4yNjI0IDMyLjIxMzMgNTkuODIyNEMzMi4yMTMzIDU5LjgyMjQgMzIuODUzMyA2Mi40MzU4IDM1LjgzOTkgNjMuNzUxM0MzOC4yNzU1IDY0LjgyNjkgMzkuMzI0NCA2My4zODY5IDQyLjQ3OTkgNjUuMjk4WiIgZmlsbD0iIzdCODFGOSIvPgo8cGF0aCBkPSJNMjIuNDk3NyAyMy4wOTM1QzIwLjA4ODggMzEuNTQ2OCAyMS4xMjg4IDQyLjI0MDIgMjQuOTMzMyA1MC4wMjY5QzI4LjgyNjYgNDcuMjcxMyAzMi45MTU1IDQzLjAxMzUgMzUuMDkzMyAzOC41MDY5QzI5Ljk2NDQgMzQuNzExMyAyNS42NjIyIDMxLjEwMjQgMjIuNDk3NyAyMy4wOTM1WiIgZmlsbD0iIzdCODFGOSIvPgo8cGF0aCBkPSJNNTMuNTE5OSA2NS4yOThDNTMuNzA2NiA1OS4yMTggNTkuNjk3NyA1Ny4yNjI0IDYzLjc4NjYgNTkuODIyNEM2My43ODY2IDU5LjgyMjQgNjMuMTQ2NiA2Mi40MzU4IDYwLjE1OTkgNjMuNzUxM0M1Ny43MjQzIDY0LjgyNjkgNTYuNjc1NSA2My4zODY5IDUzLjUxOTkgNjUuMjk4WiIgZmlsbD0iIzdCODFGOSIvPgo8cGF0aCBkPSJNNzMuNTAyMiAyMy4wOTM1Qzc1LjkxMTEgMzEuNTQ2OCA3NC44NzExIDQyLjI0MDIgNzEuMDY2NiA1MC4wMjY5QzY3LjE3MzMgNDcuMjcxMyA2My4wODQ0IDQzLjAxMzUgNjAuOTA2NiAzOC41MDY5QzY2LjAzNTUgMzQuNzExMyA3MC4zMzc3IDMxLjEwMjQgNzMuNTAyMiAyMy4wOTM1WiIgZmlsbD0iIzdCODFGOSIvPgo8cGF0aCBkPSJNNDcuOTk5OSA4NS4zMDY5QzUwLjE0MDQgODUuMzA2OSA1MS44NzU1IDgzLjc3ODcgNTEuODc1NSA4MS44OTM2QzUxLjg3NTUgODAuMDA4NCA1MC4xNDA0IDc4LjQ4MDIgNDcuOTk5OSA3OC40ODAyQzQ1Ljg1OTUgNzguNDgwMiA0NC4xMjQ0IDgwLjAwODQgNDQuMTI0NCA4MS44OTM2QzQ0LjEyNDQgODMuNzc4NyA0NS44NTk1IDg1LjMwNjkgNDcuOTk5OSA4NS4zMDY5WiIgZmlsbD0iIzdCODFGOSIvPgo8L3N2Zz4K",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?jt.Unsupported:jt.NotDetected,this._connecting=!1,this._publicKey=null,this._wallet=null,this._readyState!==jt.Unsupported&&$C(()=>window?.nightly?.solana?(this._readyState=jt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get connecting(){return this._connecting}get readyState(){return this._readyState}get publicKey(){return this._publicKey}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==jt.Installed)throw new Rc;this._connecting=!0;const t=window.nightly.solana;try{await t.connect()}catch(n){throw new Nc(n?.message,n)}if(t.publicKey.toString()==="11111111111111111111111111111111")throw new Yl;let r;try{r=new bt(t.publicKey.toBytes())}catch(n){throw new jd(n?.message,n)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch{this.emit("error",new Z2)}}this.emit("disconnect")}async signTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signTransaction(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAllTransactions(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAllTransactions(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signMessage(t){try{const r=this._wallet;if(!r)throw new Ur;try{return r.signMessage(new TextDecoder().decode(t))}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}}const v8e="Phantom";class u1t extends g4{constructor(t={}){super(),this.name=v8e,this.url="https://phantom.app",this.icon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgZmlsbD0ibm9uZSI+CjxyZWN0IHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiByeD0iMjYiIGZpbGw9IiNBQjlGRjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00Ni41MjY3IDY5LjkyMjlDNDIuMDA1NCA3Ni44NTA5IDM0LjQyOTIgODUuNjE4MiAyNC4zNDggODUuNjE4MkMxOS41ODI0IDg1LjYxODIgMTUgODMuNjU2MyAxNSA3NS4xMzQyQzE1IDUzLjQzMDUgNDQuNjMyNiAxOS44MzI3IDcyLjEyNjggMTkuODMyN0M4Ny43NjggMTkuODMyNyA5NCAzMC42ODQ2IDk0IDQzLjAwNzlDOTQgNTguODI1OCA4My43MzU1IDc2LjkxMjIgNzMuNTMyMSA3Ni45MTIyQzcwLjI5MzkgNzYuOTEyMiA2OC43MDUzIDc1LjEzNDIgNjguNzA1MyA3Mi4zMTRDNjguNzA1MyA3MS41NzgzIDY4LjgyNzUgNzAuNzgxMiA2OS4wNzE5IDY5LjkyMjlDNjUuNTg5MyA3NS44Njk5IDU4Ljg2ODUgODEuMzg3OCA1Mi41NzU0IDgxLjM4NzhDNDcuOTkzIDgxLjM4NzggNDUuNjcxMyA3OC41MDYzIDQ1LjY3MTMgNzQuNDU5OEM0NS42NzEzIDcyLjk4ODQgNDUuOTc2OCA3MS40NTU2IDQ2LjUyNjcgNjkuOTIyOVpNODMuNjc2MSA0Mi41Nzk0QzgzLjY3NjEgNDYuMTcwNCA4MS41NTc1IDQ3Ljk2NTggNzkuMTg3NSA0Ny45NjU4Qzc2Ljc4MTYgNDcuOTY1OCA3NC42OTg5IDQ2LjE3MDQgNzQuNjk4OSA0Mi41Nzk0Qzc0LjY5ODkgMzguOTg4NSA3Ni43ODE2IDM3LjE5MzEgNzkuMTg3NSAzNy4xOTMxQzgxLjU1NzUgMzcuMTkzMSA4My42NzYxIDM4Ljk4ODUgODMuNjc2MSA0Mi41Nzk0Wk03MC4yMTAzIDQyLjU3OTVDNzAuMjEwMyA0Ni4xNzA0IDY4LjA5MTYgNDcuOTY1OCA2NS43MjE2IDQ3Ljk2NThDNjMuMzE1NyA0Ny45NjU4IDYxLjIzMyA0Ni4xNzA0IDYxLjIzMyA0Mi41Nzk1QzYxLjIzMyAzOC45ODg1IDYzLjMxNTcgMzcuMTkzMSA2NS43MjE2IDM3LjE5MzFDNjguMDkxNiAzNy4xOTMxIDcwLjIxMDMgMzguOTg4NSA3MC4yMTAzIDQyLjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?jt.Unsupported:jt.NotDetected,this._disconnected=()=>{const r=this._wallet;r&&(r.off("disconnect",this._disconnected),r.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null,this.emit("error",new Z2),this.emit("disconnect"))},this._accountChanged=r=>{const n=this._publicKey;if(n){try{r=new bt(r.toBytes())}catch(i){this.emit("error",new jd(i?.message,i));return}n.equals(r)||(this._publicKey=r,this.emit("connect",r))}},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==jt.Unsupported&&(UE()?(this._readyState=jt.Loadable,this.emit("readyStateChange",this._readyState)):$C(()=>window.phantom?.solana?.isPhantom||window.solana?.isPhantom?(this._readyState=jt.Installed,this.emit("readyStateChange",this._readyState),!0):!1))}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async autoConnect(){this.readyState===jt.Installed&&await this.connect()}async connect(){try{if(this.connected||this.connecting)return;if(this.readyState===jt.Loadable){const n=encodeURIComponent(window.location.href),i=encodeURIComponent(window.location.origin);window.location.href=`https://phantom.app/ul/browse/${n}?ref=${i}`;return}if(this.readyState!==jt.Installed)throw new Rc;this._connecting=!0;const t=window.phantom?.solana||window.solana;if(!t.isConnected)try{await t.connect()}catch(n){throw new Nc(n?.message,n)}if(!t.publicKey)throw new Yl;let r;try{r=new bt(t.publicKey.toBytes())}catch(n){throw new jd(n?.message,n)}t.on("disconnect",this._disconnected),t.on("accountChanged",this._accountChanged),this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),t.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(r){this.emit("error",new p4(r?.message,r))}}this.emit("disconnect")}async sendTransaction(t,r,n={}){try{const i=this._wallet;if(!i)throw new Ur;try{const{signers:s,...o}=n;Ba(t)?s?.length&&t.sign(s):(t=await this.prepareTransaction(t,r,o),s?.length&&t.partialSign(...s)),o.preflightCommitment=o.preflightCommitment||r.commitment;const{signature:a}=await i.signAndSendTransaction(t,o);return a}catch(s){throw s instanceof Wn?s:new zu(s?.message,s)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signTransaction(t)||t}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAllTransactions(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAllTransactions(t)||t}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signMessage(t){try{const r=this._wallet;if(!r)throw new Ur;try{const{signature:n}=await r.signMessage(t);return n}catch(n){throw new Y2(n?.message,n)}}catch(r){throw this.emit("error",r),r}}}var _8e=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},x8e=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Kw;function E8e(e){const t=({register:r})=>r(e);try{window.dispatchEvent(new k8e(t))}catch(r){console.error(`wallet-standard:register-wallet event could not be dispatched
662
+ `,t)}return _o}function PP(...e){var t;return e=e.filter(r=>!E4.has(r)),e.length?(e.forEach(r=>f4e(r)),(t=rp.register)==null||t.forEach(r=>ek(()=>r(...e))),function(){var n;e.forEach(i=>d4e(i)),(n=rp.unregister)==null||n.forEach(i=>ek(()=>i(...e)))}):()=>{}}let Yg;function p4e(){return Yg||(Yg=[...E4]),Yg}function g4e(e,t){var r;return(r=rp[e])!=null&&r.push(t)||(rp[e]=[t]),function(){var i;rp[e]=(i=rp[e])==null?void 0:i.filter(s=>t!==s)}}function ek(e){try{e()}catch(t){console.error(t)}}class m4e extends Event{get detail(){return u4e(this,qw,"f")}get type(){return"wallet-standard:app-ready"}constructor(t){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),qw.set(this,void 0),l4e(this,qw,t)}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}qw=new WeakMap;function b4e(){if(_o||(_o=h4e(),typeof window>"u"))return _o;const e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),_o;const{register:t}=_o,r=(...n)=>n.forEach(i=>ek(()=>i({register:t})));try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:r})})}catch{return console.error("window.navigator.wallets could not be set"),_o}return r(...e),_o}function y4e(e){const t=new Set,{get:r,on:n}=b4e(),i=xf(DP(r()));return rh(s=>{const o=[n("register",(...a)=>i.value=[...i.value,...DP(a)]),n("unregister",(...a)=>i.value=i.value.filter(c=>a.some(u=>u===c.wallet)))];s(()=>o.forEach(a=>a()))}),ir(()=>[...i.value,...e.value.filter(({name:s})=>i.value.some(o=>o.name===s)?(t.has(s)||(t.add(s),console.warn(`${s} was registered as a Standard Wallet. The Wallet Adapter for ${s} can be removed from your app.`)),!1):!0)])}function DP(e){return e.filter(c4e).map(t=>new a4e({wallet:t}))}function w4e(e,t){const r=async(o,a,c)=>{var u;const l=(u=e.value)==null?void 0:u.adapter;if(!l)throw t(new DG);if(!l.connected)throw t(new Ur,l);return await l.sendTransaction(o,a,c)},n=ir(()=>{var o;const a=(o=e.value)==null?void 0:o.adapter;if(a&&"signTransaction"in a)return async c=>{if(!a.connected)throw t(new Ur);return await a.signTransaction(c)}}),i=ir(()=>{var o;const a=(o=e.value)==null?void 0:o.adapter;if(a&&"signAllTransactions"in a)return async c=>{if(!a.connected)throw t(new Ur);return await a.signAllTransactions(c)}}),s=ir(()=>{var o;const a=(o=e.value)==null?void 0:o.adapter;if(a&&"signMessage"in a)return async c=>{if(!a.connected)throw t(new Ur);return await a.signMessage(c)}});return{sendTransaction:r,signTransaction:n,signAllTransactions:i,signMessage:s}}function v4e(e){const t=An(!1);return typeof window>"u"||rh(r=>{if(e.value)return;const n=()=>t.value=!0;window.addEventListener("beforeunload",n),r(()=>window.removeEventListener("beforeunload",n))}),t}function _4e(e,t){const r=xf(null),n=An(null),i=An(!1),s=An(jt.Unsupported),o=ir(()=>s.value===jt.Installed||s.value===jt.Loadable),a=()=>{var c,u,l;n.value=((c=r.value)==null?void 0:c.adapter.publicKey)??null,i.value=((u=r.value)==null?void 0:u.adapter.connected)??!1,s.value=((l=r.value)==null?void 0:l.readyState)??jt.Unsupported};return rh(()=>{r.value=t.value?e.value.find(({adapter:c})=>c.name===t.value)??null:null,a()}),{wallet:r,publicKey:n,connected:i,readyState:s,ready:o,refreshWalletState:a}}function x4e(e){const t=xf([]);return rh(()=>{t.value=e.value.map(r=>({adapter:r,readyState:r.readyState}))}),t}const E4e=({wallets:e=[],autoConnect:t=!1,cluster:r="mainnet-beta",onError:n,localStorageKey:i="walletName"})=>{const s=An(r),o=An(!1),a=An(!1),c=xf(e),u=y4e(c),{isMobile:l,uriForAppIdentity:d}=B3e(u),h=K3e(u,l,d,s),g=x4e(h),{name:m,isUsingMwaAdapterOnMobile:b,select:k,deselect:w}=Z3e(i,l),{wallet:E,publicKey:A,connected:M,readyState:R,ready:N,refreshWalletState:z}=_4e(g,m),F=v4e(b),L=V3e(F,n);G3e(g),L3e(E,F,b,w,z,L);const B=z3e(t,E,b,o,M,N,w),{sendTransaction:D,signTransaction:x,signAllTransactions:y,signMessage:f}=w4e(E,L);return{wallets:g,autoConnect:B,cluster:s,wallet:E,publicKey:A,readyState:R,ready:N,connected:M,connecting:o,disconnecting:a,select:k,connect:async()=>{if(M.value||o.value||a.value)return;if(!E.value)throw L(new DG);const I=E.value.adapter;if(!N.value)throw L(new Rc,I);try{o.value=!0,await I.connect()}catch(j){throw w(),j}finally{o.value=!1}},disconnect:async()=>{if(!(a.value||!E.value))try{a.value=!0,await E.value.adapter.disconnect()}finally{a.value=!1}},sendTransaction:D,signTransaction:x,signAllTransactions:y,signMessage:f}};let tk=null;const k4e=()=>{if(tk)return tk;throw new yve("Wallet not initialized. Please use the `initWallet` method to initialize the wallet.")},A4e=e=>{tk=E4e(e)},a1t={install:(e,t={})=>{A4e(t),e.config.globalProperties.$wallet=k4e()}};function v_(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function rk(e,t,r=".",n){if(!v_(t))return rk(e,{},r,n);const i=Object.assign({},t);for(const s in e){if(s==="__proto__"||s==="constructor")continue;const o=e[s];o!=null&&(n&&n(i,s,o,r)||(Array.isArray(o)&&Array.isArray(i[s])?i[s]=[...o,...i[s]]:v_(o)&&v_(i[s])?i[s]=rk(o,i[s],(r?`${r}.`:"")+s.toString(),n):i[s]=o))}return i}function S4e(e){return(...t)=>t.reduce((r,n)=>rk(r,n,"",e),{})}const GG=S4e();function ZG(e){return wH()?(vH(e),!0):!1}const C4e=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const I4e=e=>e!=null,M4e=Object.prototype.toString,qv=e=>M4e.call(e)==="[object Object]",__=()=>{};function Hw(e){return Array.isArray(e)?e:[e]}function $4e(e){return bf()}function T4e(e,t){$4e()&&mH(e,t)}function N4e(e,t,r){return dn(e,t,{...r,immediate:!0})}const YG=C4e?window:void 0;function Jg(e){var t;const r=qa(e);return(t=r?.$el)!=null?t:r}function cc(...e){const t=[],r=()=>{t.forEach(a=>a()),t.length=0},n=(a,c,u,l)=>(a.addEventListener(c,u,l),()=>a.removeEventListener(c,u,l)),i=ir(()=>{const a=Hw(qa(e[0])).filter(c=>c!=null);return a.every(c=>typeof c!="string")?a:void 0}),s=N4e(()=>{var a,c;return[(c=(a=i.value)==null?void 0:a.map(u=>Jg(u)))!=null?c:[YG].filter(u=>u!=null),Hw(qa(i.value?e[1]:e[0])),Hw(Ef(i.value?e[2]:e[1])),qa(i.value?e[3]:e[2])]},([a,c,u,l])=>{if(r(),!a?.length||!c?.length||!u?.length)return;const d=qv(l)?{...l}:l;t.push(...a.flatMap(h=>c.flatMap(g=>u.map(m=>n(h,g,m,d)))))},{flush:"post"}),o=()=>{s(),r()};return ZG(r),o}function O4e(){const e=xf(!1),t=bf();return t&&SS(()=>{e.value=!0},t),e}function j4e(e){const t=O4e();return ir(()=>(t.value,!!e()))}function P4e(e,t,r={}){const{root:n,rootMargin:i="0px",threshold:s=0,window:o=YG,immediate:a=!0}=r,c=j4e(()=>o&&"IntersectionObserver"in o),u=ir(()=>{const m=qa(e);return Hw(m).map(Jg).filter(I4e)});let l=__;const d=xf(a),h=c.value?dn(()=>[u.value,Jg(n),d.value],([m,b])=>{if(l(),!d.value||!m.length)return;const k=new IntersectionObserver(t,{root:Jg(b),rootMargin:i,threshold:s});m.forEach(w=>w&&k.observe(w)),l=()=>{k.disconnect(),l=__}},{immediate:a,flush:"post"}):__,g=()=>{l(),h(),d.value=!1};return ZG(g),{isSupported:c,isActive:d,pause(){l(),d.value=!1},resume(){d.value=!0},stop:g}}const JG=1/60*1e3,D4e=typeof performance<"u"?()=>performance.now():()=>Date.now(),XG=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(D4e()),JG);function R4e(e){let t=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(c,u=!1,l=!1)=>{const d=l&&i,h=d?t:r;return u&&o.add(c),h.indexOf(c)===-1&&(h.push(c),d&&i&&(n=t.length)),c},cancel:c=>{const u=r.indexOf(c);u!==-1&&r.splice(u,1),o.delete(c)},process:c=>{if(i){s=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let u=0;u<n;u++){const l=t[u];l(c),o.has(l)&&(a.schedule(l),e())}i=!1,s&&(s=!1,a.process(c))}};return a}const L4e=40;let nk=!0,jm=!1,ik=!1;const mp={delta:0,timestamp:0},ib=["read","update","preRender","render","postRender"],k4=ib.reduce((e,t)=>(e[t]=R4e(()=>jm=!0),e),{}),sk=ib.reduce((e,t)=>{const r=k4[t];return e[t]=(n,i=!1,s=!1)=>(jm||F4e(),r.schedule(n,i,s)),e},{}),z4e=ib.reduce((e,t)=>(e[t]=k4[t].cancel,e),{});ib.reduce((e,t)=>(e[t]=()=>k4[t].process(mp),e),{});const B4e=e=>k4[e].process(mp),QG=e=>{jm=!1,mp.delta=nk?JG:Math.max(Math.min(e-mp.timestamp,L4e),1),mp.timestamp=e,ik=!0,ib.forEach(B4e),ik=!1,jm&&(nk=!1,XG(QG))},F4e=()=>{jm=!0,nk=!0,ik||XG(QG)},eZ=()=>mp;function tZ(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}var RP=function(){};const ok=(e,t,r)=>Math.min(Math.max(r,e),t),x_=.001,U4e=.01,q4e=10,H4e=.05,W4e=1;function V4e({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,s,o=1-t;o=ok(H4e,W4e,o),e=ok(U4e,q4e,e/1e3),o<1?(i=u=>{const l=u*o,d=l*e,h=l-r,g=ak(u,o),m=Math.exp(-d);return x_-h/g*m},s=u=>{const d=u*o*e,h=d*r+r,g=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),b=ak(Math.pow(u,2),o);return(-i(u)+x_>0?-1:1)*((h-g)*m)/b}):(i=u=>{const l=Math.exp(-u*e),d=(u-r)*e+1;return-x_+l*d},s=u=>{const l=Math.exp(-u*e),d=(r-u)*(e*e);return l*d});const a=5/e,c=G4e(i,s,a);if(e=e*1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}const K4e=12;function G4e(e,t,r){let n=r;for(let i=1;i<K4e;i++)n=n-e(n)/t(n);return n}function ak(e,t){return e*Math.sqrt(1-t*t)}const Z4e=["duration","bounce"],Y4e=["stiffness","damping","mass"];function LP(e,t){return t.some(r=>e[r]!==void 0)}function J4e(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!LP(e,Y4e)&&LP(e,Z4e)){const r=V4e(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function XC(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:i}=e,s=tZ(e,["from","to","restSpeed","restDelta"]);const o={done:!1,value:t};let{stiffness:a,damping:c,mass:u,velocity:l,duration:d,isResolvedFromDuration:h}=J4e(s),g=zP,m=zP;function b(){const k=l?-(l/1e3):0,w=r-t,E=c/(2*Math.sqrt(a*u)),A=Math.sqrt(a/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-t)/100,.4)),E<1){const M=ak(A,E);g=R=>{const N=Math.exp(-E*A*R);return r-N*((k+E*A*w)/M*Math.sin(M*R)+w*Math.cos(M*R))},m=R=>{const N=Math.exp(-E*A*R);return E*A*N*(Math.sin(M*R)*(k+E*A*w)/M+w*Math.cos(M*R))-N*(Math.cos(M*R)*(k+E*A*w)-M*w*Math.sin(M*R))}}else if(E===1)g=M=>r-Math.exp(-A*M)*(w+(k+A*w)*M);else{const M=A*Math.sqrt(E*E-1);g=R=>{const N=Math.exp(-E*A*R),z=Math.min(M*R,300);return r-N*((k+E*A*w)*Math.sinh(z)+M*w*Math.cosh(z))/M}}}return b(),{next:k=>{const w=g(k);if(h)o.done=k>=d;else{const E=m(k)*1e3,A=Math.abs(E)<=n,M=Math.abs(r-w)<=i;o.done=A&&M}return o.value=o.done?r:w,o},flipTarget:()=>{l=-l,[t,r]=[r,t],b()}}}XC.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const zP=e=>0,rZ=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},QC=(e,t,r)=>-r*e+r*t+e,nZ=(e,t)=>r=>Math.max(Math.min(r,t),e),Xg=e=>e%1?Number(e.toFixed(5)):e,Pm=/(-)?([\d]*\.?[\d])+/g,ck=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,X4e=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function sb(e){return typeof e=="string"}const ob={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Qg=Object.assign(Object.assign({},ob),{transform:nZ(0,1)}),My=Object.assign(Object.assign({},ob),{default:1}),eI=e=>({test:t=>sb(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),jf=eI("deg"),em=eI("%"),zt=eI("px"),BP=Object.assign(Object.assign({},em),{parse:e=>em.parse(e)/100,transform:e=>em.transform(e*100)}),tI=(e,t)=>r=>!!(sb(r)&&X4e.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),iZ=(e,t,r)=>n=>{if(!sb(n))return n;const[i,s,o,a]=n.match(Pm);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},gd={test:tI("hsl","hue"),parse:iZ("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+em.transform(Xg(t))+", "+em.transform(Xg(r))+", "+Xg(Qg.transform(n))+")"},Q4e=nZ(0,255),E_=Object.assign(Object.assign({},ob),{transform:e=>Math.round(Q4e(e))}),Jl={test:tI("rgb","red"),parse:iZ("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+E_.transform(e)+", "+E_.transform(t)+", "+E_.transform(r)+", "+Xg(Qg.transform(n))+")"};function e6e(e){let t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const uk={test:tI("#"),parse:e6e,transform:Jl.transform},Ls={test:e=>Jl.test(e)||uk.test(e)||gd.test(e),parse:e=>Jl.test(e)?Jl.parse(e):gd.test(e)?gd.parse(e):uk.parse(e),transform:e=>sb(e)?e:e.hasOwnProperty("red")?Jl.transform(e):gd.transform(e)},sZ="${c}",oZ="${n}";function t6e(e){var t,r,n,i;return isNaN(e)&&sb(e)&&((r=(t=e.match(Pm))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((i=(n=e.match(ck))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function aZ(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match(ck);n&&(r=n.length,e=e.replace(ck,sZ),t.push(...n.map(Ls.parse)));const i=e.match(Pm);return i&&(e=e.replace(Pm,oZ),t.push(...i.map(ob.parse))),{values:t,numColors:r,tokenised:e}}function cZ(e){return aZ(e).values}function uZ(e){const{values:t,numColors:r,tokenised:n}=aZ(e),i=t.length;return s=>{let o=n;for(let a=0;a<i;a++)o=o.replace(a<r?sZ:oZ,a<r?Ls.transform(s[a]):Xg(s[a]));return o}}const r6e=e=>typeof e=="number"?0:e;function n6e(e){const t=cZ(e);return uZ(e)(t.map(r6e))}const ab={test:t6e,parse:cZ,createTransformer:uZ,getAnimatableNone:n6e},i6e=new Set(["brightness","contrast","saturate","opacity"]);function s6e(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Pm)||[];if(!n)return e;const i=r.replace(n,"");let s=i6e.has(t)?1:0;return n!==r&&(s*=100),t+"("+s+i+")"}const o6e=/([a-z-]*)\(.*?\)/g,lk=Object.assign(Object.assign({},ab),{getAnimatableNone:e=>{const t=e.match(o6e);return t?t.map(s6e).join(" "):e}});function k_(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function FP({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,o=0;if(!t)i=s=o=r;else{const a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;i=k_(c,a,e+1/3),s=k_(c,a,e),o=k_(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const a6e=(e,t,r)=>{const n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},c6e=[uk,Jl,gd],UP=e=>c6e.find(t=>t.test(e)),lZ=(e,t)=>{let r=UP(e),n=UP(t),i=r.parse(e),s=n.parse(t);r===gd&&(i=FP(i),r=Jl),n===gd&&(s=FP(s),n=Jl);const o=Object.assign({},i);return a=>{for(const c in o)c!=="alpha"&&(o[c]=a6e(i[c],s[c],a));return o.alpha=QC(i.alpha,s.alpha,a),r.transform(o)}},u6e=e=>typeof e=="number",l6e=(e,t)=>r=>t(e(r)),fZ=(...e)=>e.reduce(l6e);function dZ(e,t){return u6e(e)?r=>QC(e,t,r):Ls.test(e)?lZ(e,t):pZ(e,t)}const hZ=(e,t)=>{const r=[...e],n=r.length,i=e.map((s,o)=>dZ(s,t[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},f6e=(e,t)=>{const r=Object.assign(Object.assign({},e),t),n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=dZ(e[i],t[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}};function qP(e){const t=ab.parse(e),r=t.length;let n=0,i=0,s=0;for(let o=0;o<r;o++)n||typeof t[o]=="number"?n++:t[o].hue!==void 0?s++:i++;return{parsed:t,numNumbers:n,numRGB:i,numHSL:s}}const pZ=(e,t)=>{const r=ab.createTransformer(t),n=qP(e),i=qP(t);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?fZ(hZ(n.parsed,i.parsed),r):o=>`${o>0?t:e}`},d6e=(e,t)=>r=>QC(e,t,r);function h6e(e){if(typeof e=="number")return d6e;if(typeof e=="string")return Ls.test(e)?lZ:pZ;if(Array.isArray(e))return hZ;if(typeof e=="object")return f6e}function p6e(e,t,r){const n=[],i=r||h6e(e[0]),s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]:t;a=fZ(c,a)}n.push(a)}return n}function g6e([e,t],[r]){return n=>r(rZ(e,t,n))}function m6e(e,t){const r=e.length,n=r-1;return i=>{let s=0,o=!1;if(i<=e[0]?o=!0:i>=e[n]&&(s=n-1,o=!0),!o){let c=1;for(;c<r&&!(e[c]>i||c===n);c++);s=c-1}const a=rZ(e[s],e[s+1],i);return t[s](a)}}function gZ(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const s=e.length;RP(s===t.length),RP(!n||!Array.isArray(n)||n.length===s-1),e[0]>e[s-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const o=p6e(t,n,i),a=s===2?g6e(e,o):m6e(e,o);return r?c=>a(ok(e[0],e[s-1],c)):a}const A4=e=>t=>1-e(1-t),rI=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,b6e=e=>t=>Math.pow(t,e),mZ=e=>t=>t*t*((e+1)*t-e),y6e=e=>{const t=mZ(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},bZ=1.525,w6e=4/11,v6e=8/11,_6e=9/10,yZ=e=>e,nI=b6e(2),x6e=A4(nI),wZ=rI(nI),vZ=e=>1-Math.sin(Math.acos(e)),_Z=A4(vZ),E6e=rI(_Z),iI=mZ(bZ),k6e=A4(iI),A6e=rI(iI),S6e=y6e(bZ),C6e=4356/361,I6e=35442/1805,M6e=16061/1805,Hv=e=>{if(e===1||e===0)return e;const t=e*e;return e<w6e?7.5625*t:e<v6e?9.075*t-9.9*e+3.4:e<_6e?C6e*t-I6e*e+M6e:10.8*e*e-20.52*e+10.72},$6e=A4(Hv),T6e=e=>e<.5?.5*(1-Hv(1-e*2)):.5*Hv(e*2-1)+.5;function N6e(e,t){return e.map(()=>t||wZ).splice(0,e.length-1)}function O6e(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function j6e(e,t){return e.map(r=>r*t)}function Ww({from:e=0,to:t=1,ease:r,offset:n,duration:i=300}){const s={done:!1,value:e},o=Array.isArray(t)?t:[e,t],a=j6e(n&&n.length===o.length?n:O6e(o),i);function c(){return gZ(a,o,{ease:Array.isArray(r)?r:N6e(o,r)})}let u=c();return{next:l=>(s.value=u(l),s.done=l>=i,s),flipTarget:()=>{o.reverse(),u=c()}}}function P6e({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o={done:!1,value:t};let a=r*e;const c=t+a,u=s===void 0?c:s(c);return u!==c&&(a=u-t),{next:l=>{const d=-a*Math.exp(-l/n);return o.done=!(d>i||d<-i),o.value=o.done?u:u+d,o},flipTarget:()=>{}}}const HP={keyframes:Ww,spring:XC,decay:P6e};function D6e(e){if(Array.isArray(e.to))return Ww;if(HP[e.type])return HP[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Ww:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?XC:Ww}function xZ(e,t,r=0){return e-t-r}function R6e(e,t,r=0,n=!0){return n?xZ(t+-e,t,r):t-(e-t)+r}function L6e(e,t,r,n){return n?e>=t+r:e<=-r}const z6e=e=>{const t=({delta:r})=>e(r);return{start:()=>sk.update(t,!0),stop:()=>z4e.update(t)}};function EZ(e){var t,r,{from:n,autoplay:i=!0,driver:s=z6e,elapsed:o=0,repeat:a=0,repeatType:c="loop",repeatDelay:u=0,onPlay:l,onStop:d,onComplete:h,onRepeat:g,onUpdate:m}=e,b=tZ(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:k}=b,w,E=0,A=b.duration,M,R=!1,N=!0,z;const F=D6e(b);!((r=(t=F).needsInterpolation)===null||r===void 0)&&r.call(t,n,k)&&(z=gZ([0,100],[n,k],{clamp:!1}),n=0,k=100);const L=F(Object.assign(Object.assign({},b),{from:n,to:k}));function B(){E++,c==="reverse"?(N=E%2===0,o=R6e(o,A,u,N)):(o=xZ(o,A,u),c==="mirror"&&L.flipTarget()),R=!1,g&&g()}function D(){w.stop(),h&&h()}function x(f){if(N||(f=-f),o+=f,!R){const p=L.next(Math.max(0,o));M=p.value,z&&(M=z(M)),R=N?p.done:o<=0}m?.(M),R&&(E===0&&(A??(A=o)),E<a?L6e(o,A,u,N)&&B():D())}function y(){l?.(),w=s(x),w.start()}return i&&y(),{stop:()=>{d?.(),w.stop()}}}function kZ(e,t){return t?e*(1e3/t):0}function B6e({from:e=0,velocity:t=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:u,driver:l,onUpdate:d,onComplete:h,onStop:g}){let m;function b(A){return r!==void 0&&A<r||n!==void 0&&A>n}function k(A){return r===void 0?n:n===void 0||Math.abs(r-A)<Math.abs(n-A)?r:n}function w(A){m?.stop(),m=EZ(Object.assign(Object.assign({},A),{driver:l,onUpdate:M=>{var R;d?.(M),(R=A.onUpdate)===null||R===void 0||R.call(A,M)},onComplete:h,onStop:g}))}function E(A){w(Object.assign({type:"spring",stiffness:o,damping:a,restDelta:c},A))}if(b(e))E({from:e,velocity:t,to:k(e)});else{let A=i*t+e;typeof u<"u"&&(A=u(A));const M=k(A),R=M===r?-1:1;let N,z;const F=L=>{N=z,z=L,t=kZ(L-N,eZ().delta),(R===1&&L>M||R===-1&&L<M)&&E({from:L,to:M,velocity:t})};w({type:"decay",from:e,velocity:t,timeConstant:s,power:i,restDelta:c,modifyTarget:u,onUpdate:b(A)?F:void 0})}return{stop:()=>m?.stop()}}const AZ=(e,t)=>1-3*t+3*e,SZ=(e,t)=>3*t-6*e,CZ=e=>3*e,Wv=(e,t,r)=>((AZ(t,r)*e+SZ(t,r))*e+CZ(t))*e,IZ=(e,t,r)=>3*AZ(t,r)*e*e+2*SZ(t,r)*e+CZ(t),F6e=1e-7,U6e=10;function q6e(e,t,r,n,i){let s,o,a=0;do o=t+(r-t)/2,s=Wv(o,n,i)-e,s>0?r=o:t=o;while(Math.abs(s)>F6e&&++a<U6e);return o}const H6e=8,W6e=.001;function V6e(e,t,r,n){for(let i=0;i<H6e;++i){const s=IZ(t,r,n);if(s===0)return t;const o=Wv(t,r,n)-e;t-=o/s}return t}const Vw=11,$y=1/(Vw-1);function K6e(e,t,r,n){if(e===t&&r===n)return yZ;const i=new Float32Array(Vw);for(let o=0;o<Vw;++o)i[o]=Wv(o*$y,e,r);function s(o){let a=0,c=1;const u=Vw-1;for(;c!==u&&i[c]<=o;++c)a+=$y;--c;const l=(o-i[c])/(i[c+1]-i[c]),d=a+l*$y,h=IZ(d,e,r);return h>=W6e?V6e(o,d,e,r):h===0?d:q6e(o,a,a+$y,e,r)}return o=>o===0||o===1?o:Wv(s(o),t,n)}const sI={},A_={};class G6e{subscriptions=new Set;add(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}notify(t,r,n){if(this.subscriptions.size)for(const i of this.subscriptions)i(t,r,n)}clear(){this.subscriptions.clear()}}function WP(e){return!Number.isNaN(Number.parseFloat(e))}class Z6e{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new G6e;stopAnimation;canTrackVelocity=!1;constructor(t){this.prev=this.current=t,this.canTrackVelocity=WP(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}set(t){this.updateAndNotify(t)}updateAndNotify=t=>{this.prev=this.current,this.current=t;const{delta:r,timestamp:n}=eZ();this.lastUpdated!==n&&(this.timeDelta=r,this.lastUpdated=n),sk.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)};get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?kZ(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}scheduleVelocityCheck=()=>sk.postRender(this.velocityCheck);velocityCheck=({timestamp:t})=>{this.canTrackVelocity||(this.canTrackVelocity=WP(this.current)),t!==this.lastUpdated&&(this.prev=this.current)};start(t){return this.stop(),new Promise(r=>{const{stop:n}=t(r);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}}function Y6e(e){return new Z6e(e)}const{isArray:J6e}=Array;function X6e(){const e=An({}),t=n=>{const i=s=>{e.value[s]&&(e.value[s].stop(),e.value[s].destroy(),delete e.value[s])};n?J6e(n)?n.forEach(i):i(n):Object.keys(e.value).forEach(i)},r=(n,i,s)=>{if(e.value[n])return e.value[n];const o=Y6e(i);return o.onChange(a=>s[n]=a),e.value[n]=o,o};return T4e(t),{motionValues:e,get:r,stop:t}}function Q6e(e){return Array.isArray(e)}function Pf(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function S_(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function e5e(e){return{type:"spring",stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function C_(){return{type:"keyframes",ease:"linear",duration:300}}function t5e(e){return{type:"keyframes",duration:800,values:e}}const VP={default:e5e,x:Pf,y:Pf,z:Pf,rotate:Pf,rotateX:Pf,rotateY:Pf,rotateZ:Pf,scaleX:S_,scaleY:S_,scale:S_,backgroundColor:C_,color:C_,opacity:C_};function MZ(e,t){let r;return Q6e(t)?r=t5e:r=VP[e]||VP.default,{to:t,...r(t)}}const KP={...ob,transform:Math.round},$Z={color:Ls,backgroundColor:Ls,outlineColor:Ls,fill:Ls,stroke:Ls,borderColor:Ls,borderTopColor:Ls,borderRightColor:Ls,borderBottomColor:Ls,borderLeftColor:Ls,borderWidth:zt,borderTopWidth:zt,borderRightWidth:zt,borderBottomWidth:zt,borderLeftWidth:zt,borderRadius:zt,radius:zt,borderTopLeftRadius:zt,borderTopRightRadius:zt,borderBottomRightRadius:zt,borderBottomLeftRadius:zt,width:zt,maxWidth:zt,height:zt,maxHeight:zt,size:zt,top:zt,right:zt,bottom:zt,left:zt,padding:zt,paddingTop:zt,paddingRight:zt,paddingBottom:zt,paddingLeft:zt,margin:zt,marginTop:zt,marginRight:zt,marginBottom:zt,marginLeft:zt,rotate:jf,rotateX:jf,rotateY:jf,rotateZ:jf,scale:My,scaleX:My,scaleY:My,scaleZ:My,skew:jf,skewX:jf,skewY:jf,distance:zt,translateX:zt,translateY:zt,translateZ:zt,x:zt,y:zt,z:zt,perspective:zt,transformPerspective:zt,opacity:Qg,originX:BP,originY:BP,originZ:zt,zIndex:KP,filter:lk,WebkitFilter:lk,fillOpacity:Qg,strokeOpacity:Qg,numOctaves:KP},oI=e=>$Z[e];function fk(e,t){return t&&typeof e=="number"&&t.transform?t.transform(e):e}function r5e(e,t){let r=oI(e);return r!==lk&&(r=ab),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const n5e={linear:yZ,easeIn:nI,easeInOut:wZ,easeOut:x6e,circIn:vZ,circInOut:E6e,circOut:_Z,backIn:iI,backInOut:A6e,backOut:k6e,anticipate:S6e,bounceIn:$6e,bounceInOut:T6e,bounceOut:Hv};function GP(e){if(Array.isArray(e)){const[t,r,n,i]=e;return K6e(t,r,n,i)}else if(typeof e=="string")return n5e[e];return e}function i5e(e){return Array.isArray(e)&&typeof e[0]!="number"}function ZP(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&ab.test(t)&&!t.startsWith("url("))}function s5e(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function o5e({ease:e,times:t,delay:r,...n}){const i={...n};return t&&(i.offset=t),e&&(i.ease=i5e(e)?e.map(GP):GP(e)),r&&(i.elapsed=-r),i}function a5e(e,t,r){return Array.isArray(t.to)&&(e.duration||(e.duration=800)),s5e(t),c5e(e)||(e={...e,...MZ(r,t.to)}),{...t,...o5e(e)}}function c5e({delay:e,repeat:t,repeatType:r,repeatDelay:n,from:i,...s}){return!!Object.keys(s).length}function u5e(e,t){return e[t]||e.default||e}function l5e(e,t,r,n,i){const s=u5e(n,e);let o=s.from===null||s.from===void 0?t.get():s.from;const a=ZP(e,r);o==="none"&&a&&typeof r=="string"&&(o=r5e(e,r));const c=ZP(e,o);function u(d){const h={from:o,to:r,velocity:n.velocity?n.velocity:t.getVelocity(),onUpdate:g=>t.set(g)};return s.type==="inertia"||s.type==="decay"?B6e({...h,...s}):EZ({...a5e(s,h,e),onUpdate:g=>{h.onUpdate(g),s.onUpdate&&s.onUpdate(g)},onComplete:()=>{i&&i(),d&&d()}})}function l(d){return t.set(r),i&&i(),d&&d(),{stop:()=>{}}}return!c||!a||s.type===!1?l:u}function f5e(){const{motionValues:e,stop:t,get:r}=X6e();return{motionValues:e,stop:t,push:(i,s,o,a={},c)=>{const u=o[i],l=r(i,u,o);if(a&&a.immediate){l.set(s);return}const d=l5e(i,l,s,a,c);l.start(d)}}}function d5e(e,t={},{motionValues:r,push:n,stop:i}=f5e()){const s=Ef(t),o=An(!1);dn(r,d=>{o.value=Object.values(d).filter(h=>h.isAnimating()).length>0},{immediate:!0,deep:!0});const a=d=>{if(!s||!s[d])throw new Error(`The variant ${d} does not exist.`);return s[d]},c=d=>{typeof d=="string"&&(d=a(d));const h=Object.entries(d).map(([m,b])=>{if(m!=="transition")return new Promise(k=>n(m,b,e,d.transition||MZ(m,d[m]),k))}).filter(Boolean);async function g(){await Promise.all(h),d.transition?.onComplete?.()}return Promise.all([g()])};return{isAnimating:o,apply:c,set:d=>{const h=qv(d)?d:a(d);Object.entries(h).forEach(([g,m])=>{g!=="transition"&&n(g,m,e,{immediate:!0})})},leave:async d=>{let h;if(s&&(s.leave&&(h=s.leave),!s.leave&&s.initial&&(h=s.initial)),!h){d();return}await c(h),d()},stop:i}}const aI=typeof window<"u",h5e=()=>aI&&(window.onpointerdown===null||sI?.TEST),p5e=()=>aI&&(window.ontouchstart===null||sI?.TEST),g5e=()=>aI&&(window.onmousedown===null||sI?.TEST);function m5e({target:e,state:t,variants:r,apply:n}){const i=Ef(r),s=An(!1),o=An(!1),a=An(!1),c=ir(()=>{let l=[...Object.keys(t.value||{})];return i&&(i.hovered&&(l=[...l,...Object.keys(i.hovered)]),i.tapped&&(l=[...l,...Object.keys(i.tapped)]),i.focused&&(l=[...l,...Object.keys(i.focused)])),l}),u=ir(()=>{const l={};Object.assign(l,t.value),s.value&&i.hovered&&Object.assign(l,i.hovered),o.value&&i.tapped&&Object.assign(l,i.tapped),a.value&&i.focused&&Object.assign(l,i.focused);for(const d in l)c.value.includes(d)||delete l[d];return l});i.hovered&&(cc(e,"mouseenter",()=>s.value=!0),cc(e,"mouseleave",()=>{s.value=!1,o.value=!1})),i.tapped&&(g5e()&&(cc(e,"mousedown",()=>o.value=!0),cc(e,"mouseup",()=>o.value=!1)),h5e()&&(cc(e,"pointerdown",()=>o.value=!0),cc(e,"pointerup",()=>o.value=!1)),p5e()&&(cc(e,"touchstart",()=>o.value=!0),cc(e,"touchend",()=>o.value=!1))),i.focused&&(cc(e,"focus",()=>a.value=!0),cc(e,"blur",()=>a.value=!1)),dn([s,o,a],()=>{n(u.value)})}function b5e({set:e,target:t,variants:r,variant:n}){const i=Ef(r);dn(()=>t,()=>{i&&(i.initial&&(e("initial"),n.value="initial"),i.enter&&(n.value="enter"))},{immediate:!0,flush:"pre"})}function y5e({state:e,apply:t}){dn(e,r=>{r&&t(r)},{immediate:!0})}function TZ({target:e,variants:t,variant:r}){const n=Ef(t);n&&(n.visible||n.visibleOnce)&&P4e(e,([{isIntersecting:i}])=>{n.visible?i?r.value="visible":r.value="initial":n.visibleOnce&&(i&&r.value!=="visibleOnce"?r.value="visibleOnce":r.value||(r.value="initial"))})}function w5e(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&b5e(e),t.syncVariants&&y5e(e),t.visibilityHooks&&TZ(e),t.eventListeners&&m5e(e)}function NZ(e={}){const t=P2({...e}),r=An({});return dn(t,()=>{const n={};for(const[i,s]of Object.entries(t)){const o=oI(i),a=fk(s,o);n[i]=a}r.value=n},{immediate:!0,deep:!0}),{state:t,style:r}}function cI(e,t){dn(()=>Jg(e),r=>{r&&t(r)},{immediate:!0})}const v5e={x:"translateX",y:"translateY",z:"translateZ"};function OZ(e={},t=!0){const r=P2({...e}),n=An("");return dn(r,i=>{let s="",o=!1;if(t&&(i.x||i.y||i.z)){const a=[i.x||0,i.y||0,i.z||0].map(c=>fk(c,zt)).join(",");s+=`translate3d(${a}) `,o=!0}for(const[a,c]of Object.entries(i)){if(t&&(a==="x"||a==="y"||a==="z"))continue;const u=oI(a),l=fk(c,u);s+=`${v5e[a]||a}(${l}) `}t&&!o&&(s+="translateZ(0px) "),n.value=s.trim()},{immediate:!0,deep:!0}),{state:r,transform:n}}const _5e=["","X","Y","Z"],x5e=["perspective","translate","scale","rotate","skew"],jZ=["transformPerspective","x","y","z"];x5e.forEach(e=>{_5e.forEach(t=>{const r=e+t;jZ.push(r)})});const E5e=new Set(jZ);function uI(e){return E5e.has(e)}const k5e=new Set(["originX","originY","originZ"]);function PZ(e){return k5e.has(e)}function A5e(e){const t={},r={};return Object.entries(e).forEach(([n,i])=>{uI(n)||PZ(n)?t[n]=i:r[n]=i}),{transform:t,style:r}}function S4(e){const{transform:t,style:r}=A5e(e),{transform:n}=OZ(t),{style:i}=NZ(r);return n.value&&(i.value.transform=n.value),i.value}function S5e(e,t){let r,n;const{state:i,style:s}=NZ();return cI(e,o=>{n=o;for(const a of Object.keys($Z))o.style[a]===null||o.style[a]===""||uI(a)||PZ(a)||(i[a]=o.style[a]);r&&Object.entries(r).forEach(([a,c])=>o.style[a]=c),t&&t(i)}),dn(s,o=>{if(!n){r=o;return}for(const a in o)n.style[a]=o[a]},{immediate:!0}),{style:i}}function C5e(e){const t=e.trim().split(/\) |\)/);if(t.length===1)return{};const r=n=>n.endsWith("px")||n.endsWith("deg")?Number.parseFloat(n):Number.isNaN(Number(n))?Number(n):n;return t.reduce((n,i)=>{if(!i)return n;const[s,o]=i.split("("),c=o.split(",").map(l=>r(l.endsWith(")")?l.replace(")",""):l.trim())),u=c.length===1?c[0]:c;return{...n,[s]:u}},{})}function I5e(e,t){Object.entries(C5e(t)).forEach(([r,n])=>{const i=["x","y","z"];if(r==="translate3d"){if(n===0){i.forEach(s=>e[s]=0);return}n.forEach((s,o)=>e[i[o]]=s);return}if(n=Number.parseFloat(`${n}`),r==="translateX"){e.x=n;return}if(r==="translateY"){e.y=n;return}if(r==="translateZ"){e.z=n;return}e[r]=n})}function M5e(e,t){let r,n;const{state:i,transform:s}=OZ();return cI(e,o=>{n=o,o.style.transform&&I5e(i,o.style.transform),r&&(o.style.transform=r),t&&t(i)}),dn(s,o=>{if(!n){r=o;return}n.style.transform=o},{immediate:!0}),{transform:i}}function $5e(e){return Object.entries(e)}function T5e(e,t){const r=P2({}),n=o=>Object.entries(o).forEach(([a,c])=>r[a]=c),{style:i}=S5e(e,n),{transform:s}=M5e(e,n);return dn(r,o=>{$5e(o).forEach(([a,c])=>{const u=uI(a)?s:i;u[a]&&u[a]===c||(u[a]=c)})},{immediate:!0,deep:!0}),cI(e,()=>t),{motionProperties:r,style:i,transform:s}}function N5e(e={}){const t=Ef(e),r=An();return{state:ir(()=>{if(r.value)return t[r.value]}),variant:r}}function DZ(e,t={},r){const{motionProperties:n}=T5e(e),{variant:i,state:s}=N5e(t),o=d5e(n,t),a={target:e,variant:i,variants:t,state:s,motionProperties:n,...o};return w5e(a,r),a}const RZ=["delay","duration"],O5e=["initial","enter","leave","visible","visible-once","visibleOnce","hovered","tapped","focused",...RZ];function j5e(e){return RZ.includes(e)}function P5e(e,t){const r=e.props?e.props:e.data&&e.data.attrs?e.data.attrs:{};if(r){r.variants&&qv(r.variants)&&(t.value={...t.value,...r.variants});for(let n of O5e)if(!(!r||!r[n])){if(j5e(n)&&typeof r[n]=="number"){for(const i of["enter","visible","visibleOnce"]){const s=t.value[i];s!=null&&(s.transition??={},s.transition[n]=r[n])}continue}if(qv(r[n])){const i=r[n];n==="visible-once"&&(n="visibleOnce"),t.value[n]=i}}}}function I_(e,t=!1){return{created:(i,s,o)=>{const a=s.value&&typeof s.value=="string"?s.value:o.key;a&&A_[a]&&A_[a].stop();const c=t?structuredClone(xH(e)||{}):e||{},u=An(c);typeof s.value=="object"&&(u.value=s.value),P5e(o,u);const d=DZ(i,u,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});i.motionInstance=d,a&&(A_[a]=d)},mounted:(i,s,o)=>{i.motionInstance&&TZ(i.motionInstance)},getSSRProps(i,s){let{initial:o}=i.value||s&&s?.props||{};o=Ef(o);const a=GG({},e?.initial||{},o||{});return!a||Object.keys(a).length===0?void 0:{style:S4(a)}}}}const D5e={initial:{opacity:0},enter:{opacity:1}},R5e={initial:{opacity:0},visible:{opacity:1}},L5e={initial:{opacity:0},visibleOnce:{opacity:1}},z5e={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},B5e={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},F5e={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},U5e={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},q5e={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},H5e={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},W5e={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},V5e={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},K5e={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},G5e={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Z5e={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Y5e={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},J5e={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},X5e={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Q5e={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},e8e={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},t8e={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},r8e={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},n8e={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},i8e={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},s8e={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},o8e={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},a8e={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},c8e={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},u8e={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},l8e={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},f8e={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Vv={__proto__:null,fade:D5e,fadeVisible:R5e,fadeVisibleOnce:L5e,pop:z5e,popVisible:B5e,popVisibleOnce:F5e,rollBottom:J5e,rollLeft:U5e,rollRight:W5e,rollTop:G5e,rollVisibleBottom:X5e,rollVisibleLeft:q5e,rollVisibleOnceBottom:Q5e,rollVisibleOnceLeft:H5e,rollVisibleOnceRight:K5e,rollVisibleOnceTop:Y5e,rollVisibleRight:V5e,rollVisibleTop:Z5e,slideBottom:u8e,slideLeft:e8e,slideRight:n8e,slideTop:o8e,slideVisibleBottom:l8e,slideVisibleLeft:t8e,slideVisibleOnceBottom:f8e,slideVisibleOnceLeft:r8e,slideVisibleOnceRight:s8e,slideVisibleOnceTop:c8e,slideVisibleRight:i8e,slideVisibleTop:a8e};function d8e(e){const t="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;",r="aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------",n=new RegExp(t.split("").join("|"),"g");return e.toString().replace(/[A-Z]/g,i=>`-${i}`).toLowerCase().replace(/\s+/g,"-").replace(n,i=>r.charAt(t.indexOf(i))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/-+$/,"")}const LZ=Symbol(""),zZ={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function h8e(e){return Object.prototype.toString.call(e)==="[object Object]"}function dk(e){if(Array.isArray(e))return e.map(dk);if(h8e(e)){const t={};for(const r in e)t[r]=dk(e[r]);return t}return e}function BZ(e){const t=P2({}),r=W3(LZ,{}),n=ir(()=>e.preset==null?{}:r!=null&&e.preset in r?structuredClone(xH(r)[e.preset]):e.preset in Vv?structuredClone(Vv[e.preset]):{}),i=ir(()=>({initial:e.initial,enter:e.enter,leave:e.leave,visible:e.visible,visibleOnce:e.visibleOnce,hovered:e.hovered,tapped:e.tapped,focused:e.focused}));function s(c,u){for(const l of["delay","duration"]){if(u[l]==null)continue;const d=Number.parseInt(u[l]);for(const h of["enter","visible","visibleOnce"]){const g=c[h];g!=null&&(g.transition??={},g.transition[l]=d)}}return c}const o=ir(()=>{const c=GG({},i.value,n.value,e.variants||{});return s({...c},e)});function a(c,u,l){c.props??={},c.props.style??={},c.props.style={...c.props.style,...l};const d=s(dk(o.value),c.props);return c.props.onVnodeMounted=({el:h})=>{t[u]=DZ(h,d)},c.props.onVnodeUpdated=({el:h})=>{const g=S4(t[u].state);for(const[m,b]of Object.entries(g))h.style[m]=b},c}return{motionConfig:o,setNodeInstance:a}}const p8e=Dt({name:"Motion",props:{...zZ,is:{type:[String,Object],default:"div"}},setup(e){const t=_H(),{motionConfig:r,setNodeInstance:n}=BZ(e);return()=>{const i=S4(r.value.initial||{}),s=g1(e.is,void 0,t);return n(s,0,i),s}}}),g8e=Dt({name:"MotionGroup",props:{...zZ,is:{type:[String,Object],required:!1}},setup(e){const t=_H(),{motionConfig:r,setNodeInstance:n}=BZ(e);return()=>{const i=S4(r.value.initial||{}),s=t.default?.()||[];for(let o=0;o<s.length;o++){const a=s[o];a.type===AS&&Array.isArray(a.children)?a.children.forEach(function c(u,l){if(u!=null){if(Array.isArray(u)){c(u,l);return}typeof u=="object"&&n(u,l,i)}}):n(a,o,i)}return e.is?g1(e.is,void 0,s):s}}}),c1t={install(e,t){if(e.directive("motion",I_()),!t||t&&!t.excludePresets)for(const r in Vv){const n=Vv[r];e.directive(`motion-${d8e(r)}`,I_(n,!0))}if(t&&t.directives)for(const r in t.directives){const n=t.directives[r];n.initial,e.directive(`motion-${r}`,I_(n,!0))}e.provide(LZ,t?.directives),e.component("Motion",p8e),e.component("MotionGroup",g8e)}};function m8e(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let u=0;u<t.length;u++)t[u]=255;for(let u=0;u<e.length;u++){const l=e.charAt(u),d=l.charCodeAt(0);if(t[d]!==255)throw new TypeError(l+" is ambiguous");t[d]=u}const r=e.length,n=e.charAt(0),i=Math.log(r)/Math.log(256),s=Math.log(256)/Math.log(r);function o(u){if(u instanceof Uint8Array||(ArrayBuffer.isView(u)?u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength):Array.isArray(u)&&(u=Uint8Array.from(u))),!(u instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(u.length===0)return"";let l=0,d=0,h=0;const g=u.length;for(;h!==g&&u[h]===0;)h++,l++;const m=(g-h)*s+1>>>0,b=new Uint8Array(m);for(;h!==g;){let E=u[h],A=0;for(let M=m-1;(E!==0||A<d)&&M!==-1;M--,A++)E+=256*b[M]>>>0,b[M]=E%r>>>0,E=E/r>>>0;if(E!==0)throw new Error("Non-zero carry");d=A,h++}let k=m-d;for(;k!==m&&b[k]===0;)k++;let w=n.repeat(l);for(;k<m;++k)w+=e.charAt(b[k]);return w}function a(u){if(typeof u!="string")throw new TypeError("Expected String");if(u.length===0)return new Uint8Array;let l=0,d=0,h=0;for(;u[l]===n;)d++,l++;const g=(u.length-l)*i+1>>>0,m=new Uint8Array(g);for(;l<u.length;){const E=u.charCodeAt(l);if(E>255)return;let A=t[E];if(A===255)return;let M=0;for(let R=g-1;(A!==0||M<h)&&R!==-1;R--,M++)A+=r*m[R]>>>0,m[R]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");h=M,l++}let b=g-h;for(;b!==g&&m[b]===0;)b++;const k=new Uint8Array(d+(g-b));let w=d;for(;b!==g;)k[w++]=m[b++];return k}function c(u){const l=a(u);if(l)return l;throw new Error("Non-base"+r+" character")}return{encode:o,decodeUnsafe:a,decode:c}}var b8e="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const tm=m8e(b8e);var Ty={exports:{}},YP;function y8e(){if(YP)return Ty.exports;YP=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(R,N,z){return Function.prototype.apply.call(R,N,z)},r;e&&typeof e.ownKeys=="function"?r=e.ownKeys:Object.getOwnPropertySymbols?r=function(R){return Object.getOwnPropertyNames(R).concat(Object.getOwnPropertySymbols(R))}:r=function(R){return Object.getOwnPropertyNames(R)};function n(M){console&&console.warn&&console.warn(M)}var i=Number.isNaN||function(R){return R!==R};function s(){s.init.call(this)}Ty.exports=s,Ty.exports.once=w,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(M){if(typeof M!="number"||M<0||i(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");o=M}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(R){if(typeof R!="number"||R<0||i(R))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+R+".");return this._maxListeners=R,this};function c(M){return M._maxListeners===void 0?s.defaultMaxListeners:M._maxListeners}s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(R){for(var N=[],z=1;z<arguments.length;z++)N.push(arguments[z]);var F=R==="error",L=this._events;if(L!==void 0)F=F&&L.error===void 0;else if(!F)return!1;if(F){var B;if(N.length>0&&(B=N[0]),B instanceof Error)throw B;var D=new Error("Unhandled error."+(B?" ("+B.message+")":""));throw D.context=B,D}var x=L[R];if(x===void 0)return!1;if(typeof x=="function")t(x,this,N);else for(var y=x.length,f=m(x,y),z=0;z<y;++z)t(f[z],this,N);return!0};function u(M,R,N,z){var F,L,B;if(a(N),L=M._events,L===void 0?(L=M._events=Object.create(null),M._eventsCount=0):(L.newListener!==void 0&&(M.emit("newListener",R,N.listener?N.listener:N),L=M._events),B=L[R]),B===void 0)B=L[R]=N,++M._eventsCount;else if(typeof B=="function"?B=L[R]=z?[N,B]:[B,N]:z?B.unshift(N):B.push(N),F=c(M),F>0&&B.length>F&&!B.warned){B.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+B.length+" "+String(R)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=M,D.type=R,D.count=B.length,n(D)}return M}s.prototype.addListener=function(R,N){return u(this,R,N,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(R,N){return u(this,R,N,!0)};function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(M,R,N){var z={fired:!1,wrapFn:void 0,target:M,type:R,listener:N},F=l.bind(z);return F.listener=N,z.wrapFn=F,F}s.prototype.once=function(R,N){return a(N),this.on(R,d(this,R,N)),this},s.prototype.prependOnceListener=function(R,N){return a(N),this.prependListener(R,d(this,R,N)),this},s.prototype.removeListener=function(R,N){var z,F,L,B,D;if(a(N),F=this._events,F===void 0)return this;if(z=F[R],z===void 0)return this;if(z===N||z.listener===N)--this._eventsCount===0?this._events=Object.create(null):(delete F[R],F.removeListener&&this.emit("removeListener",R,z.listener||N));else if(typeof z!="function"){for(L=-1,B=z.length-1;B>=0;B--)if(z[B]===N||z[B].listener===N){D=z[B].listener,L=B;break}if(L<0)return this;L===0?z.shift():b(z,L),z.length===1&&(F[R]=z[0]),F.removeListener!==void 0&&this.emit("removeListener",R,D||N)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(R){var N,z,F;if(z=this._events,z===void 0)return this;if(z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):z[R]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[R]),this;if(arguments.length===0){var L=Object.keys(z),B;for(F=0;F<L.length;++F)B=L[F],B!=="removeListener"&&this.removeAllListeners(B);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(N=z[R],typeof N=="function")this.removeListener(R,N);else if(N!==void 0)for(F=N.length-1;F>=0;F--)this.removeListener(R,N[F]);return this};function h(M,R,N){var z=M._events;if(z===void 0)return[];var F=z[R];return F===void 0?[]:typeof F=="function"?N?[F.listener||F]:[F]:N?k(F):m(F,F.length)}s.prototype.listeners=function(R){return h(this,R,!0)},s.prototype.rawListeners=function(R){return h(this,R,!1)},s.listenerCount=function(M,R){return typeof M.listenerCount=="function"?M.listenerCount(R):g.call(M,R)},s.prototype.listenerCount=g;function g(M){var R=this._events;if(R!==void 0){var N=R[M];if(typeof N=="function")return 1;if(N!==void 0)return N.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function m(M,R){for(var N=new Array(R),z=0;z<R;++z)N[z]=M[z];return N}function b(M,R){for(;R+1<M.length;R++)M[R]=M[R+1];M.pop()}function k(M){for(var R=new Array(M.length),N=0;N<R.length;++N)R[N]=M[N].listener||M[N];return R}function w(M,R){return new Promise(function(N,z){function F(B){M.removeListener(R,L),z(B)}function L(){typeof M.removeListener=="function"&&M.removeListener("error",F),N([].slice.call(arguments))}A(M,R,L,{once:!0}),R!=="error"&&E(M,F,{once:!0})})}function E(M,R,N){typeof M.on=="function"&&A(M,"error",R,N)}function A(M,R,N,z){if(typeof M.on=="function")z.once?M.once(R,N):M.on(R,N);else if(typeof M.addEventListener=="function")M.addEventListener(R,function F(L){z.once&&M.removeEventListener(R,F),N(L)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M)}return Ty.exports}var ii=y8e();const A1=Js(ii),w8e="Nightly";class u1t extends g4{constructor(){super(),this.name=w8e,this.url="https://nightly.app",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTYiIGhlaWdodD0iOTYiIHZpZXdCb3g9IjAgMCA5NiA5NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQ4IDk2Qzc0LjUwOTcgOTYgOTYgNzQuNTA5NyA5NiA0OEM5NiAyMS40OTAzIDc0LjUwOTcgMCA0OCAwQzIxLjQ5MDMgMCAwIDIxLjQ5MDMgMCA0OEMwIDc0LjUwOTcgMjEuNDkwMyA5NiA0OCA5NloiIGZpbGw9IiM2RDczRjgiLz4KPHBhdGggZD0iTTQ4IDg1LjYzNTZDNDggODUuNjM1NiA1Mi40NTMzIDg1LjYzNTYgNTUuNDQgODIuNTg2N0M1OC45MTU1IDc5LjI4MDEgNTcuMzUxMSA3NS40MzEyIDYyLjI3NTUgNzEuNDMxMkM2Ni45ODY2IDY3LjY0NDUgNzIuOTI0NCA3MC4zMzc5IDcyLjkyNDQgNzAuMzM3OUM3Ny4wMjIyIDYyLjEyNDUgNzQuNzkxMSA1Mi41NjkgNzQuNzkxMSA1Mi41NjlDODEuNzY4OCAzNC4yNTc5IDc1Ljk2NDQgMjEuMTU1NyA3NC40NDQ0IDE3LjM2MDFDNjkuNDQ4OCAyNC4zMzc5IDYzLjE5MTEgMjkuMTczNCA1NS43OTU1IDMyLjQwOUM1My4yMjY2IDMxLjcwNjggNTAuNTk1NSAzMS4zMzM0IDQ4IDMxLjM2MDFDNDUuNDEzMyAzMS4zMzM0IDQyLjc3MzMgMzEuNzA2OCA0MC4yMDQ0IDMyLjQwOUMzMi44MTc3IDI5LjE2NDUgMjYuNTUxMSAyNC4zMzc5IDIxLjU1NTUgMTcuMzYwMUMyMC4wMzU1IDIxLjE1NTcgMTQuMjMxMSAzNC4yNTc5IDIxLjIwODkgNTIuNTY5QzIxLjIwODkgNTIuNTY5IDE4Ljk3NzggNjIuMTI0NSAyMy4wNzU1IDcwLjMzNzlDMjMuMDc1NSA3MC4zMzc5IDI5LjAxMzMgNjcuNjQ0NSAzMy43MjQ0IDcxLjQzMTJDMzguNjU3NyA3NS40MzEyIDM3LjA4NDQgNzkuMjgwMSA0MC41NiA4Mi41ODY3QzQzLjU0NjYgODUuNjM1NiA0OCA4NS42MzU2IDQ4IDg1LjYzNTZaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNDIuNDc5OSA2NS4yOThDNDIuMjkzMyA1OS4yMTggMzYuMzAyMSA1Ny4yNjI0IDMyLjIxMzMgNTkuODIyNEMzMi4yMTMzIDU5LjgyMjQgMzIuODUzMyA2Mi40MzU4IDM1LjgzOTkgNjMuNzUxM0MzOC4yNzU1IDY0LjgyNjkgMzkuMzI0NCA2My4zODY5IDQyLjQ3OTkgNjUuMjk4WiIgZmlsbD0iIzdCODFGOSIvPgo8cGF0aCBkPSJNMjIuNDk3NyAyMy4wOTM1QzIwLjA4ODggMzEuNTQ2OCAyMS4xMjg4IDQyLjI0MDIgMjQuOTMzMyA1MC4wMjY5QzI4LjgyNjYgNDcuMjcxMyAzMi45MTU1IDQzLjAxMzUgMzUuMDkzMyAzOC41MDY5QzI5Ljk2NDQgMzQuNzExMyAyNS42NjIyIDMxLjEwMjQgMjIuNDk3NyAyMy4wOTM1WiIgZmlsbD0iIzdCODFGOSIvPgo8cGF0aCBkPSJNNTMuNTE5OSA2NS4yOThDNTMuNzA2NiA1OS4yMTggNTkuNjk3NyA1Ny4yNjI0IDYzLjc4NjYgNTkuODIyNEM2My43ODY2IDU5LjgyMjQgNjMuMTQ2NiA2Mi40MzU4IDYwLjE1OTkgNjMuNzUxM0M1Ny43MjQzIDY0LjgyNjkgNTYuNjc1NSA2My4zODY5IDUzLjUxOTkgNjUuMjk4WiIgZmlsbD0iIzdCODFGOSIvPgo8cGF0aCBkPSJNNzMuNTAyMiAyMy4wOTM1Qzc1LjkxMTEgMzEuNTQ2OCA3NC44NzExIDQyLjI0MDIgNzEuMDY2NiA1MC4wMjY5QzY3LjE3MzMgNDcuMjcxMyA2My4wODQ0IDQzLjAxMzUgNjAuOTA2NiAzOC41MDY5QzY2LjAzNTUgMzQuNzExMyA3MC4zMzc3IDMxLjEwMjQgNzMuNTAyMiAyMy4wOTM1WiIgZmlsbD0iIzdCODFGOSIvPgo8cGF0aCBkPSJNNDcuOTk5OSA4NS4zMDY5QzUwLjE0MDQgODUuMzA2OSA1MS44NzU1IDgzLjc3ODcgNTEuODc1NSA4MS44OTM2QzUxLjg3NTUgODAuMDA4NCA1MC4xNDA0IDc4LjQ4MDIgNDcuOTk5OSA3OC40ODAyQzQ1Ljg1OTUgNzguNDgwMiA0NC4xMjQ0IDgwLjAwODQgNDQuMTI0NCA4MS44OTM2QzQ0LjEyNDQgODMuNzc4NyA0NS44NTk1IDg1LjMwNjkgNDcuOTk5OSA4NS4zMDY5WiIgZmlsbD0iIzdCODFGOSIvPgo8L3N2Zz4K",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?jt.Unsupported:jt.NotDetected,this._connecting=!1,this._publicKey=null,this._wallet=null,this._readyState!==jt.Unsupported&&$C(()=>window?.nightly?.solana?(this._readyState=jt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get connecting(){return this._connecting}get readyState(){return this._readyState}get publicKey(){return this._publicKey}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==jt.Installed)throw new Rc;this._connecting=!0;const t=window.nightly.solana;try{await t.connect()}catch(n){throw new Nc(n?.message,n)}if(t.publicKey.toString()==="11111111111111111111111111111111")throw new Yl;let r;try{r=new bt(t.publicKey.toBytes())}catch(n){throw new jd(n?.message,n)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch{this.emit("error",new Z2)}}this.emit("disconnect")}async signTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signTransaction(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAllTransactions(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAllTransactions(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signMessage(t){try{const r=this._wallet;if(!r)throw new Ur;try{return r.signMessage(new TextDecoder().decode(t))}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}}const v8e="Phantom";class l1t extends g4{constructor(t={}){super(),this.name=v8e,this.url="https://phantom.app",this.icon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgZmlsbD0ibm9uZSI+CjxyZWN0IHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiByeD0iMjYiIGZpbGw9IiNBQjlGRjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00Ni41MjY3IDY5LjkyMjlDNDIuMDA1NCA3Ni44NTA5IDM0LjQyOTIgODUuNjE4MiAyNC4zNDggODUuNjE4MkMxOS41ODI0IDg1LjYxODIgMTUgODMuNjU2MyAxNSA3NS4xMzQyQzE1IDUzLjQzMDUgNDQuNjMyNiAxOS44MzI3IDcyLjEyNjggMTkuODMyN0M4Ny43NjggMTkuODMyNyA5NCAzMC42ODQ2IDk0IDQzLjAwNzlDOTQgNTguODI1OCA4My43MzU1IDc2LjkxMjIgNzMuNTMyMSA3Ni45MTIyQzcwLjI5MzkgNzYuOTEyMiA2OC43MDUzIDc1LjEzNDIgNjguNzA1MyA3Mi4zMTRDNjguNzA1MyA3MS41NzgzIDY4LjgyNzUgNzAuNzgxMiA2OS4wNzE5IDY5LjkyMjlDNjUuNTg5MyA3NS44Njk5IDU4Ljg2ODUgODEuMzg3OCA1Mi41NzU0IDgxLjM4NzhDNDcuOTkzIDgxLjM4NzggNDUuNjcxMyA3OC41MDYzIDQ1LjY3MTMgNzQuNDU5OEM0NS42NzEzIDcyLjk4ODQgNDUuOTc2OCA3MS40NTU2IDQ2LjUyNjcgNjkuOTIyOVpNODMuNjc2MSA0Mi41Nzk0QzgzLjY3NjEgNDYuMTcwNCA4MS41NTc1IDQ3Ljk2NTggNzkuMTg3NSA0Ny45NjU4Qzc2Ljc4MTYgNDcuOTY1OCA3NC42OTg5IDQ2LjE3MDQgNzQuNjk4OSA0Mi41Nzk0Qzc0LjY5ODkgMzguOTg4NSA3Ni43ODE2IDM3LjE5MzEgNzkuMTg3NSAzNy4xOTMxQzgxLjU1NzUgMzcuMTkzMSA4My42NzYxIDM4Ljk4ODUgODMuNjc2MSA0Mi41Nzk0Wk03MC4yMTAzIDQyLjU3OTVDNzAuMjEwMyA0Ni4xNzA0IDY4LjA5MTYgNDcuOTY1OCA2NS43MjE2IDQ3Ljk2NThDNjMuMzE1NyA0Ny45NjU4IDYxLjIzMyA0Ni4xNzA0IDYxLjIzMyA0Mi41Nzk1QzYxLjIzMyAzOC45ODg1IDYzLjMxNTcgMzcuMTkzMSA2NS43MjE2IDM3LjE5MzFDNjguMDkxNiAzNy4xOTMxIDcwLjIxMDMgMzguOTg4NSA3MC4yMTAzIDQyLjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?jt.Unsupported:jt.NotDetected,this._disconnected=()=>{const r=this._wallet;r&&(r.off("disconnect",this._disconnected),r.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null,this.emit("error",new Z2),this.emit("disconnect"))},this._accountChanged=r=>{const n=this._publicKey;if(n){try{r=new bt(r.toBytes())}catch(i){this.emit("error",new jd(i?.message,i));return}n.equals(r)||(this._publicKey=r,this.emit("connect",r))}},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==jt.Unsupported&&(UE()?(this._readyState=jt.Loadable,this.emit("readyStateChange",this._readyState)):$C(()=>window.phantom?.solana?.isPhantom||window.solana?.isPhantom?(this._readyState=jt.Installed,this.emit("readyStateChange",this._readyState),!0):!1))}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async autoConnect(){this.readyState===jt.Installed&&await this.connect()}async connect(){try{if(this.connected||this.connecting)return;if(this.readyState===jt.Loadable){const n=encodeURIComponent(window.location.href),i=encodeURIComponent(window.location.origin);window.location.href=`https://phantom.app/ul/browse/${n}?ref=${i}`;return}if(this.readyState!==jt.Installed)throw new Rc;this._connecting=!0;const t=window.phantom?.solana||window.solana;if(!t.isConnected)try{await t.connect()}catch(n){throw new Nc(n?.message,n)}if(!t.publicKey)throw new Yl;let r;try{r=new bt(t.publicKey.toBytes())}catch(n){throw new jd(n?.message,n)}t.on("disconnect",this._disconnected),t.on("accountChanged",this._accountChanged),this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),t.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(r){this.emit("error",new p4(r?.message,r))}}this.emit("disconnect")}async sendTransaction(t,r,n={}){try{const i=this._wallet;if(!i)throw new Ur;try{const{signers:s,...o}=n;Ba(t)?s?.length&&t.sign(s):(t=await this.prepareTransaction(t,r,o),s?.length&&t.partialSign(...s)),o.preflightCommitment=o.preflightCommitment||r.commitment;const{signature:a}=await i.signAndSendTransaction(t,o);return a}catch(s){throw s instanceof Wn?s:new zu(s?.message,s)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signTransaction(t)||t}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAllTransactions(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAllTransactions(t)||t}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signMessage(t){try{const r=this._wallet;if(!r)throw new Ur;try{const{signature:n}=await r.signMessage(t);return n}catch(n){throw new Y2(n?.message,n)}}catch(r){throw this.emit("error",r),r}}}var _8e=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},x8e=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Kw;function E8e(e){const t=({register:r})=>r(e);try{window.dispatchEvent(new k8e(t))}catch(r){console.error(`wallet-standard:register-wallet event could not be dispatched
663
663
  `,r)}try{window.addEventListener("wallet-standard:app-ready",({detail:r})=>t(r))}catch(r){console.error(`wallet-standard:app-ready event listener could not be added
664
- `,r)}}class k8e extends Event{get detail(){return _8e(this,Kw,"f")}get type(){return"wallet-standard:register-wallet"}constructor(t){super("wallet-standard:register-wallet",{bubbles:!1,cancelable:!1,composed:!1}),Kw.set(this,void 0),x8e(this,Kw,t,"f")}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}Kw=new WeakMap;const A8e="solana:mainnet",S8e="solana:devnet",C8e="solana:testnet",I8e="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMxIiB2aWV3Qm94PSIwIDAgMzEgMzEiIHdpZHRoPSIzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjIwLjI1IiB4Mj0iMjYuNTcxIiB5MT0iMjcuMTczIiB5Mj0iMTkuODU4Ij48c3RvcCBvZmZzZXQ9Ii4wOCIgc3RvcC1jb2xvcj0iIzk5NDVmZiIvPjxzdG9wIG9mZnNldD0iLjMiIHN0b3AtY29sb3I9IiM4NzUyZjMiLz48c3RvcCBvZmZzZXQ9Ii41IiBzdG9wLWNvbG9yPSIjNTQ5N2Q1Ii8+PHN0b3Agb2Zmc2V0PSIuNiIgc3RvcC1jb2xvcj0iIzQzYjRjYSIvPjxzdG9wIG9mZnNldD0iLjcyIiBzdG9wLWNvbG9yPSIjMjhlMGI5Ii8+PHN0b3Agb2Zmc2V0PSIuOTciIHN0b3AtY29sb3I9IiMxOWZiOWIiLz48L2xpbmVhckdyYWRpZW50PjxnIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjA5NCI+PHBhdGggZD0ibTI2LjEwOSAzLjY0My05LjM2OSA2Ljk1OSAxLjczMy00LjEwNSA3LjYzNy0yLjg1M3oiIGZpbGw9IiNlMjc2MWIiIHN0cm9rZT0iI2UyNzYxYiIvPjxnIGZpbGw9IiNlNDc2MWIiIHN0cm9rZT0iI2U0NzYxYiI+PHBhdGggZD0ibTQuNDgxIDMuNjQzIDkuMjk0IDcuMDI0LTEuNjQ4LTQuMTcxem0xOC4yNTggMTYuMTMtMi40OTUgMy44MjMgNS4zMzkgMS40NjkgMS41MzUtNS4yMDctNC4zNzgtLjA4NXptLTE5LjI0Ny4wODUgMS41MjUgNS4yMDcgNS4zMzktMS40NjktMi40OTUtMy44MjN6Ii8+PHBhdGggZD0ibTEwLjA1NSAxMy4zMTMtMS40ODggMi4yNTEgNS4zMDEuMjM1LS4xODgtNS42OTd6bTEwLjQ4IDAtMy42NzItMy4yNzctLjEyMiA1Ljc2MyA1LjI5Mi0uMjM1LTEuNDk3LTIuMjUxem0tMTAuMTc4IDEwLjI4MyAzLjE4My0xLjU1NC0yLjc0OS0yLjE0Ny0uNDMzIDMuNzAxem02LjY5NS0xLjU1NCAzLjE5MiAxLjU1NC0uNDQzLTMuNzAxeiIvPjwvZz48cGF0aCBkPSJtMjAuMjQ0IDIzLjU5Ni0zLjE5Mi0xLjU1NC4yNTQgMi4wODEtLjAyOC44NzZ6bS05Ljg4NyAwIDIuOTY2IDEuNDAzLS4wMTktLjg3Ni4yMzUtMi4wODEtMy4xODMgMS41NTR6IiBmaWxsPSIjZDdjMWIzIiBzdHJva2U9IiNkN2MxYjMiLz48cGF0aCBkPSJtMTMuMzY5IDE4LjUyMS0yLjY1NS0uNzgxIDEuODc0LS44NTd6bTMuODUxIDAgLjc4MS0xLjYzOCAxLjg4My44NTctMi42NjUuNzgxeiIgZmlsbD0iIzIzMzQ0NyIgc3Ryb2tlPSIjMjMzNDQ3Ii8+PHBhdGggZD0ibTEwLjM1NyAyMy41OTYuNDUyLTMuODIzLTIuOTQ3LjA4NXptOS40MzUtMy44MjMuNDUyIDMuODIzIDIuNDk1LTMuNzM4em0yLjI0MS00LjIwOS01LjI5Mi4yMzUuNDkgMi43MjEuNzgyLTEuNjM4IDEuODgzLjg1N3ptLTExLjMxOCAyLjE3NSAxLjg4My0uODU3Ljc3MiAxLjYzOC40OTktMi43MjEtNS4zMDEtLjIzNXoiIGZpbGw9IiNjZDYxMTYiIHN0cm9rZT0iI2NkNjExNiIvPjxwYXRoIGQ9Im04LjU2NyAxNS41NjQgMi4yMjIgNC4zMzEtLjA3NS0yLjE1NnptMTEuMzI4IDIuMTc1LS4wOTQgMi4xNTYgMi4yMzItNC4zMzEtMi4xMzcgMi4xNzV6bS02LjAyNi0xLjk0LS40OTkgMi43MjEuNjIxIDMuMjExLjE0MS00LjIyOC0uMjY0LTEuNzA0em0yLjg3MiAwLS4yNTQgMS42OTUuMTEzIDQuMjM3LjYzMS0zLjIxMXoiIGZpbGw9IiNlNDc1MWYiIHN0cm9rZT0iI2U0NzUxZiIvPjxwYXRoIGQ9Im0xNy4yMyAxOC41Mi0uNjMxIDMuMjExLjQ1Mi4zMTEgMi43NS0yLjE0Ny4wOTQtMi4xNTZ6bS02LjUxNi0uNzgxLjA3NSAyLjE1NiAyLjc1IDIuMTQ3LjQ1Mi0uMzExLS42MjItMy4yMTF6IiBmaWxsPSIjZjY4NTFiIiBzdHJva2U9IiNmNjg1MWIiLz48cGF0aCBkPSJtMTcuMjc3IDI0Ljk5OS4wMjgtLjg3Ni0uMjM1LS4yMDdoLTMuNTVsLS4yMTcuMjA3LjAxOS44NzYtMi45NjYtMS40MDMgMS4wMzYuODQ4IDIuMSAxLjQ1OWgzLjYwNmwyLjEwOS0xLjQ1OSAxLjAzNi0uODQ4eiIgZmlsbD0iI2MwYWQ5ZSIgc3Ryb2tlPSIjYzBhZDllIi8+PHBhdGggZD0ibTE3LjA1MSAyMi4wNDItLjQ1Mi0uMzExaC0yLjYwOGwtLjQ1Mi4zMTEtLjIzNSAyLjA4MS4yMTctLjIwN2gzLjU1bC4yMzUuMjA3LS4yNTQtMi4wODF6IiBmaWxsPSIjMTYxNjE2IiBzdHJva2U9IiMxNjE2MTYiLz48cGF0aCBkPSJtMjYuNTA1IDExLjA1My44LTMuODQyLTEuMTk2LTMuNTY5LTkuMDU4IDYuNzIzIDMuNDg0IDIuOTQ3IDQuOTI1IDEuNDQxIDEuMDkyLTEuMjcxLS40NzEtLjMzOS43NTMtLjY4Ny0uNTg0LS40NTIuNzUzLS41NzQtLjQ5OS0uMzc3em0tMjMuMjExLTMuODQxLjggMy44NDItLjUwOC4zNzcuNzUzLjU3NC0uNTc0LjQ1Mi43NTMuNjg3LS40NzEuMzM5IDEuMDgzIDEuMjcxIDQuOTI1LTEuNDQxIDMuNDg0LTIuOTQ3LTkuMDU5LTYuNzIzeiIgZmlsbD0iIzc2M2QxNiIgc3Ryb2tlPSIjNzYzZDE2Ii8+PHBhdGggZD0ibTI1LjQ2IDE0Ljc1NC00LjkyNS0xLjQ0MSAxLjQ5NyAyLjI1MS0yLjIzMiA0LjMzMSAyLjkzOC0uMDM4aDQuMzc4bC0xLjY1Ny01LjEwNHptLTE1LjQwNS0xLjQ0MS00LjkyNSAxLjQ0MS0xLjYzOCA1LjEwNGg0LjM2OWwyLjkyOC4wMzgtMi4yMjItNC4zMzEgMS40ODgtMi4yNTF6bTYuNjg1IDIuNDg2LjMxMS01LjQzMyAxLjQzMS0zLjg3aC02LjM1NmwxLjQxMyAzLjg3LjMyOSA1LjQzMy4xMTMgMS43MTQuMDA5IDQuMjE5aDIuNjFsLjAxOS00LjIxOS4xMjItMS43MTR6IiBmaWxsPSIjZjY4NTFiIiBzdHJva2U9IiNmNjg1MWIiLz48L2c+PGNpcmNsZSBjeD0iMjMuNSIgY3k9IjIzLjUiIGZpbGw9IiMwMDAiIHI9IjYuNSIvPjxwYXRoIGQ9Im0yNy40NzMgMjUuNTQ1LTEuMzEgMS4zNjhjLS4wMjkuMDMtLjA2My4wNTMtLjEwMS4wN2EuMzEuMzEgMCAwIDEgLS4xMjEuMDI0aC02LjIwOWMtLjAzIDAtLjA1OS0uMDA4LS4wODMtLjAyNGEuMTUuMTUgMCAwIDEgLS4wNTYtLjA2NWMtLjAxMi0uMDI2LS4wMTUtLjA1Ni0uMDEtLjA4NHMuMDE4LS4wNTUuMDM5LS4wNzZsMS4zMTEtMS4zNjhjLjAyOC0uMDMuMDYzLS4wNTMuMTAxLS4wNjlhLjMxLjMxIDAgMCAxIC4xMjEtLjAyNWg2LjIwOGMuMDMgMCAuMDU5LjAwOC4wODMuMDI0YS4xNS4xNSAwIDAgMSAuMDU2LjA2NWMuMDEyLjAyNi4wMTUuMDU2LjAxLjA4NHMtLjAxOC4wNTUtLjAzOS4wNzZ6bS0xLjMxLTIuNzU2Yy0uMDI5LS4wMy0uMDYzLS4wNTMtLjEwMS0uMDdhLjMxLjMxIDAgMCAwIC0uMTIxLS4wMjRoLTYuMjA5Yy0uMDMgMC0uMDU5LjAwOC0uMDgzLjAyNHMtLjA0NC4wMzgtLjA1Ni4wNjUtLjAxNS4wNTYtLjAxLjA4NC4wMTguMDU1LjAzOS4wNzZsMS4zMTEgMS4zNjhjLjAyOC4wMy4wNjMuMDUzLjEwMS4wNjlhLjMxLjMxIDAgMCAwIC4xMjEuMDI1aDYuMjA4Yy4wMyAwIC4wNTktLjAwOC4wODMtLjAyNGEuMTUuMTUgMCAwIDAgLjA1Ni0uMDY1Yy4wMTItLjAyNi4wMTUtLjA1Ni4wMS0uMDg0cy0uMDE4LS4wNTUtLjAzOS0uMDc2em0tNi40MzEtLjk4M2g2LjIwOWEuMzEuMzEgMCAwIDAgLjEyMS0uMDI0Yy4wMzgtLjAxNi4wNzMtLjA0LjEwMS0uMDdsMS4zMS0xLjM2OGMuMDItLjAyMS4wMzQtLjA0Ny4wMzktLjA3NnMuMDAxLS4wNTgtLjAxLS4wODRhLjE1LjE1IDAgMCAwIC0uMDU2LS4wNjVjLS4wMjUtLjAxNi0uMDU0LS4wMjQtLjA4My0uMDI0aC02LjIwOGEuMzEuMzEgMCAwIDAgLS4xMjEuMDI1Yy0uMDM4LjAxNi0uMDcyLjA0LS4xMDEuMDY5bC0xLjMxIDEuMzY4Yy0uMDIuMDIxLS4wMzQuMDQ3LS4wMzkuMDc2cy0uMDAxLjA1OC4wMS4wODQuMDMxLjA0OS4wNTYuMDY1LjA1NC4wMjQuMDgzLjAyNHoiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4=";var jr=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},M8e=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Gw,md,hk,pk,gk,cs,mk,FZ,UZ,bk,yk,wk,vk,_k;class $8e{constructor(){Gw.add(this),md.set(this,{}),hk.set(this,"1.0.0"),pk.set(this,"MetaMask"),gk.set(this,I8e),cs.set(this,null),mk.set(this,(t,r)=>(jr(this,md,"f")[t]?.push(r)||(jr(this,md,"f")[t]=[r]),()=>jr(this,Gw,"m",UZ).call(this,t,r))),bk.set(this,async()=>{if(!jr(this,cs,"f")){let t;try{t=(await Le(async()=>{const{default:r}=await Promise.resolve().then(()=>Xat);return{default:r}},void 0)).default}catch{throw new Error("Unable to load Solflare MetaMask SDK")}M8e(this,cs,new t,"f"),jr(this,cs,"f").on("standard_change",r=>jr(this,Gw,"m",FZ).call(this,"change",r))}return this.accounts.length||await jr(this,cs,"f").connect(),{accounts:this.accounts}}),yk.set(this,async()=>{jr(this,cs,"f")&&await jr(this,cs,"f").disconnect()}),wk.set(this,async(...t)=>{if(!jr(this,cs,"f"))throw new Ur;return await jr(this,cs,"f").standardSignAndSendTransaction(...t)}),vk.set(this,async(...t)=>{if(!jr(this,cs,"f"))throw new Ur;return await jr(this,cs,"f").standardSignTransaction(...t)}),_k.set(this,async(...t)=>{if(!jr(this,cs,"f"))throw new Ur;return await jr(this,cs,"f").standardSignMessage(...t)})}get version(){return jr(this,hk,"f")}get name(){return jr(this,pk,"f")}get icon(){return jr(this,gk,"f")}get chains(){return[A8e,S8e,C8e]}get features(){return{[MK]:{version:"1.0.0",connect:jr(this,bk,"f")},[abe]:{version:"1.0.0",disconnect:jr(this,yk,"f")},[$K]:{version:"1.0.0",on:jr(this,mk,"f")},[TC]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:jr(this,wk,"f")},[NC]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:jr(this,vk,"f")},[IK]:{version:"1.0.0",signMessage:jr(this,_k,"f")}}}get accounts(){return jr(this,cs,"f")?jr(this,cs,"f").standardAccounts:[]}}md=new WeakMap,hk=new WeakMap,pk=new WeakMap,gk=new WeakMap,cs=new WeakMap,mk=new WeakMap,bk=new WeakMap,yk=new WeakMap,wk=new WeakMap,vk=new WeakMap,_k=new WeakMap,Gw=new WeakSet,FZ=function(t,...r){jr(this,md,"f")[t]?.forEach(n=>n.apply(null,r))},UZ=function(t,r){jr(this,md,"f")[t]=jr(this,md,"f")[t]?.filter(n=>r!==n)};let JP=!1;function T8e(){JP||(E8e(new $8e),JP=!0)}async function N8e(){const e="solflare-detect-metamask";function t(){window.postMessage({target:"metamask-contentscript",data:{name:"metamask-provider",data:{id:e,jsonrpc:"2.0",method:"wallet_getSnaps"}}},window.location.origin)}function r(n){const i=n.data;i?.target==="metamask-inpage"&&i.data?.name==="metamask-provider"&&(i.data.data?.id===e?(window.removeEventListener("message",r),i.data.data.error||T8e()):t())}window.addEventListener("message",r),window.setTimeout(()=>window.removeEventListener("message",r),5e3),t()}const O8e="Solflare";class l1t extends g4{constructor(t={}){super(),this.name=O8e,this.url="https://solflare.com",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJTIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MCA1MCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMwMjA1MGE7c3Ryb2tlOiNmZmVmNDY7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOi41cHg7fS5jbHMtMntmaWxsOiNmZmVmNDY7fTwvc3R5bGU+PC9kZWZzPjxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMCIgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiByeD0iMTIiIHJ5PSIxMiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTI0LjIzLDI2LjQybDIuNDYtMi4zOCw0LjU5LDEuNWMzLjAxLDEsNC41MSwyLjg0LDQuNTEsNS40MywwLDEuOTYtLjc1LDMuMjYtMi4yNSw0LjkzbC0uNDYuNS4xNy0xLjE3Yy42Ny00LjI2LS41OC02LjA5LTQuNzItNy40M2wtNC4zLTEuMzhoMFpNMTguMDUsMTEuODVsMTIuNTIsNC4xNy0yLjcxLDIuNTktNi41MS0yLjE3Yy0yLjI1LS43NS0zLjAxLTEuOTYtMy4zLTQuNTF2LS4wOGgwWk0xNy4zLDMzLjA2bDIuODQtMi43MSw1LjM0LDEuNzVjMi44LjkyLDMuNzYsMi4xMywzLjQ2LDUuMThsLTExLjY1LTQuMjJoMFpNMTMuNzEsMjAuOTVjMC0uNzkuNDItMS41NCwxLjEzLTIuMTcuNzUsMS4wOSwyLjA1LDIuMDUsNC4wOSwyLjcxbDQuNDIsMS40Ni0yLjQ2LDIuMzgtNC4zNC0xLjQyYy0yLS42Ny0yLjg0LTEuNjctMi44NC0yLjk2TTI2LjgyLDQyLjg3YzkuMTgtNi4wOSwxNC4xMS0xMC4yMywxNC4xMS0xNS4zMiwwLTMuMzgtMi01LjI2LTYuNDMtNi43MmwtMy4zNC0xLjEzLDkuMTQtOC43Ny0xLjg0LTEuOTYtMi43MSwyLjM4LTEyLjgxLTQuMjJjLTMuOTcsMS4yOS04Ljk3LDUuMDktOC45Nyw4Ljg5LDAsLjQyLjA0LjgzLjE3LDEuMjktMy4zLDEuODgtNC42MywzLjYzLTQuNjMsNS44LDAsMi4wNSwxLjA5LDQuMDksNC41NSw1LjIybDIuNzUuOTItOS41Miw5LjE0LDEuODQsMS45NiwyLjk2LTIuNzEsMTQuNzMsNS4yMmgwWiIvPjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?jt.Unsupported:jt.Loadable,this._disconnected=()=>{const r=this._wallet;r&&(r.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new Z2),this.emit("disconnect"))},this._accountChanged=r=>{if(!r)return;const n=this._publicKey;if(n){try{r=new bt(r.toBytes())}catch(i){this.emit("error",new jd(i?.message,i));return}n.equals(r)||(this._publicKey=r,this.emit("connect",r))}},this._connecting=!1,this._publicKey=null,this._wallet=null,this._config=t,this._readyState!==jt.Unsupported&&($C(()=>window.solflare?.isSolflare||window.SolflareApp?(this._readyState=jt.Installed,this.emit("readyStateChange",this._readyState),!0):!1),N8e())}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.connected}get readyState(){return this._readyState}async autoConnect(){this.readyState===jt.Loadable&&UE()||await this.connect()}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==jt.Loadable&&this._readyState!==jt.Installed)throw new Rc;if(this.readyState===jt.Loadable&&UE()){const i=encodeURIComponent(window.location.href),s=encodeURIComponent(window.location.origin);window.location.href=`https://solflare.com/ul/v1/browse/${i}?ref=${s}`;return}let t;try{t=(await Le(async()=>{const{default:i}=await Promise.resolve().then(()=>_ct);return{default:i}},void 0)).default}catch(i){throw new ibe(i?.message,i)}let r;try{r=new t({network:this._config.network})}catch(i){throw new Q0(i?.message,i)}if(this._connecting=!0,!r.connected)try{await r.connect()}catch(i){throw new Nc(i?.message,i)}if(!r.publicKey)throw new Nc;let n;try{n=new bt(r.publicKey.toBytes())}catch(i){throw new jd(i?.message,i)}r.on("disconnect",this._disconnected),r.on("accountChanged",this._accountChanged),this._wallet=r,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),t.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(r){this.emit("error",new p4(r?.message,r))}}this.emit("disconnect")}async sendTransaction(t,r,n={}){try{const i=this._wallet;if(!i)throw new Ur;try{const{signers:s,...o}=n;return Ba(t)?s?.length&&t.sign(s):(t=await this.prepareTransaction(t,r,o),s?.length&&t.partialSign(...s)),o.preflightCommitment=o.preflightCommitment||r.commitment,await i.signAndSendTransaction(t,o)}catch(s){throw s instanceof Wn?s:new zu(s?.message,s)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signTransaction(t)||t}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAllTransactions(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAllTransactions(t)||t}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signMessage(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signMessage(t,"utf8")}catch(n){throw new Y2(n?.message,n)}}catch(r){throw this.emit("error",r),r}}}var Kv;(function(e){e.Mainnet="solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",e.Devnet="solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",e.Deprecated_Mainnet="solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ",e.Deprecated_Devnet="solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"})(Kv||(Kv={}));var ta;(function(e){e.signTransaction="solana_signTransaction",e.signMessage="solana_signMessage",e.signAndSendTransaction="solana_signAndSendTransaction",e.signAndSendAllTransactions="solana_signAndSendAllTransactions",e.signAllTransactions="solana_signAllTransactions"})(ta||(ta={}));const Yn={Mainnet:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",Devnet:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",Deprecated_Mainnet:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ",Deprecated_Devnet:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"};var M_={};/*! *****************************************************************************
664
+ `,r)}}class k8e extends Event{get detail(){return _8e(this,Kw,"f")}get type(){return"wallet-standard:register-wallet"}constructor(t){super("wallet-standard:register-wallet",{bubbles:!1,cancelable:!1,composed:!1}),Kw.set(this,void 0),x8e(this,Kw,t,"f")}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}Kw=new WeakMap;const A8e="solana:mainnet",S8e="solana:devnet",C8e="solana:testnet",I8e="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMxIiB2aWV3Qm94PSIwIDAgMzEgMzEiIHdpZHRoPSIzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjIwLjI1IiB4Mj0iMjYuNTcxIiB5MT0iMjcuMTczIiB5Mj0iMTkuODU4Ij48c3RvcCBvZmZzZXQ9Ii4wOCIgc3RvcC1jb2xvcj0iIzk5NDVmZiIvPjxzdG9wIG9mZnNldD0iLjMiIHN0b3AtY29sb3I9IiM4NzUyZjMiLz48c3RvcCBvZmZzZXQ9Ii41IiBzdG9wLWNvbG9yPSIjNTQ5N2Q1Ii8+PHN0b3Agb2Zmc2V0PSIuNiIgc3RvcC1jb2xvcj0iIzQzYjRjYSIvPjxzdG9wIG9mZnNldD0iLjcyIiBzdG9wLWNvbG9yPSIjMjhlMGI5Ii8+PHN0b3Agb2Zmc2V0PSIuOTciIHN0b3AtY29sb3I9IiMxOWZiOWIiLz48L2xpbmVhckdyYWRpZW50PjxnIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iLjA5NCI+PHBhdGggZD0ibTI2LjEwOSAzLjY0My05LjM2OSA2Ljk1OSAxLjczMy00LjEwNSA3LjYzNy0yLjg1M3oiIGZpbGw9IiNlMjc2MWIiIHN0cm9rZT0iI2UyNzYxYiIvPjxnIGZpbGw9IiNlNDc2MWIiIHN0cm9rZT0iI2U0NzYxYiI+PHBhdGggZD0ibTQuNDgxIDMuNjQzIDkuMjk0IDcuMDI0LTEuNjQ4LTQuMTcxem0xOC4yNTggMTYuMTMtMi40OTUgMy44MjMgNS4zMzkgMS40NjkgMS41MzUtNS4yMDctNC4zNzgtLjA4NXptLTE5LjI0Ny4wODUgMS41MjUgNS4yMDcgNS4zMzktMS40NjktMi40OTUtMy44MjN6Ii8+PHBhdGggZD0ibTEwLjA1NSAxMy4zMTMtMS40ODggMi4yNTEgNS4zMDEuMjM1LS4xODgtNS42OTd6bTEwLjQ4IDAtMy42NzItMy4yNzctLjEyMiA1Ljc2MyA1LjI5Mi0uMjM1LTEuNDk3LTIuMjUxem0tMTAuMTc4IDEwLjI4MyAzLjE4My0xLjU1NC0yLjc0OS0yLjE0Ny0uNDMzIDMuNzAxem02LjY5NS0xLjU1NCAzLjE5MiAxLjU1NC0uNDQzLTMuNzAxeiIvPjwvZz48cGF0aCBkPSJtMjAuMjQ0IDIzLjU5Ni0zLjE5Mi0xLjU1NC4yNTQgMi4wODEtLjAyOC44NzZ6bS05Ljg4NyAwIDIuOTY2IDEuNDAzLS4wMTktLjg3Ni4yMzUtMi4wODEtMy4xODMgMS41NTR6IiBmaWxsPSIjZDdjMWIzIiBzdHJva2U9IiNkN2MxYjMiLz48cGF0aCBkPSJtMTMuMzY5IDE4LjUyMS0yLjY1NS0uNzgxIDEuODc0LS44NTd6bTMuODUxIDAgLjc4MS0xLjYzOCAxLjg4My44NTctMi42NjUuNzgxeiIgZmlsbD0iIzIzMzQ0NyIgc3Ryb2tlPSIjMjMzNDQ3Ii8+PHBhdGggZD0ibTEwLjM1NyAyMy41OTYuNDUyLTMuODIzLTIuOTQ3LjA4NXptOS40MzUtMy44MjMuNDUyIDMuODIzIDIuNDk1LTMuNzM4em0yLjI0MS00LjIwOS01LjI5Mi4yMzUuNDkgMi43MjEuNzgyLTEuNjM4IDEuODgzLjg1N3ptLTExLjMxOCAyLjE3NSAxLjg4My0uODU3Ljc3MiAxLjYzOC40OTktMi43MjEtNS4zMDEtLjIzNXoiIGZpbGw9IiNjZDYxMTYiIHN0cm9rZT0iI2NkNjExNiIvPjxwYXRoIGQ9Im04LjU2NyAxNS41NjQgMi4yMjIgNC4zMzEtLjA3NS0yLjE1NnptMTEuMzI4IDIuMTc1LS4wOTQgMi4xNTYgMi4yMzItNC4zMzEtMi4xMzcgMi4xNzV6bS02LjAyNi0xLjk0LS40OTkgMi43MjEuNjIxIDMuMjExLjE0MS00LjIyOC0uMjY0LTEuNzA0em0yLjg3MiAwLS4yNTQgMS42OTUuMTEzIDQuMjM3LjYzMS0zLjIxMXoiIGZpbGw9IiNlNDc1MWYiIHN0cm9rZT0iI2U0NzUxZiIvPjxwYXRoIGQ9Im0xNy4yMyAxOC41Mi0uNjMxIDMuMjExLjQ1Mi4zMTEgMi43NS0yLjE0Ny4wOTQtMi4xNTZ6bS02LjUxNi0uNzgxLjA3NSAyLjE1NiAyLjc1IDIuMTQ3LjQ1Mi0uMzExLS42MjItMy4yMTF6IiBmaWxsPSIjZjY4NTFiIiBzdHJva2U9IiNmNjg1MWIiLz48cGF0aCBkPSJtMTcuMjc3IDI0Ljk5OS4wMjgtLjg3Ni0uMjM1LS4yMDdoLTMuNTVsLS4yMTcuMjA3LjAxOS44NzYtMi45NjYtMS40MDMgMS4wMzYuODQ4IDIuMSAxLjQ1OWgzLjYwNmwyLjEwOS0xLjQ1OSAxLjAzNi0uODQ4eiIgZmlsbD0iI2MwYWQ5ZSIgc3Ryb2tlPSIjYzBhZDllIi8+PHBhdGggZD0ibTE3LjA1MSAyMi4wNDItLjQ1Mi0uMzExaC0yLjYwOGwtLjQ1Mi4zMTEtLjIzNSAyLjA4MS4yMTctLjIwN2gzLjU1bC4yMzUuMjA3LS4yNTQtMi4wODF6IiBmaWxsPSIjMTYxNjE2IiBzdHJva2U9IiMxNjE2MTYiLz48cGF0aCBkPSJtMjYuNTA1IDExLjA1My44LTMuODQyLTEuMTk2LTMuNTY5LTkuMDU4IDYuNzIzIDMuNDg0IDIuOTQ3IDQuOTI1IDEuNDQxIDEuMDkyLTEuMjcxLS40NzEtLjMzOS43NTMtLjY4Ny0uNTg0LS40NTIuNzUzLS41NzQtLjQ5OS0uMzc3em0tMjMuMjExLTMuODQxLjggMy44NDItLjUwOC4zNzcuNzUzLjU3NC0uNTc0LjQ1Mi43NTMuNjg3LS40NzEuMzM5IDEuMDgzIDEuMjcxIDQuOTI1LTEuNDQxIDMuNDg0LTIuOTQ3LTkuMDU5LTYuNzIzeiIgZmlsbD0iIzc2M2QxNiIgc3Ryb2tlPSIjNzYzZDE2Ii8+PHBhdGggZD0ibTI1LjQ2IDE0Ljc1NC00LjkyNS0xLjQ0MSAxLjQ5NyAyLjI1MS0yLjIzMiA0LjMzMSAyLjkzOC0uMDM4aDQuMzc4bC0xLjY1Ny01LjEwNHptLTE1LjQwNS0xLjQ0MS00LjkyNSAxLjQ0MS0xLjYzOCA1LjEwNGg0LjM2OWwyLjkyOC4wMzgtMi4yMjItNC4zMzEgMS40ODgtMi4yNTF6bTYuNjg1IDIuNDg2LjMxMS01LjQzMyAxLjQzMS0zLjg3aC02LjM1NmwxLjQxMyAzLjg3LjMyOSA1LjQzMy4xMTMgMS43MTQuMDA5IDQuMjE5aDIuNjFsLjAxOS00LjIxOS4xMjItMS43MTR6IiBmaWxsPSIjZjY4NTFiIiBzdHJva2U9IiNmNjg1MWIiLz48L2c+PGNpcmNsZSBjeD0iMjMuNSIgY3k9IjIzLjUiIGZpbGw9IiMwMDAiIHI9IjYuNSIvPjxwYXRoIGQ9Im0yNy40NzMgMjUuNTQ1LTEuMzEgMS4zNjhjLS4wMjkuMDMtLjA2My4wNTMtLjEwMS4wN2EuMzEuMzEgMCAwIDEgLS4xMjEuMDI0aC02LjIwOWMtLjAzIDAtLjA1OS0uMDA4LS4wODMtLjAyNGEuMTUuMTUgMCAwIDEgLS4wNTYtLjA2NWMtLjAxMi0uMDI2LS4wMTUtLjA1Ni0uMDEtLjA4NHMuMDE4LS4wNTUuMDM5LS4wNzZsMS4zMTEtMS4zNjhjLjAyOC0uMDMuMDYzLS4wNTMuMTAxLS4wNjlhLjMxLjMxIDAgMCAxIC4xMjEtLjAyNWg2LjIwOGMuMDMgMCAuMDU5LjAwOC4wODMuMDI0YS4xNS4xNSAwIDAgMSAuMDU2LjA2NWMuMDEyLjAyNi4wMTUuMDU2LjAxLjA4NHMtLjAxOC4wNTUtLjAzOS4wNzZ6bS0xLjMxLTIuNzU2Yy0uMDI5LS4wMy0uMDYzLS4wNTMtLjEwMS0uMDdhLjMxLjMxIDAgMCAwIC0uMTIxLS4wMjRoLTYuMjA5Yy0uMDMgMC0uMDU5LjAwOC0uMDgzLjAyNHMtLjA0NC4wMzgtLjA1Ni4wNjUtLjAxNS4wNTYtLjAxLjA4NC4wMTguMDU1LjAzOS4wNzZsMS4zMTEgMS4zNjhjLjAyOC4wMy4wNjMuMDUzLjEwMS4wNjlhLjMxLjMxIDAgMCAwIC4xMjEuMDI1aDYuMjA4Yy4wMyAwIC4wNTktLjAwOC4wODMtLjAyNGEuMTUuMTUgMCAwIDAgLjA1Ni0uMDY1Yy4wMTItLjAyNi4wMTUtLjA1Ni4wMS0uMDg0cy0uMDE4LS4wNTUtLjAzOS0uMDc2em0tNi40MzEtLjk4M2g2LjIwOWEuMzEuMzEgMCAwIDAgLjEyMS0uMDI0Yy4wMzgtLjAxNi4wNzMtLjA0LjEwMS0uMDdsMS4zMS0xLjM2OGMuMDItLjAyMS4wMzQtLjA0Ny4wMzktLjA3NnMuMDAxLS4wNTgtLjAxLS4wODRhLjE1LjE1IDAgMCAwIC0uMDU2LS4wNjVjLS4wMjUtLjAxNi0uMDU0LS4wMjQtLjA4My0uMDI0aC02LjIwOGEuMzEuMzEgMCAwIDAgLS4xMjEuMDI1Yy0uMDM4LjAxNi0uMDcyLjA0LS4xMDEuMDY5bC0xLjMxIDEuMzY4Yy0uMDIuMDIxLS4wMzQuMDQ3LS4wMzkuMDc2cy0uMDAxLjA1OC4wMS4wODQuMDMxLjA0OS4wNTYuMDY1LjA1NC4wMjQuMDgzLjAyNHoiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4=";var jr=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},M8e=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Gw,md,hk,pk,gk,cs,mk,FZ,UZ,bk,yk,wk,vk,_k;class $8e{constructor(){Gw.add(this),md.set(this,{}),hk.set(this,"1.0.0"),pk.set(this,"MetaMask"),gk.set(this,I8e),cs.set(this,null),mk.set(this,(t,r)=>(jr(this,md,"f")[t]?.push(r)||(jr(this,md,"f")[t]=[r]),()=>jr(this,Gw,"m",UZ).call(this,t,r))),bk.set(this,async()=>{if(!jr(this,cs,"f")){let t;try{t=(await Le(async()=>{const{default:r}=await Promise.resolve().then(()=>Xat);return{default:r}},void 0)).default}catch{throw new Error("Unable to load Solflare MetaMask SDK")}M8e(this,cs,new t,"f"),jr(this,cs,"f").on("standard_change",r=>jr(this,Gw,"m",FZ).call(this,"change",r))}return this.accounts.length||await jr(this,cs,"f").connect(),{accounts:this.accounts}}),yk.set(this,async()=>{jr(this,cs,"f")&&await jr(this,cs,"f").disconnect()}),wk.set(this,async(...t)=>{if(!jr(this,cs,"f"))throw new Ur;return await jr(this,cs,"f").standardSignAndSendTransaction(...t)}),vk.set(this,async(...t)=>{if(!jr(this,cs,"f"))throw new Ur;return await jr(this,cs,"f").standardSignTransaction(...t)}),_k.set(this,async(...t)=>{if(!jr(this,cs,"f"))throw new Ur;return await jr(this,cs,"f").standardSignMessage(...t)})}get version(){return jr(this,hk,"f")}get name(){return jr(this,pk,"f")}get icon(){return jr(this,gk,"f")}get chains(){return[A8e,S8e,C8e]}get features(){return{[MK]:{version:"1.0.0",connect:jr(this,bk,"f")},[abe]:{version:"1.0.0",disconnect:jr(this,yk,"f")},[$K]:{version:"1.0.0",on:jr(this,mk,"f")},[TC]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:jr(this,wk,"f")},[NC]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:jr(this,vk,"f")},[IK]:{version:"1.0.0",signMessage:jr(this,_k,"f")}}}get accounts(){return jr(this,cs,"f")?jr(this,cs,"f").standardAccounts:[]}}md=new WeakMap,hk=new WeakMap,pk=new WeakMap,gk=new WeakMap,cs=new WeakMap,mk=new WeakMap,bk=new WeakMap,yk=new WeakMap,wk=new WeakMap,vk=new WeakMap,_k=new WeakMap,Gw=new WeakSet,FZ=function(t,...r){jr(this,md,"f")[t]?.forEach(n=>n.apply(null,r))},UZ=function(t,r){jr(this,md,"f")[t]=jr(this,md,"f")[t]?.filter(n=>r!==n)};let JP=!1;function T8e(){JP||(E8e(new $8e),JP=!0)}async function N8e(){const e="solflare-detect-metamask";function t(){window.postMessage({target:"metamask-contentscript",data:{name:"metamask-provider",data:{id:e,jsonrpc:"2.0",method:"wallet_getSnaps"}}},window.location.origin)}function r(n){const i=n.data;i?.target==="metamask-inpage"&&i.data?.name==="metamask-provider"&&(i.data.data?.id===e?(window.removeEventListener("message",r),i.data.data.error||T8e()):t())}window.addEventListener("message",r),window.setTimeout(()=>window.removeEventListener("message",r),5e3),t()}const O8e="Solflare";class f1t extends g4{constructor(t={}){super(),this.name=O8e,this.url="https://solflare.com",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJTIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MCA1MCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMwMjA1MGE7c3Ryb2tlOiNmZmVmNDY7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOi41cHg7fS5jbHMtMntmaWxsOiNmZmVmNDY7fTwvc3R5bGU+PC9kZWZzPjxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMCIgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIiByeD0iMTIiIHJ5PSIxMiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTI0LjIzLDI2LjQybDIuNDYtMi4zOCw0LjU5LDEuNWMzLjAxLDEsNC41MSwyLjg0LDQuNTEsNS40MywwLDEuOTYtLjc1LDMuMjYtMi4yNSw0LjkzbC0uNDYuNS4xNy0xLjE3Yy42Ny00LjI2LS41OC02LjA5LTQuNzItNy40M2wtNC4zLTEuMzhoMFpNMTguMDUsMTEuODVsMTIuNTIsNC4xNy0yLjcxLDIuNTktNi41MS0yLjE3Yy0yLjI1LS43NS0zLjAxLTEuOTYtMy4zLTQuNTF2LS4wOGgwWk0xNy4zLDMzLjA2bDIuODQtMi43MSw1LjM0LDEuNzVjMi44LjkyLDMuNzYsMi4xMywzLjQ2LDUuMThsLTExLjY1LTQuMjJoMFpNMTMuNzEsMjAuOTVjMC0uNzkuNDItMS41NCwxLjEzLTIuMTcuNzUsMS4wOSwyLjA1LDIuMDUsNC4wOSwyLjcxbDQuNDIsMS40Ni0yLjQ2LDIuMzgtNC4zNC0xLjQyYy0yLS42Ny0yLjg0LTEuNjctMi44NC0yLjk2TTI2LjgyLDQyLjg3YzkuMTgtNi4wOSwxNC4xMS0xMC4yMywxNC4xMS0xNS4zMiwwLTMuMzgtMi01LjI2LTYuNDMtNi43MmwtMy4zNC0xLjEzLDkuMTQtOC43Ny0xLjg0LTEuOTYtMi43MSwyLjM4LTEyLjgxLTQuMjJjLTMuOTcsMS4yOS04Ljk3LDUuMDktOC45Nyw4Ljg5LDAsLjQyLjA0LjgzLjE3LDEuMjktMy4zLDEuODgtNC42MywzLjYzLTQuNjMsNS44LDAsMi4wNSwxLjA5LDQuMDksNC41NSw1LjIybDIuNzUuOTItOS41Miw5LjE0LDEuODQsMS45NiwyLjk2LTIuNzEsMTQuNzMsNS4yMmgwWiIvPjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?jt.Unsupported:jt.Loadable,this._disconnected=()=>{const r=this._wallet;r&&(r.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new Z2),this.emit("disconnect"))},this._accountChanged=r=>{if(!r)return;const n=this._publicKey;if(n){try{r=new bt(r.toBytes())}catch(i){this.emit("error",new jd(i?.message,i));return}n.equals(r)||(this._publicKey=r,this.emit("connect",r))}},this._connecting=!1,this._publicKey=null,this._wallet=null,this._config=t,this._readyState!==jt.Unsupported&&($C(()=>window.solflare?.isSolflare||window.SolflareApp?(this._readyState=jt.Installed,this.emit("readyStateChange",this._readyState),!0):!1),N8e())}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.connected}get readyState(){return this._readyState}async autoConnect(){this.readyState===jt.Loadable&&UE()||await this.connect()}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==jt.Loadable&&this._readyState!==jt.Installed)throw new Rc;if(this.readyState===jt.Loadable&&UE()){const i=encodeURIComponent(window.location.href),s=encodeURIComponent(window.location.origin);window.location.href=`https://solflare.com/ul/v1/browse/${i}?ref=${s}`;return}let t;try{t=(await Le(async()=>{const{default:i}=await Promise.resolve().then(()=>_ct);return{default:i}},void 0)).default}catch(i){throw new ibe(i?.message,i)}let r;try{r=new t({network:this._config.network})}catch(i){throw new Q0(i?.message,i)}if(this._connecting=!0,!r.connected)try{await r.connect()}catch(i){throw new Nc(i?.message,i)}if(!r.publicKey)throw new Nc;let n;try{n=new bt(r.publicKey.toBytes())}catch(i){throw new jd(i?.message,i)}r.on("disconnect",this._disconnected),r.on("accountChanged",this._accountChanged),this._wallet=r,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),t.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(r){this.emit("error",new p4(r?.message,r))}}this.emit("disconnect")}async sendTransaction(t,r,n={}){try{const i=this._wallet;if(!i)throw new Ur;try{const{signers:s,...o}=n;return Ba(t)?s?.length&&t.sign(s):(t=await this.prepareTransaction(t,r,o),s?.length&&t.partialSign(...s)),o.preflightCommitment=o.preflightCommitment||r.commitment,await i.signAndSendTransaction(t,o)}catch(s){throw s instanceof Wn?s:new zu(s?.message,s)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signTransaction(t)||t}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAllTransactions(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAllTransactions(t)||t}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signMessage(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signMessage(t,"utf8")}catch(n){throw new Y2(n?.message,n)}}catch(r){throw this.emit("error",r),r}}}var Kv;(function(e){e.Mainnet="solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",e.Devnet="solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",e.Deprecated_Mainnet="solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ",e.Deprecated_Devnet="solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"})(Kv||(Kv={}));var ta;(function(e){e.signTransaction="solana_signTransaction",e.signMessage="solana_signMessage",e.signAndSendTransaction="solana_signAndSendTransaction",e.signAndSendAllTransactions="solana_signAndSendAllTransactions",e.signAllTransactions="solana_signAllTransactions"})(ta||(ta={}));const Yn={Mainnet:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",Devnet:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",Deprecated_Mainnet:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ",Deprecated_Devnet:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"};var M_={};/*! *****************************************************************************
665
665
  Copyright (c) Microsoft Corporation.
666
666
 
667
667
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1612,7 +1612,7 @@ ${e.length}`,r=new TextEncoder().encode(t+e);return"0x"+Buffer.from(TYe(r)).toSt
1612
1612
  --local-color-4: ${c[3]};
1613
1613
  --local-color-5: ${c[4]};
1614
1614
  --local-radial-circle: ${a}
1615
- `},hexToRgb(e){const t=parseInt(e,16),r=t>>16&255,n=t>>8&255,i=t&255;return[r,n,i]},tintColor(e,t){const[r,n,i]=e,s=Math.round(r+(255-r)*t),o=Math.round(n+(255-n)*t),a=Math.round(i+(255-i)*t);return[s,o,a]},isNumber(e){return{number:/^[0-9]+$/u}.number.test(e)},getColorTheme(e){return e||(typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)")?.matches?"dark":"light":"dark")},splitBalance(e){const t=e.split(".");return t.length===2?[t[0],t[1]]:["0","00"]},roundNumber(e,t,r){return e.toString().length>=t?Number(e).toFixed(r):e},formatNumberToLocalString(e,t=2){return e===void 0?"0.00":typeof e=="number"?e.toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t}):parseFloat(e).toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t})}};function Brt(e,t){const{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(i){customElements.get(e)||customElements.define(e,i)}}}function Frt(e,t){return customElements.get(e)||customElements.define(e,t),t}function at(e){return function(r){return typeof r=="function"?Frt(e,r):Brt(e,r)}}const vw={ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3,ERROR_INVALID_CHAIN_ID:32603};function Nb(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}const tS=Nb({id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",network:"solana-mainnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!1,chainNamespace:"solana",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",deprecatedCaipNetworkId:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"}),rS=Nb({id:"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",name:"Solana Devnet",network:"solana-devnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",deprecatedCaipNetworkId:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"}),Urt=Nb({id:"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",name:"Solana Testnet",network:"solana-testnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"});Nb({id:"000000000019d6689c085ae165831e93",caipNetworkId:"bip122:000000000019d6689c085ae165831e93",chainNamespace:"bip122",name:"Bitcoin",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}});Nb({id:"000000000933ea01ad0ee984209779ba",caipNetworkId:"bip122:000000000933ea01ad0ee984209779ba",chainNamespace:"bip122",name:"Bitcoin Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0});const qrt={solana:["solana_signMessage","solana_signTransaction","solana_requestAccounts","solana_getAccounts","solana_signAllTransactions","solana_signAndSendTransaction"],eip155:["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_showCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"],bip122:["sendTransfer","signMessage","signPsbt","getAccountAddresses"]},Ste={getMethodsByChainNamespace(e){return qrt[e]||[]},createDefaultNamespace(e){return{methods:this.getMethodsByChainNamespace(e),events:["accountsChanged","chainChanged"],chains:[],rpcMap:{}}},applyNamespaceOverrides(e,t){if(!t)return{...e};const r={...e},n=new Set;if(t.methods&&Object.keys(t.methods).forEach(i=>n.add(i)),t.chains&&Object.keys(t.chains).forEach(i=>n.add(i)),t.events&&Object.keys(t.events).forEach(i=>n.add(i)),t.rpcMap&&Object.keys(t.rpcMap).forEach(i=>{const[s]=i.split(":");s&&n.add(s)}),n.forEach(i=>{r[i]||(r[i]=this.createDefaultNamespace(i))}),t.methods&&Object.entries(t.methods).forEach(([i,s])=>{r[i]&&(r[i].methods=s)}),t.chains&&Object.entries(t.chains).forEach(([i,s])=>{r[i]&&(r[i].chains=s)}),t.events&&Object.entries(t.events).forEach(([i,s])=>{r[i]&&(r[i].events=s)}),t.rpcMap){const i=new Set;Object.entries(t.rpcMap).forEach(([s,o])=>{const[a,c]=s.split(":");!a||!c||!r[a]||(r[a].rpcMap||(r[a].rpcMap={}),i.has(a)||(r[a].rpcMap={},i.add(a)),r[a].rpcMap[c]=o)})}return r},createNamespaces(e,t){const r=e.reduce((n,i)=>{const{id:s,chainNamespace:o,rpcUrls:a}=i,c=a.default.http[0];n[o]||(n[o]=this.createDefaultNamespace(o));const u=`${o}:${s}`,l=n[o];switch(l.chains.push(u),u){case tS.caipNetworkId:l.chains.push(tS.deprecatedCaipNetworkId);break;case rS.caipNetworkId:l.chains.push(rS.deprecatedCaipNetworkId);break}return l?.rpcMap&&c&&(l.rpcMap[s]=c),n},{});return this.applyNamespaceOverrides(r,t)},resolveReownName:async e=>{const t=await gte.resolveName(e);return(Object.values(t?.addresses)||[])[0]?.address||!1},getChainsFromNamespaces(e={}){return Object.values(e).flatMap(t=>{const r=t.chains||[],n=t.accounts.map(i=>{const[s,o]=i.split(":");return`${s}:${o}`});return Array.from(new Set([...r,...n]))})},isSessionEventData(e){return typeof e=="object"&&e!==null&&"id"in e&&"topic"in e&&"params"in e&&typeof e.params=="object"&&e.params!==null&&"chainId"in e.params&&"event"in e.params&&typeof e.params.event=="object"&&e.params.event!==null}};class Cte{constructor({provider:t,caipNetworks:r,namespace:n}){this.id=vt.CONNECTOR_ID.WALLET_CONNECT,this.name=g3.ConnectorNamesMap[vt.CONNECTOR_ID.WALLET_CONNECT],this.type="WALLET_CONNECT",this.imageId=g3.ConnectorImageIds[vt.CONNECTOR_ID.WALLET_CONNECT],this.caipNetworks=r,this.provider=t,this.chain=n}get chains(){return this.caipNetworks}async connectWalletConnect(){if(!await this.authenticate()){const r=Ne.state.universalProviderConfigOverride,n=Ste.createNamespaces(this.caipNetworks,r);await this.provider.connect({optionalNamespaces:n})}return{clientId:await this.provider.client.core.crypto.getClientId(),session:this.provider.session}}async disconnect(){await this.provider.disconnect()}async authenticate(){const t=this.chains.map(r=>r.caipNetworkId);return df.universalProviderAuthenticate({universalProvider:this.provider,chains:t,methods:Hrt})}}const Hrt=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"];class Wrt{constructor(t){this.availableConnectors=[],this.eventListeners=new Map,t&&this.construct(t)}construct(t){this.caipNetworks=t.networks,this.projectId=t.projectId,this.namespace=t.namespace,this.adapterType=t.adapterType}get connectors(){return this.availableConnectors}get networks(){return this.caipNetworks||[]}setAuthProvider(t){this.addConnector({id:vt.CONNECTOR_ID.AUTH,type:"AUTH",name:vt.CONNECTOR_NAMES.AUTH,provider:t,imageId:g3.ConnectorImageIds[vt.CONNECTOR_ID.AUTH],chain:this.namespace,chains:[]})}addConnector(...t){const r=new Set;this.availableConnectors=[...t,...this.availableConnectors].filter(n=>r.has(n.id)?!1:(r.add(n.id),!0)),this.emit("connectors",this.availableConnectors)}setStatus(t,r){xt.setStatus(t,r)}on(t,r){this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t)?.add(r)}off(t,r){const n=this.eventListeners.get(t);n&&n.delete(r)}removeAllEventListeners(){this.eventListeners.forEach(t=>{t.clear()})}emit(t,r){const n=this.eventListeners.get(t);n&&n.forEach(i=>i(r))}async connectWalletConnect(t){return{clientId:(await this.getWalletConnectConnector().connectWalletConnect()).clientId}}async switchNetwork(t){const{caipNetwork:r,providerType:n}=t;if(!t.provider)return;const i="provider"in t.provider?t.provider.provider:t.provider;if(n==="WALLET_CONNECT"){i.setDefaultChain(r.caipNetworkId);return}if(i&&n==="AUTH"){const s=i;await s.switchNetwork(r.caipNetworkId);const o=await s.getUser({chainId:r.caipNetworkId,preferredAccountType:Ne.state.defaultAccountTypes[r.chainNamespace]});this.emit("switchNetwork",o)}}getWalletConnectConnector(){const t=this.connectors.find(r=>r instanceof Cte);if(!t)throw new Error("WalletConnectConnector not found");return t}}class Vrt extends Wrt{setUniversalProvider(t){this.addConnector(new Cte({provider:t,caipNetworks:this.caipNetworks||[],namespace:this.namespace}))}async connect(t){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:Number(t.chainId),provider:this.provider,address:""})}async disconnect(){try{await this.getWalletConnectConnector().disconnect()}catch(t){console.warn("UniversalAdapter:disconnect - error",t)}}async getAccounts({namespace:t}){const n=this.provider?.session?.namespaces?.[t]?.accounts?.map(i=>{const[,,s]=i.split(":");return s}).filter((i,s,o)=>o.indexOf(i)===s)||[];return Promise.resolve({accounts:n.map(i=>Fe.createAccount(t,i,t==="bip122"?"payment":"eoa"))})}async syncConnectors(){return Promise.resolve()}async getBalance(t){if(!(t.caipNetwork&&ei.BALANCE_SUPPORTED_CHAINS.includes(t.caipNetwork?.chainNamespace))||t.caipNetwork?.testnet)return{balance:"0.00",symbol:t.caipNetwork?.nativeCurrency.symbol||""};if(xt.state.balanceLoading&&t.chainId===ae.state.activeCaipNetwork?.id)return{balance:xt.state.balance||"0.00",symbol:xt.state.balanceSymbol||""};const i=(await xt.fetchTokenBalance()).find(s=>s.chainId===`${t.caipNetwork?.chainNamespace}:${t.chainId}`&&s.symbol===t.caipNetwork?.nativeCurrency.symbol);return{balance:i?.quantity.numeric||"0.00",symbol:i?.symbol||t.caipNetwork?.nativeCurrency.symbol||""}}async signMessage(t){const{provider:r,message:n,address:i}=t;if(!r)throw new Error("UniversalAdapter:signMessage - provider is undefined");let s="";return ae.state.activeCaipNetwork?.chainNamespace===vt.CHAIN.SOLANA?s=(await r.request({method:"solana_signMessage",params:{message:tm.encode(new TextEncoder().encode(n)),pubkey:i}},ae.state.activeCaipNetwork?.caipNetworkId)).signature:s=await r.request({method:"personal_sign",params:[n,i]},ae.state.activeCaipNetwork?.caipNetworkId),{signature:s}}async estimateGas(){return Promise.resolve({gas:BigInt(0)})}async getProfile(){return Promise.resolve({profileImage:"",profileName:""})}async sendTransaction(){return Promise.resolve({hash:""})}walletGetAssets(t){return Promise.resolve({})}async writeContract(){return Promise.resolve({hash:""})}async getEnsAddress(){return Promise.resolve({address:!1})}parseUnits(){return 0n}formatUnits(){return"0"}async getCapabilities(){return Promise.resolve({})}async grantPermissions(){return Promise.resolve({})}async revokePermissions(){return Promise.resolve("0x")}async syncConnection(){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:1,provider:this.provider,address:""})}async switchNetwork(t){const{caipNetwork:r}=t,n=this.getWalletConnectConnector();if(r.chainNamespace===vt.CHAIN.EVM)try{await n.provider?.request({method:"wallet_switchEthereumChain",params:[{chainId:bU(r.id)}]})}catch(i){if(i.code===vw.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||i.code===vw.ERROR_INVALID_CHAIN_ID||i.code===vw.ERROR_CODE_DEFAULT||i?.data?.originalError?.code===vw.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)try{await n.provider?.request({method:"wallet_addEthereumChain",params:[{chainId:bU(r.id),rpcUrls:[r?.rpcUrls.chainDefault?.http],chainName:r.name,nativeCurrency:r.nativeCurrency,blockExplorerUrls:[r.blockExplorers?.default.url]}]})}catch{throw new Error("Chain is not supported")}}n.provider.setDefaultChain(r.caipNetworkId)}getWalletConnectProvider(){return this.connectors.find(n=>n.type==="WALLET_CONNECT")?.provider}}class Krt{constructor(t){this.hasSwitchedToPreferredAccountTypeOnConnect=!1,this.chainNamespaces=[],this.reportedAlertErrors={},this.getCaipNetwork=r=>{if(r){const n=ae.getNetworkData(r)?.caipNetwork;return n||ae.getRequestedCaipNetworks(r).filter(i=>i.chainNamespace===r)?.[0]}return ae.state.activeCaipNetwork||this.defaultCaipNetwork},this.getCaipNetworkId=()=>{const r=this.getCaipNetwork();if(r)return r.id},this.getCaipNetworks=r=>ae.getRequestedCaipNetworks(r),this.getActiveChainNamespace=()=>ae.state.activeChain,this.setRequestedCaipNetworks=(r,n)=>{ae.setRequestedCaipNetworks(r,n)},this.getApprovedCaipNetworkIds=()=>ae.getAllApprovedCaipNetworkIds(),this.getCaipAddress=r=>ae.state.activeChain===r||!r?ae.state.activeCaipAddress:ae.getAccountProp("caipAddress",r),this.setClientId=r=>{Nt.setClientId(r)},this.getProvider=r=>bn.getProvider(r),this.getProviderType=r=>bn.getProviderId(r),this.getPreferredAccountType=()=>xt.state.preferredAccountType,this.setCaipAddress=(r,n)=>{xt.setCaipAddress(r,n)},this.setBalance=(r,n,i)=>{xt.setBalance(r,n,i)},this.setProfileName=(r,n)=>{xt.setProfileName(r,n)},this.setProfileImage=(r,n)=>{xt.setProfileImage(r,n)},this.setUser=(r,n)=>{xt.setUser(r,n),Ne.state.enableEmbedded&&or.close()},this.resetAccount=r=>{xt.resetAccount(r)},this.setCaipNetwork=r=>{ae.setActiveCaipNetwork(r)},this.setCaipNetworkOfNamespace=(r,n)=>{ae.setChainNetworkData(n,{caipNetwork:r})},this.setAllAccounts=(r,n)=>{xt.setAllAccounts(r,n),Ne.setHasMultipleAddresses(r?.length>1)},this.setStatus=(r,n)=>{xt.setStatus(r,n),Je.isConnected()?dt.setConnectionStatus("connected"):dt.setConnectionStatus("disconnected")},this.getAddressByChainNamespace=r=>ae.getAccountProp("address",r),this.setConnectors=r=>{const n=[...Je.getConnectors(),...r];Je.setConnectors(n)},this.fetchIdentity=r=>Nt.fetchIdentity(r),this.getReownName=r=>gte.getNamesForAddress(r),this.getConnectors=()=>Je.getConnectors(),this.getConnectorImage=r=>ri.getConnectorImage(r),this.setConnectedWalletInfo=(r,n)=>{const i=bn.getProviderId(n),s=r?{...r,type:i}:void 0;xt.setConnectedWalletInfo(s,n)},this.getIsConnectedState=()=>!!ae.state.activeCaipAddress,this.addAddressLabel=(r,n,i)=>{xt.addAddressLabel(r,n,i)},this.removeAddressLabel=(r,n)=>{xt.removeAddressLabel(r,n)},this.getAddress=r=>ae.state.activeChain===r||!r?xt.state.address:ae.getAccountProp("address",r),this.setApprovedCaipNetworksData=r=>ae.setApprovedCaipNetworksData(r),this.resetNetwork=r=>{ae.resetNetwork(r)},this.addConnector=r=>{Je.addConnector(r)},this.resetWcConnection=()=>{ht.resetWcConnection()},this.setAddressExplorerUrl=(r,n)=>{xt.setAddressExplorerUrl(r,n)},this.setSmartAccountDeployed=(r,n)=>{xt.setSmartAccountDeployed(r,n)},this.setSmartAccountEnabledNetworks=(r,n)=>{ae.setSmartAccountEnabledNetworks(r,n)},this.setPreferredAccountType=(r,n)=>{xt.setPreferredAccountType(r,n)},this.setEIP6963Enabled=r=>{Ne.setEIP6963Enabled(r)},this.handleUnsafeRPCRequest=()=>{if(this.isOpen()){if(this.isTransactionStackEmpty())return;this.redirect("ApproveTransaction")}else this.open({view:"ApproveTransaction"})},this.options=t,this.version=t.sdkVersion,this.caipNetworks=this.extendCaipNetworks(t),this.chainNamespaces=[...new Set(this.caipNetworks?.map(r=>r.chainNamespace))],this.defaultCaipNetwork=this.extendDefaultCaipNetwork(t),this.chainAdapters=this.createAdapters(t.adapters),this.initialize(t),this.sendInitializeEvent(t)}async initialize(t){this.initControllers(t),await this.initChainAdapters(),await this.injectModalUi(),await this.syncExistingConnection(),Hu.set({initialized:!0})}sendInitializeEvent(t){const{...r}=t;delete r.adapters,Ut.sendEvent({type:"track",event:"INITIALIZE",properties:{...r,networks:t.networks.map(n=>n.id),siweConfig:{options:t.siweConfig?.options||{}}}})}initControllers(t){this.initializeOptionsController(t),this.initializeChainController(t),this.initializeThemeController(t),this.initializeConnectionController(t),this.initializeConnectorController()}initializeThemeController(t){t.themeMode&&Jn.setThemeMode(t.themeMode),t.themeVariables&&Jn.setThemeVariables(t.themeVariables)}initializeChainController(t){if(!this.connectionControllerClient||!this.networkControllerClient)throw new Error("ConnectionControllerClient and NetworkControllerClient must be set");ae.initialize(t.adapters??[],this.caipNetworks,{connectionControllerClient:this.connectionControllerClient,networkControllerClient:this.networkControllerClient});const r=this.getDefaultNetwork();r&&ae.setActiveCaipNetwork(r)}initializeConnectionController(t){ht.setWcBasic(t.basic??!1)}initializeConnectorController(){Je.initialize(this.chainNamespaces)}initializeOptionsController(t){Ne.setDebug(t.debug!==!1),Ne.setEnableWalletConnect(t.enableWalletConnect!==!1),Ne.setEnableWalletGuide(t.enableWalletGuide!==!1),Ne.setEnableWallets(t.enableWallets!==!1),Ne.setEIP6963Enabled(t.enableEIP6963!==!1),Ne.setEnableNetworkSwitch(t.enableNetworkSwitch!==!1),Ne.setEnableAuthLogger(t.enableAuthLogger!==!1),Ne.setCustomRpcUrls(t.customRpcUrls),Ne.setSdkVersion(t.sdkVersion),Ne.setProjectId(t.projectId),Ne.setEnableEmbedded(t.enableEmbedded),Ne.setAllWallets(t.allWallets),Ne.setIncludeWalletIds(t.includeWalletIds),Ne.setExcludeWalletIds(t.excludeWalletIds),Ne.setFeaturedWalletIds(t.featuredWalletIds),Ne.setTokens(t.tokens),Ne.setTermsConditionsUrl(t.termsConditionsUrl),Ne.setPrivacyPolicyUrl(t.privacyPolicyUrl),Ne.setCustomWallets(t.customWallets),Ne.setFeatures(t.features),Ne.setAllowUnsupportedChain(t.allowUnsupportedChain),Ne.setDefaultAccountTypes(t.defaultAccountTypes),Ne.setUniversalProviderConfigOverride(t.universalProviderConfigOverride);const r=this.getDefaultMetaData();if(!t.metadata&&r&&(t.metadata=r),Ne.setMetadata(t.metadata),Ne.setDisableAppend(t.disableAppend),Ne.setEnableEmbedded(t.enableEmbedded),Ne.setSIWX(t.siwx),!t.projectId){cf.open(ww.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");return}if(t.adapters?.find(i=>i.namespace===vt.CHAIN.EVM)&&t.siweConfig){if(t.siwx)throw new Error("Cannot set both `siweConfig` and `siwx` options");Ne.setSIWX(t.siweConfig.mapToSIWX())}}getDefaultMetaData(){return typeof window<"u"&&typeof document<"u"?{name:document.getElementsByTagName("title")?.[0]?.textContent||"",description:document.querySelector('meta[property="og:description"]')?.content||"",url:window.location.origin,icons:[document.querySelector('link[rel~="icon"]')?.href||""]}:null}setUnsupportedNetwork(t){const r=this.getActiveChainNamespace();if(r){const n=Y0.getUnsupportedNetwork(`${r}:${t}`);ae.setActiveCaipNetwork(n)}}getDefaultNetwork(){return Y0.getCaipNetworkFromStorage(this.defaultCaipNetwork)}extendCaipNetwork(t,r){return Y0.extendCaipNetwork(t,{customNetworkImageUrls:r.chainImages,projectId:r.projectId})}extendCaipNetworks(t){return Y0.extendCaipNetworks(t.networks,{customNetworkImageUrls:t.chainImages,customRpcUrls:t.customRpcUrls,projectId:t.projectId})}extendDefaultCaipNetwork(t){const r=t.networks.find(i=>i.id===t.defaultNetwork?.id);return r?Y0.extendCaipNetwork(r,{customNetworkImageUrls:t.chainImages,customRpcUrls:t.customRpcUrls,projectId:t.projectId}):void 0}createClients(){this.connectionControllerClient={connectWalletConnect:async()=>{const t=ae.state.activeChain,r=this.getAdapter(t),n=this.getCaipNetwork(t)?.id;if(!r)throw new Error("Adapter not found");const i=await r.connectWalletConnect(n);this.close(),this.setClientId(i?.clientId||null),dt.setConnectedNamespaces([...ae.state.chains.keys()]),this.chainNamespaces.forEach(s=>{Je.setConnectorId(Bl.CONNECTOR_TYPE_WALLET_CONNECT,s)}),await this.syncWalletConnectAccount()},connectExternal:async({id:t,info:r,type:n,provider:i,chain:s,caipNetwork:o})=>{const a=ae.state.activeChain,c=s||a,u=this.getAdapter(c);if(s&&s!==a&&!o){const g=this.caipNetworks?.find(m=>m.chainNamespace===s);g&&this.setCaipNetwork(g)}if(!u)throw new Error("Adapter not found");const l=this.getCaipNetwork(c),d=await u.connect({id:t,info:r,type:n,provider:i,chainId:o?.id||l?.id,rpcUrl:o?.rpcUrls?.default?.http?.[0]||l?.rpcUrls?.default?.http?.[0]});if(!d)return;dt.addConnectedNamespace(c),this.syncProvider({...d,chainNamespace:c}),await this.syncAccount({...d,chainNamespace:c});const{accounts:h}=await u.getAccounts({namespace:c,id:t});this.setAllAccounts(h,c)},reconnectExternal:async({id:t,info:r,type:n,provider:i})=>{const s=ae.state.activeChain,o=this.getAdapter(s);o?.reconnect&&(await o?.reconnect({id:t,info:r,type:n,provider:i,chainId:this.getCaipNetwork()?.id}),dt.addConnectedNamespace(s))},disconnect:async t=>{const r=t||ae.state.activeChain,n=this.getAdapter(r),i=bn.getProvider(r),s=bn.getProviderId(r);await n?.disconnect({provider:i,providerType:s}),dt.removeConnectedNamespace(r),bn.resetChain(r),this.setUser(void 0,r),this.setStatus("disconnected",r),this.hasSwitchedToPreferredAccountTypeOnConnect=!1},checkInstalled:t=>t?t.some(r=>!!window.ethereum?.[String(r)]):!!window.ethereum,signMessage:async t=>(await this.getAdapter(ae.state.activeChain)?.signMessage({message:t,address:xt.state.address,provider:bn.getProvider(ae.state.activeChain)}))?.signature||"",sendTransaction:async t=>{if(t.chainNamespace===vt.CHAIN.EVM){const r=this.getAdapter(ae.state.activeChain),n=bn.getProvider(ae.state.activeChain);return(await r?.sendTransaction({...t,caipNetwork:this.getCaipNetwork(),provider:n}))?.hash||""}return""},estimateGas:async t=>{if(t.chainNamespace===vt.CHAIN.EVM){const r=this.getAdapter(ae.state.activeChain),n=bn.getProvider(ae.state.activeChain),i=this.getCaipNetwork();if(!i)throw new Error("CaipNetwork is undefined");return(await r?.estimateGas({...t,provider:n,caipNetwork:i}))?.gas||0n}return 0n},getEnsAvatar:async()=>(await this.getAdapter(ae.state.activeChain)?.getProfile({address:xt.state.address,chainId:Number(this.getCaipNetwork()?.id)}))?.profileImage||!1,getEnsAddress:async t=>{const r=this.getAdapter(ae.state.activeChain),n=this.getCaipNetwork();return n&&(await r?.getEnsAddress({name:t,caipNetwork:n}))?.address||!1},writeContract:async t=>{const r=this.getAdapter(ae.state.activeChain),n=this.getCaipNetwork(),i=this.getCaipAddress(),s=bn.getProvider(ae.state.activeChain);if(!n||!i)throw new Error("CaipNetwork or CaipAddress is undefined");return(await r?.writeContract({...t,caipNetwork:n,provider:s,caipAddress:i}))?.hash},parseUnits:(t,r)=>this.getAdapter(ae.state.activeChain)?.parseUnits({value:t,decimals:r})??0n,formatUnits:(t,r)=>this.getAdapter(ae.state.activeChain)?.formatUnits({value:t,decimals:r})??"0",getCapabilities:async t=>await this.getAdapter(ae.state.activeChain)?.getCapabilities(t),grantPermissions:async t=>await this.getAdapter(ae.state.activeChain)?.grantPermissions(t),revokePermissions:async t=>{const r=this.getAdapter(ae.state.activeChain);return r?.revokePermissions?await r.revokePermissions(t):"0x"},walletGetAssets:async t=>await this.getAdapter(ae.state.activeChain)?.walletGetAssets(t)??{}},this.networkControllerClient={switchCaipNetwork:async t=>await this.switchCaipNetwork(t),getApprovedCaipNetworksData:async()=>this.getApprovedCaipNetworksData()},ht.setClient(this.connectionControllerClient)}getApprovedCaipNetworksData(){if(bn.getProviderId(ae.state.activeChain)===Bl.CONNECTOR_TYPE_WALLET_CONNECT){const r=this.universalProvider?.session?.namespaces;return{supportsAllNetworks:this.universalProvider?.session?.peer?.metadata.name==="MetaMask Wallet",approvedCaipNetworkIds:this.getChainsFromNamespaces(r)}}return{supportsAllNetworks:!0,approvedCaipNetworkIds:[]}}async switchCaipNetwork(t){if(!t)return;const r=t.chainNamespace;if(this.getAddressByChainNamespace(t.chainNamespace)){const i=bn.getProvider(r),s=bn.getProviderId(r);if(t.chainNamespace===ae.state.activeChain)await this.getAdapter(r)?.switchNetwork({caipNetwork:t,provider:i,providerType:s});else if(this.setCaipNetwork(t),s===Bl.CONNECTOR_TYPE_WALLET_CONNECT)this.syncWalletConnectAccount();else{const o=this.getAddressByChainNamespace(r);o&&this.syncAccount({address:o,chainId:t.id,chainNamespace:r})}}else this.setCaipNetwork(t)}getChainsFromNamespaces(t={}){return Object.values(t).flatMap(r=>{const n=r.chains||[],i=r.accounts.map(s=>{const{chainId:o,chainNamespace:a}=Cl.parseCaipAddress(s);return`${a}:${o}`});return Array.from(new Set([...n,...i]))})}createAdapters(t){return this.createClients(),this.chainNamespaces.reduce((r,n)=>{const i=t?.find(s=>s.namespace===n);return i?(r[n]=i,r[n].namespace=n,r[n].construct({namespace:n,projectId:this.options?.projectId,networks:this.caipNetworks})):r[n]=new Vrt({namespace:n,networks:this.caipNetworks}),r},{})}async initChainAdapter(t){this.onConnectors(t),this.listenAdapter(t),this.chainAdapters?.[t].syncConnectors(this.options,this),await this.createUniversalProviderForAdapter(t)}async initChainAdapters(){await Promise.all(this.chainNamespaces.map(async t=>{await this.initChainAdapter(t)}))}onConnectors(t){this.getAdapter(t)?.on("connectors",this.setConnectors.bind(this))}listenAdapter(t){const r=this.getAdapter(t);if(!r)return;const n=dt.getConnectionStatus();n==="connected"?this.setStatus("connecting",t):n==="disconnected"?(dt.clearAddressCache(),this.setStatus(n,t)):this.setStatus(n,t),r.on("switchNetwork",({address:i,chainId:s})=>{const o=this.caipNetworks?.find(u=>u.id===s||u.caipNetworkId===s),a=ae.state.activeChain===t,c=ae.getAccountProp("address",t);if(o){const u=a&&i?i:c;u&&this.syncAccount({address:u,chainId:s,chainNamespace:t})}else this.setUnsupportedNetwork(s)}),r.on("disconnect",this.disconnect.bind(this,t)),r.on("pendingTransactions",()=>{const i=xt.state.address,s=ae.state.activeCaipNetwork;!i||!s?.id||this.updateNativeBalance(i,s.id,s.chainNamespace)}),r.on("accountChanged",({address:i,chainId:s})=>{const o=ae.state.activeChain===t;o&&s?this.syncAccount({address:i,chainId:s,chainNamespace:t}):o&&ae.state.activeCaipNetwork?.id?this.syncAccount({address:i,chainId:ae.state.activeCaipNetwork?.id,chainNamespace:t}):this.syncAccountInfo(i,s,t)})}async createUniversalProviderForAdapter(t){await this.getUniversalProvider(),this.universalProvider&&this.chainAdapters?.[t]?.setUniversalProvider?.(this.universalProvider)}async syncExistingConnection(){await Promise.allSettled(this.chainNamespaces.map(t=>this.syncNamespaceConnection(t)))}async syncNamespaceConnection(t){try{const r=Je.getConnectorId(t);switch(this.setStatus("connecting",t),r){case vt.CONNECTOR_ID.WALLET_CONNECT:await this.syncWalletConnectAccount();break;case vt.CONNECTOR_ID.AUTH:break;default:await this.syncAdapterConnection(t)}}catch(r){console.warn("AppKit couldn't sync existing connection",r),this.setStatus("disconnected",t)}}async syncAdapterConnection(t){const r=this.getAdapter(t),n=Je.getConnectorId(t),i=this.getCaipNetwork(t),s=Je.getConnectors(t).find(o=>o.id===n);try{if(!r||!s)throw new Error(`Adapter or connector not found for namespace ${t}`);if(!i?.id)throw new Error("CaipNetwork not found");const o=await r?.syncConnection({namespace:t,id:s.id,chainId:i.id,rpcUrl:i?.rpcUrls?.default?.http?.[0]});if(o){const a=await r?.getAccounts({namespace:t,id:s.id});a&&a.accounts.length>0?this.setAllAccounts(a.accounts,t):this.setAllAccounts([Fe.createAccount(t,o.address,"eoa")],t),this.syncProvider({...o,chainNamespace:t}),await this.syncAccount({...o,chainNamespace:t}),this.setStatus("connected",t)}else this.setStatus("disconnected",t)}catch{this.setStatus("disconnected",t)}}async syncWalletConnectAccount(){const t=this.chainNamespaces.map(async r=>{const n=this.getAdapter(r),i=this.universalProvider?.session?.namespaces?.[r]?.accounts||[],s=ae.state.activeCaipNetwork?.id,o=i.find(a=>{const{chainId:c}=Cl.parseCaipAddress(a);return c===s?.toString()})||i[0];if(o){const a=Cl.validateCaipAddress(o),{chainId:c,address:u}=Cl.parseCaipAddress(a);if(bn.setProviderId(r,Bl.CONNECTOR_TYPE_WALLET_CONNECT),this.caipNetworks&&ae.state.activeCaipNetwork&&n?.namespace!==vt.CHAIN.EVM){const l=n?.getWalletConnectProvider({caipNetworks:this.caipNetworks,provider:this.universalProvider,activeCaipNetwork:ae.state.activeCaipNetwork});bn.setProvider(r,l)}else bn.setProvider(r,this.universalProvider);Je.setConnectorId(vt.CONNECTOR_ID.WALLET_CONNECT,r),dt.addConnectedNamespace(r),this.syncWalletConnectAccounts(r),await this.syncAccount({address:u,chainId:c,chainNamespace:r})}else this.setStatus("disconnected",r);await ae.setApprovedCaipNetworksData(r)});await Promise.all(t)}syncWalletConnectAccounts(t){const r=this.universalProvider?.session?.namespaces?.[t]?.accounts?.map(n=>{const{address:i}=Cl.parseCaipAddress(n);return i}).filter((n,i,s)=>s.indexOf(n)===i);r&&this.setAllAccounts(r.map(n=>Fe.createAccount(t,n,t==="bip122"?"payment":"eoa")),t)}syncProvider({type:t,provider:r,id:n,chainNamespace:i}){bn.setProviderId(i,t),bn.setProvider(i,r),Je.setConnectorId(n,i)}async syncAccount(t){const r=t.chainNamespace===ae.state.activeChain,n=ae.getCaipNetworkByNamespace(t.chainNamespace,t.chainId),{address:i,chainId:s,chainNamespace:o}=t,{chainId:a}=dt.getActiveNetworkProps(),c=s||a,u=ae.state.activeCaipNetwork?.name===vt.UNSUPPORTED_NETWORK_NAME,l=ae.getNetworkProp("supportsAllNetworks",o);if(this.setStatus("connected",o),!(u&&!l)&&c){let d=this.caipNetworks?.find(m=>m.id.toString()===c.toString()),h=this.caipNetworks?.find(m=>m.chainNamespace===o);if(!l&&!d&&!h){const m=this.getApprovedCaipNetworkIds()||[],b=m.find(w=>Cl.parseCaipNetworkId(w)?.chainId===c.toString()),k=m.find(w=>Cl.parseCaipNetworkId(w)?.chainNamespace===o);d=this.caipNetworks?.find(w=>w.caipNetworkId===b),h=this.caipNetworks?.find(w=>w.caipNetworkId===k||"deprecatedCaipNetworkId"in w&&w.deprecatedCaipNetworkId===k)}const g=d||h;g?.chainNamespace===ae.state.activeChain?Ne.state.enableNetworkSwitch&&!Ne.state.allowUnsupportedChain&&ae.state.activeCaipNetwork?.name===vt.UNSUPPORTED_NETWORK_NAME?ae.showUnsupportedChainUI():this.setCaipNetwork(g):r||n&&this.setCaipNetworkOfNamespace(n,o),this.syncConnectedWalletInfo(o),mte.isLowerCaseMatch(i,xt.state.address)||this.syncAccountInfo(i,g?.id,o),r?await this.syncBalance({address:i,chainId:g?.id,chainNamespace:o}):await this.syncBalance({address:i,chainId:n?.id,chainNamespace:o})}}async syncAccountInfo(t,r,n){const i=this.getCaipAddress(n),s=r||i?.split(":")[1];if(!s)return;const o=`${n}:${s}:${t}`;this.setCaipAddress(o,n),await this.syncIdentity({address:t,chainId:s,chainNamespace:n})}async syncReownName(t,r){try{const n=await this.getReownName(t);if(n[0]){const i=n[0];this.setProfileName(i.name,r)}else this.setProfileName(null,r)}catch{this.setProfileName(null,r)}}syncConnectedWalletInfo(t){const r=Je.getConnectorId(t),n=bn.getProviderId(t);if(n===Bl.CONNECTOR_TYPE_ANNOUNCED||n===Bl.CONNECTOR_TYPE_INJECTED){if(r){const i=this.getConnectors().find(s=>s.id===r);if(i){const{info:s,name:o,imageUrl:a}=i,c=a||this.getConnectorImage(i);this.setConnectedWalletInfo({name:o,icon:c,...s},t)}}}else if(n===Bl.CONNECTOR_TYPE_WALLET_CONNECT){const i=bn.getProvider(t);i?.session&&this.setConnectedWalletInfo({...i.session.peer.metadata,name:i.session.peer.metadata.name,icon:i.session.peer.metadata.icons?.[0]},t)}else if(r)if(r===vt.CONNECTOR_ID.COINBASE){const i=this.getConnectors().find(s=>s.id===vt.CONNECTOR_ID.COINBASE);this.setConnectedWalletInfo({name:"Coinbase Wallet",icon:this.getConnectorImage(i)},t)}else this.setConnectedWalletInfo({name:r},t)}async syncBalance(t){!qX.getNetworksByNamespace(this.caipNetworks,t.chainNamespace).find(n=>n.id.toString()===t.chainId?.toString())||!t.chainId||await this.updateNativeBalance(t.address,t.chainId,t.chainNamespace)}async updateNativeBalance(t,r,n){const i=this.getAdapter(n);if(i){const s=await i.getBalance({address:t,chainId:r,caipNetwork:this.getCaipNetwork(n),tokens:this.options.tokens});this.setBalance(s.balance,s.symbol,n)}}async initializeUniversalAdapter(){const t=grt.createLogger((n,...i)=>{n&&this.handleAlertError(n),console.error(...i)}),r={projectId:this.options?.projectId,metadata:{name:this.options?.metadata?this.options?.metadata.name:"",description:this.options?.metadata?this.options?.metadata.description:"",url:this.options?.metadata?this.options?.metadata.url:"",icons:this.options?.metadata?this.options?.metadata.icons:[""]},logger:t};Ne.setManualWCControl(!!this.options?.manualWCControl),this.universalProvider=this.options.universalProvider??await Ltt.init(r),this.listenWalletConnect()}listenWalletConnect(){this.universalProvider&&(this.universalProvider.on("display_uri",t=>{ht.setUri(t)}),this.universalProvider.on("connect",ht.finalizeWcConnection),this.universalProvider.on("disconnect",()=>{this.chainNamespaces.forEach(t=>{this.resetAccount(t)}),ht.resetWcConnection()}),this.universalProvider.on("chainChanged",t=>{const r=this.caipNetworks?.find(i=>i.id==t),n=this.getCaipNetwork();if(!r){this.setUnsupportedNetwork(t);return}n?.id!==r?.id&&this.setCaipNetwork(r)}),this.universalProvider.on("session_event",t=>{if(Ste.isSessionEventData(t)){const{name:r,data:n}=t.params.event;r==="accountsChanged"&&Array.isArray(n)&&Fe.isCaipAddress(n[0])&&this.syncAccount(Cl.parseCaipAddress(n[0]))}}))}createUniversalProvider(){return!this.universalProviderInitPromise&&Fe.isClient()&&this.options?.projectId&&(this.universalProviderInitPromise=this.initializeUniversalAdapter()),this.universalProviderInitPromise}async getUniversalProvider(){if(!this.universalProvider)try{await this.createUniversalProvider()}catch(t){Ut.sendEvent({type:"error",event:"INTERNAL_SDK_ERROR",properties:{errorType:"UniversalProviderInitError",errorMessage:t instanceof Error?t.message:"Unknown",uncaught:!1}}),console.error("AppKit:getUniversalProvider - Cannot create provider",t)}return this.universalProvider}handleAlertError(t){const r=Object.entries(ww.UniversalProviderErrors).find(([,{message:a}])=>t.message.includes(a)),[n,i]=r??[],{message:s,alertErrorKey:o}=i??{};if(n&&s&&!this.reportedAlertErrors[n]){const a=ww.ALERT_ERRORS[o];a&&(cf.open(a,"error"),this.reportedAlertErrors[n]=!0)}}getAdapter(t){if(t)return this.chainAdapters?.[t]}createAdapter(t){if(!t)return;const r=t.namespace;if(!r)return;this.createClients();const n=t;n.namespace=r,n.construct({namespace:r,projectId:this.options?.projectId,networks:this.caipNetworks}),this.chainNamespaces.includes(r)||this.chainNamespaces.push(r),this.chainAdapters&&(this.chainAdapters[r]=n)}async open(t){await this.injectModalUi(),t?.uri&&ht.setUri(t.uri),await or.open(t)}async close(){await this.injectModalUi(),or.close()}setLoading(t,r){or.setLoading(t,r)}async disconnect(t){await ht.disconnect(t)}getError(){return""}getChainId(){return ae.state.activeCaipNetwork?.id}async switchNetwork(t){const r=this.caipNetworks?.find(n=>n.id===t.id);if(!r){cf.open(ww.ALERT_ERRORS.SWITCH_NETWORK_NOT_FOUND,"error");return}await ae.switchActiveNetwork(r)}getWalletProvider(){return ae.state.activeChain?bn.state.providers[ae.state.activeChain]:null}getWalletProviderType(){return bn.getProviderId(ae.state.activeChain)}subscribeProviders(t){return bn.subscribeProviders(t)}getThemeMode(){return Jn.state.themeMode}getThemeVariables(){return Jn.state.themeVariables}setThemeMode(t){Jn.setThemeMode(t),Ate(Jn.state.themeMode)}setTermsConditionsUrl(t){Ne.setTermsConditionsUrl(t)}setPrivacyPolicyUrl(t){Ne.setPrivacyPolicyUrl(t)}setThemeVariables(t){Jn.setThemeVariables(t),zrt(Jn.state.themeVariables)}subscribeTheme(t){return Jn.subscribe(t)}getWalletInfo(){return xt.state.connectedWalletInfo}getAccount(t){const r=Je.getAuthConnector(t),n=ae.getAccountData(t);if(n)return{allAccounts:n.allAccounts,caipAddress:n.caipAddress,address:Fe.getPlainAddress(n.caipAddress),isConnected:!!n.caipAddress,status:n.status,embeddedWalletInfo:r?{user:n.user,authProvider:n.socialProvider||"email",accountType:n.preferredAccountType,isSmartAccountDeployed:!!n.smartAccountDeployed}:void 0}}subscribeAccount(t,r){const n=()=>{const i=this.getAccount(r);i&&t(i)};r?ae.subscribeChainProp("accountState",n,r):ae.subscribe(n),Je.subscribe(n)}subscribeNetwork(t){return ae.subscribe(({activeCaipNetwork:r})=>{t({caipNetwork:r,chainId:r?.id,caipNetworkId:r?.caipNetworkId})})}subscribeWalletInfo(t){return xt.subscribeKey("connectedWalletInfo",t)}subscribeShouldUpdateToAddress(t){xt.subscribeKey("shouldUpdateToAddress",t)}subscribeCaipNetworkChange(t){ae.subscribeKey("activeCaipNetwork",t)}getState(){return Hu.state}subscribeState(t){return Hu.subscribe(t)}showErrorMessage(t){Gr.showError(t)}showSuccessMessage(t){Gr.showSuccess(t)}getEvent(){return{...Ut.state}}subscribeEvents(t){return Ut.subscribe(t)}replace(t){Ze.replace(t)}redirect(t){Ze.push(t)}popTransactionStack(t){Ze.popTransactionStack(t)}isOpen(){return or.state.open}isTransactionStackEmpty(){return Ze.state.transactionStack.length===0}isTransactionShouldReplaceView(){return Ze.state.transactionStack[Ze.state.transactionStack.length-1]?.replace}static getInstance(){return this.instance}updateFeatures(t){Ne.setFeatures(t)}updateOptions(t){const n={...Ne.state||{},...t};Ne.setOptions(n)}setConnectMethodsOrder(t){Ne.setConnectMethodsOrder(t)}setWalletFeaturesOrder(t){Ne.setWalletFeaturesOrder(t)}setCollapseWallets(t){Ne.setCollapseWallets(t)}setSocialsOrder(t){Ne.setSocialsOrder(t)}getConnectMethodsOrder(){return s1.getConnectOrderMethod(Ne.state.features,Je.getConnectors())}removeAdapter(t){const r=this.getIsConnectedState(),n=this.getAdapter(t);if(!n||!this.chainAdapters||r)return;const i=this.caipNetworks?.filter(s=>s.chainNamespace!==t);ae.removeAdapter(t),Je.removeAdapter(t),this.chainNamespaces=this.chainNamespaces.filter(s=>s!==t),this.caipNetworks=i,n.removeAllEventListeners(),Reflect.deleteProperty(this.chainAdapters,t)}addAdapter(t,r){const n=t.namespace;if(!this.connectionControllerClient||!this.networkControllerClient||!this.chainAdapters||!n)return;const i=this.extendCaipNetworks({...this.options,networks:r});this.caipNetworks=[...this.caipNetworks||[],...i],this.createAdapter(t),this.initChainAdapter(n),ae.addAdapter(t,{connectionControllerClient:this.connectionControllerClient,networkControllerClient:this.networkControllerClient},i)}addNetwork(t,r){if(this.chainAdapters&&!this.chainAdapters[t])throw new Error(`Adapter for namespace ${t} doesn't exist`);const n=this.extendCaipNetwork(r,this.options);ae.addNetwork(n),this.caipNetworks&&!this.caipNetworks?.find(i=>i.id===n.id)&&this.caipNetworks.push(n)}removeNetwork(t,r){if(this.chainAdapters&&!this.chainAdapters[t])throw new Error(`Adapter for namespace ${t} doesn't exist`);if(!this.caipNetworks?.find(s=>s.id===r))throw new Error(`Network with ID ${r} not found`);if(!this.caipNetworks)return;const i=this.caipNetworks.filter(s=>s.chainNamespace===t&&s.id!==r);if(!i?.length)throw new Error("Cannot remove last network for a namespace");ae.removeNetwork(t,r),this.caipNetworks=[...i]}}let PU=!1;class Grt extends Krt{async open(t){Je.isConnected()||await super.open(t)}async close(){await super.close(),this.options.manualWCControl&&ht.finalizeWcConnection()}async syncIdentity(t){return Promise.resolve()}async syncBalance(t){return Promise.resolve()}async injectModalUi(){if(!PU&&Fe.isClient()){if(await Le(()=>Promise.resolve().then(()=>elt),void 0),await Le(()=>Promise.resolve().then(()=>mlt),void 0),!document.querySelector("w3m-modal")){const r=document.createElement("w3m-modal");!Ne.state.disableAppend&&!Ne.state.enableEmbedded&&document.body.insertAdjacentElement("beforeend",r)}PU=!0}}}const Zrt="1.7.2";function Yrt(e){return new Grt({...e,basic:!0,sdkVersion:`html-core-${Zrt}`})}class fp extends Error{constructor(){super(),Object.setPrototypeOf(this,fp.prototype)}}class DU extends Error{constructor(t){super(`WalletConnect Adapter - Method ${t} is not supported by the wallet`),this.name="WalletConnectFeatureNotSupportedError"}}function Jrt(e){let t=[e];return e===Yn.Mainnet||e===Yn.Deprecated_Mainnet?(t=[Yn.Mainnet,Yn.Deprecated_Mainnet],e===Yn.Deprecated_Mainnet&&console.warn(w3.mainnet)):(e===Yn.Deprecated_Devnet||e===Yn.Devnet)&&(t=[Yn.Devnet,Yn.Deprecated_Devnet],console.warn(w3.devnet)),t}const w3={mainnet:`You are using a deprecated chain ID for Solana Mainnet, please use ${Yn.Mainnet} instead.`,devnet:`You are using a deprecated chain ID for Solana Devnet, please use ${Yn.Devnet} instead.`,wallet:"The connected wallet is using a deprecated chain ID for Solana. Please, contact them to upgrade. You can learn more at https://github.com/ChainAgnostic/namespaces/blob/main/solana/caip10.md#chain-ids"};function RU(e,t){const r=e.namespaces.solana?.accounts.map(n=>`solana:${n.split(":")[1]}`);if(t===Yn.Mainnet)return r?.find(n=>n===Yn.Mainnet)?Yn.Mainnet:(console.warn(w3.wallet),Yn.Deprecated_Mainnet);if(t===Yn.Devnet)return r?.find(n=>n===Yn.Devnet)?Yn.Devnet:(console.warn(w3.wallet),Yn.Deprecated_Devnet);throw Error("WalletConnect Solana Adapter: Unable to get a default chain from the session.")}function Xrt(e){return{optionalNamespaces:{solana:{chains:Jrt(e),methods:[ta.signTransaction,ta.signMessage],events:[]}}}}class xM extends Error{constructor(){super("QR Code Modal was closed by user"),Object.setPrototypeOf(this,xM.prototype),this.name="QRCodeModalError"}}class Qrt{_UniversalProvider;_session;_modal;_projectId;_network;_ConnectQueueResolver;constructor(t){if(this.initClient(t.options),this._network=t.network,!t.options.projectId)throw Error("WalletConnect Adapter: Project ID is undefined");this._projectId=t.options.projectId}async connect(){if(this._UniversalProvider||await new Promise(i=>{this._ConnectQueueResolver=i}),!this._UniversalProvider)throw new Error("WalletConnect Adapter - Universal Provider was undefined while calling 'connect()'");if(this._UniversalProvider.session){this._session=this._UniversalProvider.session;const i=RU(this._session,this._network);return this._network=i,this._UniversalProvider.setDefaultChain(i),{publicKey:this.publicKey}}await this.initModal();const t=Xrt(this._network);this._modal?.open();const r=new AbortController,n=r.signal;this._modal?.subscribeState(i=>{i.open||r.abort(new xM)});try{const i=await Promise.race([this._UniversalProvider?.connect(t),new Promise((o,a)=>{n.addEventListener("abort",()=>{a(n.reason)})})]);if(this._modal?.close(),this._session=i,!i)throw new Nc;const s=RU(i,this._network);return this._network=s,this._UniversalProvider?.setDefaultChain(s),{publicKey:this.publicKey}}catch(i){throw this._modal?.close(),i}}async disconnect(){if(this._UniversalProvider?.session){if(await this.initModal(),!this._modal)throw Error("WalletConnect Adapter -Modal is undefined: unable to disconnect");await this.client.disconnect(),this._session=void 0}else throw new fp}get client(){if(this._UniversalProvider)return this._UniversalProvider;throw new fp}get session(){if(!this._session)throw new fp;return this._session}get publicKey(){if(this._UniversalProvider?.session&&this._session){const{address:t}=kSe(this._session?.namespaces.solana?.accounts[0]??"");return new bt(t)}throw new fp}async signTransaction(t){this.checkIfWalletSupportsMethod(ta.signTransaction);const r=Ba(t),n=r?{}:t,{signature:i,transaction:s}=await this.client.client.request({chainId:this._network,topic:this.session.topic,request:{method:ta.signTransaction,params:{...n,transaction:this.serialize(t)}}});return s?this.deserialize(s,r):(t.addSignature(this.publicKey,Buffer.from(tm.decode(i))),t)}async signMessage(t){this.checkIfWalletSupportsMethod(ta.signMessage);const{signature:r}=await this.client.client.request({chainId:this._network,topic:this.session.topic,request:{method:ta.signMessage,params:{pubkey:this.publicKey.toString(),message:tm.encode(t)}}});return tm.decode(r)}async signAndSendTransaction(t){this.checkIfWalletSupportsMethod(ta.signAndSendTransaction);const{signature:r}=await this.client.client.request({chainId:this._network,topic:this.session.topic,request:{method:ta.signAndSendTransaction,params:{transaction:this.serialize(t)}}});return r}async signAllTransactions(t){try{this.checkIfWalletSupportsMethod(ta.signAllTransactions);const r=t.map(i=>this.serialize(i)),{transactions:n}=await this.client.client.request({chainId:this._network,topic:this.session.topic,request:{method:ta.signAllTransactions,params:{transactions:r}}});return t.map((i,s)=>Ba(i)?this.deserialize(n[s]??"",!0):this.deserialize(n[s]??""))}catch(r){if(r instanceof DU){const n=t.map(s=>this.signTransaction(s));return await Promise.all(n)}throw r}}async initClient(t){const r=await BFe.init(t);this._UniversalProvider=r,this._ConnectQueueResolver&&this._ConnectQueueResolver(!0)}async initModal(){if(!this._modal){if(!this._UniversalProvider)throw new Error("WalletConnect Adapter - cannot init modal when Universal Provider is undefined");this._modal=Yrt({projectId:this._projectId,universalProvider:this._UniversalProvider,networks:[tS,rS,Urt],manualWCControl:!0})}}serialize(t){return Buffer.from(t.serialize({verifySignatures:!1})).toString("base64")}deserialize(t,r=!1){return r?Hs.deserialize(Buffer.from(t,"base64")):ua.from(Buffer.from(t,"base64"))}checkIfWalletSupportsMethod(t){if(!this.session.namespaces.solana?.methods.includes(t))throw new DU(t)}}const ent="WalletConnect";class Nmt extends CK{name=ent;url="https://walletconnect.org";icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4NSIgdmlld0JveD0iMCAwIDMwMCAxODUiIHdpZHRoPSIzMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTYxLjQzODU0MjkgMzYuMjU2MjYxMmM0OC45MTEyMjQxLTQ3Ljg4ODE2NjMgMTI4LjIxMTk4NzEtNDcuODg4MTY2MyAxNzcuMTIzMjA5MSAwbDUuODg2NTQ1IDUuNzYzNDE3NGMyLjQ0NTU2MSAyLjM5NDQwODEgMi40NDU1NjEgNi4yNzY1MTEyIDAgOC42NzA5MjA0bC0yMC4xMzY2OTUgMTkuNzE1NTAzYy0xLjIyMjc4MSAxLjE5NzIwNTEtMy4yMDUzIDEuMTk3MjA1MS00LjQyODA4MSAwbC04LjEwMDU4NC03LjkzMTE0NzljLTM0LjEyMTY5Mi0zMy40MDc5ODE3LTg5LjQ0Mzg4Ni0zMy40MDc5ODE3LTEyMy41NjU1Nzg4IDBsLTguNjc1MDU2MiA4LjQ5MzYwNTFjLTEuMjIyNzgxNiAxLjE5NzIwNDEtMy4yMDUzMDEgMS4xOTcyMDQxLTQuNDI4MDgwNiAwbC0yMC4xMzY2OTQ5LTE5LjcxNTUwMzFjLTIuNDQ1NTYxMi0yLjM5NDQwOTItMi40NDU1NjEyLTYuMjc2NTEyMiAwLTguNjcwOTIwNHptMjE4Ljc2Nzc5NjEgNDAuNzczNzQ0OSAxNy45MjE2OTcgMTcuNTQ2ODk3YzIuNDQ1NTQ5IDIuMzk0Mzk2OSAyLjQ0NTU2MyA2LjI3NjQ3NjkuMDAwMDMxIDguNjcwODg5OWwtODAuODEwMTcxIDc5LjEyMTEzNGMtMi40NDU1NDQgMi4zOTQ0MjYtNi40MTA1ODIgMi4zOTQ0NTMtOC44NTYxNi4wMDAwNjItLjAwMDAxLS4wMDAwMS0uMDAwMDIyLS4wMDAwMjItLjAwMDAzMi0uMDAwMDMybC01Ny4zNTQxNDMtNTYuMTU0NTcyYy0uNjExMzktLjU5ODYwMi0xLjYwMjY1LS41OTg2MDItMi4yMTQwNCAwLS4wMDAwMDQuMDAwMDA0LS4wMDAwMDcuMDAwMDA4LS4wMDAwMTEuMDAwMDExbC01Ny4zNTI5MjEyIDU2LjE1NDUzMWMtMi40NDU1MzY4IDIuMzk0NDMyLTYuNDEwNTc1NSAyLjM5NDQ3Mi04Ljg1NjE2MTIuMDAwMDg3LS4wMDAwMTQzLS4wMDAwMTQtLjAwMDAyOTYtLjAwMDAyOC0uMDAwMDQ0OS0uMDAwMDQ0bC04MC44MTI0MTk0My03OS4xMjIxODVjLTIuNDQ1NTYwMjEtMi4zOTQ0MDgtMi40NDU1NjAyMS02LjI3NjUxMTUgMC04LjY3MDkxOTdsMTcuOTIxNzI5NjMtMTcuNTQ2ODY3M2MyLjQ0NTU2MDItMi4zOTQ0MDgyIDYuNDEwNTk4OS0yLjM5NDQwODIgOC44NTYxNjAyIDBsNTcuMzU0OTc3NSA1Ni4xNTUzNTdjLjYxMTM5MDguNTk4NjAyIDEuNjAyNjQ5LjU5ODYwMiAyLjIxNDAzOTggMCAuMDAwMDA5Mi0uMDAwMDA5LjAwMDAxNzQtLjAwMDAxNy4wMDAwMjY1LS4wMDAwMjRsNTcuMzUyMTAzMS01Ni4xNTUzMzNjMi40NDU1MDUtMi4zOTQ0NjMzIDYuNDEwNTQ0LTIuMzk0NTUzMSA4Ljg1NjE2MS0uMDAwMi4wMDAwMzQuMDAwMDMzNi4wMDAwNjguMDAwMDY3My4wMDAxMDEuMDAwMTAxbDU3LjM1NDkwMiA1Ni4xNTU0MzJjLjYxMTM5LjU5ODYwMSAxLjYwMjY1LjU5ODYwMSAyLjIxNDA0IDBsNTcuMzUzOTc1LTU2LjE1NDMyNDljMi40NDU1NjEtMi4zOTQ0MDkyIDYuNDEwNTk5LTIuMzk0NDA5MiA4Ljg1NjE2IDB6IiBmaWxsPSIjM2I5OWZjIi8+PC9zdmc+";supportedTransactionVersions=new Set(["legacy",0]);_publicKey;_connecting;_wallet;_config;_readyState;_onDisconnect;constructor(t){super(),this._publicKey=null,this._connecting=!1,this._config=t,this._wallet=null,this._readyState=typeof window>"u"?jt.Unsupported:jt.Loadable,this._onDisconnect=this.disconnect.bind(this)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==jt.Loadable)throw new Rc;this._connecting=!0,this._wallet=new Qrt({network:this._config.network===qE.Mainnet?Kv.Mainnet:Kv.Devnet,options:this._config.options});const{publicKey:t}=await this._wallet.connect();this._publicKey=t,this.emit("connect",t),this._wallet.client.on("session_delete",this._onDisconnect)}catch(t){throw t.constructor.name==="QRCodeModalError"||t instanceof Error&&t.name==="QRCodeModalError"?new sbe:(this._connecting=!1,t)}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.client.off("session_delete",this._onDisconnect),this._publicKey=null;try{t.client.session&&await t.disconnect()}catch(r){console.error("WalletConnectWalletAdapter: disconnect error",r),this.emit("error",new p4(r?.message,r))}}this.emit("disconnect")}async signTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signTransaction(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signMessage(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signMessage(t)}catch(n){throw new Y2(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAndSendTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAndSendTransaction(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAllTransactions(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAllTransactions(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}}function us(e,t,r){return(t=int(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LU(Object(r),!0).forEach(function(n){us(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tnt(e,t){if(e==null)return{};var r,n,i=rnt(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rnt(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function nnt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function int(e){var t=nnt(e,"string");return typeof t=="symbol"?t:t+""}function v3(e){"@babel/helpers - typeof";return v3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v3(e)}function W7(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?us({},e,t):{}}function snt(e){var t,r=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},us(us(us(us(us(us(us(us(us(us(t,"fa-".concat(e.size),e.size!==null),"fa-rotate-".concat(e.rotation),e.rotation!==null),"fa-rotate-by",e.rotateBy),"fa-pull-".concat(e.pull),e.pull!==null),"fa-swap-opacity",e.swapOpacity),"fa-bounce",e.bounce),"fa-shake",e.shake),"fa-beat",e.beat),"fa-fade",e.fade),"fa-beat-fade",e.beatFade),us(us(us(us(t,"fa-flash",e.flash),"fa-spin-pulse",e.spinPulse),"fa-spin-reverse",e.spinReverse),"fa-width-auto",e.widthAuto));return Object.keys(r).map(function(n){return r[n]?n:null}).filter(function(n){return n})}var ont=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ite={exports:{}};(function(e){(function(t){var r=function(w,E,A){if(!u(E)||d(E)||h(E)||g(E)||c(E))return E;var M,R=0,N=0;if(l(E))for(M=[],N=E.length;R<N;R++)M.push(r(w,E[R],A));else{M={};for(var z in E)Object.prototype.hasOwnProperty.call(E,z)&&(M[w(z,A)]=r(w,E[z],A))}return M},n=function(w,E){E=E||{};var A=E.separator||"_",M=E.split||/(?=[A-Z])/;return w.split(M).join(A)},i=function(w){return m(w)?w:(w=w.replace(/[\-_\s]+(.)?/g,function(E,A){return A?A.toUpperCase():""}),w.substr(0,1).toLowerCase()+w.substr(1))},s=function(w){var E=i(w);return E.substr(0,1).toUpperCase()+E.substr(1)},o=function(w,E){return n(w,E).toLowerCase()},a=Object.prototype.toString,c=function(w){return typeof w=="function"},u=function(w){return w===Object(w)},l=function(w){return a.call(w)=="[object Array]"},d=function(w){return a.call(w)=="[object Date]"},h=function(w){return a.call(w)=="[object RegExp]"},g=function(w){return a.call(w)=="[object Boolean]"},m=function(w){return w=w-0,w===w},b=function(w,E){var A=E&&"process"in E?E.process:E;return typeof A!="function"?w:function(M,R){return A(M,w,R)}},k={camelize:i,decamelize:o,pascalize:s,depascalize:o,camelizeKeys:function(w,E){return r(b(i,E),w)},decamelizeKeys:function(w,E){return r(b(o,E),w,E)},pascalizeKeys:function(w,E){return r(b(s,E),w)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=k:t.humps=k})(ont)})(Ite);var ant=Ite.exports,cnt=["class","style"];function unt(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,r){var n=r.indexOf(":"),i=ant.camelize(r.slice(0,n)),s=r.slice(n+1).trim();return t[i]=s,t},{})}function lnt(e){return e.split(/\s+/).reduce(function(t,r){return t[r]=!0,t},{})}function Mte(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var n=(e.children||[]).map(function(c){return Mte(c)}),i=Object.keys(e.attributes||{}).reduce(function(c,u){var l=e.attributes[u];switch(u){case"class":c.class=lnt(l);break;case"style":c.style=unt(l);break;default:c.attrs[u]=l}return c},{attrs:{},class:{},style:{}});r.class;var s=r.style,o=s===void 0?{}:s,a=tnt(r,cnt);return g1(e.tag,Du(Du(Du({},t),{},{class:i.class,style:Du(Du({},i.style),o)},i.attrs),a),n)}var $te=!1;try{$te=!0}catch{}function fnt(){if(!$te&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function zU(e){if(e&&v3(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(FE.icon)return FE.icon(e);if(e===null)return null;if(v3(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var Omt=Dt({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},rotateBy:{type:Boolean,default:!1},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1},widthAuto:{type:Boolean,default:!1}},setup:function(t,r){var n=r.attrs,i=ir(function(){return zU(t.icon)}),s=ir(function(){return W7("classes",snt(t))}),o=ir(function(){return W7("transform",typeof t.transform=="string"?FE.transform(t.transform):t.transform)}),a=ir(function(){return W7("mask",zU(t.mask))}),c=ir(function(){var l=Du(Du(Du(Du({},s.value),o.value),a.value),{},{symbol:t.symbol,maskId:t.maskId});return l.title=t.title,l.titleId=t.titleId,Y2e(i.value,l)});dn(c,function(l){if(!l)return fnt("Could not find one or more icon(s)",i.value,a.value)},{immediate:!0});var u=ir(function(){return c.value?Mte(c.value.abstract[0],{},n):null});return function(){return u.value}}});/*!
1615
+ `},hexToRgb(e){const t=parseInt(e,16),r=t>>16&255,n=t>>8&255,i=t&255;return[r,n,i]},tintColor(e,t){const[r,n,i]=e,s=Math.round(r+(255-r)*t),o=Math.round(n+(255-n)*t),a=Math.round(i+(255-i)*t);return[s,o,a]},isNumber(e){return{number:/^[0-9]+$/u}.number.test(e)},getColorTheme(e){return e||(typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)")?.matches?"dark":"light":"dark")},splitBalance(e){const t=e.split(".");return t.length===2?[t[0],t[1]]:["0","00"]},roundNumber(e,t,r){return e.toString().length>=t?Number(e).toFixed(r):e},formatNumberToLocalString(e,t=2){return e===void 0?"0.00":typeof e=="number"?e.toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t}):parseFloat(e).toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t})}};function Brt(e,t){const{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(i){customElements.get(e)||customElements.define(e,i)}}}function Frt(e,t){return customElements.get(e)||customElements.define(e,t),t}function at(e){return function(r){return typeof r=="function"?Frt(e,r):Brt(e,r)}}const vw={ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3,ERROR_INVALID_CHAIN_ID:32603};function Nb(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}const tS=Nb({id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",network:"solana-mainnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!1,chainNamespace:"solana",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",deprecatedCaipNetworkId:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"}),rS=Nb({id:"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",name:"Solana Devnet",network:"solana-devnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",deprecatedCaipNetworkId:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"}),Urt=Nb({id:"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",name:"Solana Testnet",network:"solana-testnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"});Nb({id:"000000000019d6689c085ae165831e93",caipNetworkId:"bip122:000000000019d6689c085ae165831e93",chainNamespace:"bip122",name:"Bitcoin",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}});Nb({id:"000000000933ea01ad0ee984209779ba",caipNetworkId:"bip122:000000000933ea01ad0ee984209779ba",chainNamespace:"bip122",name:"Bitcoin Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0});const qrt={solana:["solana_signMessage","solana_signTransaction","solana_requestAccounts","solana_getAccounts","solana_signAllTransactions","solana_signAndSendTransaction"],eip155:["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_showCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"],bip122:["sendTransfer","signMessage","signPsbt","getAccountAddresses"]},Ste={getMethodsByChainNamespace(e){return qrt[e]||[]},createDefaultNamespace(e){return{methods:this.getMethodsByChainNamespace(e),events:["accountsChanged","chainChanged"],chains:[],rpcMap:{}}},applyNamespaceOverrides(e,t){if(!t)return{...e};const r={...e},n=new Set;if(t.methods&&Object.keys(t.methods).forEach(i=>n.add(i)),t.chains&&Object.keys(t.chains).forEach(i=>n.add(i)),t.events&&Object.keys(t.events).forEach(i=>n.add(i)),t.rpcMap&&Object.keys(t.rpcMap).forEach(i=>{const[s]=i.split(":");s&&n.add(s)}),n.forEach(i=>{r[i]||(r[i]=this.createDefaultNamespace(i))}),t.methods&&Object.entries(t.methods).forEach(([i,s])=>{r[i]&&(r[i].methods=s)}),t.chains&&Object.entries(t.chains).forEach(([i,s])=>{r[i]&&(r[i].chains=s)}),t.events&&Object.entries(t.events).forEach(([i,s])=>{r[i]&&(r[i].events=s)}),t.rpcMap){const i=new Set;Object.entries(t.rpcMap).forEach(([s,o])=>{const[a,c]=s.split(":");!a||!c||!r[a]||(r[a].rpcMap||(r[a].rpcMap={}),i.has(a)||(r[a].rpcMap={},i.add(a)),r[a].rpcMap[c]=o)})}return r},createNamespaces(e,t){const r=e.reduce((n,i)=>{const{id:s,chainNamespace:o,rpcUrls:a}=i,c=a.default.http[0];n[o]||(n[o]=this.createDefaultNamespace(o));const u=`${o}:${s}`,l=n[o];switch(l.chains.push(u),u){case tS.caipNetworkId:l.chains.push(tS.deprecatedCaipNetworkId);break;case rS.caipNetworkId:l.chains.push(rS.deprecatedCaipNetworkId);break}return l?.rpcMap&&c&&(l.rpcMap[s]=c),n},{});return this.applyNamespaceOverrides(r,t)},resolveReownName:async e=>{const t=await gte.resolveName(e);return(Object.values(t?.addresses)||[])[0]?.address||!1},getChainsFromNamespaces(e={}){return Object.values(e).flatMap(t=>{const r=t.chains||[],n=t.accounts.map(i=>{const[s,o]=i.split(":");return`${s}:${o}`});return Array.from(new Set([...r,...n]))})},isSessionEventData(e){return typeof e=="object"&&e!==null&&"id"in e&&"topic"in e&&"params"in e&&typeof e.params=="object"&&e.params!==null&&"chainId"in e.params&&"event"in e.params&&typeof e.params.event=="object"&&e.params.event!==null}};class Cte{constructor({provider:t,caipNetworks:r,namespace:n}){this.id=vt.CONNECTOR_ID.WALLET_CONNECT,this.name=g3.ConnectorNamesMap[vt.CONNECTOR_ID.WALLET_CONNECT],this.type="WALLET_CONNECT",this.imageId=g3.ConnectorImageIds[vt.CONNECTOR_ID.WALLET_CONNECT],this.caipNetworks=r,this.provider=t,this.chain=n}get chains(){return this.caipNetworks}async connectWalletConnect(){if(!await this.authenticate()){const r=Ne.state.universalProviderConfigOverride,n=Ste.createNamespaces(this.caipNetworks,r);await this.provider.connect({optionalNamespaces:n})}return{clientId:await this.provider.client.core.crypto.getClientId(),session:this.provider.session}}async disconnect(){await this.provider.disconnect()}async authenticate(){const t=this.chains.map(r=>r.caipNetworkId);return df.universalProviderAuthenticate({universalProvider:this.provider,chains:t,methods:Hrt})}}const Hrt=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"];class Wrt{constructor(t){this.availableConnectors=[],this.eventListeners=new Map,t&&this.construct(t)}construct(t){this.caipNetworks=t.networks,this.projectId=t.projectId,this.namespace=t.namespace,this.adapterType=t.adapterType}get connectors(){return this.availableConnectors}get networks(){return this.caipNetworks||[]}setAuthProvider(t){this.addConnector({id:vt.CONNECTOR_ID.AUTH,type:"AUTH",name:vt.CONNECTOR_NAMES.AUTH,provider:t,imageId:g3.ConnectorImageIds[vt.CONNECTOR_ID.AUTH],chain:this.namespace,chains:[]})}addConnector(...t){const r=new Set;this.availableConnectors=[...t,...this.availableConnectors].filter(n=>r.has(n.id)?!1:(r.add(n.id),!0)),this.emit("connectors",this.availableConnectors)}setStatus(t,r){xt.setStatus(t,r)}on(t,r){this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t)?.add(r)}off(t,r){const n=this.eventListeners.get(t);n&&n.delete(r)}removeAllEventListeners(){this.eventListeners.forEach(t=>{t.clear()})}emit(t,r){const n=this.eventListeners.get(t);n&&n.forEach(i=>i(r))}async connectWalletConnect(t){return{clientId:(await this.getWalletConnectConnector().connectWalletConnect()).clientId}}async switchNetwork(t){const{caipNetwork:r,providerType:n}=t;if(!t.provider)return;const i="provider"in t.provider?t.provider.provider:t.provider;if(n==="WALLET_CONNECT"){i.setDefaultChain(r.caipNetworkId);return}if(i&&n==="AUTH"){const s=i;await s.switchNetwork(r.caipNetworkId);const o=await s.getUser({chainId:r.caipNetworkId,preferredAccountType:Ne.state.defaultAccountTypes[r.chainNamespace]});this.emit("switchNetwork",o)}}getWalletConnectConnector(){const t=this.connectors.find(r=>r instanceof Cte);if(!t)throw new Error("WalletConnectConnector not found");return t}}class Vrt extends Wrt{setUniversalProvider(t){this.addConnector(new Cte({provider:t,caipNetworks:this.caipNetworks||[],namespace:this.namespace}))}async connect(t){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:Number(t.chainId),provider:this.provider,address:""})}async disconnect(){try{await this.getWalletConnectConnector().disconnect()}catch(t){console.warn("UniversalAdapter:disconnect - error",t)}}async getAccounts({namespace:t}){const n=this.provider?.session?.namespaces?.[t]?.accounts?.map(i=>{const[,,s]=i.split(":");return s}).filter((i,s,o)=>o.indexOf(i)===s)||[];return Promise.resolve({accounts:n.map(i=>Fe.createAccount(t,i,t==="bip122"?"payment":"eoa"))})}async syncConnectors(){return Promise.resolve()}async getBalance(t){if(!(t.caipNetwork&&ei.BALANCE_SUPPORTED_CHAINS.includes(t.caipNetwork?.chainNamespace))||t.caipNetwork?.testnet)return{balance:"0.00",symbol:t.caipNetwork?.nativeCurrency.symbol||""};if(xt.state.balanceLoading&&t.chainId===ae.state.activeCaipNetwork?.id)return{balance:xt.state.balance||"0.00",symbol:xt.state.balanceSymbol||""};const i=(await xt.fetchTokenBalance()).find(s=>s.chainId===`${t.caipNetwork?.chainNamespace}:${t.chainId}`&&s.symbol===t.caipNetwork?.nativeCurrency.symbol);return{balance:i?.quantity.numeric||"0.00",symbol:i?.symbol||t.caipNetwork?.nativeCurrency.symbol||""}}async signMessage(t){const{provider:r,message:n,address:i}=t;if(!r)throw new Error("UniversalAdapter:signMessage - provider is undefined");let s="";return ae.state.activeCaipNetwork?.chainNamespace===vt.CHAIN.SOLANA?s=(await r.request({method:"solana_signMessage",params:{message:tm.encode(new TextEncoder().encode(n)),pubkey:i}},ae.state.activeCaipNetwork?.caipNetworkId)).signature:s=await r.request({method:"personal_sign",params:[n,i]},ae.state.activeCaipNetwork?.caipNetworkId),{signature:s}}async estimateGas(){return Promise.resolve({gas:BigInt(0)})}async getProfile(){return Promise.resolve({profileImage:"",profileName:""})}async sendTransaction(){return Promise.resolve({hash:""})}walletGetAssets(t){return Promise.resolve({})}async writeContract(){return Promise.resolve({hash:""})}async getEnsAddress(){return Promise.resolve({address:!1})}parseUnits(){return 0n}formatUnits(){return"0"}async getCapabilities(){return Promise.resolve({})}async grantPermissions(){return Promise.resolve({})}async revokePermissions(){return Promise.resolve("0x")}async syncConnection(){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:1,provider:this.provider,address:""})}async switchNetwork(t){const{caipNetwork:r}=t,n=this.getWalletConnectConnector();if(r.chainNamespace===vt.CHAIN.EVM)try{await n.provider?.request({method:"wallet_switchEthereumChain",params:[{chainId:bU(r.id)}]})}catch(i){if(i.code===vw.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||i.code===vw.ERROR_INVALID_CHAIN_ID||i.code===vw.ERROR_CODE_DEFAULT||i?.data?.originalError?.code===vw.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)try{await n.provider?.request({method:"wallet_addEthereumChain",params:[{chainId:bU(r.id),rpcUrls:[r?.rpcUrls.chainDefault?.http],chainName:r.name,nativeCurrency:r.nativeCurrency,blockExplorerUrls:[r.blockExplorers?.default.url]}]})}catch{throw new Error("Chain is not supported")}}n.provider.setDefaultChain(r.caipNetworkId)}getWalletConnectProvider(){return this.connectors.find(n=>n.type==="WALLET_CONNECT")?.provider}}class Krt{constructor(t){this.hasSwitchedToPreferredAccountTypeOnConnect=!1,this.chainNamespaces=[],this.reportedAlertErrors={},this.getCaipNetwork=r=>{if(r){const n=ae.getNetworkData(r)?.caipNetwork;return n||ae.getRequestedCaipNetworks(r).filter(i=>i.chainNamespace===r)?.[0]}return ae.state.activeCaipNetwork||this.defaultCaipNetwork},this.getCaipNetworkId=()=>{const r=this.getCaipNetwork();if(r)return r.id},this.getCaipNetworks=r=>ae.getRequestedCaipNetworks(r),this.getActiveChainNamespace=()=>ae.state.activeChain,this.setRequestedCaipNetworks=(r,n)=>{ae.setRequestedCaipNetworks(r,n)},this.getApprovedCaipNetworkIds=()=>ae.getAllApprovedCaipNetworkIds(),this.getCaipAddress=r=>ae.state.activeChain===r||!r?ae.state.activeCaipAddress:ae.getAccountProp("caipAddress",r),this.setClientId=r=>{Nt.setClientId(r)},this.getProvider=r=>bn.getProvider(r),this.getProviderType=r=>bn.getProviderId(r),this.getPreferredAccountType=()=>xt.state.preferredAccountType,this.setCaipAddress=(r,n)=>{xt.setCaipAddress(r,n)},this.setBalance=(r,n,i)=>{xt.setBalance(r,n,i)},this.setProfileName=(r,n)=>{xt.setProfileName(r,n)},this.setProfileImage=(r,n)=>{xt.setProfileImage(r,n)},this.setUser=(r,n)=>{xt.setUser(r,n),Ne.state.enableEmbedded&&or.close()},this.resetAccount=r=>{xt.resetAccount(r)},this.setCaipNetwork=r=>{ae.setActiveCaipNetwork(r)},this.setCaipNetworkOfNamespace=(r,n)=>{ae.setChainNetworkData(n,{caipNetwork:r})},this.setAllAccounts=(r,n)=>{xt.setAllAccounts(r,n),Ne.setHasMultipleAddresses(r?.length>1)},this.setStatus=(r,n)=>{xt.setStatus(r,n),Je.isConnected()?dt.setConnectionStatus("connected"):dt.setConnectionStatus("disconnected")},this.getAddressByChainNamespace=r=>ae.getAccountProp("address",r),this.setConnectors=r=>{const n=[...Je.getConnectors(),...r];Je.setConnectors(n)},this.fetchIdentity=r=>Nt.fetchIdentity(r),this.getReownName=r=>gte.getNamesForAddress(r),this.getConnectors=()=>Je.getConnectors(),this.getConnectorImage=r=>ri.getConnectorImage(r),this.setConnectedWalletInfo=(r,n)=>{const i=bn.getProviderId(n),s=r?{...r,type:i}:void 0;xt.setConnectedWalletInfo(s,n)},this.getIsConnectedState=()=>!!ae.state.activeCaipAddress,this.addAddressLabel=(r,n,i)=>{xt.addAddressLabel(r,n,i)},this.removeAddressLabel=(r,n)=>{xt.removeAddressLabel(r,n)},this.getAddress=r=>ae.state.activeChain===r||!r?xt.state.address:ae.getAccountProp("address",r),this.setApprovedCaipNetworksData=r=>ae.setApprovedCaipNetworksData(r),this.resetNetwork=r=>{ae.resetNetwork(r)},this.addConnector=r=>{Je.addConnector(r)},this.resetWcConnection=()=>{ht.resetWcConnection()},this.setAddressExplorerUrl=(r,n)=>{xt.setAddressExplorerUrl(r,n)},this.setSmartAccountDeployed=(r,n)=>{xt.setSmartAccountDeployed(r,n)},this.setSmartAccountEnabledNetworks=(r,n)=>{ae.setSmartAccountEnabledNetworks(r,n)},this.setPreferredAccountType=(r,n)=>{xt.setPreferredAccountType(r,n)},this.setEIP6963Enabled=r=>{Ne.setEIP6963Enabled(r)},this.handleUnsafeRPCRequest=()=>{if(this.isOpen()){if(this.isTransactionStackEmpty())return;this.redirect("ApproveTransaction")}else this.open({view:"ApproveTransaction"})},this.options=t,this.version=t.sdkVersion,this.caipNetworks=this.extendCaipNetworks(t),this.chainNamespaces=[...new Set(this.caipNetworks?.map(r=>r.chainNamespace))],this.defaultCaipNetwork=this.extendDefaultCaipNetwork(t),this.chainAdapters=this.createAdapters(t.adapters),this.initialize(t),this.sendInitializeEvent(t)}async initialize(t){this.initControllers(t),await this.initChainAdapters(),await this.injectModalUi(),await this.syncExistingConnection(),Hu.set({initialized:!0})}sendInitializeEvent(t){const{...r}=t;delete r.adapters,Ut.sendEvent({type:"track",event:"INITIALIZE",properties:{...r,networks:t.networks.map(n=>n.id),siweConfig:{options:t.siweConfig?.options||{}}}})}initControllers(t){this.initializeOptionsController(t),this.initializeChainController(t),this.initializeThemeController(t),this.initializeConnectionController(t),this.initializeConnectorController()}initializeThemeController(t){t.themeMode&&Jn.setThemeMode(t.themeMode),t.themeVariables&&Jn.setThemeVariables(t.themeVariables)}initializeChainController(t){if(!this.connectionControllerClient||!this.networkControllerClient)throw new Error("ConnectionControllerClient and NetworkControllerClient must be set");ae.initialize(t.adapters??[],this.caipNetworks,{connectionControllerClient:this.connectionControllerClient,networkControllerClient:this.networkControllerClient});const r=this.getDefaultNetwork();r&&ae.setActiveCaipNetwork(r)}initializeConnectionController(t){ht.setWcBasic(t.basic??!1)}initializeConnectorController(){Je.initialize(this.chainNamespaces)}initializeOptionsController(t){Ne.setDebug(t.debug!==!1),Ne.setEnableWalletConnect(t.enableWalletConnect!==!1),Ne.setEnableWalletGuide(t.enableWalletGuide!==!1),Ne.setEnableWallets(t.enableWallets!==!1),Ne.setEIP6963Enabled(t.enableEIP6963!==!1),Ne.setEnableNetworkSwitch(t.enableNetworkSwitch!==!1),Ne.setEnableAuthLogger(t.enableAuthLogger!==!1),Ne.setCustomRpcUrls(t.customRpcUrls),Ne.setSdkVersion(t.sdkVersion),Ne.setProjectId(t.projectId),Ne.setEnableEmbedded(t.enableEmbedded),Ne.setAllWallets(t.allWallets),Ne.setIncludeWalletIds(t.includeWalletIds),Ne.setExcludeWalletIds(t.excludeWalletIds),Ne.setFeaturedWalletIds(t.featuredWalletIds),Ne.setTokens(t.tokens),Ne.setTermsConditionsUrl(t.termsConditionsUrl),Ne.setPrivacyPolicyUrl(t.privacyPolicyUrl),Ne.setCustomWallets(t.customWallets),Ne.setFeatures(t.features),Ne.setAllowUnsupportedChain(t.allowUnsupportedChain),Ne.setDefaultAccountTypes(t.defaultAccountTypes),Ne.setUniversalProviderConfigOverride(t.universalProviderConfigOverride);const r=this.getDefaultMetaData();if(!t.metadata&&r&&(t.metadata=r),Ne.setMetadata(t.metadata),Ne.setDisableAppend(t.disableAppend),Ne.setEnableEmbedded(t.enableEmbedded),Ne.setSIWX(t.siwx),!t.projectId){cf.open(ww.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");return}if(t.adapters?.find(i=>i.namespace===vt.CHAIN.EVM)&&t.siweConfig){if(t.siwx)throw new Error("Cannot set both `siweConfig` and `siwx` options");Ne.setSIWX(t.siweConfig.mapToSIWX())}}getDefaultMetaData(){return typeof window<"u"&&typeof document<"u"?{name:document.getElementsByTagName("title")?.[0]?.textContent||"",description:document.querySelector('meta[property="og:description"]')?.content||"",url:window.location.origin,icons:[document.querySelector('link[rel~="icon"]')?.href||""]}:null}setUnsupportedNetwork(t){const r=this.getActiveChainNamespace();if(r){const n=Y0.getUnsupportedNetwork(`${r}:${t}`);ae.setActiveCaipNetwork(n)}}getDefaultNetwork(){return Y0.getCaipNetworkFromStorage(this.defaultCaipNetwork)}extendCaipNetwork(t,r){return Y0.extendCaipNetwork(t,{customNetworkImageUrls:r.chainImages,projectId:r.projectId})}extendCaipNetworks(t){return Y0.extendCaipNetworks(t.networks,{customNetworkImageUrls:t.chainImages,customRpcUrls:t.customRpcUrls,projectId:t.projectId})}extendDefaultCaipNetwork(t){const r=t.networks.find(i=>i.id===t.defaultNetwork?.id);return r?Y0.extendCaipNetwork(r,{customNetworkImageUrls:t.chainImages,customRpcUrls:t.customRpcUrls,projectId:t.projectId}):void 0}createClients(){this.connectionControllerClient={connectWalletConnect:async()=>{const t=ae.state.activeChain,r=this.getAdapter(t),n=this.getCaipNetwork(t)?.id;if(!r)throw new Error("Adapter not found");const i=await r.connectWalletConnect(n);this.close(),this.setClientId(i?.clientId||null),dt.setConnectedNamespaces([...ae.state.chains.keys()]),this.chainNamespaces.forEach(s=>{Je.setConnectorId(Bl.CONNECTOR_TYPE_WALLET_CONNECT,s)}),await this.syncWalletConnectAccount()},connectExternal:async({id:t,info:r,type:n,provider:i,chain:s,caipNetwork:o})=>{const a=ae.state.activeChain,c=s||a,u=this.getAdapter(c);if(s&&s!==a&&!o){const g=this.caipNetworks?.find(m=>m.chainNamespace===s);g&&this.setCaipNetwork(g)}if(!u)throw new Error("Adapter not found");const l=this.getCaipNetwork(c),d=await u.connect({id:t,info:r,type:n,provider:i,chainId:o?.id||l?.id,rpcUrl:o?.rpcUrls?.default?.http?.[0]||l?.rpcUrls?.default?.http?.[0]});if(!d)return;dt.addConnectedNamespace(c),this.syncProvider({...d,chainNamespace:c}),await this.syncAccount({...d,chainNamespace:c});const{accounts:h}=await u.getAccounts({namespace:c,id:t});this.setAllAccounts(h,c)},reconnectExternal:async({id:t,info:r,type:n,provider:i})=>{const s=ae.state.activeChain,o=this.getAdapter(s);o?.reconnect&&(await o?.reconnect({id:t,info:r,type:n,provider:i,chainId:this.getCaipNetwork()?.id}),dt.addConnectedNamespace(s))},disconnect:async t=>{const r=t||ae.state.activeChain,n=this.getAdapter(r),i=bn.getProvider(r),s=bn.getProviderId(r);await n?.disconnect({provider:i,providerType:s}),dt.removeConnectedNamespace(r),bn.resetChain(r),this.setUser(void 0,r),this.setStatus("disconnected",r),this.hasSwitchedToPreferredAccountTypeOnConnect=!1},checkInstalled:t=>t?t.some(r=>!!window.ethereum?.[String(r)]):!!window.ethereum,signMessage:async t=>(await this.getAdapter(ae.state.activeChain)?.signMessage({message:t,address:xt.state.address,provider:bn.getProvider(ae.state.activeChain)}))?.signature||"",sendTransaction:async t=>{if(t.chainNamespace===vt.CHAIN.EVM){const r=this.getAdapter(ae.state.activeChain),n=bn.getProvider(ae.state.activeChain);return(await r?.sendTransaction({...t,caipNetwork:this.getCaipNetwork(),provider:n}))?.hash||""}return""},estimateGas:async t=>{if(t.chainNamespace===vt.CHAIN.EVM){const r=this.getAdapter(ae.state.activeChain),n=bn.getProvider(ae.state.activeChain),i=this.getCaipNetwork();if(!i)throw new Error("CaipNetwork is undefined");return(await r?.estimateGas({...t,provider:n,caipNetwork:i}))?.gas||0n}return 0n},getEnsAvatar:async()=>(await this.getAdapter(ae.state.activeChain)?.getProfile({address:xt.state.address,chainId:Number(this.getCaipNetwork()?.id)}))?.profileImage||!1,getEnsAddress:async t=>{const r=this.getAdapter(ae.state.activeChain),n=this.getCaipNetwork();return n&&(await r?.getEnsAddress({name:t,caipNetwork:n}))?.address||!1},writeContract:async t=>{const r=this.getAdapter(ae.state.activeChain),n=this.getCaipNetwork(),i=this.getCaipAddress(),s=bn.getProvider(ae.state.activeChain);if(!n||!i)throw new Error("CaipNetwork or CaipAddress is undefined");return(await r?.writeContract({...t,caipNetwork:n,provider:s,caipAddress:i}))?.hash},parseUnits:(t,r)=>this.getAdapter(ae.state.activeChain)?.parseUnits({value:t,decimals:r})??0n,formatUnits:(t,r)=>this.getAdapter(ae.state.activeChain)?.formatUnits({value:t,decimals:r})??"0",getCapabilities:async t=>await this.getAdapter(ae.state.activeChain)?.getCapabilities(t),grantPermissions:async t=>await this.getAdapter(ae.state.activeChain)?.grantPermissions(t),revokePermissions:async t=>{const r=this.getAdapter(ae.state.activeChain);return r?.revokePermissions?await r.revokePermissions(t):"0x"},walletGetAssets:async t=>await this.getAdapter(ae.state.activeChain)?.walletGetAssets(t)??{}},this.networkControllerClient={switchCaipNetwork:async t=>await this.switchCaipNetwork(t),getApprovedCaipNetworksData:async()=>this.getApprovedCaipNetworksData()},ht.setClient(this.connectionControllerClient)}getApprovedCaipNetworksData(){if(bn.getProviderId(ae.state.activeChain)===Bl.CONNECTOR_TYPE_WALLET_CONNECT){const r=this.universalProvider?.session?.namespaces;return{supportsAllNetworks:this.universalProvider?.session?.peer?.metadata.name==="MetaMask Wallet",approvedCaipNetworkIds:this.getChainsFromNamespaces(r)}}return{supportsAllNetworks:!0,approvedCaipNetworkIds:[]}}async switchCaipNetwork(t){if(!t)return;const r=t.chainNamespace;if(this.getAddressByChainNamespace(t.chainNamespace)){const i=bn.getProvider(r),s=bn.getProviderId(r);if(t.chainNamespace===ae.state.activeChain)await this.getAdapter(r)?.switchNetwork({caipNetwork:t,provider:i,providerType:s});else if(this.setCaipNetwork(t),s===Bl.CONNECTOR_TYPE_WALLET_CONNECT)this.syncWalletConnectAccount();else{const o=this.getAddressByChainNamespace(r);o&&this.syncAccount({address:o,chainId:t.id,chainNamespace:r})}}else this.setCaipNetwork(t)}getChainsFromNamespaces(t={}){return Object.values(t).flatMap(r=>{const n=r.chains||[],i=r.accounts.map(s=>{const{chainId:o,chainNamespace:a}=Cl.parseCaipAddress(s);return`${a}:${o}`});return Array.from(new Set([...n,...i]))})}createAdapters(t){return this.createClients(),this.chainNamespaces.reduce((r,n)=>{const i=t?.find(s=>s.namespace===n);return i?(r[n]=i,r[n].namespace=n,r[n].construct({namespace:n,projectId:this.options?.projectId,networks:this.caipNetworks})):r[n]=new Vrt({namespace:n,networks:this.caipNetworks}),r},{})}async initChainAdapter(t){this.onConnectors(t),this.listenAdapter(t),this.chainAdapters?.[t].syncConnectors(this.options,this),await this.createUniversalProviderForAdapter(t)}async initChainAdapters(){await Promise.all(this.chainNamespaces.map(async t=>{await this.initChainAdapter(t)}))}onConnectors(t){this.getAdapter(t)?.on("connectors",this.setConnectors.bind(this))}listenAdapter(t){const r=this.getAdapter(t);if(!r)return;const n=dt.getConnectionStatus();n==="connected"?this.setStatus("connecting",t):n==="disconnected"?(dt.clearAddressCache(),this.setStatus(n,t)):this.setStatus(n,t),r.on("switchNetwork",({address:i,chainId:s})=>{const o=this.caipNetworks?.find(u=>u.id===s||u.caipNetworkId===s),a=ae.state.activeChain===t,c=ae.getAccountProp("address",t);if(o){const u=a&&i?i:c;u&&this.syncAccount({address:u,chainId:s,chainNamespace:t})}else this.setUnsupportedNetwork(s)}),r.on("disconnect",this.disconnect.bind(this,t)),r.on("pendingTransactions",()=>{const i=xt.state.address,s=ae.state.activeCaipNetwork;!i||!s?.id||this.updateNativeBalance(i,s.id,s.chainNamespace)}),r.on("accountChanged",({address:i,chainId:s})=>{const o=ae.state.activeChain===t;o&&s?this.syncAccount({address:i,chainId:s,chainNamespace:t}):o&&ae.state.activeCaipNetwork?.id?this.syncAccount({address:i,chainId:ae.state.activeCaipNetwork?.id,chainNamespace:t}):this.syncAccountInfo(i,s,t)})}async createUniversalProviderForAdapter(t){await this.getUniversalProvider(),this.universalProvider&&this.chainAdapters?.[t]?.setUniversalProvider?.(this.universalProvider)}async syncExistingConnection(){await Promise.allSettled(this.chainNamespaces.map(t=>this.syncNamespaceConnection(t)))}async syncNamespaceConnection(t){try{const r=Je.getConnectorId(t);switch(this.setStatus("connecting",t),r){case vt.CONNECTOR_ID.WALLET_CONNECT:await this.syncWalletConnectAccount();break;case vt.CONNECTOR_ID.AUTH:break;default:await this.syncAdapterConnection(t)}}catch(r){console.warn("AppKit couldn't sync existing connection",r),this.setStatus("disconnected",t)}}async syncAdapterConnection(t){const r=this.getAdapter(t),n=Je.getConnectorId(t),i=this.getCaipNetwork(t),s=Je.getConnectors(t).find(o=>o.id===n);try{if(!r||!s)throw new Error(`Adapter or connector not found for namespace ${t}`);if(!i?.id)throw new Error("CaipNetwork not found");const o=await r?.syncConnection({namespace:t,id:s.id,chainId:i.id,rpcUrl:i?.rpcUrls?.default?.http?.[0]});if(o){const a=await r?.getAccounts({namespace:t,id:s.id});a&&a.accounts.length>0?this.setAllAccounts(a.accounts,t):this.setAllAccounts([Fe.createAccount(t,o.address,"eoa")],t),this.syncProvider({...o,chainNamespace:t}),await this.syncAccount({...o,chainNamespace:t}),this.setStatus("connected",t)}else this.setStatus("disconnected",t)}catch{this.setStatus("disconnected",t)}}async syncWalletConnectAccount(){const t=this.chainNamespaces.map(async r=>{const n=this.getAdapter(r),i=this.universalProvider?.session?.namespaces?.[r]?.accounts||[],s=ae.state.activeCaipNetwork?.id,o=i.find(a=>{const{chainId:c}=Cl.parseCaipAddress(a);return c===s?.toString()})||i[0];if(o){const a=Cl.validateCaipAddress(o),{chainId:c,address:u}=Cl.parseCaipAddress(a);if(bn.setProviderId(r,Bl.CONNECTOR_TYPE_WALLET_CONNECT),this.caipNetworks&&ae.state.activeCaipNetwork&&n?.namespace!==vt.CHAIN.EVM){const l=n?.getWalletConnectProvider({caipNetworks:this.caipNetworks,provider:this.universalProvider,activeCaipNetwork:ae.state.activeCaipNetwork});bn.setProvider(r,l)}else bn.setProvider(r,this.universalProvider);Je.setConnectorId(vt.CONNECTOR_ID.WALLET_CONNECT,r),dt.addConnectedNamespace(r),this.syncWalletConnectAccounts(r),await this.syncAccount({address:u,chainId:c,chainNamespace:r})}else this.setStatus("disconnected",r);await ae.setApprovedCaipNetworksData(r)});await Promise.all(t)}syncWalletConnectAccounts(t){const r=this.universalProvider?.session?.namespaces?.[t]?.accounts?.map(n=>{const{address:i}=Cl.parseCaipAddress(n);return i}).filter((n,i,s)=>s.indexOf(n)===i);r&&this.setAllAccounts(r.map(n=>Fe.createAccount(t,n,t==="bip122"?"payment":"eoa")),t)}syncProvider({type:t,provider:r,id:n,chainNamespace:i}){bn.setProviderId(i,t),bn.setProvider(i,r),Je.setConnectorId(n,i)}async syncAccount(t){const r=t.chainNamespace===ae.state.activeChain,n=ae.getCaipNetworkByNamespace(t.chainNamespace,t.chainId),{address:i,chainId:s,chainNamespace:o}=t,{chainId:a}=dt.getActiveNetworkProps(),c=s||a,u=ae.state.activeCaipNetwork?.name===vt.UNSUPPORTED_NETWORK_NAME,l=ae.getNetworkProp("supportsAllNetworks",o);if(this.setStatus("connected",o),!(u&&!l)&&c){let d=this.caipNetworks?.find(m=>m.id.toString()===c.toString()),h=this.caipNetworks?.find(m=>m.chainNamespace===o);if(!l&&!d&&!h){const m=this.getApprovedCaipNetworkIds()||[],b=m.find(w=>Cl.parseCaipNetworkId(w)?.chainId===c.toString()),k=m.find(w=>Cl.parseCaipNetworkId(w)?.chainNamespace===o);d=this.caipNetworks?.find(w=>w.caipNetworkId===b),h=this.caipNetworks?.find(w=>w.caipNetworkId===k||"deprecatedCaipNetworkId"in w&&w.deprecatedCaipNetworkId===k)}const g=d||h;g?.chainNamespace===ae.state.activeChain?Ne.state.enableNetworkSwitch&&!Ne.state.allowUnsupportedChain&&ae.state.activeCaipNetwork?.name===vt.UNSUPPORTED_NETWORK_NAME?ae.showUnsupportedChainUI():this.setCaipNetwork(g):r||n&&this.setCaipNetworkOfNamespace(n,o),this.syncConnectedWalletInfo(o),mte.isLowerCaseMatch(i,xt.state.address)||this.syncAccountInfo(i,g?.id,o),r?await this.syncBalance({address:i,chainId:g?.id,chainNamespace:o}):await this.syncBalance({address:i,chainId:n?.id,chainNamespace:o})}}async syncAccountInfo(t,r,n){const i=this.getCaipAddress(n),s=r||i?.split(":")[1];if(!s)return;const o=`${n}:${s}:${t}`;this.setCaipAddress(o,n),await this.syncIdentity({address:t,chainId:s,chainNamespace:n})}async syncReownName(t,r){try{const n=await this.getReownName(t);if(n[0]){const i=n[0];this.setProfileName(i.name,r)}else this.setProfileName(null,r)}catch{this.setProfileName(null,r)}}syncConnectedWalletInfo(t){const r=Je.getConnectorId(t),n=bn.getProviderId(t);if(n===Bl.CONNECTOR_TYPE_ANNOUNCED||n===Bl.CONNECTOR_TYPE_INJECTED){if(r){const i=this.getConnectors().find(s=>s.id===r);if(i){const{info:s,name:o,imageUrl:a}=i,c=a||this.getConnectorImage(i);this.setConnectedWalletInfo({name:o,icon:c,...s},t)}}}else if(n===Bl.CONNECTOR_TYPE_WALLET_CONNECT){const i=bn.getProvider(t);i?.session&&this.setConnectedWalletInfo({...i.session.peer.metadata,name:i.session.peer.metadata.name,icon:i.session.peer.metadata.icons?.[0]},t)}else if(r)if(r===vt.CONNECTOR_ID.COINBASE){const i=this.getConnectors().find(s=>s.id===vt.CONNECTOR_ID.COINBASE);this.setConnectedWalletInfo({name:"Coinbase Wallet",icon:this.getConnectorImage(i)},t)}else this.setConnectedWalletInfo({name:r},t)}async syncBalance(t){!qX.getNetworksByNamespace(this.caipNetworks,t.chainNamespace).find(n=>n.id.toString()===t.chainId?.toString())||!t.chainId||await this.updateNativeBalance(t.address,t.chainId,t.chainNamespace)}async updateNativeBalance(t,r,n){const i=this.getAdapter(n);if(i){const s=await i.getBalance({address:t,chainId:r,caipNetwork:this.getCaipNetwork(n),tokens:this.options.tokens});this.setBalance(s.balance,s.symbol,n)}}async initializeUniversalAdapter(){const t=grt.createLogger((n,...i)=>{n&&this.handleAlertError(n),console.error(...i)}),r={projectId:this.options?.projectId,metadata:{name:this.options?.metadata?this.options?.metadata.name:"",description:this.options?.metadata?this.options?.metadata.description:"",url:this.options?.metadata?this.options?.metadata.url:"",icons:this.options?.metadata?this.options?.metadata.icons:[""]},logger:t};Ne.setManualWCControl(!!this.options?.manualWCControl),this.universalProvider=this.options.universalProvider??await Ltt.init(r),this.listenWalletConnect()}listenWalletConnect(){this.universalProvider&&(this.universalProvider.on("display_uri",t=>{ht.setUri(t)}),this.universalProvider.on("connect",ht.finalizeWcConnection),this.universalProvider.on("disconnect",()=>{this.chainNamespaces.forEach(t=>{this.resetAccount(t)}),ht.resetWcConnection()}),this.universalProvider.on("chainChanged",t=>{const r=this.caipNetworks?.find(i=>i.id==t),n=this.getCaipNetwork();if(!r){this.setUnsupportedNetwork(t);return}n?.id!==r?.id&&this.setCaipNetwork(r)}),this.universalProvider.on("session_event",t=>{if(Ste.isSessionEventData(t)){const{name:r,data:n}=t.params.event;r==="accountsChanged"&&Array.isArray(n)&&Fe.isCaipAddress(n[0])&&this.syncAccount(Cl.parseCaipAddress(n[0]))}}))}createUniversalProvider(){return!this.universalProviderInitPromise&&Fe.isClient()&&this.options?.projectId&&(this.universalProviderInitPromise=this.initializeUniversalAdapter()),this.universalProviderInitPromise}async getUniversalProvider(){if(!this.universalProvider)try{await this.createUniversalProvider()}catch(t){Ut.sendEvent({type:"error",event:"INTERNAL_SDK_ERROR",properties:{errorType:"UniversalProviderInitError",errorMessage:t instanceof Error?t.message:"Unknown",uncaught:!1}}),console.error("AppKit:getUniversalProvider - Cannot create provider",t)}return this.universalProvider}handleAlertError(t){const r=Object.entries(ww.UniversalProviderErrors).find(([,{message:a}])=>t.message.includes(a)),[n,i]=r??[],{message:s,alertErrorKey:o}=i??{};if(n&&s&&!this.reportedAlertErrors[n]){const a=ww.ALERT_ERRORS[o];a&&(cf.open(a,"error"),this.reportedAlertErrors[n]=!0)}}getAdapter(t){if(t)return this.chainAdapters?.[t]}createAdapter(t){if(!t)return;const r=t.namespace;if(!r)return;this.createClients();const n=t;n.namespace=r,n.construct({namespace:r,projectId:this.options?.projectId,networks:this.caipNetworks}),this.chainNamespaces.includes(r)||this.chainNamespaces.push(r),this.chainAdapters&&(this.chainAdapters[r]=n)}async open(t){await this.injectModalUi(),t?.uri&&ht.setUri(t.uri),await or.open(t)}async close(){await this.injectModalUi(),or.close()}setLoading(t,r){or.setLoading(t,r)}async disconnect(t){await ht.disconnect(t)}getError(){return""}getChainId(){return ae.state.activeCaipNetwork?.id}async switchNetwork(t){const r=this.caipNetworks?.find(n=>n.id===t.id);if(!r){cf.open(ww.ALERT_ERRORS.SWITCH_NETWORK_NOT_FOUND,"error");return}await ae.switchActiveNetwork(r)}getWalletProvider(){return ae.state.activeChain?bn.state.providers[ae.state.activeChain]:null}getWalletProviderType(){return bn.getProviderId(ae.state.activeChain)}subscribeProviders(t){return bn.subscribeProviders(t)}getThemeMode(){return Jn.state.themeMode}getThemeVariables(){return Jn.state.themeVariables}setThemeMode(t){Jn.setThemeMode(t),Ate(Jn.state.themeMode)}setTermsConditionsUrl(t){Ne.setTermsConditionsUrl(t)}setPrivacyPolicyUrl(t){Ne.setPrivacyPolicyUrl(t)}setThemeVariables(t){Jn.setThemeVariables(t),zrt(Jn.state.themeVariables)}subscribeTheme(t){return Jn.subscribe(t)}getWalletInfo(){return xt.state.connectedWalletInfo}getAccount(t){const r=Je.getAuthConnector(t),n=ae.getAccountData(t);if(n)return{allAccounts:n.allAccounts,caipAddress:n.caipAddress,address:Fe.getPlainAddress(n.caipAddress),isConnected:!!n.caipAddress,status:n.status,embeddedWalletInfo:r?{user:n.user,authProvider:n.socialProvider||"email",accountType:n.preferredAccountType,isSmartAccountDeployed:!!n.smartAccountDeployed}:void 0}}subscribeAccount(t,r){const n=()=>{const i=this.getAccount(r);i&&t(i)};r?ae.subscribeChainProp("accountState",n,r):ae.subscribe(n),Je.subscribe(n)}subscribeNetwork(t){return ae.subscribe(({activeCaipNetwork:r})=>{t({caipNetwork:r,chainId:r?.id,caipNetworkId:r?.caipNetworkId})})}subscribeWalletInfo(t){return xt.subscribeKey("connectedWalletInfo",t)}subscribeShouldUpdateToAddress(t){xt.subscribeKey("shouldUpdateToAddress",t)}subscribeCaipNetworkChange(t){ae.subscribeKey("activeCaipNetwork",t)}getState(){return Hu.state}subscribeState(t){return Hu.subscribe(t)}showErrorMessage(t){Gr.showError(t)}showSuccessMessage(t){Gr.showSuccess(t)}getEvent(){return{...Ut.state}}subscribeEvents(t){return Ut.subscribe(t)}replace(t){Ze.replace(t)}redirect(t){Ze.push(t)}popTransactionStack(t){Ze.popTransactionStack(t)}isOpen(){return or.state.open}isTransactionStackEmpty(){return Ze.state.transactionStack.length===0}isTransactionShouldReplaceView(){return Ze.state.transactionStack[Ze.state.transactionStack.length-1]?.replace}static getInstance(){return this.instance}updateFeatures(t){Ne.setFeatures(t)}updateOptions(t){const n={...Ne.state||{},...t};Ne.setOptions(n)}setConnectMethodsOrder(t){Ne.setConnectMethodsOrder(t)}setWalletFeaturesOrder(t){Ne.setWalletFeaturesOrder(t)}setCollapseWallets(t){Ne.setCollapseWallets(t)}setSocialsOrder(t){Ne.setSocialsOrder(t)}getConnectMethodsOrder(){return s1.getConnectOrderMethod(Ne.state.features,Je.getConnectors())}removeAdapter(t){const r=this.getIsConnectedState(),n=this.getAdapter(t);if(!n||!this.chainAdapters||r)return;const i=this.caipNetworks?.filter(s=>s.chainNamespace!==t);ae.removeAdapter(t),Je.removeAdapter(t),this.chainNamespaces=this.chainNamespaces.filter(s=>s!==t),this.caipNetworks=i,n.removeAllEventListeners(),Reflect.deleteProperty(this.chainAdapters,t)}addAdapter(t,r){const n=t.namespace;if(!this.connectionControllerClient||!this.networkControllerClient||!this.chainAdapters||!n)return;const i=this.extendCaipNetworks({...this.options,networks:r});this.caipNetworks=[...this.caipNetworks||[],...i],this.createAdapter(t),this.initChainAdapter(n),ae.addAdapter(t,{connectionControllerClient:this.connectionControllerClient,networkControllerClient:this.networkControllerClient},i)}addNetwork(t,r){if(this.chainAdapters&&!this.chainAdapters[t])throw new Error(`Adapter for namespace ${t} doesn't exist`);const n=this.extendCaipNetwork(r,this.options);ae.addNetwork(n),this.caipNetworks&&!this.caipNetworks?.find(i=>i.id===n.id)&&this.caipNetworks.push(n)}removeNetwork(t,r){if(this.chainAdapters&&!this.chainAdapters[t])throw new Error(`Adapter for namespace ${t} doesn't exist`);if(!this.caipNetworks?.find(s=>s.id===r))throw new Error(`Network with ID ${r} not found`);if(!this.caipNetworks)return;const i=this.caipNetworks.filter(s=>s.chainNamespace===t&&s.id!==r);if(!i?.length)throw new Error("Cannot remove last network for a namespace");ae.removeNetwork(t,r),this.caipNetworks=[...i]}}let PU=!1;class Grt extends Krt{async open(t){Je.isConnected()||await super.open(t)}async close(){await super.close(),this.options.manualWCControl&&ht.finalizeWcConnection()}async syncIdentity(t){return Promise.resolve()}async syncBalance(t){return Promise.resolve()}async injectModalUi(){if(!PU&&Fe.isClient()){if(await Le(()=>Promise.resolve().then(()=>elt),void 0),await Le(()=>Promise.resolve().then(()=>mlt),void 0),!document.querySelector("w3m-modal")){const r=document.createElement("w3m-modal");!Ne.state.disableAppend&&!Ne.state.enableEmbedded&&document.body.insertAdjacentElement("beforeend",r)}PU=!0}}}const Zrt="1.7.2";function Yrt(e){return new Grt({...e,basic:!0,sdkVersion:`html-core-${Zrt}`})}class fp extends Error{constructor(){super(),Object.setPrototypeOf(this,fp.prototype)}}class DU extends Error{constructor(t){super(`WalletConnect Adapter - Method ${t} is not supported by the wallet`),this.name="WalletConnectFeatureNotSupportedError"}}function Jrt(e){let t=[e];return e===Yn.Mainnet||e===Yn.Deprecated_Mainnet?(t=[Yn.Mainnet,Yn.Deprecated_Mainnet],e===Yn.Deprecated_Mainnet&&console.warn(w3.mainnet)):(e===Yn.Deprecated_Devnet||e===Yn.Devnet)&&(t=[Yn.Devnet,Yn.Deprecated_Devnet],console.warn(w3.devnet)),t}const w3={mainnet:`You are using a deprecated chain ID for Solana Mainnet, please use ${Yn.Mainnet} instead.`,devnet:`You are using a deprecated chain ID for Solana Devnet, please use ${Yn.Devnet} instead.`,wallet:"The connected wallet is using a deprecated chain ID for Solana. Please, contact them to upgrade. You can learn more at https://github.com/ChainAgnostic/namespaces/blob/main/solana/caip10.md#chain-ids"};function RU(e,t){const r=e.namespaces.solana?.accounts.map(n=>`solana:${n.split(":")[1]}`);if(t===Yn.Mainnet)return r?.find(n=>n===Yn.Mainnet)?Yn.Mainnet:(console.warn(w3.wallet),Yn.Deprecated_Mainnet);if(t===Yn.Devnet)return r?.find(n=>n===Yn.Devnet)?Yn.Devnet:(console.warn(w3.wallet),Yn.Deprecated_Devnet);throw Error("WalletConnect Solana Adapter: Unable to get a default chain from the session.")}function Xrt(e){return{optionalNamespaces:{solana:{chains:Jrt(e),methods:[ta.signTransaction,ta.signMessage],events:[]}}}}class xM extends Error{constructor(){super("QR Code Modal was closed by user"),Object.setPrototypeOf(this,xM.prototype),this.name="QRCodeModalError"}}class Qrt{_UniversalProvider;_session;_modal;_projectId;_network;_ConnectQueueResolver;constructor(t){if(this.initClient(t.options),this._network=t.network,!t.options.projectId)throw Error("WalletConnect Adapter: Project ID is undefined");this._projectId=t.options.projectId}async connect(){if(this._UniversalProvider||await new Promise(i=>{this._ConnectQueueResolver=i}),!this._UniversalProvider)throw new Error("WalletConnect Adapter - Universal Provider was undefined while calling 'connect()'");if(this._UniversalProvider.session){this._session=this._UniversalProvider.session;const i=RU(this._session,this._network);return this._network=i,this._UniversalProvider.setDefaultChain(i),{publicKey:this.publicKey}}await this.initModal();const t=Xrt(this._network);this._modal?.open();const r=new AbortController,n=r.signal;this._modal?.subscribeState(i=>{i.open||r.abort(new xM)});try{const i=await Promise.race([this._UniversalProvider?.connect(t),new Promise((o,a)=>{n.addEventListener("abort",()=>{a(n.reason)})})]);if(this._modal?.close(),this._session=i,!i)throw new Nc;const s=RU(i,this._network);return this._network=s,this._UniversalProvider?.setDefaultChain(s),{publicKey:this.publicKey}}catch(i){throw this._modal?.close(),i}}async disconnect(){if(this._UniversalProvider?.session){if(await this.initModal(),!this._modal)throw Error("WalletConnect Adapter -Modal is undefined: unable to disconnect");await this.client.disconnect(),this._session=void 0}else throw new fp}get client(){if(this._UniversalProvider)return this._UniversalProvider;throw new fp}get session(){if(!this._session)throw new fp;return this._session}get publicKey(){if(this._UniversalProvider?.session&&this._session){const{address:t}=kSe(this._session?.namespaces.solana?.accounts[0]??"");return new bt(t)}throw new fp}async signTransaction(t){this.checkIfWalletSupportsMethod(ta.signTransaction);const r=Ba(t),n=r?{}:t,{signature:i,transaction:s}=await this.client.client.request({chainId:this._network,topic:this.session.topic,request:{method:ta.signTransaction,params:{...n,transaction:this.serialize(t)}}});return s?this.deserialize(s,r):(t.addSignature(this.publicKey,Buffer.from(tm.decode(i))),t)}async signMessage(t){this.checkIfWalletSupportsMethod(ta.signMessage);const{signature:r}=await this.client.client.request({chainId:this._network,topic:this.session.topic,request:{method:ta.signMessage,params:{pubkey:this.publicKey.toString(),message:tm.encode(t)}}});return tm.decode(r)}async signAndSendTransaction(t){this.checkIfWalletSupportsMethod(ta.signAndSendTransaction);const{signature:r}=await this.client.client.request({chainId:this._network,topic:this.session.topic,request:{method:ta.signAndSendTransaction,params:{transaction:this.serialize(t)}}});return r}async signAllTransactions(t){try{this.checkIfWalletSupportsMethod(ta.signAllTransactions);const r=t.map(i=>this.serialize(i)),{transactions:n}=await this.client.client.request({chainId:this._network,topic:this.session.topic,request:{method:ta.signAllTransactions,params:{transactions:r}}});return t.map((i,s)=>Ba(i)?this.deserialize(n[s]??"",!0):this.deserialize(n[s]??""))}catch(r){if(r instanceof DU){const n=t.map(s=>this.signTransaction(s));return await Promise.all(n)}throw r}}async initClient(t){const r=await BFe.init(t);this._UniversalProvider=r,this._ConnectQueueResolver&&this._ConnectQueueResolver(!0)}async initModal(){if(!this._modal){if(!this._UniversalProvider)throw new Error("WalletConnect Adapter - cannot init modal when Universal Provider is undefined");this._modal=Yrt({projectId:this._projectId,universalProvider:this._UniversalProvider,networks:[tS,rS,Urt],manualWCControl:!0})}}serialize(t){return Buffer.from(t.serialize({verifySignatures:!1})).toString("base64")}deserialize(t,r=!1){return r?Hs.deserialize(Buffer.from(t,"base64")):ua.from(Buffer.from(t,"base64"))}checkIfWalletSupportsMethod(t){if(!this.session.namespaces.solana?.methods.includes(t))throw new DU(t)}}const ent="WalletConnect";class Omt extends CK{name=ent;url="https://walletconnect.org";icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4NSIgdmlld0JveD0iMCAwIDMwMCAxODUiIHdpZHRoPSIzMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTYxLjQzODU0MjkgMzYuMjU2MjYxMmM0OC45MTEyMjQxLTQ3Ljg4ODE2NjMgMTI4LjIxMTk4NzEtNDcuODg4MTY2MyAxNzcuMTIzMjA5MSAwbDUuODg2NTQ1IDUuNzYzNDE3NGMyLjQ0NTU2MSAyLjM5NDQwODEgMi40NDU1NjEgNi4yNzY1MTEyIDAgOC42NzA5MjA0bC0yMC4xMzY2OTUgMTkuNzE1NTAzYy0xLjIyMjc4MSAxLjE5NzIwNTEtMy4yMDUzIDEuMTk3MjA1MS00LjQyODA4MSAwbC04LjEwMDU4NC03LjkzMTE0NzljLTM0LjEyMTY5Mi0zMy40MDc5ODE3LTg5LjQ0Mzg4Ni0zMy40MDc5ODE3LTEyMy41NjU1Nzg4IDBsLTguNjc1MDU2MiA4LjQ5MzYwNTFjLTEuMjIyNzgxNiAxLjE5NzIwNDEtMy4yMDUzMDEgMS4xOTcyMDQxLTQuNDI4MDgwNiAwbC0yMC4xMzY2OTQ5LTE5LjcxNTUwMzFjLTIuNDQ1NTYxMi0yLjM5NDQwOTItMi40NDU1NjEyLTYuMjc2NTEyMiAwLTguNjcwOTIwNHptMjE4Ljc2Nzc5NjEgNDAuNzczNzQ0OSAxNy45MjE2OTcgMTcuNTQ2ODk3YzIuNDQ1NTQ5IDIuMzk0Mzk2OSAyLjQ0NTU2MyA2LjI3NjQ3NjkuMDAwMDMxIDguNjcwODg5OWwtODAuODEwMTcxIDc5LjEyMTEzNGMtMi40NDU1NDQgMi4zOTQ0MjYtNi40MTA1ODIgMi4zOTQ0NTMtOC44NTYxNi4wMDAwNjItLjAwMDAxLS4wMDAwMS0uMDAwMDIyLS4wMDAwMjItLjAwMDAzMi0uMDAwMDMybC01Ny4zNTQxNDMtNTYuMTU0NTcyYy0uNjExMzktLjU5ODYwMi0xLjYwMjY1LS41OTg2MDItMi4yMTQwNCAwLS4wMDAwMDQuMDAwMDA0LS4wMDAwMDcuMDAwMDA4LS4wMDAwMTEuMDAwMDExbC01Ny4zNTI5MjEyIDU2LjE1NDUzMWMtMi40NDU1MzY4IDIuMzk0NDMyLTYuNDEwNTc1NSAyLjM5NDQ3Mi04Ljg1NjE2MTIuMDAwMDg3LS4wMDAwMTQzLS4wMDAwMTQtLjAwMDAyOTYtLjAwMDAyOC0uMDAwMDQ0OS0uMDAwMDQ0bC04MC44MTI0MTk0My03OS4xMjIxODVjLTIuNDQ1NTYwMjEtMi4zOTQ0MDgtMi40NDU1NjAyMS02LjI3NjUxMTUgMC04LjY3MDkxOTdsMTcuOTIxNzI5NjMtMTcuNTQ2ODY3M2MyLjQ0NTU2MDItMi4zOTQ0MDgyIDYuNDEwNTk4OS0yLjM5NDQwODIgOC44NTYxNjAyIDBsNTcuMzU0OTc3NSA1Ni4xNTUzNTdjLjYxMTM5MDguNTk4NjAyIDEuNjAyNjQ5LjU5ODYwMiAyLjIxNDAzOTggMCAuMDAwMDA5Mi0uMDAwMDA5LjAwMDAxNzQtLjAwMDAxNy4wMDAwMjY1LS4wMDAwMjRsNTcuMzUyMTAzMS01Ni4xNTUzMzNjMi40NDU1MDUtMi4zOTQ0NjMzIDYuNDEwNTQ0LTIuMzk0NTUzMSA4Ljg1NjE2MS0uMDAwMi4wMDAwMzQuMDAwMDMzNi4wMDAwNjguMDAwMDY3My4wMDAxMDEuMDAwMTAxbDU3LjM1NDkwMiA1Ni4xNTU0MzJjLjYxMTM5LjU5ODYwMSAxLjYwMjY1LjU5ODYwMSAyLjIxNDA0IDBsNTcuMzUzOTc1LTU2LjE1NDMyNDljMi40NDU1NjEtMi4zOTQ0MDkyIDYuNDEwNTk5LTIuMzk0NDA5MiA4Ljg1NjE2IDB6IiBmaWxsPSIjM2I5OWZjIi8+PC9zdmc+";supportedTransactionVersions=new Set(["legacy",0]);_publicKey;_connecting;_wallet;_config;_readyState;_onDisconnect;constructor(t){super(),this._publicKey=null,this._connecting=!1,this._config=t,this._wallet=null,this._readyState=typeof window>"u"?jt.Unsupported:jt.Loadable,this._onDisconnect=this.disconnect.bind(this)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==jt.Loadable)throw new Rc;this._connecting=!0,this._wallet=new Qrt({network:this._config.network===qE.Mainnet?Kv.Mainnet:Kv.Devnet,options:this._config.options});const{publicKey:t}=await this._wallet.connect();this._publicKey=t,this.emit("connect",t),this._wallet.client.on("session_delete",this._onDisconnect)}catch(t){throw t.constructor.name==="QRCodeModalError"||t instanceof Error&&t.name==="QRCodeModalError"?new sbe:(this._connecting=!1,t)}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.client.off("session_delete",this._onDisconnect),this._publicKey=null;try{t.client.session&&await t.disconnect()}catch(r){console.error("WalletConnectWalletAdapter: disconnect error",r),this.emit("error",new p4(r?.message,r))}}this.emit("disconnect")}async signTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signTransaction(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signMessage(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signMessage(t)}catch(n){throw new Y2(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAndSendTransaction(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAndSendTransaction(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}async signAllTransactions(t){try{const r=this._wallet;if(!r)throw new Ur;try{return await r.signAllTransactions(t)}catch(n){throw new Ui(n?.message,n)}}catch(r){throw this.emit("error",r),r}}}function us(e,t,r){return(t=int(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LU(Object(r),!0).forEach(function(n){us(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LU(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tnt(e,t){if(e==null)return{};var r,n,i=rnt(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rnt(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function nnt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function int(e){var t=nnt(e,"string");return typeof t=="symbol"?t:t+""}function v3(e){"@babel/helpers - typeof";return v3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v3(e)}function W7(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?us({},e,t):{}}function snt(e){var t,r=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},us(us(us(us(us(us(us(us(us(us(t,"fa-".concat(e.size),e.size!==null),"fa-rotate-".concat(e.rotation),e.rotation!==null),"fa-rotate-by",e.rotateBy),"fa-pull-".concat(e.pull),e.pull!==null),"fa-swap-opacity",e.swapOpacity),"fa-bounce",e.bounce),"fa-shake",e.shake),"fa-beat",e.beat),"fa-fade",e.fade),"fa-beat-fade",e.beatFade),us(us(us(us(t,"fa-flash",e.flash),"fa-spin-pulse",e.spinPulse),"fa-spin-reverse",e.spinReverse),"fa-width-auto",e.widthAuto));return Object.keys(r).map(function(n){return r[n]?n:null}).filter(function(n){return n})}var ont=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ite={exports:{}};(function(e){(function(t){var r=function(w,E,A){if(!u(E)||d(E)||h(E)||g(E)||c(E))return E;var M,R=0,N=0;if(l(E))for(M=[],N=E.length;R<N;R++)M.push(r(w,E[R],A));else{M={};for(var z in E)Object.prototype.hasOwnProperty.call(E,z)&&(M[w(z,A)]=r(w,E[z],A))}return M},n=function(w,E){E=E||{};var A=E.separator||"_",M=E.split||/(?=[A-Z])/;return w.split(M).join(A)},i=function(w){return m(w)?w:(w=w.replace(/[\-_\s]+(.)?/g,function(E,A){return A?A.toUpperCase():""}),w.substr(0,1).toLowerCase()+w.substr(1))},s=function(w){var E=i(w);return E.substr(0,1).toUpperCase()+E.substr(1)},o=function(w,E){return n(w,E).toLowerCase()},a=Object.prototype.toString,c=function(w){return typeof w=="function"},u=function(w){return w===Object(w)},l=function(w){return a.call(w)=="[object Array]"},d=function(w){return a.call(w)=="[object Date]"},h=function(w){return a.call(w)=="[object RegExp]"},g=function(w){return a.call(w)=="[object Boolean]"},m=function(w){return w=w-0,w===w},b=function(w,E){var A=E&&"process"in E?E.process:E;return typeof A!="function"?w:function(M,R){return A(M,w,R)}},k={camelize:i,decamelize:o,pascalize:s,depascalize:o,camelizeKeys:function(w,E){return r(b(i,E),w)},decamelizeKeys:function(w,E){return r(b(o,E),w,E)},pascalizeKeys:function(w,E){return r(b(s,E),w)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=k:t.humps=k})(ont)})(Ite);var ant=Ite.exports,cnt=["class","style"];function unt(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,r){var n=r.indexOf(":"),i=ant.camelize(r.slice(0,n)),s=r.slice(n+1).trim();return t[i]=s,t},{})}function lnt(e){return e.split(/\s+/).reduce(function(t,r){return t[r]=!0,t},{})}function Mte(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var n=(e.children||[]).map(function(c){return Mte(c)}),i=Object.keys(e.attributes||{}).reduce(function(c,u){var l=e.attributes[u];switch(u){case"class":c.class=lnt(l);break;case"style":c.style=unt(l);break;default:c.attrs[u]=l}return c},{attrs:{},class:{},style:{}});r.class;var s=r.style,o=s===void 0?{}:s,a=tnt(r,cnt);return g1(e.tag,Du(Du(Du({},t),{},{class:i.class,style:Du(Du({},i.style),o)},i.attrs),a),n)}var $te=!1;try{$te=!0}catch{}function fnt(){if(!$te&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function zU(e){if(e&&v3(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(FE.icon)return FE.icon(e);if(e===null)return null;if(v3(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var jmt=Dt({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},rotateBy:{type:Boolean,default:!1},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1},widthAuto:{type:Boolean,default:!1}},setup:function(t,r){var n=r.attrs,i=ir(function(){return zU(t.icon)}),s=ir(function(){return W7("classes",snt(t))}),o=ir(function(){return W7("transform",typeof t.transform=="string"?FE.transform(t.transform):t.transform)}),a=ir(function(){return W7("mask",zU(t.mask))}),c=ir(function(){var l=Du(Du(Du(Du({},s.value),o.value),a.value),{},{symbol:t.symbol,maskId:t.maskId});return l.title=t.title,l.titleId=t.titleId,Y2e(i.value,l)});dn(c,function(l){if(!l)return fnt("Could not find one or more icon(s)",i.value,a.value)},{immediate:!0});var u=ir(function(){return c.value?Mte(c.value.abstract[0],{},n):null});return function(){return u.value}}});/*!
1616
1616
  * @kurkle/color v0.3.4
1617
1617
  * https://github.com/kurkle/color#readme
1618
1618
  * (c) 2024 Jukka Kurkela
@@ -1638,8 +1638,8 @@ ${e.length}`,r=new TextEncoder().encode(t+e);return"0x"+Buffer.from(TYe(r)).toSt
1638
1638
  `:"")+e.getLines(t+1,l,e.tShift[t],!0)+(d?`${d}
1639
1639
  `:""),h.map=[t,e.line],h.markup="\\[",!0},lq={alt:["paragraph","reference","blockquote","list"]},Eot=(e,t)=>{if(typeof t?.render!="function")throw new Error('[@mdit/plugin-tex]: "render" option should be a function');const{allowInlineWithSpace:r=!1,mathFence:n=!1,delimiters:i="dollars",render:s}=t;if(n){const o=e.renderer.rules.fence;e.renderer.rules.fence=(...a)=>{const[c,u,,l]=a,{content:d,info:h}=c[u];return h.trim()==="math"?s(d,!0,l):o(...a)}}(i==="dollars"||i==="all")&&(e.inline.ruler.after("escape","math_inline_dollar",wot(r)),e.block.ruler.after("blockquote","math_block_dollar",_ot,lq)),(i==="brackets"||i==="all")&&(e.inline.ruler.before("escape","math_inline_bracket",vot()),e.block.ruler.after("blockquote","math_block_bracket",xot(),lq)),e.renderer.rules.math_inline=(o,a,c,u)=>s(o[a].content,!1,u),e.renderer.rules.math_block=(o,a,c,u)=>s(o[a].content,!0,u)},kot=(e,t,r)=>{let n;try{n=EH(e,{...t,displayMode:!1})}catch(i){/* istanbul ignore else -- @preserve */if(i instanceof kH)console.error(i),n=`<span class='katex-error' title='${k3(i.toString())}'>${k3(e)}</span>`;else throw i}return r?.(n,!1)??n},Aot=(e,t,r)=>{let n;try{n=`<p class='katex-block'>${EH(e,{...t,displayMode:!0})}</p>
1640
1640
  `}catch(i){/* istanbul ignore else -- @preserve */if(i instanceof kH)console.error(i),n=`<p class='katex-block katex-error' title='${k3(i.toString())}'>${k3(e)}</p>
1641
- `;else throw i}return r?.(n,!0)??n},jmt=(e,t={})=>{const{allowInlineWithSpace:r=!1,delimiters:n,mathFence:i,logger:s=u=>u==="newLineInDisplayMode"?"ignore":"warn",macros:o={},transformer:a,...c}=t;e.use(Eot,{allowInlineWithSpace:r,delimiters:n,mathFence:i,render:(u,l,d)=>{const h={strict:(g,m,b)=>s(g,m,b,d)??"ignore",macros:o,throwOnError:!1,...c};return l?Aot(u,h,a):kot(u,h,a)}})};function Ve(e,t,r){return(t=Cot(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sot(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cot(e){var t=Sot(e,"string");return typeof t=="symbol"?t:String(t)}function Iot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mot(e,t,r){return t&&fq(e.prototype,t),r&&fq(e,r),e}function $ot(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dq(Object(r),!0).forEach(function(n){$ot(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dq(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pq={addCSS:!0,thumbWidth:15,watch:!0};function Tot(e,t){return(function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function Not(e,t){if(e&&t){var r=new Event(t,{bubbles:!0});e.dispatchEvent(r)}}var Rb=function(e){return e!=null?e.constructor:null},jM=function(e,t){return!!(e&&t&&e instanceof t)},sre=function(e){return e==null},ore=function(e){return Rb(e)===Object},Oot=function(e){return Rb(e)===Number&&!Number.isNaN(e)},are=function(e){return Rb(e)===String},jot=function(e){return Rb(e)===Boolean},Pot=function(e){return Rb(e)===Function},cre=function(e){return Array.isArray(e)},ure=function(e){return jM(e,NodeList)},Dot=function(e){return jM(e,Element)},Rot=function(e){return jM(e,Event)},Lot=function(e){return sre(e)||(are(e)||cre(e)||ure(e))&&!e.length||ore(e)&&!Object.keys(e).length},as={nullOrUndefined:sre,object:ore,number:Oot,string:are,boolean:jot,function:Pot,array:cre,nodeList:ure,element:Dot,event:Rot,empty:Lot};function zot(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}function Bot(e,t){if(1>t){var r=zot(t);return parseFloat(e.toFixed(r))}return Math.round(e/t)*t}var Fot=function(){function e(t,r){Iot(this,e),as.element(t)?this.element=t:as.string(t)&&(this.element=document.querySelector(t)),as.element(this.element)&&as.empty(this.element.rangeTouch)&&(this.config=hq({},pq,{},r),this.init())}return Mot(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(t){var r=this,n=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(i){r.element[n](i,function(s){return r.set(s)},!1)})}},{key:"get",value:function(t){if(!e.enabled||!as.event(t))return null;var r,n=t.target,i=t.changedTouches[0],s=parseFloat(n.getAttribute("min"))||0,o=parseFloat(n.getAttribute("max"))||100,a=parseFloat(n.getAttribute("step"))||1,c=n.getBoundingClientRect(),u=100/c.width*(this.config.thumbWidth/2)/100;return 0>(r=100/c.width*(i.clientX-c.left))?r=0:100<r&&(r=100),50>r?r-=(100-2*r)*u:50<r&&(r+=2*(r-50)*u),s+Bot(r/100*(o-s),a)}},{key:"set",value:function(t){e.enabled&&as.event(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),Not(t.target,t.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(t){var r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=null;if(as.empty(t)||as.string(t)?n=Array.from(document.querySelectorAll(as.string(t)?t:'input[type="range"]')):as.element(t)?n=[t]:as.nodeList(t)?n=Array.from(t):as.array(t)&&(n=t.filter(as.element)),as.empty(n))return null;var i=hq({},pq,{},r);if(as.string(t)&&i.watch){var s=new MutationObserver(function(o){Array.from(o).forEach(function(a){Array.from(a.addedNodes).forEach(function(c){as.element(c)&&Tot(c,t)&&new e(c,i)})})});s.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(o){return new e(o,r)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const Lb=e=>e!=null?e.constructor:null,Xu=(e,t)=>!!(e&&t&&e instanceof t),PM=e=>e==null,lre=e=>Lb(e)===Object,Uot=e=>Lb(e)===Number&&!Number.isNaN(e),g6=e=>Lb(e)===String,qot=e=>Lb(e)===Boolean,fre=e=>typeof e=="function",dre=e=>Array.isArray(e),Hot=e=>Xu(e,WeakMap),hre=e=>Xu(e,NodeList),Wot=e=>Lb(e)===Text,Vot=e=>Xu(e,Event),Kot=e=>Xu(e,KeyboardEvent),Got=e=>Xu(e,window.TextTrackCue)||Xu(e,window.VTTCue),Zot=e=>Xu(e,TextTrack)||!PM(e)&&g6(e.kind),Yot=e=>Xu(e,Promise)&&fre(e.then),Jot=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",pre=e=>PM(e)||(g6(e)||dre(e)||hre(e))&&!e.length||lre(e)&&!Object.keys(e).length,Xot=e=>{if(Xu(e,window.URL))return!0;if(!g6(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!pre(new URL(t).hostname)}catch{return!1}};var Q={nullOrUndefined:PM,object:lre,number:Uot,string:g6,boolean:qot,function:fre,array:dre,weakMap:Hot,nodeList:hre,element:Jot,textNode:Wot,event:Vot,keyboardEvent:Kot,cue:Got,track:Zot,promise:Yot,url:Xot,empty:pre};const cS=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},r=Object.keys(t).find(n=>e.style[n]!==void 0);return!!Q.string(r)&&t[r]})();function gre(e,t){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}},t)}const Qot=!!window.document.documentMode,eat=/Edge/g.test(navigator.userAgent),tat="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),rat=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,nat=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,iat=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var vi={isIE:Qot,isEdge:eat,isWebKit:tat,isIPhone:rat,isIPadOS:nat,isIos:iat};function sat(e){return JSON.parse(JSON.stringify(e))}function mre(e,t){return t.split(".").reduce((r,n)=>r&&r[n],e)}function Mn(e={},...t){if(!t.length)return e;const r=t.shift();return Q.object(r)?(Object.keys(r).forEach(n=>{Q.object(r[n])?(Object.keys(e).includes(n)||Object.assign(e,{[n]:{}}),Mn(e[n],r[n])):Object.assign(e,{[n]:r[n]})}),Mn(e,...t)):e}function bre(e,t){const r=e.length?e:[e];Array.from(r).reverse().forEach((n,i)=>{const s=i>0?t.cloneNode(!0):t,o=n.parentNode,a=n.nextSibling;s.appendChild(n),a?o.insertBefore(s,a):o.appendChild(s)})}function uS(e,t){Q.element(e)&&!Q.empty(t)&&Object.entries(t).filter(([,r])=>!Q.nullOrUndefined(r)).forEach(([r,n])=>e.setAttribute(r,n))}function Tt(e,t,r){const n=document.createElement(e);return Q.object(t)&&uS(n,t),Q.string(r)&&(n.innerText=r),n}function oat(e,t){Q.element(e)&&Q.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)}function gq(e,t,r,n){Q.element(t)&&t.appendChild(Tt(e,r,n))}function Fu(e){Q.nodeList(e)||Q.array(e)?Array.from(e).forEach(Fu):Q.element(e)&&Q.element(e.parentNode)&&e.parentNode.removeChild(e)}function uv(e){if(!Q.element(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function A3(e,t){return Q.element(t)&&Q.element(t.parentNode)&&Q.element(e)?(t.parentNode.replaceChild(e,t),e):null}function Cc(e,t){if(!Q.string(e)||Q.empty(e))return{};const r={},n=Mn({},t);return e.split(",").forEach(i=>{const s=i.trim(),o=s.replace(".",""),a=s.replace(/[[\]]/g,"").split("="),[c]=a,u=a.length>1?a[1].replace(/["']/g,""):"";switch(s.charAt(0)){case".":Q.string(n.class)?r.class=`${n.class} ${o}`:r.class=o;break;case"#":r.id=s.replace("#","");break;case"[":r[c]=u}}),Mn(n,r)}function Hf(e,t){if(!Q.element(e))return;let r=t;Q.boolean(r)||(r=!e.hidden),e.hidden=r}function Mr(e,t,r){if(Q.nodeList(e))return Array.from(e).map(n=>Mr(n,t,r));if(Q.element(e)){let n="toggle";return r!==void 0&&(n=r?"add":"remove"),e.classList[n](t),e.classList.contains(t)}return!1}function S3(e,t){return Q.element(e)&&e.classList.contains(t)}function _d(e,t){const{prototype:r}=Element;return(r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function aat(e,t){const{prototype:r}=Element;return(r.closest||function(){let n=this;do{if(_d.matches(n,t))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}).call(e,t)}function x2(e){return this.elements.container.querySelectorAll(e)}function Kn(e){return this.elements.container.querySelector(e)}function ex(e=null,t=!1){Q.element(e)&&e.focus({preventScroll:!0,focusVisible:t})}const mq={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},$n={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t){const r=$n[e]||t!=="html5";return{api:r,ui:r&&$n.rangeInput}},pip:!(vi.isIPhone||!Q.function(Tt("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Tt("video").disablePictureInPicture)),airplay:Q.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(Q.empty(e))return!1;const[t]=e.split("/");let r=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(mq).includes(r)&&(r+=`; codecs="${mq[e]}"`);try{return!!(r&&this.media.canPlayType(r).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range",e.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:cS!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},cat=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e})();function E2(e,t,r,n=!1,i=!0,s=!1){if(!e||!("addEventListener"in e)||Q.empty(t)||!Q.function(r))return;const o=t.split(" ");let a=s;cat&&(a={passive:i,capture:s}),o.forEach(c=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:e,type:c,callback:r,options:a}),e[n?"addEventListener":"removeEventListener"](c,r,a)})}function sr(e,t="",r,n=!0,i=!1){E2.call(this,e,t,r,!0,n,i)}function m6(e,t="",r,n=!0,i=!1){E2.call(this,e,t,r,!1,n,i)}function DM(e,t="",r,n=!0,i=!1){const s=(...o)=>{m6(e,t,s,n,i),r.apply(this,o)};E2.call(this,e,t,s,!0,n,i)}function Ot(e,t="",r=!1,n={}){if(!Q.element(e)||Q.empty(t))return;const i=new CustomEvent(t,{bubbles:r,detail:{...n,plyr:this}});e.dispatchEvent(i)}function uat(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:t,type:r,callback:n,options:i}=e;t.removeEventListener(r,n,i)}),this.eventListeners=[])}function lat(){return new Promise(e=>this.ready?setTimeout(e,0):sr.call(this,this.elements.container,"ready",e)).then(()=>{})}function Mc(e){Q.promise(e)&&e.then(null,()=>{})}function lS(e){return Q.array(e)?e.filter((t,r)=>e.indexOf(t)===r):e}function yre(e,t){return Q.array(e)&&e.length?e.reduce((r,n)=>Math.abs(n-t)<Math.abs(r-t)?n:r):null}function wre(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const bq=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((e,[t,r])=>({...e,[t/r]:[t,r]}),{});function vre(e){return Q.array(e)||Q.string(e)&&e.includes(":")?(Q.array(e)?e:e.split(":")).map(Number).every(Q.number):!1}function C3(e){if(!Q.array(e)||!e.every(Q.number))return null;const[t,r]=e,n=(s,o)=>o===0?s:n(o,s%o),i=n(t,r);return[t/i,r/i]}function RM(e){const t=n=>vre(n)?n.split(":").map(Number):null;let r=t(e);if(r===null&&(r=t(this.config.ratio)),r===null&&!Q.empty(this.embed)&&Q.array(this.embed.ratio)&&({ratio:r}=this.embed),r===null&&this.isHTML5){const{videoWidth:n,videoHeight:i}=this.media;r=[n,i]}return C3(r)}function u1(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,r=RM.call(this,e);if(!Q.array(r))return{};const[n,i]=C3(r),s=100/n*i;if(wre(`aspect-ratio: ${n}/${i}`)?t.style.aspectRatio=`${n}/${i}`:t.style.paddingBottom=`${s}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const o=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),a=(o-s)/(o/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${a}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:s,ratio:r}}function _re(e,t,r=.05){const n=e/t,i=yre(Object.keys(bq),n);return Math.abs(i-n)<=r?bq[i]:[e,t]}function fat(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const of={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const t=e.getAttribute("type");return!!Q.empty(t)||$n.mime.call(this,t)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:of.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,Q.empty(this.config.ratio)||u1.call(e),Object.defineProperty(e.media,"quality",{get(){const t=of.getSources.call(e).find(r=>r.getAttribute("src")===e.source);return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&Q.function(e.config.quality.onChange))e.config.quality.onChange(t);else{const r=of.getSources.call(e).find(c=>Number(c.getAttribute("size"))===t);if(!r)return;const{currentTime:n,paused:i,preload:s,readyState:o,playbackRate:a}=e.media;e.media.src=r.getAttribute("src"),(s!=="none"||o)&&(e.once("loadedmetadata",()=>{e.speed=a,e.currentTime=n,i||Mc(e.play())}),e.media.load())}Ot.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(Fu(of.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function dat(e){return`${e}-${Math.floor(1e4*Math.random())}`}function fS(e,...t){return Q.empty(e)?e:e.toString().replace(/{(\d+)}/g,(r,n)=>t[n].toString())}function hat(e,t){return e===0||t===0||Number.isNaN(e)||Number.isNaN(t)?0:(e/t*100).toFixed(2)}const dm=(e="",t="",r="")=>e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),r.toString()),xre=(e="")=>e.toString().replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());function pat(e=""){let t=e.toString();return t=dm(t,"-"," "),t=dm(t,"_"," "),t=xre(t),dm(t," ","")}function gat(e=""){let t=e.toString();return t=pat(t),t.charAt(0).toLowerCase()+t.slice(1)}function mat(e){const t=document.createDocumentFragment(),r=document.createElement("div");return t.appendChild(r),r.innerHTML=e,t.firstChild.innerText}function bat(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const yq={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},pi={get(e="",t={}){if(Q.empty(e)||Q.empty(t))return"";let r=mre(t.i18n,e);if(Q.empty(r))return Object.keys(yq).includes(e)?yq[e]:"";const n={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(n).forEach(([i,s])=>{r=dm(r,i,s)}),r}};let Ere=class dS{constructor(t){Ve(this,"get",r=>{if(!dS.supported||!this.enabled)return null;const n=window.localStorage.getItem(this.key);if(Q.empty(n))return null;const i=JSON.parse(n);return Q.string(r)&&r.length?i[r]:i}),Ve(this,"set",r=>{if(!dS.supported||!this.enabled||!Q.object(r))return;let n=this.get();Q.empty(n)&&(n={}),Mn(n,r);try{window.localStorage.setItem(this.key,JSON.stringify(n))}catch{}}),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch{return!1}}};function zb(e,t="text"){return new Promise((r,n)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",()=>{if(t==="text")try{r(JSON.parse(i.responseText))}catch{r(i.responseText)}else r(i.response)}),i.addEventListener("error",()=>{throw new Error(i.status)}),i.open("GET",e,!0),i.responseType=t,i.send()}catch(i){n(i)}})}function kre(e,t){if(!Q.string(e))return;const r="cache",n=Q.string(t);let i=!1;const s=()=>document.getElementById(t)!==null,o=(a,c)=>{a.innerHTML=c,n&&s()||document.body.insertAdjacentElement("afterbegin",a)};if(!n||!s()){const a=Ere.supported,c=document.createElement("div");if(c.setAttribute("hidden",""),n&&c.setAttribute("id",t),a){const u=window.localStorage.getItem(`${r}-${t}`);if(i=u!==null,i){const l=JSON.parse(u);o(c,l.content)}}zb(e).then(u=>{if(!Q.empty(u)){if(a)try{window.localStorage.setItem(`${r}-${t}`,JSON.stringify({content:u}))}catch{}o(c,u)}}).catch(()=>{})}}const Are=e=>Math.trunc(e/60/60%60,10),yat=e=>Math.trunc(e/60%60,10),wat=e=>Math.trunc(e%60,10);function b6(e=0,t=!1,r=!1){if(!Q.number(e))return b6(void 0,t,r);const n=a=>`0${a}`.slice(-2);let i=Are(e);const s=yat(e),o=wat(e);return i=t||i>0?`${i}:`:"",`${r&&e>0?"-":""}${i}${n(s)}:${n(o)}`}const He={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,r=e.host!==t||vi.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:r}},findElements(){try{return this.elements.controls=Kn.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:x2.call(this,this.config.selectors.buttons.play),pause:Kn.call(this,this.config.selectors.buttons.pause),restart:Kn.call(this,this.config.selectors.buttons.restart),rewind:Kn.call(this,this.config.selectors.buttons.rewind),fastForward:Kn.call(this,this.config.selectors.buttons.fastForward),mute:Kn.call(this,this.config.selectors.buttons.mute),pip:Kn.call(this,this.config.selectors.buttons.pip),airplay:Kn.call(this,this.config.selectors.buttons.airplay),settings:Kn.call(this,this.config.selectors.buttons.settings),captions:Kn.call(this,this.config.selectors.buttons.captions),fullscreen:Kn.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Kn.call(this,this.config.selectors.progress),this.elements.inputs={seek:Kn.call(this,this.config.selectors.inputs.seek),volume:Kn.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Kn.call(this,this.config.selectors.display.buffer),currentTime:Kn.call(this,this.config.selectors.display.currentTime),duration:Kn.call(this,this.config.selectors.display.duration)},Q.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const r="http://www.w3.org/2000/svg",n=He.getIconUrl.call(this),i=`${n.cors?"":n.url}#${this.config.iconPrefix}`,s=document.createElementNS(r,"svg");uS(s,Mn(t,{"aria-hidden":"true",focusable:"false"}));const o=document.createElementNS(r,"use"),a=`${i}-${e}`;return"href"in o&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",a),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),s.appendChild(o),s},createLabel(e,t={}){const r=pi.get(e,this.config);return Tt("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},r)},createBadge(e){if(Q.empty(e))return null;const t=Tt("span",{class:this.config.classNames.menu.value});return t.appendChild(Tt("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const r=Mn({},t);let n=gat(e);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(o=>{Object.keys(r).includes(o)&&(i[o]=r[o],delete r[o])}),i.element!=="button"||Object.keys(r).includes("type")||(r.type="button"),Object.keys(r).includes("class")?r.class.split(" ").some(o=>o===this.config.classNames.control)||Mn(r,{class:`${r.class} ${this.config.classNames.control}`}):r.class=this.config.classNames.control,e){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":r.class+=` ${this.config.classNames.control}--overlaid`,n="play",i.label="play",i.icon="play";break;default:Q.empty(i.label)&&(i.label=n),Q.empty(i.icon)&&(i.icon=e)}const s=Tt(i.element);return i.toggle?(s.appendChild(He.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),s.appendChild(He.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),s.appendChild(He.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),s.appendChild(He.createLabel.call(this,i.label,{class:"label--not-pressed"}))):(s.appendChild(He.createIcon.call(this,i.icon)),s.appendChild(He.createLabel.call(this,i.label))),Mn(r,Cc(this.config.selectors.buttons[n],r)),uS(s,r),n==="play"?(Q.array(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(s)):this.elements.buttons[n]=s,s},createRange(e,t){const r=Tt("input",Mn(Cc(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":pi.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=r,He.updateRangeFill.call(this,r),Fot.setup(r),r},createProgress(e,t){const r=Tt("progress",Mn(Cc(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if(e!=="volume"){r.appendChild(Tt("span",null,"0"));const n={played:"played",buffer:"buffered"}[e],i=n?pi.get(n,this.config):"";r.innerText=`% ${i.toLowerCase()}`}return this.elements.display[e]=r,r},createTime(e,t){const r=Cc(this.config.selectors.display[e],t),n=Tt("div",Mn(r,{class:`${r.class?r.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":pi.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts(e,t){sr.call(this,e,"keydown keyup",r=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(r.key)||(r.preventDefault(),r.stopPropagation(),r.type==="keydown"))return;const n=_d(e,'[role="menuitemradio"]');if(!n&&[" ","ArrowRight"].includes(r.key))He.showMenuPanel.call(this,t,!0);else{let i;r.key!==" "&&(r.key==="ArrowDown"||n&&r.key==="ArrowRight"?(i=e.nextElementSibling,Q.element(i)||(i=e.parentNode.firstElementChild)):(i=e.previousElementSibling,Q.element(i)||(i=e.parentNode.lastElementChild)),ex.call(this,i,!0))}},!1),sr.call(this,e,"keyup",r=>{r.key==="Return"&&He.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:t,type:r,title:n,badge:i=null,checked:s=!1}){const o=Cc(this.config.selectors.inputs[r]),a=Tt("button",Mn(o,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${o.class?o.class:""}`.trim(),"aria-checked":s,value:e})),c=Tt("span");c.innerHTML=n,Q.element(i)&&c.appendChild(i),a.appendChild(c),Object.defineProperty(a,"checked",{enumerable:!0,get:()=>a.getAttribute("aria-checked")==="true",set(u){u&&Array.from(a.parentNode.children).filter(l=>_d(l,'[role="menuitemradio"]')).forEach(l=>l.setAttribute("aria-checked","false")),a.setAttribute("aria-checked",u?"true":"false")}}),this.listeners.bind(a,"click keyup",u=>{if(!Q.keyboardEvent(u)||u.key===" "){switch(u.preventDefault(),u.stopPropagation(),a.checked=!0,r){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}He.showMenuPanel.call(this,"home",Q.keyboardEvent(u))}},r,!1),He.bindMenuItemShortcuts.call(this,a,r),t.appendChild(a)},formatTime(e=0,t=!1){return Q.number(e)?b6(e,Are(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,r=!1){Q.element(e)&&Q.number(t)&&(e.innerText=He.formatTime(t,r))},updateVolume(){this.supported.ui&&(Q.element(this.elements.inputs.volume)&&He.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),Q.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,t=0){Q.element(e)&&(e.value=t,He.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!Q.event(e))return;let t=0;const r=(n,i)=>{const s=Q.number(i)?i:0,o=Q.element(n)?n:this.elements.display.buffer;if(Q.element(o)){o.value=s;const a=o.getElementsByTagName("span")[0];Q.element(a)&&(a.childNodes[0].nodeValue=s)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":t=hat(this.currentTime,this.duration),e.type==="timeupdate"&&He.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":r(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const t=Q.event(e)?e.target:e;if(Q.element(t)&&t.getAttribute("type")==="range"){if(_d(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const r=He.formatTime(this.currentTime),n=He.formatTime(this.duration),i=pi.get("seekLabel",this.config);t.setAttribute("aria-valuetext",i.replace("{currentTime}",r).replace("{duration}",n))}else if(_d(t,this.config.selectors.inputs.volume)){const r=100*t.value;t.setAttribute("aria-valuenow",r),t.setAttribute("aria-valuetext",`${r.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);(vi.isWebKit||vi.isIPadOS)&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){var t,r;if(!this.config.tooltips.seek||!Q.element(this.elements.inputs.seek)||!Q.element(this.elements.display.seekTooltip)||this.duration===0)return;const n=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,s=l=>Mr(n,i,l);if(this.touch)return void s(!1);let o=0;const a=this.elements.progress.getBoundingClientRect();if(Q.event(e))o=100/a.width*(e.pageX-a.left);else{if(!S3(n,i))return;o=parseFloat(n.style.left,10)}o<0?o=0:o>100&&(o=100);const c=this.duration/100*o;n.innerText=He.formatTime(c);const u=(t=this.config.markers)===null||t===void 0||(r=t.points)===null||r===void 0?void 0:r.find(({time:l})=>l===Math.round(c));u&&n.insertAdjacentHTML("afterbegin",`${u.label}<br>`),n.style.left=`${o}%`,Q.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&s(e.type==="mouseenter")},timeUpdate(e){const t=!Q.element(this.elements.display.duration)&&this.config.invertTime;He.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&e.type==="timeupdate"&&this.media.seeking||He.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Hf(this.elements.display.currentTime,!0),void Hf(this.elements.progress,!0);Q.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=Q.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&He.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&He.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&He.setMarkers.call(this),He.updateSeekTooltip.call(this)},toggleMenuButton(e,t){Hf(this.elements.settings.buttons[e],!t)},updateSetting(e,t,r){const n=this.elements.settings.panels[e];let i=null,s=t;if(e==="captions")i=this.currentTrack;else{if(i=Q.empty(r)?this[e]:r,Q.empty(i)&&(i=this.config[e].default),!Q.empty(this.options[e])&&!this.options[e].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${e}`);if(!this.config[e].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${e}`)}if(Q.element(s)||(s=n&&n.querySelector('[role="menu"]')),!Q.element(s))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=He.getLabel.call(this,e,i);const o=s&&s.querySelector(`[value="${i}"]`);Q.element(o)&&(o.checked=!0)},getLabel(e,t){switch(e){case"speed":return t===1?pi.get("normal",this.config):`${t}&times;`;case"quality":if(Q.number(t)){const r=pi.get(`qualityLabel.${t}`,this.config);return r.length?r:`${t}p`}return xre(t);case"captions":return gr.getLabel.call(this);default:return null}},setQualityMenu(e){if(!Q.element(this.elements.settings.panels.quality))return;const t="quality",r=this.elements.settings.panels.quality.querySelector('[role="menu"]');Q.array(e)&&(this.options.quality=lS(e).filter(s=>this.config.quality.options.includes(s)));const n=!Q.empty(this.options.quality)&&this.options.quality.length>1;if(He.toggleMenuButton.call(this,t,n),uv(r),He.checkMenu.call(this),!n)return;const i=s=>{const o=pi.get(`qualityBadge.${s}`,this.config);return o.length?He.createBadge.call(this,o):null};this.options.quality.sort((s,o)=>{const a=this.config.quality.options;return a.indexOf(s)>a.indexOf(o)?1:-1}).forEach(s=>{He.createMenuItem.call(this,{value:s,list:r,type:t,title:He.getLabel.call(this,"quality",s),badge:i(s)})}),He.updateSetting.call(this,t,r)},setCaptionsMenu(){if(!Q.element(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),r=gr.getTracks.call(this),n=!!r.length;if(He.toggleMenuButton.call(this,e,n),uv(t),He.checkMenu.call(this),!n)return;const i=r.map((s,o)=>({value:o,checked:this.captions.toggled&&this.currentTrack===o,title:gr.getLabel.call(this,s),badge:s.language&&He.createBadge.call(this,s.language.toUpperCase()),list:t,type:"language"}));i.unshift({value:-1,checked:!this.captions.toggled,title:pi.get("disabled",this.config),list:t,type:"language"}),i.forEach(He.createMenuItem.bind(this)),He.updateSetting.call(this,e,t)},setSpeedMenu(){if(!Q.element(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(n=>n>=this.minimumSpeed&&n<=this.maximumSpeed);const r=!Q.empty(this.options.speed)&&this.options.speed.length>1;He.toggleMenuButton.call(this,e,r),uv(t),He.checkMenu.call(this),r&&(this.options.speed.forEach(n=>{He.createMenuItem.call(this,{value:n,list:t,type:e,title:He.getLabel.call(this,"speed",n)})}),He.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!Q.empty(e)&&Object.values(e).some(r=>!r.hidden);Hf(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let r=e;Q.element(r)||(r=Object.values(this.elements.settings.panels).find(i=>!i.hidden));const n=r.querySelector('[role^="menuitem"]');ex.call(this,n,t)},toggleMenu(e){const{popup:t}=this.elements.settings,r=this.elements.buttons.settings;if(!Q.element(t)||!Q.element(r))return;const{hidden:n}=t;let i=n;if(Q.boolean(e))i=e;else if(Q.keyboardEvent(e)&&e.key==="Escape")i=!1;else if(Q.event(e)){const s=Q.function(e.composedPath)?e.composedPath()[0]:e.target,o=t.contains(s);if(o||!o&&e.target!==r&&i)return}r.setAttribute("aria-expanded",i),Hf(t,!i),Mr(this.elements.container,this.config.classNames.menu.open,i),i&&Q.keyboardEvent(e)?He.focusFirstMenuItem.call(this,null,!0):i||n||ex.call(this,r,Q.keyboardEvent(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const r=t.scrollWidth,n=t.scrollHeight;return Fu(t),{width:r,height:n}},showMenuPanel(e="",t=!1){const r=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!Q.element(r))return;const n=r.parentNode,i=Array.from(n.children).find(s=>!s.hidden);if($n.transitions&&!$n.reducedMotion){n.style.width=`${i.scrollWidth}px`,n.style.height=`${i.scrollHeight}px`;const s=He.getMenuSize.call(this,r),o=a=>{a.target===n&&["width","height"].includes(a.propertyName)&&(n.style.width="",n.style.height="",m6.call(this,n,cS,o))};sr.call(this,n,cS,o),n.style.width=`${s.width}px`,n.style.height=`${s.height}px`}Hf(i,!0),Hf(r,!1),He.focusFirstMenuItem.call(this,r,t)},setDownloadUrl(){const e=this.elements.buttons.download;Q.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:r,createProgress:n,createRange:i,createTime:s,setQualityMenu:o,setSpeedMenu:a,showMenuPanel:c}=He;this.elements.controls=null,Q.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(r.call(this,"play-large"));const u=Tt("div",Cc(this.config.selectors.controls.wrapper));this.elements.controls=u;const l={class:"plyr__controls__item"};return lS(Q.array(this.config.controls)?this.config.controls:[]).forEach(d=>{if(d==="restart"&&u.appendChild(r.call(this,"restart",l)),d==="rewind"&&u.appendChild(r.call(this,"rewind",l)),d==="play"&&u.appendChild(r.call(this,"play",l)),d==="fast-forward"&&u.appendChild(r.call(this,"fast-forward",l)),d==="progress"){const h=Tt("div",{class:`${l.class} plyr__progress__container`}),g=Tt("div",Cc(this.config.selectors.progress));if(g.appendChild(i.call(this,"seek",{id:`plyr-seek-${e.id}`})),g.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const m=Tt("span",{class:this.config.classNames.tooltip},"00:00");g.appendChild(m),this.elements.display.seekTooltip=m}this.elements.progress=g,h.appendChild(this.elements.progress),u.appendChild(h)}if(d==="current-time"&&u.appendChild(s.call(this,"currentTime",l)),d==="duration"&&u.appendChild(s.call(this,"duration",l)),d==="mute"||d==="volume"){let{volume:h}=this.elements;if(Q.element(h)&&u.contains(h)||(h=Tt("div",Mn({},l,{class:`${l.class} plyr__volume`.trim()})),this.elements.volume=h,u.appendChild(h)),d==="mute"&&h.appendChild(r.call(this,"mute")),d==="volume"&&!vi.isIos&&!vi.isIPadOS){const g={max:1,step:.05,value:this.config.volume};h.appendChild(i.call(this,"volume",Mn(g,{id:`plyr-volume-${e.id}`})))}}if(d==="captions"&&u.appendChild(r.call(this,"captions",l)),d==="settings"&&!Q.empty(this.config.settings)){const h=Tt("div",Mn({},l,{class:`${l.class} plyr__menu`.trim(),hidden:""}));h.appendChild(r.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const g=Tt("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),m=Tt("div"),b=Tt("div",{id:`plyr-settings-${e.id}-home`}),k=Tt("div",{role:"menu"});b.appendChild(k),m.appendChild(b),this.elements.settings.panels.home=b,this.config.settings.forEach(w=>{const E=Tt("button",Mn(Cc(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,E,w),sr.call(this,E,"click",()=>{c.call(this,w,!1)});const A=Tt("span",null,pi.get(w,this.config)),M=Tt("span",{class:this.config.classNames.menu.value});M.innerHTML=e[w],A.appendChild(M),E.appendChild(A),k.appendChild(E);const R=Tt("div",{id:`plyr-settings-${e.id}-${w}`,hidden:""}),N=Tt("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});N.appendChild(Tt("span",{"aria-hidden":!0},pi.get(w,this.config))),N.appendChild(Tt("span",{class:this.config.classNames.hidden},pi.get("menuBack",this.config))),sr.call(this,R,"keydown",z=>{z.key==="ArrowLeft"&&(z.preventDefault(),z.stopPropagation(),c.call(this,"home",!0))},!1),sr.call(this,N,"click",()=>{c.call(this,"home",!1)}),R.appendChild(N),R.appendChild(Tt("div",{role:"menu"})),m.appendChild(R),this.elements.settings.buttons[w]=E,this.elements.settings.panels[w]=R}),g.appendChild(m),h.appendChild(g),u.appendChild(h),this.elements.settings.popup=g,this.elements.settings.menu=h}if(d==="pip"&&$n.pip&&u.appendChild(r.call(this,"pip",l)),d==="airplay"&&$n.airplay&&u.appendChild(r.call(this,"airplay",l)),d==="download"){const h=Mn({},l,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(h.download="");const{download:g}=this.config.urls;!Q.url(g)&&this.isEmbed&&Mn(h,{icon:`logo-${this.provider}`,label:this.provider}),u.appendChild(r.call(this,"download",h))}d==="fullscreen"&&u.appendChild(r.call(this,"fullscreen",l))}),this.isHTML5&&o.call(this,of.getQualityOptions.call(this)),a.call(this),u},inject(){if(this.config.loadSprite){const i=He.getIconUrl.call(this);i.cors&&kre(i.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let r=!0;Q.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),Q.element(this.config.controls)||Q.string(this.config.controls)?e=this.config.controls:(e=He.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:gr.getLabel.call(this)}),r=!1);let n;if(r&&Q.string(this.config.controls)&&(e=(i=>{let s=i;return Object.entries(t).forEach(([o,a])=>{s=dm(s,`{${o}}`,a)}),s})(e)),Q.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),Q.element(n)||(n=this.elements.container),n[Q.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),Q.element(this.elements.controls)||He.findElements.call(this),!Q.empty(this.elements.buttons)){const i=s=>{const o=this.config.classNames.controlPressed;s.setAttribute("aria-pressed","false"),Object.defineProperty(s,"pressed",{configurable:!0,enumerable:!0,get:()=>S3(s,o),set(a=!1){Mr(s,o,a),s.setAttribute("aria-pressed",a?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(s=>{Q.array(s)||Q.nodeList(s)?Array.from(s).filter(Boolean).forEach(i):i(s)})}if(vi.isEdge&&gre(n),this.config.tooltips.controls){const{classNames:i,selectors:s}=this.config,o=`${s.controls.wrapper} ${s.labels} .${i.hidden}`,a=x2.call(this,o);Array.from(a).forEach(c=>{Mr(c,this.config.classNames.hidden,!1),Mr(c,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;const r=(e=this.config.markers)===null||e===void 0||(t=e.points)===null||t===void 0?void 0:t.filter(({time:c})=>c>0&&c<this.duration);if(r==null||!r.length)return;const n=document.createDocumentFragment(),i=document.createDocumentFragment();let s=null;const o=`${this.config.classNames.tooltip}--visible`,a=c=>Mr(s,o,c);r.forEach(c=>{const u=Tt("span",{class:this.config.classNames.marker},""),l=c.time/this.duration*100+"%";s&&(u.addEventListener("mouseenter",()=>{c.label||(s.style.left=l,s.innerHTML=c.label,a(!0))}),u.addEventListener("mouseleave",()=>{a(!1)})),u.addEventListener("click",()=>{this.currentTime=c.time}),u.style.left=l,i.appendChild(u)}),n.appendChild(i),this.config.tooltips.seek||(s=Tt("span",{class:this.config.classNames.tooltip},""),n.appendChild(s)),this.elements.markers={points:i,tip:s},this.elements.progress.appendChild(n)}};function Sre(e,t=!0){let r=e;if(t){const n=document.createElement("a");n.href=r,r=n.href}try{return new URL(r)}catch{return null}}function Cre(e){const t=new URLSearchParams;return Q.object(e)&&Object.entries(e).forEach(([r,n])=>{t.set(r,n)}),t}const gr={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!$n.textTracks)return void(Q.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&He.setCaptionsMenu.call(this));if(Q.element(this.elements.captions)||(this.elements.captions=Tt("div",Cc(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),oat(this.elements.captions,this.elements.wrapper)),vi.isIE&&window.URL){const n=this.media.querySelectorAll("track");Array.from(n).forEach(i=>{const s=i.getAttribute("src"),o=Sre(s);o!==null&&o.hostname!==window.location.href.hostname&&["http:","https:"].includes(o.protocol)&&zb(s,"blob").then(a=>{i.setAttribute("src",window.URL.createObjectURL(a))}).catch(()=>{Fu(i)})})}const e=lS((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(n=>n.split("-")[0]));let t=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();t==="auto"&&([t]=e);let r=this.storage.get("captions");if(Q.boolean(r)||({active:r}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:r,language:t,languages:e}),this.isHTML5){const n=this.config.captions.update?"addtrack removetrack":"removetrack";sr.call(this,this.media.textTracks,n,gr.update.bind(this))}setTimeout(gr.update.bind(this),0)},update(){const e=gr.getTracks.call(this,!0),{active:t,language:r,meta:n,currentTrackNode:i}=this.captions,s=!!e.find(o=>o.language===r);this.isHTML5&&this.isVideo&&e.filter(o=>!n.get(o)).forEach(o=>{this.debug.log("Track added",o),n.set(o,{default:o.mode==="showing"}),o.mode==="showing"&&(o.mode="hidden"),sr.call(this,o,"cuechange",()=>gr.updateCues.call(this))}),(s&&this.language!==r||!e.includes(i))&&(gr.setLanguage.call(this,r),gr.toggle.call(this,t&&s)),this.elements&&Mr(this.elements.container,this.config.classNames.captions.enabled,!Q.empty(e)),Q.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&He.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:r}=this.captions,n=this.config.classNames.captions.active,i=Q.nullOrUndefined(e)?!r:e;if(i!==r){if(t||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!t){const s=gr.getTracks.call(this),o=gr.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=o.language,void gr.set.call(this,s.indexOf(o))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Mr(this.elements.container,n,i),this.captions.toggled=i,He.updateSetting.call(this,"captions"),Ot.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout(()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,t=!0){const r=gr.getTracks.call(this);if(e!==-1)if(Q.number(e))if(e in r){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const n=r[e],{language:i}=n||{};this.captions.currentTrackNode=n,He.updateSetting.call(this,"captions"),t||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),Ot.call(this,this.media,"languagechange")}gr.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&gr.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else gr.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!Q.string(e))return void this.debug.warn("Invalid language argument",e);const r=e.toLowerCase();this.captions.language=r;const n=gr.getTracks.call(this),i=gr.findTrack.call(this,[r]);gr.set.call(this,n.indexOf(i),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(t=>!this.isHTML5||e||this.captions.meta.has(t)).filter(t=>["captions","subtitles"].includes(t.kind))},findTrack(e,t=!1){const r=gr.getTracks.call(this),n=o=>Number((this.captions.meta.get(o)||{}).default),i=Array.from(r).sort((o,a)=>n(a)-n(o));let s;return e.every(o=>(s=i.find(a=>a.language===o),!s)),s||(t?i[0]:void 0)},getCurrentTrack(){return gr.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!Q.track(t)&&$n.textTracks&&this.captions.toggled&&(t=gr.getCurrentTrack.call(this)),Q.track(t)?Q.empty(t.label)?Q.empty(t.language)?pi.get("enabled",this.config):e.language.toUpperCase():t.label:pi.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!Q.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!Q.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const n=gr.getCurrentTrack.call(this);t=Array.from((n||{}).activeCues||[]).map(i=>i.getCueAsHTML()).map(bat)}const r=t.map(n=>n.trim()).join(`
1642
- `);if(r!==this.elements.captions.innerHTML){uv(this.elements.captions);const n=Tt("span",Cc(this.config.selectors.caption));n.innerHTML=r,this.elements.captions.appendChild(n),Ot.call(this,this.media,"cuechange")}}},Ire={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},tx={active:"picture-in-picture",inactive:"inline"},Kl={html5:"html5",youtube:"youtube",vimeo:"vimeo"},rx={audio:"audio",video:"video"};function vat(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Kl.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Kl.vimeo:null}const nx=()=>{};class _at{constructor(t=!1){this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):nx}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):nx}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):nx}}class ja{constructor(t){Ve(this,"onChange",()=>{if(!this.supported)return;const r=this.player.elements.buttons.fullscreen;Q.element(r)&&(r.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;Ot.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),Ve(this,"toggleFallback",(r=!1)=>{if(r?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=r?"hidden":"",Mr(this.target,this.player.config.classNames.fullscreen.fallback,r),vi.isIos){let n=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const s=Q.string(n.content)&&n.content.includes(i);r?(this.cleanupViewport=!s,s||(n.content+=`,${i}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(o=>o.trim()!==i).join(","))}this.onChange()}),Ve(this,"trapFocus",r=>{if(vi.isIos||vi.isIPadOS||!this.active||r.key!=="Tab")return;const n=document.activeElement,i=x2.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[s]=i,o=i[i.length-1];n!==o||r.shiftKey?n===s&&r.shiftKey&&(o.focus(),r.preventDefault()):(s.focus(),r.preventDefault())}),Ve(this,"update",()=>{if(this.supported){let r;r=this.forceFallback?"Fallback (forced)":ja.nativeSupported?"Native":"Fallback",this.player.debug.log(`${r} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Mr(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),Ve(this,"enter",()=>{this.supported&&(vi.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!ja.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?Q.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),Ve(this,"exit",()=>{if(this.supported)if(vi.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Mc(this.player.play());else if(!ja.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!Q.empty(this.prefix)){const r=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${r}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),Ve(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=t,this.prefix=ja.prefix,this.property=ja.property,this.scrollPosition={x:0,y:0},this.forceFallback=t.config.fullscreen.fallback==="force",this.player.elements.fullscreen=t.config.fullscreen.container&&aat(this.player.elements.container,t.config.fullscreen.container),sr.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),sr.call(this.player,this.player.elements.container,"dblclick",r=>{Q.element(this.player.elements.controls)&&this.player.elements.controls.contains(r.target)||this.player.listeners.proxy(r,this.toggle,"fullscreen")}),sr.call(this,this.player.elements.container,"keydown",r=>this.trapFocus(r)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return ja.nativeSupported&&!this.forceFallback}static get prefix(){if(Q.function(document.exitFullscreen))return"";let t="";return["webkit","moz","ms"].some(r=>!(!Q.function(document[`${r}ExitFullscreen`])&&!Q.function(document[`${r}CancelFullScreen`]))&&(t=r,!0)),t}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,ja.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||ja.nativeSupported||!vi.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!ja.nativeSupported||this.forceFallback)return S3(this.target,this.player.config.classNames.fullscreen.fallback);const t=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return t&&t.shadowRoot?t===this.target.getRootNode().host:t===this.target}get target(){return vi.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function lv(e,t=1){return new Promise((r,n)=>{const i=new Image,s=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=t?r:n)(i)};Object.assign(i,{onload:s,onerror:s,src:e})})}const Br={addStyleHook(){Mr(this.elements.container,this.config.selectors.container.replace(".",""),!0),Mr(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Br.toggleNativeControls.call(this,!0);Q.element(this.elements.controls)||(He.inject.call(this),this.listeners.controls()),Br.toggleNativeControls.call(this),this.isHTML5&&gr.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,He.updateVolume.call(this),He.timeUpdate.call(this),He.durationUpdate.call(this),Br.checkPlaying.call(this),Mr(this.elements.container,this.config.classNames.pip.supported,$n.pip&&this.isHTML5&&this.isVideo),Mr(this.elements.container,this.config.classNames.airplay.supported,$n.airplay&&this.isHTML5),Mr(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{Ot.call(this,this.media,"ready")},0),Br.setTitle.call(this),this.poster&&Br.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&He.durationUpdate.call(this),this.config.mediaMetadata&&He.setMediaMetadata.call(this)},setTitle(){let e=pi.get("play",this.config);if(Q.string(this.config.title)&&!Q.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(t=>{t.setAttribute("aria-label",e)}),this.isEmbed){const t=Kn.call(this,"iframe");if(!Q.element(t))return;const r=Q.empty(this.config.title)?"video":this.config.title,n=pi.get("frameTitle",this.config);t.setAttribute("title",n.replace("{title}",r))}},togglePoster(e){Mr(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),lat.call(this).then(()=>lv(e)).catch(r=>{throw e===this.poster&&Br.togglePoster.call(this,!1),r}).then(()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),Br.togglePoster.call(this,!0),e)))},checkPlaying(e){Mr(this.elements.container,this.config.classNames.playing,this.playing),Mr(this.elements.container,this.config.classNames.paused,this.paused),Mr(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(t=>{Object.assign(t,{pressed:this.playing}),t.setAttribute("aria-label",pi.get(this.playing?"pause":"play",this.config))}),Q.event(e)&&e.type==="timeupdate"||Br.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Mr(this.elements.container,this.config.classNames.loading,this.loading),Br.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const r=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||t.pressed||t.hover||r))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!Q.empty(e)&&Q.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),Q.empty(this.media.style)&&this.media.removeAttribute("style")}};class xat{constructor(t){Ve(this,"firstTouch",()=>{const{player:r}=this,{elements:n}=r;r.touch=!0,Mr(n.container,r.config.classNames.isTouch,!0)}),Ve(this,"global",(r=!0)=>{const{player:n}=this;n.config.keyboard.global&&E2.call(n,window,"keydown keyup",this.handleKey,r,!1),E2.call(n,document.body,"click",this.toggleMenu,r),DM.call(n,document.body,"touchstart",this.firstTouch)}),Ve(this,"container",()=>{const{player:r}=this,{config:n,elements:i,timers:s}=r;!n.keyboard.global&&n.keyboard.focused&&sr.call(r,i.container,"keydown keyup",this.handleKey,!1),sr.call(r,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",c=>{const{controls:u}=i;u&&c.type==="enterfullscreen"&&(u.pressed=!1,u.hover=!1);let l=0;["touchstart","touchmove","mousemove"].includes(c.type)&&(Br.toggleControls.call(r,!0),l=r.touch?3e3:2e3),clearTimeout(s.controls),s.controls=setTimeout(()=>Br.toggleControls.call(r,!1),l)});const o=()=>{if(!r.isVimeo||r.config.vimeo.premium)return;const c=i.wrapper,{active:u}=r.fullscreen,[l,d]=RM.call(r),h=wre(`aspect-ratio: ${l} / ${d}`);if(!u)return void(h?(c.style.width=null,c.style.height=null):(c.style.maxWidth=null,c.style.margin=null));const[g,m]=fat(),b=g/m>l/d;h?(c.style.width=b?"auto":"100%",c.style.height=b?"100%":"auto"):(c.style.maxWidth=b?m/d*l+"px":null,c.style.margin=b?"0 auto":null)},a=()=>{clearTimeout(s.resized),s.resized=setTimeout(o,50)};sr.call(r,i.container,"enterfullscreen exitfullscreen",c=>{const{target:u}=r.fullscreen;u===i.container&&(!r.isEmbed&&Q.empty(r.config.ratio)||(o(),(c.type==="enterfullscreen"?sr:m6).call(r,window,"resize",a)))})}),Ve(this,"media",()=>{const{player:r}=this,{elements:n}=r;if(sr.call(r,r.media,"timeupdate seeking seeked",s=>He.timeUpdate.call(r,s)),sr.call(r,r.media,"durationchange loadeddata loadedmetadata",s=>He.durationUpdate.call(r,s)),sr.call(r,r.media,"ended",()=>{r.isHTML5&&r.isVideo&&r.config.resetOnEnd&&(r.restart(),r.pause())}),sr.call(r,r.media,"progress playing seeking seeked",s=>He.updateProgress.call(r,s)),sr.call(r,r.media,"volumechange",s=>He.updateVolume.call(r,s)),sr.call(r,r.media,"playing play pause ended emptied timeupdate",s=>Br.checkPlaying.call(r,s)),sr.call(r,r.media,"waiting canplay seeked playing",s=>Br.checkLoading.call(r,s)),r.supported.ui&&r.config.clickToPlay&&!r.isAudio){const s=Kn.call(r,`.${r.config.classNames.video}`);if(!Q.element(s))return;sr.call(r,n.container,"click",o=>{([n.container,s].includes(o.target)||s.contains(o.target))&&(r.touch&&r.config.hideControls||(r.ended?(this.proxy(o,r.restart,"restart"),this.proxy(o,()=>{Mc(r.play())},"play")):this.proxy(o,()=>{Mc(r.togglePlay())},"play")))})}r.supported.ui&&r.config.disableContextMenu&&sr.call(r,n.wrapper,"contextmenu",s=>{s.preventDefault()},!1),sr.call(r,r.media,"volumechange",()=>{r.storage.set({volume:r.volume,muted:r.muted})}),sr.call(r,r.media,"ratechange",()=>{He.updateSetting.call(r,"speed"),r.storage.set({speed:r.speed})}),sr.call(r,r.media,"qualitychange",s=>{He.updateSetting.call(r,"quality",null,s.detail.quality)}),sr.call(r,r.media,"ready qualitychange",()=>{He.setDownloadUrl.call(r)});const i=r.config.events.concat(["keyup","keydown"]).join(" ");sr.call(r,r.media,i,s=>{let{detail:o={}}=s;s.type==="error"&&(o=r.media.error),Ot.call(r,n.container,s.type,!0,o)})}),Ve(this,"proxy",(r,n,i)=>{const{player:s}=this,o=s.config.listeners[i];let a=!0;Q.function(o)&&(a=o.call(s,r)),a!==!1&&Q.function(n)&&n.call(s,r)}),Ve(this,"bind",(r,n,i,s,o=!0)=>{const{player:a}=this,c=a.config.listeners[s],u=Q.function(c);sr.call(a,r,n,l=>this.proxy(l,i,s),o&&!u)}),Ve(this,"controls",()=>{const{player:r}=this,{elements:n}=r,i=vi.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(s=>{this.bind(s,"click",()=>{Mc(r.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",r.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{r.lastSeekTime=Date.now(),r.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{r.lastSeekTime=Date.now(),r.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{r.muted=!r.muted},"mute"),this.bind(n.buttons.captions,"click",()=>r.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{Ot.call(r,r.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{r.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{r.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",r.airplay,"airplay"),this.bind(n.buttons.settings,"click",s=>{s.stopPropagation(),s.preventDefault(),He.toggleMenu.call(r,s)},null,!1),this.bind(n.buttons.settings,"keyup",s=>{[" ","Enter"].includes(s.key)&&(s.key!=="Enter"?(s.preventDefault(),s.stopPropagation(),He.toggleMenu.call(r,s)):He.focusFirstMenuItem.call(r,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",s=>{s.key==="Escape"&&He.toggleMenu.call(r,s)}),this.bind(n.inputs.seek,"mousedown mousemove",s=>{const o=n.progress.getBoundingClientRect(),a=100/o.width*(s.pageX-o.left);s.currentTarget.setAttribute("seek-value",a)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",s=>{const o=s.currentTarget,a="play-on-seeked";if(Q.keyboardEvent(s)&&!["ArrowLeft","ArrowRight"].includes(s.key))return;r.lastSeekTime=Date.now();const c=o.hasAttribute(a),u=["mouseup","touchend","keyup"].includes(s.type);c&&u?(o.removeAttribute(a),Mc(r.play())):!u&&r.playing&&(o.setAttribute(a,""),r.pause())}),vi.isIos){const s=x2.call(r,'input[type="range"]');Array.from(s).forEach(o=>this.bind(o,i,a=>gre(a.target)))}this.bind(n.inputs.seek,i,s=>{const o=s.currentTarget;let a=o.getAttribute("seek-value");Q.empty(a)&&(a=o.value),o.removeAttribute("seek-value"),r.currentTime=a/o.max*r.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",s=>He.updateSeekTooltip.call(r,s)),this.bind(n.progress,"mousemove touchmove",s=>{const{previewThumbnails:o}=r;o&&o.loaded&&o.startMove(s)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:s}=r;s&&s.loaded&&s.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",s=>{const{previewThumbnails:o}=r;o&&o.loaded&&o.startScrubbing(s)}),this.bind(n.progress,"mouseup touchend",s=>{const{previewThumbnails:o}=r;o&&o.loaded&&o.endScrubbing(s)}),vi.isWebKit&&Array.from(x2.call(r,'input[type="range"]')).forEach(s=>{this.bind(s,"input",o=>He.updateRangeFill.call(r,o.target))}),r.config.toggleInvert&&!Q.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{r.currentTime!==0&&(r.config.invertTime=!r.config.invertTime,He.timeUpdate.call(r))}),this.bind(n.inputs.volume,i,s=>{r.volume=s.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",s=>{n.controls.hover=!r.touch&&s.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(s=>!s.contains(n.container)).forEach(s=>{this.bind(s,"mouseenter mouseleave",o=>{n.controls&&(n.controls.hover=!r.touch&&o.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",s=>{n.controls.pressed=["mousedown","touchstart"].includes(s.type)}),this.bind(n.controls,"focusin",()=>{const{config:s,timers:o}=r;Mr(n.controls,s.classNames.noTransition,!0),Br.toggleControls.call(r,!0),setTimeout(()=>{Mr(n.controls,s.classNames.noTransition,!1)},0);const a=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout(()=>Br.toggleControls.call(r,!1),a)}),this.bind(n.inputs.volume,"wheel",s=>{const o=s.webkitDirectionInvertedFromDevice,[a,c]=[s.deltaX,-s.deltaY].map(d=>o?-d:d),u=Math.sign(Math.abs(a)>Math.abs(c)?a:c);r.increaseVolume(u/50);const{volume:l}=r.media;(u===1&&l<1||u===-1&&l>0)&&s.preventDefault()},"volume",!1)}),this.player=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(t){const{player:r}=this,{elements:n}=r,{key:i,type:s,altKey:o,ctrlKey:a,metaKey:c,shiftKey:u}=t,l=s==="keydown",d=l&&i===this.lastKey;if(!(o||a||c||u)&&i){if(l){const g=document.activeElement;if(Q.element(g)){const{editable:m}=r.config.selectors,{seek:b}=n.inputs;if(g!==b&&_d(g,m)||t.key===" "&&_d(g,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(i)&&(t.preventDefault(),t.stopPropagation()),i){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d||(h=parseInt(i,10),r.currentTime=r.duration/10*h);break;case" ":case"k":d||Mc(r.togglePlay());break;case"ArrowUp":r.increaseVolume(.1);break;case"ArrowDown":r.decreaseVolume(.1);break;case"m":d||(r.muted=!r.muted);break;case"ArrowRight":r.forward();break;case"ArrowLeft":r.rewind();break;case"f":r.fullscreen.toggle();break;case"c":d||r.toggleCaptions();break;case"l":r.loop=!r.loop}i==="Escape"&&!r.fullscreen.usingNative&&r.fullscreen.active&&r.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var h}}toggleMenu(t){He.toggleMenu.call(this.player,t)}}function Eat(e,t){return e(t={exports:{}},t.exports),t.exports}var kat=Eat(function(e,t){e.exports=function(){var r=function(){},n={},i={},s={};function o(h,g){h=h.push?h:[h];var m,b,k,w=[],E=h.length,A=E;for(m=function(M,R){R.length&&w.push(M),--A||g(w)};E--;)b=h[E],(k=i[b])?m(b,k):(s[b]=s[b]||[]).push(m)}function a(h,g){if(h){var m=s[h];if(i[h]=g,m)for(;m.length;)m[0](h,g),m.splice(0,1)}}function c(h,g){h.call&&(h={success:h}),g.length?(h.error||r)(g):(h.success||r)(h)}function u(h,g,m,b){var k,w,E=document,A=m.async,M=(m.numRetries||0)+1,R=m.before||r,N=h.replace(/[\?|#].*$/,""),z=h.replace(/^(css|img)!/,"");b=b||0,/(^css!|\.css$)/.test(N)?((w=E.createElement("link")).rel="stylesheet",w.href=z,(k="hideFocus"in w)&&w.relList&&(k=0,w.rel="preload",w.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(N)?(w=E.createElement("img")).src=z:((w=E.createElement("script")).src=h,w.async=A===void 0||A),w.onload=w.onerror=w.onbeforeload=function(F){var L=F.type[0];if(k)try{w.sheet.cssText.length||(L="e")}catch(B){B.code!=18&&(L="e")}if(L=="e"){if((b+=1)<M)return u(h,g,m,b)}else if(w.rel=="preload"&&w.as=="style")return w.rel="stylesheet";g(h,L,F.defaultPrevented)},R(h,w)!==!1&&E.head.appendChild(w)}function l(h,g,m){var b,k,w=(h=h.push?h:[h]).length,E=w,A=[];for(b=function(M,R,N){if(R=="e"&&A.push(M),R=="b"){if(!N)return;A.push(M)}--w||g(A)},k=0;k<E;k++)u(h[k],b,m)}function d(h,g,m){var b,k;if(g&&g.trim&&(b=g),k=(b?m:g)||{},b){if(b in n)throw"LoadJS";n[b]=!0}function w(E,A){l(h,function(M){c(k,M),E&&c({success:E,error:A},M),a(b,M)},k)}if(k.returnPromise)return new Promise(w);w()}return d.ready=function(h,g){return o(h,function(m){c(g,m)}),d},d.done=function(h){a(h,[])},d.reset=function(){n={},i={},s={}},d.isDefined=function(h){return h in n},d}()});function LM(e){return new Promise((t,r)=>{kat(e,{success:t,error:r})})}function Aat(e){return Q.empty(e)?null:Q.number(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}function Sat(e){const t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return t&&t.length===5?t[4]:null}function xg(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Ot.call(this,this.media,e?"play":"pause"))}const hS={setup(){const e=this;Mr(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,u1.call(e),Q.object(window.Vimeo)?hS.ready.call(e):LM(e.config.urls.vimeo.sdk).then(()=>{hS.ready.call(e)}).catch(t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)})},ready(){const e=this,t=e.config.vimeo,{premium:r,referrerPolicy:n,...i}=t;let s=e.media.getAttribute("src"),o="";Q.empty(s)?(s=e.media.getAttribute(e.config.attributes.embed.id),o=e.media.getAttribute(e.config.attributes.embed.hash)):o=Sat(s);const a=o?{h:o}:{};r&&Object.assign(i,{controls:!1,sidedock:!1});const c=Cre({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...a,...i}),u=Aat(s),l=Tt("iframe"),d=fS(e.config.urls.vimeo.iframe,u,c);if(l.setAttribute("src",d),l.setAttribute("allowfullscreen",""),l.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Q.empty(n)||l.setAttribute("referrerPolicy",n),r||!t.customControls)l.setAttribute("data-poster",e.poster),e.media=A3(l,e.media);else{const E=Tt("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});E.appendChild(l),e.media=A3(E,e.media)}t.customControls||zb(fS(e.config.urls.vimeo.api,d)).then(E=>{!Q.empty(E)&&E.thumbnail_url&&Br.setPoster.call(e,E.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(l,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(xg.call(e,!0),e.embed.play()),e.media.pause=()=>(xg.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:h}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>h,set(E){const{embed:A,media:M,paused:R,volume:N}=e,z=R&&!A.hasPlayed;M.seeking=!0,Ot.call(e,M,"seeking"),Promise.resolve(z&&A.setVolume(0)).then(()=>A.setCurrentTime(E)).then(()=>z&&A.pause()).then(()=>z&&A.setVolume(N)).catch(()=>{})}});let g=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>g,set(E){e.embed.setPlaybackRate(E).then(()=>{g=E,Ot.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:m}=e.config;Object.defineProperty(e.media,"volume",{get:()=>m,set(E){e.embed.setVolume(E).then(()=>{m=E,Ot.call(e,e.media,"volumechange")})}});let{muted:b}=e.config;Object.defineProperty(e.media,"muted",{get:()=>b,set(E){const A=!!Q.boolean(E)&&E;e.embed.setMuted(!!A||e.config.muted).then(()=>{b=A,Ot.call(e,e.media,"volumechange")})}});let k,{loop:w}=e.config;Object.defineProperty(e.media,"loop",{get:()=>w,set(E){const A=Q.boolean(E)?E:e.config.loop.active;e.embed.setLoop(A).then(()=>{w=A})}}),e.embed.getVideoUrl().then(E=>{k=E,He.setDownloadUrl.call(e)}).catch(E=>{this.debug.warn(E)}),Object.defineProperty(e.media,"currentSrc",{get:()=>k}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(E=>{const[A,M]=E;e.embed.ratio=_re(A,M),u1.call(this)}),e.embed.setAutopause(e.config.autopause).then(E=>{e.config.autopause=E}),e.embed.getVideoTitle().then(E=>{e.config.title=E,Br.setTitle.call(this)}),e.embed.getCurrentTime().then(E=>{h=E,Ot.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(E=>{e.media.duration=E,Ot.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(E=>{e.media.textTracks=E,gr.setup.call(e)}),e.embed.on("cuechange",({cues:E=[]})=>{const A=E.map(M=>mat(M.text));gr.updateCues.call(e,A)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(E=>{xg.call(e,!E),E||Ot.call(e,e.media,"playing")}),Q.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{Ot.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{Ot.call(e,e.media,"playing")}),e.embed.on("play",()=>{xg.call(e,!0),Ot.call(e,e.media,"playing")}),e.embed.on("pause",()=>{xg.call(e,!1)}),e.embed.on("timeupdate",E=>{e.media.seeking=!1,h=E.seconds,Ot.call(e,e.media,"timeupdate")}),e.embed.on("progress",E=>{e.media.buffered=E.percent,Ot.call(e,e.media,"progress"),parseInt(E.percent,10)===1&&Ot.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(A=>{A!==e.media.duration&&(e.media.duration=A,Ot.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,Ot.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,Ot.call(e,e.media,"ended")}),e.embed.on("error",E=>{e.media.error=E,Ot.call(e,e.media,"error")}),t.customControls&&setTimeout(()=>Br.build.call(e),0)}};function Cat(e){return Q.empty(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}function Eg(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Ot.call(this,this.media,e?"play":"pause"))}function Iat(e){return e.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const fv={setup(){if(Mr(this.elements.wrapper,this.config.classNames.embed,!0),Q.object(window.YT)&&Q.function(window.YT.Player))fv.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{Q.function(e)&&e(),fv.ready.call(this)},LM(this.config.urls.youtube.sdk).catch(t=>{this.debug.warn("YouTube API failed to load",t)})}},getTitle(e){zb(fS(this.config.urls.youtube.api,e)).then(t=>{if(Q.object(t)){const{title:r,height:n,width:i}=t;this.config.title=r,Br.setTitle.call(this),this.embed.ratio=_re(i,n)}u1.call(this)}).catch(()=>{u1.call(this)})},ready(){const e=this,t=e.config.youtube,r=e.media&&e.media.getAttribute("id");if(!Q.empty(r)&&r.startsWith("youtube-"))return;let n=e.media.getAttribute("src");Q.empty(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));const i=Cat(n),s=Tt("div",{id:dat(e.provider),"data-poster":t.customControls?e.poster:void 0});if(e.media=A3(s,e.media),t.customControls){const o=a=>`https://i.ytimg.com/vi/${i}/${a}default.jpg`;lv(o("maxres"),121).catch(()=>lv(o("sd"),121)).catch(()=>lv(o("hq"))).then(a=>Br.setPoster.call(e,a.src)).then(a=>{a.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:i,host:Iat(t),playerVars:Mn({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(o){if(!e.media.error){const a=o.data,c={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[a]||"An unknown error occurred";e.media.error={code:a,message:c},Ot.call(e,e.media,"error")}},onPlaybackRateChange(o){const a=o.target;e.media.playbackRate=a.getPlaybackRate(),Ot.call(e,e.media,"ratechange")},onReady(o){if(Q.function(e.media.play))return;const a=o.target;fv.getTitle.call(e,i),e.media.play=()=>{Eg.call(e,!0),a.playVideo()},e.media.pause=()=>{Eg.call(e,!1),a.pauseVideo()},e.media.stop=()=>{a.stopVideo()},e.media.duration=a.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(a.getCurrentTime()),set(d){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,Ot.call(e,e.media,"seeking"),a.seekTo(d)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>a.getPlaybackRate(),set(d){a.setPlaybackRate(d)}});let{volume:c}=e.config;Object.defineProperty(e.media,"volume",{get:()=>c,set(d){c=d,a.setVolume(100*c),Ot.call(e,e.media,"volumechange")}});let{muted:u}=e.config;Object.defineProperty(e.media,"muted",{get:()=>u,set(d){const h=Q.boolean(d)?d:u;u=h,a[h?"mute":"unMute"](),a.setVolume(100*c),Ot.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>a.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const l=a.getAvailablePlaybackRates();e.options.speed=l.filter(d=>e.config.speed.options.includes(d)),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),Ot.call(e,e.media,"timeupdate"),Ot.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=a.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBuffered<e.media.buffered)&&Ot.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,e.media.buffered===1&&(clearInterval(e.timers.buffering),Ot.call(e,e.media,"canplaythrough"))},200),t.customControls&&setTimeout(()=>Br.build.call(e),50)},onStateChange(o){const a=o.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(o.data)&&(e.media.seeking=!1,Ot.call(e,e.media,"seeked")),o.data){case-1:Ot.call(e,e.media,"timeupdate"),e.media.buffered=a.getVideoLoadedFraction(),Ot.call(e,e.media,"progress");break;case 0:Eg.call(e,!1),e.media.loop?(a.stopVideo(),a.playVideo()):Ot.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(Eg.call(e,!0),Ot.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{Ot.call(e,e.media,"timeupdate")},50),e.media.duration!==a.getDuration()&&(e.media.duration=a.getDuration(),Ot.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),Eg.call(e,!1);break;case 3:Ot.call(e,e.media,"waiting")}Ot.call(e,e.elements.container,"statechange",!1,{code:o.data})}}})}},Mre={setup(){this.media?(Mr(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Mr(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Mr(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Tt("div",{class:this.config.classNames.video}),bre(this.media,this.elements.wrapper),this.elements.poster=Tt("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?of.setup.call(this):this.isYouTube?fv.setup.call(this):this.isVimeo&&hS.setup.call(this)):this.debug.warn("No media element found!")}};class Mat{constructor(t){Ve(this,"load",()=>{this.enabled&&(Q.object(window.google)&&Q.object(window.google.ima)?this.ready():LM(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),Ve(this,"ready",()=>{var r;this.enabled||((r=this).manager&&r.manager.destroy(),r.elements.displayContainer&&r.elements.displayContainer.destroy(),r.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),Ve(this,"setupIMA",()=>{this.elements.container=Tt("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,r=>this.onAdsManagerLoaded(r),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,r=>this.onAdError(r),!1),this.requestAds()}),Ve(this,"requestAds",()=>{const{container:r}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=r.offsetWidth,n.linearAdSlotHeight=r.offsetHeight,n.nonLinearAdSlotWidth=r.offsetWidth,n.nonLinearAdSlotHeight=r.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),Ve(this,"pollCountdown",(r=!1)=>{if(!r)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=b6(Math.max(this.manager.getRemainingTime(),0)),i=`${pi.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),Ve(this,"onAdsManagerLoaded",r=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=r.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,i=>this.onAdError(i)),Object.keys(google.ima.AdEvent.Type).forEach(i=>{this.manager.addEventListener(google.ima.AdEvent.Type[i],s=>this.onAdEvent(s))}),this.trigger("loaded")}),Ve(this,"addCuePoints",()=>{Q.empty(this.cuePoints)||this.cuePoints.forEach(r=>{if(r!==0&&r!==-1&&r<this.player.duration){const n=this.player.elements.progress;if(Q.element(n)){const i=100/this.player.duration*r,s=Tt("span",{class:this.player.config.classNames.cues});s.style.left=`${i.toString()}%`,n.appendChild(s)}}})}),Ve(this,"onAdEvent",r=>{const{container:n}=this.player.elements,i=r.getAd(),s=r.getAdData();switch((o=>{Ot.call(this.player,this.player.media,`ads${o.replace(/_/g,"").toLowerCase()}`)})(r.type),r.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=n.offsetWidth,i.height=n.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:s.adError&&this.player.debug.warn(`Non-fatal ad error: ${s.adError.getMessage()}`)}}),Ve(this,"onAdError",r=>{this.cancel(),this.player.debug.warn("Ads error",r)}),Ve(this,"listeners",()=>{const{container:r}=this.player.elements;let n;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{n=this.player.currentTime}),this.player.on("seeked",()=>{const i=this.player.currentTime;Q.empty(this.cuePoints)||this.cuePoints.forEach((s,o)=>{n<s&&s<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(r.offsetWidth,r.offsetHeight,google.ima.ViewMode.NORMAL)})}),Ve(this,"play",()=>{const{container:r}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(r.offsetWidth,r.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),Ve(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Mc(this.player.media.play())}),Ve(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),Ve(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),Ve(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(r=>{this.on("loaded",r),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),Ve(this,"trigger",(r,...n)=>{const i=this.events[r];Q.array(i)&&i.forEach(s=>{Q.function(s)&&s.apply(this,n)})}),Ve(this,"on",(r,n)=>(Q.array(this.events[r])||(this.events[r]=[]),this.events[r].push(n),this)),Ve(this,"startSafetyTimer",(r,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},r)}),Ve(this,"clearSafetyTimer",r=>{Q.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${r}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=t,this.config=t.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((r,n)=>{this.on("loaded",r),this.on("error",n)}),this.load()}get enabled(){const{config:t}=this;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!Q.empty(t.publisherId)||Q.url(t.tagUrl))}get tagUrl(){const{config:t}=this;return Q.url(t.tagUrl)?t.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Cre({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:t.publisherId})}`}}function $re(e=0,t=0,r=255){return Math.min(Math.max(e,t),r)}const $at=e=>{const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(r=>{const n={};r.split(/\r\n|\n|\r/).forEach(i=>{if(Q.number(n.startTime)){if(!Q.empty(i.trim())&&Q.empty(n.text)){const s=i.trim().split("#xywh=");[n.text]=s,s[1]&&([n.x,n.y,n.w,n.h]=s[1].split(","))}}else{const s=i.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);s&&(n.startTime=60*Number(s[1]||0)*60+60*Number(s[2])+Number(s[3])+ +`0.${s[4]}`,n.endTime=60*Number(s[6]||0)*60+60*Number(s[7])+Number(s[8])+ +`0.${s[9]}`)}}),n.text&&t.push(n)}),t},wq=(e,t)=>{const r={};return e>t.width/t.height?(r.width=t.width,r.height=1/e*t.width):(r.height=t.height,r.width=e*t.height),r};class pS{constructor(t){Ve(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),Ve(this,"getThumbnails",()=>new Promise(r=>{const{src:n}=this.player.config.previewThumbnails;if(Q.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((s,o)=>s.height-o.height),this.player.debug.log("Preview thumbnails",this.thumbnails),r()};if(Q.function(n))n(s=>{this.thumbnails=s,i()});else{const s=(Q.string(n)?[n]:n).map(o=>this.getThumbnail(o));Promise.all(s).then(i)}})),Ve(this,"getThumbnail",r=>new Promise(n=>{zb(r).then(i=>{const s={frames:$at(i),height:null,urlPrefix:""};s.frames[0].text.startsWith("/")||s.frames[0].text.startsWith("http://")||s.frames[0].text.startsWith("https://")||(s.urlPrefix=r.substring(0,r.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{s.height=o.naturalHeight,s.width=o.naturalWidth,this.thumbnails.push(s),n()},o.src=s.urlPrefix+s.frames[0].text})})),Ve(this,"startMove",r=>{if(this.loaded&&Q.event(r)&&["touchmove","mousemove"].includes(r.type)&&this.player.media.duration){if(r.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,i;const s=this.player.elements.progress.getBoundingClientRect(),o=100/s.width*(r.pageX-s.left);this.seekTime=this.player.media.duration*(o/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=r.pageX,this.elements.thumb.time.innerText=b6(this.seekTime);const a=(n=this.player.config.markers)===null||n===void 0||(i=n.points)===null||i===void 0?void 0:i.find(({time:c})=>c===Math.round(this.seekTime));a&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${a.label}<br>`)}this.showImageAtCurrentTime()}}),Ve(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),Ve(this,"startScrubbing",r=>{(Q.nullOrUndefined(r.button)||r.button===!1||r.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),Ve(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):DM.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),Ve(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),Ve(this,"render",()=>{this.elements.thumb.container=Tt("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Tt("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const r=Tt("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Tt("span",{},"00:00"),r.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(r),Q.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Tt("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),Ve(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),Ve(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const r=this.thumbnails[0].frames.findIndex(s=>this.seekTime>=s.startTime&&this.seekTime<=s.endTime),n=r>=0;let i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((s,o)=>{this.loadedImages.includes(s.frames[r].text)&&(i=o)}),r!==this.showingThumb&&(this.showingThumb=r,this.loadImage(i)))}),Ve(this,"loadImage",(r=0)=>{const n=this.showingThumb,i=this.thumbnails[r],{urlPrefix:s}=i,o=i.frames[n],a=i.frames[n].text,c=s+a;if(this.currentImageElement&&this.currentImageElement.dataset.filename===a)this.showImage(this.currentImageElement,o,r,n,a,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const u=new Image;u.src=c,u.dataset.index=n,u.dataset.filename=a,this.showingThumbFilename=a,this.player.debug.log(`Loading image: ${c}`),u.onload=()=>this.showImage(u,o,r,n,a,!0),this.loadingImage=u,this.removeOldImages(u)}}),Ve(this,"showImage",(r,n,i,s,o,a=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${s}. qual: ${i}. newimg: ${a}`),this.setImageSizeAndOffset(r,n),a&&(this.currentImageContainer.appendChild(r),this.currentImageElement=r,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(s,!0).then(this.preloadNearby(s,!1)).then(this.getHigherQuality(i,r,n,o))}),Ve(this,"removeOldImages",r=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(n.dataset.index!==r.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:s}=this;setTimeout(()=>{s.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},i)}})}),Ve(this,"preloadNearby",(r,n=!0)=>new Promise(i=>{setTimeout(()=>{const s=this.thumbnails[0].frames[r].text;if(this.showingThumbFilename===s){let o;o=n?this.thumbnails[0].frames.slice(r):this.thumbnails[0].frames.slice(0,r).reverse();let a=!1;o.forEach(c=>{const u=c.text;if(u!==s&&!this.loadedImages.includes(u)){a=!0,this.player.debug.log(`Preloading thumb filename: ${u}`);const{urlPrefix:l}=this.thumbnails[0],d=l+u,h=new Image;h.src=d,h.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${u}`),this.loadedImages.includes(u)||this.loadedImages.push(u),i()}}}),a||i()}},300)})),Ve(this,"getHigherQuality",(r,n,i,s)=>{if(r<this.thumbnails.length-1){let o=n.naturalHeight;this.usingSprites&&(o=i.h),o<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===s&&(this.player.debug.log(`Showing higher quality thumb for: ${s}`),this.loadImage(r+1))},300)}}),Ve(this,"toggleThumbContainer",(r=!1,n=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,r),!r&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),Ve(this,"toggleScrubbingContainer",(r=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,r),r||(this.showingThumb=null,this.showingThumbFilename=null)}),Ve(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),Ve(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:r}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(r.clientHeight>20&&r.clientWidth<20){const n=Math.floor(r.clientHeight*this.thumbAspectRatio);r.style.width=`${n}px`}else if(r.clientHeight<20&&r.clientWidth>20){const n=Math.floor(r.clientWidth/this.thumbAspectRatio);r.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);r.style.height=`${this.thumbContainerHeight}px`,r.style.width=`${n}px`}this.setThumbContainerPos()}),Ve(this,"setThumbContainerPos",()=>{const r=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,s=n.left-r.left+10,o=n.right-r.left-i.clientWidth-10,a=this.mousePosX-r.left-i.clientWidth/2,c=$re(a,s,o);i.style.left=`${c}px`,i.style.setProperty("--preview-arrow-offset",a-c+"px")}),Ve(this,"setScrubbingContainerSize",()=>{const{width:r,height:n}=wq(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${r}px`,this.elements.scrubbing.container.style.height=`${n}px`}),Ve(this,"setImageSizeAndOffset",(r,n)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/n.h;r.style.height=r.naturalHeight*i+"px",r.style.width=r.naturalWidth*i+"px",r.style.left=`-${n.x*i}px`,r.style.top=`-${n.y*i}px`}),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:t}=wq(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return t}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}const gS={insertElements(e,t){Q.string(t)?gq(e,this.media,{src:t}):Q.array(t)&&t.forEach(r=>{gq(e,this.media,r)})},change(e){mre(e,"sources.length")?(of.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],Fu(this.media),this.media=null,Q.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:r}=e,[{provider:n=Kl.html5,src:i}]=t,s=n==="html5"?r:"div",o=n==="html5"?{}:{src:i};Object.assign(this,{provider:n,type:r,supported:$n.check(r,n,this.config.playsinline),media:Tt(s,o)}),this.elements.container.appendChild(this.media),Q.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),Q.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Br.addStyleHook.call(this),this.isHTML5&&gS.insertElements.call(this,"source",t),this.config.title=e.title,Mre.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&gS.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Br.build.call(this),this.isHTML5&&this.media.load(),Q.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new pS(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class k2{constructor(t,r){if(Ve(this,"play",()=>Q.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Mc(this.media.play())),this.media.play()):null),Ve(this,"pause",()=>this.playing&&Q.function(this.media.pause)?this.media.pause():null),Ve(this,"togglePlay",a=>(Q.boolean(a)?a:!this.playing)?this.play():this.pause()),Ve(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):Q.function(this.media.stop)&&this.media.stop()}),Ve(this,"restart",()=>{this.currentTime=0}),Ve(this,"rewind",a=>{this.currentTime-=Q.number(a)?a:this.config.seekTime}),Ve(this,"forward",a=>{this.currentTime+=Q.number(a)?a:this.config.seekTime}),Ve(this,"increaseVolume",a=>{const c=this.media.muted?0:this.volume;this.volume=c+(Q.number(a)?a:0)}),Ve(this,"decreaseVolume",a=>{this.increaseVolume(-a)}),Ve(this,"airplay",()=>{$n.airplay&&this.media.webkitShowPlaybackTargetPicker()}),Ve(this,"toggleControls",a=>{if(this.supported.ui&&!this.isAudio){const c=S3(this.elements.container,this.config.classNames.hideControls),u=a===void 0?void 0:!a,l=Mr(this.elements.container,this.config.classNames.hideControls,u);if(l&&Q.array(this.config.controls)&&this.config.controls.includes("settings")&&!Q.empty(this.config.settings)&&He.toggleMenu.call(this,!1),l!==c){const d=l?"controlshidden":"controlsshown";Ot.call(this,this.media,d)}return!l}return!1}),Ve(this,"on",(a,c)=>{sr.call(this,this.elements.container,a,c)}),Ve(this,"once",(a,c)=>{DM.call(this,this.elements.container,a,c)}),Ve(this,"off",(a,c)=>{m6(this.elements.container,a,c)}),Ve(this,"destroy",(a,c=!1)=>{if(!this.ready)return;const u=()=>{document.body.style.overflow="",this.embed=null,c?(Object.keys(this.elements).length&&(Fu(this.elements.buttons.play),Fu(this.elements.captions),Fu(this.elements.controls),Fu(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),Q.function(a)&&a()):(uat.call(this),of.cancelRequests.call(this),A3(this.elements.original,this.elements.container),Ot.call(this,this.elements.original,"destroyed",!0),Q.function(a)&&a.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Br.toggleNativeControls.call(this,!0),u()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&Q.function(this.embed.destroy)&&this.embed.destroy(),u()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(u),setTimeout(u,200))}),Ve(this,"supports",a=>$n.mime.call(this,a)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=$n.touch,this.media=t,Q.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||Q.nodeList(this.media)||Q.array(this.media))&&(this.media=this.media[0]),this.config=Mn({},Ire,k2.defaults,r||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new _at(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",$n),Q.nullOrUndefined(this.media)||!Q.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!$n.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const i=this.media.tagName.toLowerCase();let s=null,o=null;switch(i){case"div":if(s=this.media.querySelector("iframe"),Q.element(s)){if(o=Sre(s.getAttribute("src")),this.provider=vat(o.toString()),this.elements.container=this.media,this.media=s,this.elements.container.className="",o.search.length){const a=["1","true"];a.includes(o.searchParams.get("autoplay"))&&(this.config.autoplay=!0),a.includes(o.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=a.includes(o.searchParams.get("playsinline")),this.config.youtube.hl=o.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Q.empty(this.provider)||!Object.values(Kl).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=rx.video;break;case"video":case"audio":this.type=i,this.provider=Kl.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=$n.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new xat(this),this.storage=new Ere(this),this.media.plyr=this,Q.element(this.elements.container)||(this.elements.container=Tt("div"),bre(this.media,this.elements.container)),Br.migrateStyles.call(this),Br.addStyleHook.call(this),Mre.setup.call(this),this.config.debug&&sr.call(this,this.elements.container,this.config.events.join(" "),a=>{this.debug.log(`event: ${a.type}`)}),this.fullscreen=new ja(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Br.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Mat(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Mc(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new pS(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Kl.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Kl.youtube}get isVimeo(){return this.provider===Kl.vimeo}get isVideo(){return this.type===rx.video}get isAudio(){return this.type===rx.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(t){if(!this.duration)return;const r=Q.number(t)&&t>0;this.media.currentTime=r?Math.min(t,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:t}=this.media;return Q.number(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const t=parseFloat(this.config.duration),r=(this.media||{}).duration,n=Q.number(r)&&r!==1/0?r:0;return t||n}set volume(t){let r=t;Q.string(r)&&(r=Number(r)),Q.number(r)||(r=this.storage.get("volume")),Q.number(r)||({volume:r}=this.config),r>1&&(r=1),r<0&&(r=0),this.config.volume=r,this.media.volume=r,!Q.empty(t)&&this.muted&&r>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(t){let r=t;Q.boolean(r)||(r=this.storage.get("muted")),Q.boolean(r)||(r=this.config.muted),this.config.muted=r,this.media.muted=r}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(t){let r=null;Q.number(t)&&(r=t),Q.number(r)||(r=this.storage.get("speed")),Q.number(r)||(r=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:i}=this;r=$re(r,n,i),this.config.speed.selected=r,setTimeout(()=>{this.media&&(this.media.playbackRate=r)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(t){const r=this.config.quality,n=this.options.quality;if(!n.length)return;let i=[!Q.empty(t)&&Number(t),this.storage.get("quality"),r.selected,r.default].find(Q.number),s=!0;if(!n.includes(i)){const o=yre(n,i);this.debug.warn(`Unsupported quality option: ${i}, using ${o} instead`),i=o,s=!1}r.selected=i,this.media.quality=i,s&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(t){const r=Q.boolean(t)?t:this.config.loop.active;this.config.loop.active=r,this.media.loop=r}get loop(){return!!this.media.loop}set source(t){gS.change.call(this,t)}get source(){return this.media.currentSrc}get download(){const{download:t}=this.config.urls;return Q.url(t)?t:this.source}set download(t){Q.url(t)&&(this.config.urls.download=t,He.setDownloadUrl.call(this))}set poster(t){this.isVideo?Br.setPoster.call(this,t,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const t=C3(RM.call(this));return Q.array(t)?t.join(":"):t}set ratio(t){this.isVideo?Q.string(t)&&vre(t)?(this.config.ratio=C3(t),u1.call(this)):this.debug.error(`Invalid aspect ratio specified (${t})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(t){this.config.autoplay=Q.boolean(t)?t:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(t){gr.toggle.call(this,t,!1)}set currentTrack(t){gr.set.call(this,t,!1),gr.setup.call(this)}get currentTrack(){const{toggled:t,currentTrack:r}=this.captions;return t?r:-1}set language(t){gr.setLanguage.call(this,t,!1)}get language(){return(gr.getCurrentTrack.call(this)||{}).language}set pip(t){if(!$n.pip)return;const r=Q.boolean(t)?t:!this.pip;Q.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(r?tx.active:tx.inactive),Q.function(this.media.requestPictureInPicture)&&(!this.pip&&r?this.media.requestPictureInPicture():this.pip&&!r&&document.exitPictureInPicture())}get pip(){return $n.pip?Q.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===tx.active:null}setPreviewThumbnails(t){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,t),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new pS(this))}static supported(t,r){return $n.check(t,r)}static loadSprite(t,r){return kre(t,r)}static setup(t,r={}){let n=null;return Q.string(t)?n=Array.from(document.querySelectorAll(t)):Q.nodeList(t)?n=Array.from(t):Q.array(t)&&(n=t.filter(Q.element)),Q.empty(n)?null:n.map(i=>new k2(i,r))}}k2.defaults=sat(Ire);var Fg={name:"VuePlyr",props:{options:{type:Object,required:!1,default(){return{}}}},data(){return{player:{}}},computed:{opts(){const e=this.options;return Object.prototype.hasOwnProperty.call(this.options,"hideYouTubeDOMError")||(e.hideYouTubeDOMError=!0),e}},mounted(){this.player=new k2(this.$el,this.opts)},beforeUnmount(){try{this.player.destroy()}catch(e){this.opts.hideYouTubeDOMError&&e.message==="The YouTube player is not attached to the DOM."||console.error(e)}},render(){const e=this.$slots.default;return typeof e=="function"?e()[0]:e}};Fg.__file="lib/VuePlyr.vue";Fg.install=(e,t={})=>{t.plyr&&(Fg.props.options.default=()=>({...t.plyr})),e.component(Fg.name,Fg)};var dv={exports:{}},Tat=dv.exports,vq;function Nat(){return vq||(vq=1,function(e,t){(function(r,n){n()})(Tat,function(){function r(u,l){return typeof l>"u"?l={autoBom:!1}:typeof l!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function n(u,l,d){var h=new XMLHttpRequest;h.open("GET",u),h.responseType="blob",h.onload=function(){c(h.response,l,d)},h.onerror=function(){console.error("could not download file")},h.send()}function i(u){var l=new XMLHttpRequest;l.open("HEAD",u,!1);try{l.send()}catch{}return 200<=l.status&&299>=l.status}function s(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(l)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Un=="object"&&Un.global===Un?Un:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(u,l,d){var h=o.URL||o.webkitURL,g=document.createElement("a");l=l||u.name||"download",g.download=l,g.rel="noopener",typeof u=="string"?(g.href=u,g.origin===location.origin?s(g):i(g.href)?n(u,l,d):s(g,g.target="_blank")):(g.href=h.createObjectURL(u),setTimeout(function(){h.revokeObjectURL(g.href)},4e4),setTimeout(function(){s(g)},0))}:"msSaveOrOpenBlob"in navigator?function(u,l,d){if(l=l||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(r(u,d),l);else if(i(u))n(u,l,d);else{var h=document.createElement("a");h.href=u,h.target="_blank",setTimeout(function(){s(h)})}}:function(u,l,d,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof u=="string")return n(u,l,d);var g=u.type==="application/octet-stream",m=/constructor/i.test(o.HTMLElement)||o.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||g&&m||a)&&typeof FileReader<"u"){var k=new FileReader;k.onloadend=function(){var A=k.result;A=b?A:A.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=A:location=A,h=null},k.readAsDataURL(u)}else{var w=o.URL||o.webkitURL,E=w.createObjectURL(u);h?h.location=E:location.href=E,h=null,setTimeout(function(){w.revokeObjectURL(E)},4e4)}});o.saveAs=c.saveAs=c,e.exports=c})}(dv)),dv.exports}var Pmt=Nat(),Oat={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};function jat(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Pat(e,t,r){var n=typeof t.fill=="string"?[t.fill]:t.fill||[],i=[],s=t.theme||r.theme;switch(s){case"outline":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.multiColor.outFillColor),i.push(typeof n[2]=="string"?n[2]:r.colors.multiColor.innerStrokeColor),i.push(typeof n[3]=="string"?n[3]:r.colors.multiColor.innerFillColor);break}return{size:t.size||r.size,strokeWidth:t.strokeWidth||r.strokeWidth,strokeLinecap:t.strokeLinecap||r.strokeLinecap,strokeLinejoin:t.strokeLinejoin||r.strokeLinejoin,colors:i,id:e}}var Dat=Symbol("icon-context");function zM(e,t,r){var n={name:"icon-"+e,props:["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","spin"],setup:function(s){var o=jat(),a=W3(Dat,Oat);return function(){var c=s.size,u=s.strokeWidth,l=s.strokeLinecap,d=s.strokeLinejoin,h=s.theme,g=s.fill,m=s.spin,b=Pat(o,{size:c,strokeWidth:u,strokeLinecap:l,strokeLinejoin:d,theme:h,fill:g},a),k=[a.prefix+"-icon"];return k.push(a.prefix+"-icon-"+e),t&&a.rtl&&k.push(a.prefix+"-icon-rtl"),m&&k.push(a.prefix+"-icon-spin"),ia("span",{class:k.join(" ")},[r(b)])}}};return n}const Dmt=zM("pause-one",!1,function(e){return ia("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[ia("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),ia("path",{d:"M19 18V30",stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),ia("path",{d:"M29 18V30",stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),Rmt=zM("play",!0,function(e){return ia("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[ia("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),ia("path",{d:"M20 24V17.0718L26 20.5359L32 24L26 27.4641L20 30.9282V24Z",fill:e.colors[3],stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null)])}),Lmt=zM("volume-small",!0,function(e){return ia("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[ia("path",{d:"M24 6V42C17 42 11.7985 32.8391 11.7985 32.8391H6C4.89543 32.8391 4 31.9437 4 30.8391V17.0108C4 15.9062 4.89543 15.0108 6 15.0108H11.7985C11.7985 15.0108 17 6 24 6Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),ia("path",{d:"M32 15L32 15C32.6232 15.5565 33.1881 16.1797 33.6841 16.8588C35.1387 18.8504 36 21.3223 36 24C36 26.6545 35.1535 29.1067 33.7218 31.0893C33.2168 31.7885 32.6391 32.4293 32 33",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])});var ix,_q;function Rat(){if(_q)return ix;_q=1;function e(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function d(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(m.length===0)return"";for(var b=0,k=0,w=0,E=m.length;w!==E&&m[w]===0;)w++,b++;for(var A=(E-w)*l+1>>>0,M=new Uint8Array(A);w!==E;){for(var R=m[w],N=0,z=A-1;(R!==0||N<k)&&z!==-1;z--,N++)R+=256*M[z]>>>0,M[z]=R%a>>>0,R=R/a>>>0;if(R!==0)throw new Error("Non-zero carry");k=N,w++}for(var F=A-k;F!==A&&M[F]===0;)F++;for(var L=c.repeat(b);F<A;++F)L+=t.charAt(M[F]);return L}function h(m){if(typeof m!="string")throw new TypeError("Expected String");if(m.length===0)return new Uint8Array;for(var b=0,k=0,w=0;m[b]===c;)k++,b++;for(var E=(m.length-b)*u+1>>>0,A=new Uint8Array(E);m[b];){var M=m.charCodeAt(b);if(M>255)return;var R=r[M];if(R===255)return;for(var N=0,z=E-1;(R!==0||N<w)&&z!==-1;z--,N++)R+=a*A[z]>>>0,A[z]=R%256>>>0,R=R/256>>>0;if(R!==0)throw new Error("Non-zero carry");w=N,b++}for(var F=E-w;F!==E&&A[F]===0;)F++;for(var L=new Uint8Array(k+(E-F)),B=k;F!==E;)L[B++]=A[F++];return L}function g(m){var b=h(m);if(b)return b;throw new Error("Non-base"+a+" character")}return{encode:d,decodeUnsafe:h,decode:g}}return ix=e,ix}var sx,xq;function Lat(){return xq||(xq=1,sx=Rat()("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),sx}var zat=Lat();const Ec=Js(zat);let Sw;const Bat=new Uint8Array(16);function Fat(){if(!Sw&&(Sw=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sw(Bat)}const zi=[];for(let e=0;e<256;++e)zi.push((e+256).toString(16).slice(1));function Uat(e,t=0){return zi[e[t+0]]+zi[e[t+1]]+zi[e[t+2]]+zi[e[t+3]]+"-"+zi[e[t+4]]+zi[e[t+5]]+"-"+zi[e[t+6]]+zi[e[t+7]]+"-"+zi[e[t+8]]+zi[e[t+9]]+"-"+zi[e[t+10]]+zi[e[t+11]]+zi[e[t+12]]+zi[e[t+13]]+zi[e[t+14]]+zi[e[t+15]]}const qat=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Eq={randomUUID:qat};function Hat(e,t,r){if(Eq.randomUUID&&!e)return Eq.randomUUID();e=e||{};const n=e.random||(e.rng||Fat)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Uat(n)}function mS(e){return e.version===void 0}function ox(e){return mS(e)?e.serialize({verifySignatures:!1,requireAllSignatures:!1}):e.serialize()}var Tre=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?s(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})};function ax(e){return Tre(this,void 0,void 0,function*(){try{return yield e.request({method:"wallet_getSnaps"}),!0}catch{return!1}})}function Wat(){return Tre(this,void 0,void 0,function*(){try{const e=window.ethereum;if(!e)return null;if(e.providers&&Array.isArray(e.providers)){const t=e.providers;for(const r of t)if(yield ax(r))return r}if(e.detected&&Array.isArray(e.detected)){const t=e.detected;for(const r of t)if(yield ax(r))return r}return(yield ax(e))?e:null}catch(e){return console.error(e),null}})}const Vat="solana:mainnet",Kat="solana:devnet",Gat="solana:testnet",Zat="solana:localnet",Nre=[Vat,Kat,Gat,Zat];function cx(e){return Nre.includes(e)}var D0=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},R0=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},hv,pv,gv,mv,bv,yv;const Yat=Nre,Jat=[TC,NC,IK];class y6{get address(){return D0(this,hv,"f")}get publicKey(){return D0(this,pv,"f").slice()}get chains(){return D0(this,gv,"f").slice()}get features(){return D0(this,mv,"f").slice()}get label(){return D0(this,bv,"f")}get icon(){return D0(this,yv,"f")}constructor({address:t,publicKey:r,label:n,icon:i}){hv.set(this,void 0),pv.set(this,void 0),gv.set(this,void 0),mv.set(this,void 0),bv.set(this,void 0),yv.set(this,void 0),new.target===y6&&Object.freeze(this),R0(this,hv,t,"f"),R0(this,pv,r,"f"),R0(this,gv,Yat,"f"),R0(this,mv,Jat,"f"),R0(this,bv,n,"f"),R0(this,yv,i,"f")}}hv=new WeakMap,pv=new WeakMap,gv=new WeakMap,mv=new WeakMap,bv=new WeakMap,yv=new WeakMap;var Ia=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?s(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})};class w6 extends G2{constructor(t){super(),this._network="mainnet-beta",this._iframeParams={},this._element=null,this._iframe=null,this._publicKey=null,this._account=null,this._isConnected=!1,this._connectHandler=null,this._messageHandlers={},this._handleEvent=r=>{var n,i;switch(r.type){case"connect":{this._collapseIframe(),!((n=r.data)===null||n===void 0)&&n.publicKey?(this._publicKey=r.data.publicKey,this._isConnected=!0,this._connectHandler&&(this._connectHandler.resolve(),this._connectHandler=null),this._connected()):(this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),this._disconnected());return}case"disconnect":{this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),this._disconnected();return}case"accountChanged":{!((i=r.data)===null||i===void 0)&&i.publicKey?(this._publicKey=r.data.publicKey,this.emit("accountChanged",this.publicKey),this._standardConnected()):(this.emit("accountChanged",void 0),this._standardDisconnected());return}default:return}},this._handleResize=r=>{r.resizeMode==="full"?r.params.mode==="fullscreen"?this._expandIframe():r.params.mode==="hide"&&this._collapseIframe():r.resizeMode==="coordinates"&&this._resizeIframe(r.params)},this._handleMessage=r=>{var n;if(((n=r.data)===null||n===void 0?void 0:n.channel)!=="solflareIframeToWalletAdapter")return;const i=r.data.data||{};if(i.type==="event")this._handleEvent(i.event);else if(i.type==="resize")this._handleResize(i);else if(i.type==="response"&&this._messageHandlers[i.id]){const{resolve:s,reject:o}=this._messageHandlers[i.id];delete this._messageHandlers[i.id],i.error?o(i.error):s(i.result)}},this._removeElement=()=>{this._element&&(this._element.remove(),this._element=null)},this._removeDanglingElements=()=>{const r=document.getElementsByClassName("solflare-metamask-wallet-adapter-iframe");for(const n of r)n.parentElement&&n.remove()},this._injectElement=()=>{this._removeElement(),this._removeDanglingElements();const r=Object.assign(Object.assign({},this._iframeParams),{mm:!0,v:1,cluster:this._network||"mainnet-beta",origin:window.location.origin||"",title:document.title||""}),n=Object.keys(r).map(s=>`${s}=${encodeURIComponent(r[s])}`).join("&"),i=`${w6.IFRAME_URL}?${n}`;this._element=document.createElement("div"),this._element.className="solflare-metamask-wallet-adapter-iframe",this._element.innerHTML=`
1641
+ `;else throw i}return r?.(n,!0)??n},Pmt=(e,t={})=>{const{allowInlineWithSpace:r=!1,delimiters:n,mathFence:i,logger:s=u=>u==="newLineInDisplayMode"?"ignore":"warn",macros:o={},transformer:a,...c}=t;e.use(Eot,{allowInlineWithSpace:r,delimiters:n,mathFence:i,render:(u,l,d)=>{const h={strict:(g,m,b)=>s(g,m,b,d)??"ignore",macros:o,throwOnError:!1,...c};return l?Aot(u,h,a):kot(u,h,a)}})};function Ve(e,t,r){return(t=Cot(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sot(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cot(e){var t=Sot(e,"string");return typeof t=="symbol"?t:String(t)}function Iot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mot(e,t,r){return t&&fq(e.prototype,t),r&&fq(e,r),e}function $ot(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dq(Object(r),!0).forEach(function(n){$ot(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dq(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pq={addCSS:!0,thumbWidth:15,watch:!0};function Tot(e,t){return(function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function Not(e,t){if(e&&t){var r=new Event(t,{bubbles:!0});e.dispatchEvent(r)}}var Rb=function(e){return e!=null?e.constructor:null},jM=function(e,t){return!!(e&&t&&e instanceof t)},sre=function(e){return e==null},ore=function(e){return Rb(e)===Object},Oot=function(e){return Rb(e)===Number&&!Number.isNaN(e)},are=function(e){return Rb(e)===String},jot=function(e){return Rb(e)===Boolean},Pot=function(e){return Rb(e)===Function},cre=function(e){return Array.isArray(e)},ure=function(e){return jM(e,NodeList)},Dot=function(e){return jM(e,Element)},Rot=function(e){return jM(e,Event)},Lot=function(e){return sre(e)||(are(e)||cre(e)||ure(e))&&!e.length||ore(e)&&!Object.keys(e).length},as={nullOrUndefined:sre,object:ore,number:Oot,string:are,boolean:jot,function:Pot,array:cre,nodeList:ure,element:Dot,event:Rot,empty:Lot};function zot(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}function Bot(e,t){if(1>t){var r=zot(t);return parseFloat(e.toFixed(r))}return Math.round(e/t)*t}var Fot=function(){function e(t,r){Iot(this,e),as.element(t)?this.element=t:as.string(t)&&(this.element=document.querySelector(t)),as.element(this.element)&&as.empty(this.element.rangeTouch)&&(this.config=hq({},pq,{},r),this.init())}return Mot(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(t){var r=this,n=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(i){r.element[n](i,function(s){return r.set(s)},!1)})}},{key:"get",value:function(t){if(!e.enabled||!as.event(t))return null;var r,n=t.target,i=t.changedTouches[0],s=parseFloat(n.getAttribute("min"))||0,o=parseFloat(n.getAttribute("max"))||100,a=parseFloat(n.getAttribute("step"))||1,c=n.getBoundingClientRect(),u=100/c.width*(this.config.thumbWidth/2)/100;return 0>(r=100/c.width*(i.clientX-c.left))?r=0:100<r&&(r=100),50>r?r-=(100-2*r)*u:50<r&&(r+=2*(r-50)*u),s+Bot(r/100*(o-s),a)}},{key:"set",value:function(t){e.enabled&&as.event(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),Not(t.target,t.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(t){var r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=null;if(as.empty(t)||as.string(t)?n=Array.from(document.querySelectorAll(as.string(t)?t:'input[type="range"]')):as.element(t)?n=[t]:as.nodeList(t)?n=Array.from(t):as.array(t)&&(n=t.filter(as.element)),as.empty(n))return null;var i=hq({},pq,{},r);if(as.string(t)&&i.watch){var s=new MutationObserver(function(o){Array.from(o).forEach(function(a){Array.from(a.addedNodes).forEach(function(c){as.element(c)&&Tot(c,t)&&new e(c,i)})})});s.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(o){return new e(o,r)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const Lb=e=>e!=null?e.constructor:null,Xu=(e,t)=>!!(e&&t&&e instanceof t),PM=e=>e==null,lre=e=>Lb(e)===Object,Uot=e=>Lb(e)===Number&&!Number.isNaN(e),g6=e=>Lb(e)===String,qot=e=>Lb(e)===Boolean,fre=e=>typeof e=="function",dre=e=>Array.isArray(e),Hot=e=>Xu(e,WeakMap),hre=e=>Xu(e,NodeList),Wot=e=>Lb(e)===Text,Vot=e=>Xu(e,Event),Kot=e=>Xu(e,KeyboardEvent),Got=e=>Xu(e,window.TextTrackCue)||Xu(e,window.VTTCue),Zot=e=>Xu(e,TextTrack)||!PM(e)&&g6(e.kind),Yot=e=>Xu(e,Promise)&&fre(e.then),Jot=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",pre=e=>PM(e)||(g6(e)||dre(e)||hre(e))&&!e.length||lre(e)&&!Object.keys(e).length,Xot=e=>{if(Xu(e,window.URL))return!0;if(!g6(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!pre(new URL(t).hostname)}catch{return!1}};var Q={nullOrUndefined:PM,object:lre,number:Uot,string:g6,boolean:qot,function:fre,array:dre,weakMap:Hot,nodeList:hre,element:Jot,textNode:Wot,event:Vot,keyboardEvent:Kot,cue:Got,track:Zot,promise:Yot,url:Xot,empty:pre};const cS=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},r=Object.keys(t).find(n=>e.style[n]!==void 0);return!!Q.string(r)&&t[r]})();function gre(e,t){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}},t)}const Qot=!!window.document.documentMode,eat=/Edge/g.test(navigator.userAgent),tat="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),rat=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,nat=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,iat=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var vi={isIE:Qot,isEdge:eat,isWebKit:tat,isIPhone:rat,isIPadOS:nat,isIos:iat};function sat(e){return JSON.parse(JSON.stringify(e))}function mre(e,t){return t.split(".").reduce((r,n)=>r&&r[n],e)}function Mn(e={},...t){if(!t.length)return e;const r=t.shift();return Q.object(r)?(Object.keys(r).forEach(n=>{Q.object(r[n])?(Object.keys(e).includes(n)||Object.assign(e,{[n]:{}}),Mn(e[n],r[n])):Object.assign(e,{[n]:r[n]})}),Mn(e,...t)):e}function bre(e,t){const r=e.length?e:[e];Array.from(r).reverse().forEach((n,i)=>{const s=i>0?t.cloneNode(!0):t,o=n.parentNode,a=n.nextSibling;s.appendChild(n),a?o.insertBefore(s,a):o.appendChild(s)})}function uS(e,t){Q.element(e)&&!Q.empty(t)&&Object.entries(t).filter(([,r])=>!Q.nullOrUndefined(r)).forEach(([r,n])=>e.setAttribute(r,n))}function Tt(e,t,r){const n=document.createElement(e);return Q.object(t)&&uS(n,t),Q.string(r)&&(n.innerText=r),n}function oat(e,t){Q.element(e)&&Q.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)}function gq(e,t,r,n){Q.element(t)&&t.appendChild(Tt(e,r,n))}function Fu(e){Q.nodeList(e)||Q.array(e)?Array.from(e).forEach(Fu):Q.element(e)&&Q.element(e.parentNode)&&e.parentNode.removeChild(e)}function uv(e){if(!Q.element(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function A3(e,t){return Q.element(t)&&Q.element(t.parentNode)&&Q.element(e)?(t.parentNode.replaceChild(e,t),e):null}function Cc(e,t){if(!Q.string(e)||Q.empty(e))return{};const r={},n=Mn({},t);return e.split(",").forEach(i=>{const s=i.trim(),o=s.replace(".",""),a=s.replace(/[[\]]/g,"").split("="),[c]=a,u=a.length>1?a[1].replace(/["']/g,""):"";switch(s.charAt(0)){case".":Q.string(n.class)?r.class=`${n.class} ${o}`:r.class=o;break;case"#":r.id=s.replace("#","");break;case"[":r[c]=u}}),Mn(n,r)}function Hf(e,t){if(!Q.element(e))return;let r=t;Q.boolean(r)||(r=!e.hidden),e.hidden=r}function Mr(e,t,r){if(Q.nodeList(e))return Array.from(e).map(n=>Mr(n,t,r));if(Q.element(e)){let n="toggle";return r!==void 0&&(n=r?"add":"remove"),e.classList[n](t),e.classList.contains(t)}return!1}function S3(e,t){return Q.element(e)&&e.classList.contains(t)}function _d(e,t){const{prototype:r}=Element;return(r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function aat(e,t){const{prototype:r}=Element;return(r.closest||function(){let n=this;do{if(_d.matches(n,t))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}).call(e,t)}function x2(e){return this.elements.container.querySelectorAll(e)}function Kn(e){return this.elements.container.querySelector(e)}function ex(e=null,t=!1){Q.element(e)&&e.focus({preventScroll:!0,focusVisible:t})}const mq={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},$n={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t){const r=$n[e]||t!=="html5";return{api:r,ui:r&&$n.rangeInput}},pip:!(vi.isIPhone||!Q.function(Tt("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Tt("video").disablePictureInPicture)),airplay:Q.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(Q.empty(e))return!1;const[t]=e.split("/");let r=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(mq).includes(r)&&(r+=`; codecs="${mq[e]}"`);try{return!!(r&&this.media.canPlayType(r).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range",e.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:cS!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},cat=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e})();function E2(e,t,r,n=!1,i=!0,s=!1){if(!e||!("addEventListener"in e)||Q.empty(t)||!Q.function(r))return;const o=t.split(" ");let a=s;cat&&(a={passive:i,capture:s}),o.forEach(c=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:e,type:c,callback:r,options:a}),e[n?"addEventListener":"removeEventListener"](c,r,a)})}function sr(e,t="",r,n=!0,i=!1){E2.call(this,e,t,r,!0,n,i)}function m6(e,t="",r,n=!0,i=!1){E2.call(this,e,t,r,!1,n,i)}function DM(e,t="",r,n=!0,i=!1){const s=(...o)=>{m6(e,t,s,n,i),r.apply(this,o)};E2.call(this,e,t,s,!0,n,i)}function Ot(e,t="",r=!1,n={}){if(!Q.element(e)||Q.empty(t))return;const i=new CustomEvent(t,{bubbles:r,detail:{...n,plyr:this}});e.dispatchEvent(i)}function uat(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:t,type:r,callback:n,options:i}=e;t.removeEventListener(r,n,i)}),this.eventListeners=[])}function lat(){return new Promise(e=>this.ready?setTimeout(e,0):sr.call(this,this.elements.container,"ready",e)).then(()=>{})}function Mc(e){Q.promise(e)&&e.then(null,()=>{})}function lS(e){return Q.array(e)?e.filter((t,r)=>e.indexOf(t)===r):e}function yre(e,t){return Q.array(e)&&e.length?e.reduce((r,n)=>Math.abs(n-t)<Math.abs(r-t)?n:r):null}function wre(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const bq=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((e,[t,r])=>({...e,[t/r]:[t,r]}),{});function vre(e){return Q.array(e)||Q.string(e)&&e.includes(":")?(Q.array(e)?e:e.split(":")).map(Number).every(Q.number):!1}function C3(e){if(!Q.array(e)||!e.every(Q.number))return null;const[t,r]=e,n=(s,o)=>o===0?s:n(o,s%o),i=n(t,r);return[t/i,r/i]}function RM(e){const t=n=>vre(n)?n.split(":").map(Number):null;let r=t(e);if(r===null&&(r=t(this.config.ratio)),r===null&&!Q.empty(this.embed)&&Q.array(this.embed.ratio)&&({ratio:r}=this.embed),r===null&&this.isHTML5){const{videoWidth:n,videoHeight:i}=this.media;r=[n,i]}return C3(r)}function u1(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,r=RM.call(this,e);if(!Q.array(r))return{};const[n,i]=C3(r),s=100/n*i;if(wre(`aspect-ratio: ${n}/${i}`)?t.style.aspectRatio=`${n}/${i}`:t.style.paddingBottom=`${s}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const o=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),a=(o-s)/(o/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${a}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:s,ratio:r}}function _re(e,t,r=.05){const n=e/t,i=yre(Object.keys(bq),n);return Math.abs(i-n)<=r?bq[i]:[e,t]}function fat(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const of={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const t=e.getAttribute("type");return!!Q.empty(t)||$n.mime.call(this,t)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:of.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,Q.empty(this.config.ratio)||u1.call(e),Object.defineProperty(e.media,"quality",{get(){const t=of.getSources.call(e).find(r=>r.getAttribute("src")===e.source);return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&Q.function(e.config.quality.onChange))e.config.quality.onChange(t);else{const r=of.getSources.call(e).find(c=>Number(c.getAttribute("size"))===t);if(!r)return;const{currentTime:n,paused:i,preload:s,readyState:o,playbackRate:a}=e.media;e.media.src=r.getAttribute("src"),(s!=="none"||o)&&(e.once("loadedmetadata",()=>{e.speed=a,e.currentTime=n,i||Mc(e.play())}),e.media.load())}Ot.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(Fu(of.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function dat(e){return`${e}-${Math.floor(1e4*Math.random())}`}function fS(e,...t){return Q.empty(e)?e:e.toString().replace(/{(\d+)}/g,(r,n)=>t[n].toString())}function hat(e,t){return e===0||t===0||Number.isNaN(e)||Number.isNaN(t)?0:(e/t*100).toFixed(2)}const dm=(e="",t="",r="")=>e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),r.toString()),xre=(e="")=>e.toString().replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());function pat(e=""){let t=e.toString();return t=dm(t,"-"," "),t=dm(t,"_"," "),t=xre(t),dm(t," ","")}function gat(e=""){let t=e.toString();return t=pat(t),t.charAt(0).toLowerCase()+t.slice(1)}function mat(e){const t=document.createDocumentFragment(),r=document.createElement("div");return t.appendChild(r),r.innerHTML=e,t.firstChild.innerText}function bat(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const yq={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},pi={get(e="",t={}){if(Q.empty(e)||Q.empty(t))return"";let r=mre(t.i18n,e);if(Q.empty(r))return Object.keys(yq).includes(e)?yq[e]:"";const n={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(n).forEach(([i,s])=>{r=dm(r,i,s)}),r}};let Ere=class dS{constructor(t){Ve(this,"get",r=>{if(!dS.supported||!this.enabled)return null;const n=window.localStorage.getItem(this.key);if(Q.empty(n))return null;const i=JSON.parse(n);return Q.string(r)&&r.length?i[r]:i}),Ve(this,"set",r=>{if(!dS.supported||!this.enabled||!Q.object(r))return;let n=this.get();Q.empty(n)&&(n={}),Mn(n,r);try{window.localStorage.setItem(this.key,JSON.stringify(n))}catch{}}),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch{return!1}}};function zb(e,t="text"){return new Promise((r,n)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",()=>{if(t==="text")try{r(JSON.parse(i.responseText))}catch{r(i.responseText)}else r(i.response)}),i.addEventListener("error",()=>{throw new Error(i.status)}),i.open("GET",e,!0),i.responseType=t,i.send()}catch(i){n(i)}})}function kre(e,t){if(!Q.string(e))return;const r="cache",n=Q.string(t);let i=!1;const s=()=>document.getElementById(t)!==null,o=(a,c)=>{a.innerHTML=c,n&&s()||document.body.insertAdjacentElement("afterbegin",a)};if(!n||!s()){const a=Ere.supported,c=document.createElement("div");if(c.setAttribute("hidden",""),n&&c.setAttribute("id",t),a){const u=window.localStorage.getItem(`${r}-${t}`);if(i=u!==null,i){const l=JSON.parse(u);o(c,l.content)}}zb(e).then(u=>{if(!Q.empty(u)){if(a)try{window.localStorage.setItem(`${r}-${t}`,JSON.stringify({content:u}))}catch{}o(c,u)}}).catch(()=>{})}}const Are=e=>Math.trunc(e/60/60%60,10),yat=e=>Math.trunc(e/60%60,10),wat=e=>Math.trunc(e%60,10);function b6(e=0,t=!1,r=!1){if(!Q.number(e))return b6(void 0,t,r);const n=a=>`0${a}`.slice(-2);let i=Are(e);const s=yat(e),o=wat(e);return i=t||i>0?`${i}:`:"",`${r&&e>0?"-":""}${i}${n(s)}:${n(o)}`}const He={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,r=e.host!==t||vi.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:r}},findElements(){try{return this.elements.controls=Kn.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:x2.call(this,this.config.selectors.buttons.play),pause:Kn.call(this,this.config.selectors.buttons.pause),restart:Kn.call(this,this.config.selectors.buttons.restart),rewind:Kn.call(this,this.config.selectors.buttons.rewind),fastForward:Kn.call(this,this.config.selectors.buttons.fastForward),mute:Kn.call(this,this.config.selectors.buttons.mute),pip:Kn.call(this,this.config.selectors.buttons.pip),airplay:Kn.call(this,this.config.selectors.buttons.airplay),settings:Kn.call(this,this.config.selectors.buttons.settings),captions:Kn.call(this,this.config.selectors.buttons.captions),fullscreen:Kn.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Kn.call(this,this.config.selectors.progress),this.elements.inputs={seek:Kn.call(this,this.config.selectors.inputs.seek),volume:Kn.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Kn.call(this,this.config.selectors.display.buffer),currentTime:Kn.call(this,this.config.selectors.display.currentTime),duration:Kn.call(this,this.config.selectors.display.duration)},Q.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const r="http://www.w3.org/2000/svg",n=He.getIconUrl.call(this),i=`${n.cors?"":n.url}#${this.config.iconPrefix}`,s=document.createElementNS(r,"svg");uS(s,Mn(t,{"aria-hidden":"true",focusable:"false"}));const o=document.createElementNS(r,"use"),a=`${i}-${e}`;return"href"in o&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",a),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),s.appendChild(o),s},createLabel(e,t={}){const r=pi.get(e,this.config);return Tt("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},r)},createBadge(e){if(Q.empty(e))return null;const t=Tt("span",{class:this.config.classNames.menu.value});return t.appendChild(Tt("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const r=Mn({},t);let n=gat(e);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(o=>{Object.keys(r).includes(o)&&(i[o]=r[o],delete r[o])}),i.element!=="button"||Object.keys(r).includes("type")||(r.type="button"),Object.keys(r).includes("class")?r.class.split(" ").some(o=>o===this.config.classNames.control)||Mn(r,{class:`${r.class} ${this.config.classNames.control}`}):r.class=this.config.classNames.control,e){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":r.class+=` ${this.config.classNames.control}--overlaid`,n="play",i.label="play",i.icon="play";break;default:Q.empty(i.label)&&(i.label=n),Q.empty(i.icon)&&(i.icon=e)}const s=Tt(i.element);return i.toggle?(s.appendChild(He.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),s.appendChild(He.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),s.appendChild(He.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),s.appendChild(He.createLabel.call(this,i.label,{class:"label--not-pressed"}))):(s.appendChild(He.createIcon.call(this,i.icon)),s.appendChild(He.createLabel.call(this,i.label))),Mn(r,Cc(this.config.selectors.buttons[n],r)),uS(s,r),n==="play"?(Q.array(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(s)):this.elements.buttons[n]=s,s},createRange(e,t){const r=Tt("input",Mn(Cc(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":pi.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=r,He.updateRangeFill.call(this,r),Fot.setup(r),r},createProgress(e,t){const r=Tt("progress",Mn(Cc(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if(e!=="volume"){r.appendChild(Tt("span",null,"0"));const n={played:"played",buffer:"buffered"}[e],i=n?pi.get(n,this.config):"";r.innerText=`% ${i.toLowerCase()}`}return this.elements.display[e]=r,r},createTime(e,t){const r=Cc(this.config.selectors.display[e],t),n=Tt("div",Mn(r,{class:`${r.class?r.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":pi.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts(e,t){sr.call(this,e,"keydown keyup",r=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(r.key)||(r.preventDefault(),r.stopPropagation(),r.type==="keydown"))return;const n=_d(e,'[role="menuitemradio"]');if(!n&&[" ","ArrowRight"].includes(r.key))He.showMenuPanel.call(this,t,!0);else{let i;r.key!==" "&&(r.key==="ArrowDown"||n&&r.key==="ArrowRight"?(i=e.nextElementSibling,Q.element(i)||(i=e.parentNode.firstElementChild)):(i=e.previousElementSibling,Q.element(i)||(i=e.parentNode.lastElementChild)),ex.call(this,i,!0))}},!1),sr.call(this,e,"keyup",r=>{r.key==="Return"&&He.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:t,type:r,title:n,badge:i=null,checked:s=!1}){const o=Cc(this.config.selectors.inputs[r]),a=Tt("button",Mn(o,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${o.class?o.class:""}`.trim(),"aria-checked":s,value:e})),c=Tt("span");c.innerHTML=n,Q.element(i)&&c.appendChild(i),a.appendChild(c),Object.defineProperty(a,"checked",{enumerable:!0,get:()=>a.getAttribute("aria-checked")==="true",set(u){u&&Array.from(a.parentNode.children).filter(l=>_d(l,'[role="menuitemradio"]')).forEach(l=>l.setAttribute("aria-checked","false")),a.setAttribute("aria-checked",u?"true":"false")}}),this.listeners.bind(a,"click keyup",u=>{if(!Q.keyboardEvent(u)||u.key===" "){switch(u.preventDefault(),u.stopPropagation(),a.checked=!0,r){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}He.showMenuPanel.call(this,"home",Q.keyboardEvent(u))}},r,!1),He.bindMenuItemShortcuts.call(this,a,r),t.appendChild(a)},formatTime(e=0,t=!1){return Q.number(e)?b6(e,Are(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,r=!1){Q.element(e)&&Q.number(t)&&(e.innerText=He.formatTime(t,r))},updateVolume(){this.supported.ui&&(Q.element(this.elements.inputs.volume)&&He.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),Q.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,t=0){Q.element(e)&&(e.value=t,He.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!Q.event(e))return;let t=0;const r=(n,i)=>{const s=Q.number(i)?i:0,o=Q.element(n)?n:this.elements.display.buffer;if(Q.element(o)){o.value=s;const a=o.getElementsByTagName("span")[0];Q.element(a)&&(a.childNodes[0].nodeValue=s)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":t=hat(this.currentTime,this.duration),e.type==="timeupdate"&&He.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":r(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const t=Q.event(e)?e.target:e;if(Q.element(t)&&t.getAttribute("type")==="range"){if(_d(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const r=He.formatTime(this.currentTime),n=He.formatTime(this.duration),i=pi.get("seekLabel",this.config);t.setAttribute("aria-valuetext",i.replace("{currentTime}",r).replace("{duration}",n))}else if(_d(t,this.config.selectors.inputs.volume)){const r=100*t.value;t.setAttribute("aria-valuenow",r),t.setAttribute("aria-valuetext",`${r.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);(vi.isWebKit||vi.isIPadOS)&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){var t,r;if(!this.config.tooltips.seek||!Q.element(this.elements.inputs.seek)||!Q.element(this.elements.display.seekTooltip)||this.duration===0)return;const n=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,s=l=>Mr(n,i,l);if(this.touch)return void s(!1);let o=0;const a=this.elements.progress.getBoundingClientRect();if(Q.event(e))o=100/a.width*(e.pageX-a.left);else{if(!S3(n,i))return;o=parseFloat(n.style.left,10)}o<0?o=0:o>100&&(o=100);const c=this.duration/100*o;n.innerText=He.formatTime(c);const u=(t=this.config.markers)===null||t===void 0||(r=t.points)===null||r===void 0?void 0:r.find(({time:l})=>l===Math.round(c));u&&n.insertAdjacentHTML("afterbegin",`${u.label}<br>`),n.style.left=`${o}%`,Q.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&s(e.type==="mouseenter")},timeUpdate(e){const t=!Q.element(this.elements.display.duration)&&this.config.invertTime;He.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&e.type==="timeupdate"&&this.media.seeking||He.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Hf(this.elements.display.currentTime,!0),void Hf(this.elements.progress,!0);Q.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=Q.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&He.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&He.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&He.setMarkers.call(this),He.updateSeekTooltip.call(this)},toggleMenuButton(e,t){Hf(this.elements.settings.buttons[e],!t)},updateSetting(e,t,r){const n=this.elements.settings.panels[e];let i=null,s=t;if(e==="captions")i=this.currentTrack;else{if(i=Q.empty(r)?this[e]:r,Q.empty(i)&&(i=this.config[e].default),!Q.empty(this.options[e])&&!this.options[e].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${e}`);if(!this.config[e].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${e}`)}if(Q.element(s)||(s=n&&n.querySelector('[role="menu"]')),!Q.element(s))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=He.getLabel.call(this,e,i);const o=s&&s.querySelector(`[value="${i}"]`);Q.element(o)&&(o.checked=!0)},getLabel(e,t){switch(e){case"speed":return t===1?pi.get("normal",this.config):`${t}&times;`;case"quality":if(Q.number(t)){const r=pi.get(`qualityLabel.${t}`,this.config);return r.length?r:`${t}p`}return xre(t);case"captions":return gr.getLabel.call(this);default:return null}},setQualityMenu(e){if(!Q.element(this.elements.settings.panels.quality))return;const t="quality",r=this.elements.settings.panels.quality.querySelector('[role="menu"]');Q.array(e)&&(this.options.quality=lS(e).filter(s=>this.config.quality.options.includes(s)));const n=!Q.empty(this.options.quality)&&this.options.quality.length>1;if(He.toggleMenuButton.call(this,t,n),uv(r),He.checkMenu.call(this),!n)return;const i=s=>{const o=pi.get(`qualityBadge.${s}`,this.config);return o.length?He.createBadge.call(this,o):null};this.options.quality.sort((s,o)=>{const a=this.config.quality.options;return a.indexOf(s)>a.indexOf(o)?1:-1}).forEach(s=>{He.createMenuItem.call(this,{value:s,list:r,type:t,title:He.getLabel.call(this,"quality",s),badge:i(s)})}),He.updateSetting.call(this,t,r)},setCaptionsMenu(){if(!Q.element(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),r=gr.getTracks.call(this),n=!!r.length;if(He.toggleMenuButton.call(this,e,n),uv(t),He.checkMenu.call(this),!n)return;const i=r.map((s,o)=>({value:o,checked:this.captions.toggled&&this.currentTrack===o,title:gr.getLabel.call(this,s),badge:s.language&&He.createBadge.call(this,s.language.toUpperCase()),list:t,type:"language"}));i.unshift({value:-1,checked:!this.captions.toggled,title:pi.get("disabled",this.config),list:t,type:"language"}),i.forEach(He.createMenuItem.bind(this)),He.updateSetting.call(this,e,t)},setSpeedMenu(){if(!Q.element(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(n=>n>=this.minimumSpeed&&n<=this.maximumSpeed);const r=!Q.empty(this.options.speed)&&this.options.speed.length>1;He.toggleMenuButton.call(this,e,r),uv(t),He.checkMenu.call(this),r&&(this.options.speed.forEach(n=>{He.createMenuItem.call(this,{value:n,list:t,type:e,title:He.getLabel.call(this,"speed",n)})}),He.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!Q.empty(e)&&Object.values(e).some(r=>!r.hidden);Hf(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let r=e;Q.element(r)||(r=Object.values(this.elements.settings.panels).find(i=>!i.hidden));const n=r.querySelector('[role^="menuitem"]');ex.call(this,n,t)},toggleMenu(e){const{popup:t}=this.elements.settings,r=this.elements.buttons.settings;if(!Q.element(t)||!Q.element(r))return;const{hidden:n}=t;let i=n;if(Q.boolean(e))i=e;else if(Q.keyboardEvent(e)&&e.key==="Escape")i=!1;else if(Q.event(e)){const s=Q.function(e.composedPath)?e.composedPath()[0]:e.target,o=t.contains(s);if(o||!o&&e.target!==r&&i)return}r.setAttribute("aria-expanded",i),Hf(t,!i),Mr(this.elements.container,this.config.classNames.menu.open,i),i&&Q.keyboardEvent(e)?He.focusFirstMenuItem.call(this,null,!0):i||n||ex.call(this,r,Q.keyboardEvent(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const r=t.scrollWidth,n=t.scrollHeight;return Fu(t),{width:r,height:n}},showMenuPanel(e="",t=!1){const r=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!Q.element(r))return;const n=r.parentNode,i=Array.from(n.children).find(s=>!s.hidden);if($n.transitions&&!$n.reducedMotion){n.style.width=`${i.scrollWidth}px`,n.style.height=`${i.scrollHeight}px`;const s=He.getMenuSize.call(this,r),o=a=>{a.target===n&&["width","height"].includes(a.propertyName)&&(n.style.width="",n.style.height="",m6.call(this,n,cS,o))};sr.call(this,n,cS,o),n.style.width=`${s.width}px`,n.style.height=`${s.height}px`}Hf(i,!0),Hf(r,!1),He.focusFirstMenuItem.call(this,r,t)},setDownloadUrl(){const e=this.elements.buttons.download;Q.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:r,createProgress:n,createRange:i,createTime:s,setQualityMenu:o,setSpeedMenu:a,showMenuPanel:c}=He;this.elements.controls=null,Q.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(r.call(this,"play-large"));const u=Tt("div",Cc(this.config.selectors.controls.wrapper));this.elements.controls=u;const l={class:"plyr__controls__item"};return lS(Q.array(this.config.controls)?this.config.controls:[]).forEach(d=>{if(d==="restart"&&u.appendChild(r.call(this,"restart",l)),d==="rewind"&&u.appendChild(r.call(this,"rewind",l)),d==="play"&&u.appendChild(r.call(this,"play",l)),d==="fast-forward"&&u.appendChild(r.call(this,"fast-forward",l)),d==="progress"){const h=Tt("div",{class:`${l.class} plyr__progress__container`}),g=Tt("div",Cc(this.config.selectors.progress));if(g.appendChild(i.call(this,"seek",{id:`plyr-seek-${e.id}`})),g.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const m=Tt("span",{class:this.config.classNames.tooltip},"00:00");g.appendChild(m),this.elements.display.seekTooltip=m}this.elements.progress=g,h.appendChild(this.elements.progress),u.appendChild(h)}if(d==="current-time"&&u.appendChild(s.call(this,"currentTime",l)),d==="duration"&&u.appendChild(s.call(this,"duration",l)),d==="mute"||d==="volume"){let{volume:h}=this.elements;if(Q.element(h)&&u.contains(h)||(h=Tt("div",Mn({},l,{class:`${l.class} plyr__volume`.trim()})),this.elements.volume=h,u.appendChild(h)),d==="mute"&&h.appendChild(r.call(this,"mute")),d==="volume"&&!vi.isIos&&!vi.isIPadOS){const g={max:1,step:.05,value:this.config.volume};h.appendChild(i.call(this,"volume",Mn(g,{id:`plyr-volume-${e.id}`})))}}if(d==="captions"&&u.appendChild(r.call(this,"captions",l)),d==="settings"&&!Q.empty(this.config.settings)){const h=Tt("div",Mn({},l,{class:`${l.class} plyr__menu`.trim(),hidden:""}));h.appendChild(r.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const g=Tt("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),m=Tt("div"),b=Tt("div",{id:`plyr-settings-${e.id}-home`}),k=Tt("div",{role:"menu"});b.appendChild(k),m.appendChild(b),this.elements.settings.panels.home=b,this.config.settings.forEach(w=>{const E=Tt("button",Mn(Cc(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,E,w),sr.call(this,E,"click",()=>{c.call(this,w,!1)});const A=Tt("span",null,pi.get(w,this.config)),M=Tt("span",{class:this.config.classNames.menu.value});M.innerHTML=e[w],A.appendChild(M),E.appendChild(A),k.appendChild(E);const R=Tt("div",{id:`plyr-settings-${e.id}-${w}`,hidden:""}),N=Tt("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});N.appendChild(Tt("span",{"aria-hidden":!0},pi.get(w,this.config))),N.appendChild(Tt("span",{class:this.config.classNames.hidden},pi.get("menuBack",this.config))),sr.call(this,R,"keydown",z=>{z.key==="ArrowLeft"&&(z.preventDefault(),z.stopPropagation(),c.call(this,"home",!0))},!1),sr.call(this,N,"click",()=>{c.call(this,"home",!1)}),R.appendChild(N),R.appendChild(Tt("div",{role:"menu"})),m.appendChild(R),this.elements.settings.buttons[w]=E,this.elements.settings.panels[w]=R}),g.appendChild(m),h.appendChild(g),u.appendChild(h),this.elements.settings.popup=g,this.elements.settings.menu=h}if(d==="pip"&&$n.pip&&u.appendChild(r.call(this,"pip",l)),d==="airplay"&&$n.airplay&&u.appendChild(r.call(this,"airplay",l)),d==="download"){const h=Mn({},l,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(h.download="");const{download:g}=this.config.urls;!Q.url(g)&&this.isEmbed&&Mn(h,{icon:`logo-${this.provider}`,label:this.provider}),u.appendChild(r.call(this,"download",h))}d==="fullscreen"&&u.appendChild(r.call(this,"fullscreen",l))}),this.isHTML5&&o.call(this,of.getQualityOptions.call(this)),a.call(this),u},inject(){if(this.config.loadSprite){const i=He.getIconUrl.call(this);i.cors&&kre(i.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let r=!0;Q.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),Q.element(this.config.controls)||Q.string(this.config.controls)?e=this.config.controls:(e=He.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:gr.getLabel.call(this)}),r=!1);let n;if(r&&Q.string(this.config.controls)&&(e=(i=>{let s=i;return Object.entries(t).forEach(([o,a])=>{s=dm(s,`{${o}}`,a)}),s})(e)),Q.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),Q.element(n)||(n=this.elements.container),n[Q.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),Q.element(this.elements.controls)||He.findElements.call(this),!Q.empty(this.elements.buttons)){const i=s=>{const o=this.config.classNames.controlPressed;s.setAttribute("aria-pressed","false"),Object.defineProperty(s,"pressed",{configurable:!0,enumerable:!0,get:()=>S3(s,o),set(a=!1){Mr(s,o,a),s.setAttribute("aria-pressed",a?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(s=>{Q.array(s)||Q.nodeList(s)?Array.from(s).filter(Boolean).forEach(i):i(s)})}if(vi.isEdge&&gre(n),this.config.tooltips.controls){const{classNames:i,selectors:s}=this.config,o=`${s.controls.wrapper} ${s.labels} .${i.hidden}`,a=x2.call(this,o);Array.from(a).forEach(c=>{Mr(c,this.config.classNames.hidden,!1),Mr(c,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;const r=(e=this.config.markers)===null||e===void 0||(t=e.points)===null||t===void 0?void 0:t.filter(({time:c})=>c>0&&c<this.duration);if(r==null||!r.length)return;const n=document.createDocumentFragment(),i=document.createDocumentFragment();let s=null;const o=`${this.config.classNames.tooltip}--visible`,a=c=>Mr(s,o,c);r.forEach(c=>{const u=Tt("span",{class:this.config.classNames.marker},""),l=c.time/this.duration*100+"%";s&&(u.addEventListener("mouseenter",()=>{c.label||(s.style.left=l,s.innerHTML=c.label,a(!0))}),u.addEventListener("mouseleave",()=>{a(!1)})),u.addEventListener("click",()=>{this.currentTime=c.time}),u.style.left=l,i.appendChild(u)}),n.appendChild(i),this.config.tooltips.seek||(s=Tt("span",{class:this.config.classNames.tooltip},""),n.appendChild(s)),this.elements.markers={points:i,tip:s},this.elements.progress.appendChild(n)}};function Sre(e,t=!0){let r=e;if(t){const n=document.createElement("a");n.href=r,r=n.href}try{return new URL(r)}catch{return null}}function Cre(e){const t=new URLSearchParams;return Q.object(e)&&Object.entries(e).forEach(([r,n])=>{t.set(r,n)}),t}const gr={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!$n.textTracks)return void(Q.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&He.setCaptionsMenu.call(this));if(Q.element(this.elements.captions)||(this.elements.captions=Tt("div",Cc(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),oat(this.elements.captions,this.elements.wrapper)),vi.isIE&&window.URL){const n=this.media.querySelectorAll("track");Array.from(n).forEach(i=>{const s=i.getAttribute("src"),o=Sre(s);o!==null&&o.hostname!==window.location.href.hostname&&["http:","https:"].includes(o.protocol)&&zb(s,"blob").then(a=>{i.setAttribute("src",window.URL.createObjectURL(a))}).catch(()=>{Fu(i)})})}const e=lS((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(n=>n.split("-")[0]));let t=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();t==="auto"&&([t]=e);let r=this.storage.get("captions");if(Q.boolean(r)||({active:r}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:r,language:t,languages:e}),this.isHTML5){const n=this.config.captions.update?"addtrack removetrack":"removetrack";sr.call(this,this.media.textTracks,n,gr.update.bind(this))}setTimeout(gr.update.bind(this),0)},update(){const e=gr.getTracks.call(this,!0),{active:t,language:r,meta:n,currentTrackNode:i}=this.captions,s=!!e.find(o=>o.language===r);this.isHTML5&&this.isVideo&&e.filter(o=>!n.get(o)).forEach(o=>{this.debug.log("Track added",o),n.set(o,{default:o.mode==="showing"}),o.mode==="showing"&&(o.mode="hidden"),sr.call(this,o,"cuechange",()=>gr.updateCues.call(this))}),(s&&this.language!==r||!e.includes(i))&&(gr.setLanguage.call(this,r),gr.toggle.call(this,t&&s)),this.elements&&Mr(this.elements.container,this.config.classNames.captions.enabled,!Q.empty(e)),Q.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&He.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:r}=this.captions,n=this.config.classNames.captions.active,i=Q.nullOrUndefined(e)?!r:e;if(i!==r){if(t||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!t){const s=gr.getTracks.call(this),o=gr.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=o.language,void gr.set.call(this,s.indexOf(o))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Mr(this.elements.container,n,i),this.captions.toggled=i,He.updateSetting.call(this,"captions"),Ot.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout(()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,t=!0){const r=gr.getTracks.call(this);if(e!==-1)if(Q.number(e))if(e in r){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const n=r[e],{language:i}=n||{};this.captions.currentTrackNode=n,He.updateSetting.call(this,"captions"),t||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),Ot.call(this,this.media,"languagechange")}gr.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&gr.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else gr.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!Q.string(e))return void this.debug.warn("Invalid language argument",e);const r=e.toLowerCase();this.captions.language=r;const n=gr.getTracks.call(this),i=gr.findTrack.call(this,[r]);gr.set.call(this,n.indexOf(i),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(t=>!this.isHTML5||e||this.captions.meta.has(t)).filter(t=>["captions","subtitles"].includes(t.kind))},findTrack(e,t=!1){const r=gr.getTracks.call(this),n=o=>Number((this.captions.meta.get(o)||{}).default),i=Array.from(r).sort((o,a)=>n(a)-n(o));let s;return e.every(o=>(s=i.find(a=>a.language===o),!s)),s||(t?i[0]:void 0)},getCurrentTrack(){return gr.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!Q.track(t)&&$n.textTracks&&this.captions.toggled&&(t=gr.getCurrentTrack.call(this)),Q.track(t)?Q.empty(t.label)?Q.empty(t.language)?pi.get("enabled",this.config):e.language.toUpperCase():t.label:pi.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!Q.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!Q.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const n=gr.getCurrentTrack.call(this);t=Array.from((n||{}).activeCues||[]).map(i=>i.getCueAsHTML()).map(bat)}const r=t.map(n=>n.trim()).join(`
1642
+ `);if(r!==this.elements.captions.innerHTML){uv(this.elements.captions);const n=Tt("span",Cc(this.config.selectors.caption));n.innerHTML=r,this.elements.captions.appendChild(n),Ot.call(this,this.media,"cuechange")}}},Ire={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},tx={active:"picture-in-picture",inactive:"inline"},Kl={html5:"html5",youtube:"youtube",vimeo:"vimeo"},rx={audio:"audio",video:"video"};function vat(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Kl.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Kl.vimeo:null}const nx=()=>{};class _at{constructor(t=!1){this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):nx}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):nx}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):nx}}class ja{constructor(t){Ve(this,"onChange",()=>{if(!this.supported)return;const r=this.player.elements.buttons.fullscreen;Q.element(r)&&(r.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;Ot.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),Ve(this,"toggleFallback",(r=!1)=>{if(r?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=r?"hidden":"",Mr(this.target,this.player.config.classNames.fullscreen.fallback,r),vi.isIos){let n=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const s=Q.string(n.content)&&n.content.includes(i);r?(this.cleanupViewport=!s,s||(n.content+=`,${i}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(o=>o.trim()!==i).join(","))}this.onChange()}),Ve(this,"trapFocus",r=>{if(vi.isIos||vi.isIPadOS||!this.active||r.key!=="Tab")return;const n=document.activeElement,i=x2.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[s]=i,o=i[i.length-1];n!==o||r.shiftKey?n===s&&r.shiftKey&&(o.focus(),r.preventDefault()):(s.focus(),r.preventDefault())}),Ve(this,"update",()=>{if(this.supported){let r;r=this.forceFallback?"Fallback (forced)":ja.nativeSupported?"Native":"Fallback",this.player.debug.log(`${r} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Mr(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),Ve(this,"enter",()=>{this.supported&&(vi.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!ja.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?Q.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),Ve(this,"exit",()=>{if(this.supported)if(vi.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Mc(this.player.play());else if(!ja.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!Q.empty(this.prefix)){const r=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${r}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),Ve(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=t,this.prefix=ja.prefix,this.property=ja.property,this.scrollPosition={x:0,y:0},this.forceFallback=t.config.fullscreen.fallback==="force",this.player.elements.fullscreen=t.config.fullscreen.container&&aat(this.player.elements.container,t.config.fullscreen.container),sr.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),sr.call(this.player,this.player.elements.container,"dblclick",r=>{Q.element(this.player.elements.controls)&&this.player.elements.controls.contains(r.target)||this.player.listeners.proxy(r,this.toggle,"fullscreen")}),sr.call(this,this.player.elements.container,"keydown",r=>this.trapFocus(r)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return ja.nativeSupported&&!this.forceFallback}static get prefix(){if(Q.function(document.exitFullscreen))return"";let t="";return["webkit","moz","ms"].some(r=>!(!Q.function(document[`${r}ExitFullscreen`])&&!Q.function(document[`${r}CancelFullScreen`]))&&(t=r,!0)),t}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,ja.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||ja.nativeSupported||!vi.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!ja.nativeSupported||this.forceFallback)return S3(this.target,this.player.config.classNames.fullscreen.fallback);const t=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return t&&t.shadowRoot?t===this.target.getRootNode().host:t===this.target}get target(){return vi.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function lv(e,t=1){return new Promise((r,n)=>{const i=new Image,s=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=t?r:n)(i)};Object.assign(i,{onload:s,onerror:s,src:e})})}const Br={addStyleHook(){Mr(this.elements.container,this.config.selectors.container.replace(".",""),!0),Mr(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Br.toggleNativeControls.call(this,!0);Q.element(this.elements.controls)||(He.inject.call(this),this.listeners.controls()),Br.toggleNativeControls.call(this),this.isHTML5&&gr.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,He.updateVolume.call(this),He.timeUpdate.call(this),He.durationUpdate.call(this),Br.checkPlaying.call(this),Mr(this.elements.container,this.config.classNames.pip.supported,$n.pip&&this.isHTML5&&this.isVideo),Mr(this.elements.container,this.config.classNames.airplay.supported,$n.airplay&&this.isHTML5),Mr(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{Ot.call(this,this.media,"ready")},0),Br.setTitle.call(this),this.poster&&Br.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&He.durationUpdate.call(this),this.config.mediaMetadata&&He.setMediaMetadata.call(this)},setTitle(){let e=pi.get("play",this.config);if(Q.string(this.config.title)&&!Q.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(t=>{t.setAttribute("aria-label",e)}),this.isEmbed){const t=Kn.call(this,"iframe");if(!Q.element(t))return;const r=Q.empty(this.config.title)?"video":this.config.title,n=pi.get("frameTitle",this.config);t.setAttribute("title",n.replace("{title}",r))}},togglePoster(e){Mr(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),lat.call(this).then(()=>lv(e)).catch(r=>{throw e===this.poster&&Br.togglePoster.call(this,!1),r}).then(()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),Br.togglePoster.call(this,!0),e)))},checkPlaying(e){Mr(this.elements.container,this.config.classNames.playing,this.playing),Mr(this.elements.container,this.config.classNames.paused,this.paused),Mr(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(t=>{Object.assign(t,{pressed:this.playing}),t.setAttribute("aria-label",pi.get(this.playing?"pause":"play",this.config))}),Q.event(e)&&e.type==="timeupdate"||Br.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Mr(this.elements.container,this.config.classNames.loading,this.loading),Br.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const r=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||t.pressed||t.hover||r))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!Q.empty(e)&&Q.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),Q.empty(this.media.style)&&this.media.removeAttribute("style")}};class xat{constructor(t){Ve(this,"firstTouch",()=>{const{player:r}=this,{elements:n}=r;r.touch=!0,Mr(n.container,r.config.classNames.isTouch,!0)}),Ve(this,"global",(r=!0)=>{const{player:n}=this;n.config.keyboard.global&&E2.call(n,window,"keydown keyup",this.handleKey,r,!1),E2.call(n,document.body,"click",this.toggleMenu,r),DM.call(n,document.body,"touchstart",this.firstTouch)}),Ve(this,"container",()=>{const{player:r}=this,{config:n,elements:i,timers:s}=r;!n.keyboard.global&&n.keyboard.focused&&sr.call(r,i.container,"keydown keyup",this.handleKey,!1),sr.call(r,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",c=>{const{controls:u}=i;u&&c.type==="enterfullscreen"&&(u.pressed=!1,u.hover=!1);let l=0;["touchstart","touchmove","mousemove"].includes(c.type)&&(Br.toggleControls.call(r,!0),l=r.touch?3e3:2e3),clearTimeout(s.controls),s.controls=setTimeout(()=>Br.toggleControls.call(r,!1),l)});const o=()=>{if(!r.isVimeo||r.config.vimeo.premium)return;const c=i.wrapper,{active:u}=r.fullscreen,[l,d]=RM.call(r),h=wre(`aspect-ratio: ${l} / ${d}`);if(!u)return void(h?(c.style.width=null,c.style.height=null):(c.style.maxWidth=null,c.style.margin=null));const[g,m]=fat(),b=g/m>l/d;h?(c.style.width=b?"auto":"100%",c.style.height=b?"100%":"auto"):(c.style.maxWidth=b?m/d*l+"px":null,c.style.margin=b?"0 auto":null)},a=()=>{clearTimeout(s.resized),s.resized=setTimeout(o,50)};sr.call(r,i.container,"enterfullscreen exitfullscreen",c=>{const{target:u}=r.fullscreen;u===i.container&&(!r.isEmbed&&Q.empty(r.config.ratio)||(o(),(c.type==="enterfullscreen"?sr:m6).call(r,window,"resize",a)))})}),Ve(this,"media",()=>{const{player:r}=this,{elements:n}=r;if(sr.call(r,r.media,"timeupdate seeking seeked",s=>He.timeUpdate.call(r,s)),sr.call(r,r.media,"durationchange loadeddata loadedmetadata",s=>He.durationUpdate.call(r,s)),sr.call(r,r.media,"ended",()=>{r.isHTML5&&r.isVideo&&r.config.resetOnEnd&&(r.restart(),r.pause())}),sr.call(r,r.media,"progress playing seeking seeked",s=>He.updateProgress.call(r,s)),sr.call(r,r.media,"volumechange",s=>He.updateVolume.call(r,s)),sr.call(r,r.media,"playing play pause ended emptied timeupdate",s=>Br.checkPlaying.call(r,s)),sr.call(r,r.media,"waiting canplay seeked playing",s=>Br.checkLoading.call(r,s)),r.supported.ui&&r.config.clickToPlay&&!r.isAudio){const s=Kn.call(r,`.${r.config.classNames.video}`);if(!Q.element(s))return;sr.call(r,n.container,"click",o=>{([n.container,s].includes(o.target)||s.contains(o.target))&&(r.touch&&r.config.hideControls||(r.ended?(this.proxy(o,r.restart,"restart"),this.proxy(o,()=>{Mc(r.play())},"play")):this.proxy(o,()=>{Mc(r.togglePlay())},"play")))})}r.supported.ui&&r.config.disableContextMenu&&sr.call(r,n.wrapper,"contextmenu",s=>{s.preventDefault()},!1),sr.call(r,r.media,"volumechange",()=>{r.storage.set({volume:r.volume,muted:r.muted})}),sr.call(r,r.media,"ratechange",()=>{He.updateSetting.call(r,"speed"),r.storage.set({speed:r.speed})}),sr.call(r,r.media,"qualitychange",s=>{He.updateSetting.call(r,"quality",null,s.detail.quality)}),sr.call(r,r.media,"ready qualitychange",()=>{He.setDownloadUrl.call(r)});const i=r.config.events.concat(["keyup","keydown"]).join(" ");sr.call(r,r.media,i,s=>{let{detail:o={}}=s;s.type==="error"&&(o=r.media.error),Ot.call(r,n.container,s.type,!0,o)})}),Ve(this,"proxy",(r,n,i)=>{const{player:s}=this,o=s.config.listeners[i];let a=!0;Q.function(o)&&(a=o.call(s,r)),a!==!1&&Q.function(n)&&n.call(s,r)}),Ve(this,"bind",(r,n,i,s,o=!0)=>{const{player:a}=this,c=a.config.listeners[s],u=Q.function(c);sr.call(a,r,n,l=>this.proxy(l,i,s),o&&!u)}),Ve(this,"controls",()=>{const{player:r}=this,{elements:n}=r,i=vi.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(s=>{this.bind(s,"click",()=>{Mc(r.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",r.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{r.lastSeekTime=Date.now(),r.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{r.lastSeekTime=Date.now(),r.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{r.muted=!r.muted},"mute"),this.bind(n.buttons.captions,"click",()=>r.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{Ot.call(r,r.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{r.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{r.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",r.airplay,"airplay"),this.bind(n.buttons.settings,"click",s=>{s.stopPropagation(),s.preventDefault(),He.toggleMenu.call(r,s)},null,!1),this.bind(n.buttons.settings,"keyup",s=>{[" ","Enter"].includes(s.key)&&(s.key!=="Enter"?(s.preventDefault(),s.stopPropagation(),He.toggleMenu.call(r,s)):He.focusFirstMenuItem.call(r,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",s=>{s.key==="Escape"&&He.toggleMenu.call(r,s)}),this.bind(n.inputs.seek,"mousedown mousemove",s=>{const o=n.progress.getBoundingClientRect(),a=100/o.width*(s.pageX-o.left);s.currentTarget.setAttribute("seek-value",a)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",s=>{const o=s.currentTarget,a="play-on-seeked";if(Q.keyboardEvent(s)&&!["ArrowLeft","ArrowRight"].includes(s.key))return;r.lastSeekTime=Date.now();const c=o.hasAttribute(a),u=["mouseup","touchend","keyup"].includes(s.type);c&&u?(o.removeAttribute(a),Mc(r.play())):!u&&r.playing&&(o.setAttribute(a,""),r.pause())}),vi.isIos){const s=x2.call(r,'input[type="range"]');Array.from(s).forEach(o=>this.bind(o,i,a=>gre(a.target)))}this.bind(n.inputs.seek,i,s=>{const o=s.currentTarget;let a=o.getAttribute("seek-value");Q.empty(a)&&(a=o.value),o.removeAttribute("seek-value"),r.currentTime=a/o.max*r.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",s=>He.updateSeekTooltip.call(r,s)),this.bind(n.progress,"mousemove touchmove",s=>{const{previewThumbnails:o}=r;o&&o.loaded&&o.startMove(s)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:s}=r;s&&s.loaded&&s.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",s=>{const{previewThumbnails:o}=r;o&&o.loaded&&o.startScrubbing(s)}),this.bind(n.progress,"mouseup touchend",s=>{const{previewThumbnails:o}=r;o&&o.loaded&&o.endScrubbing(s)}),vi.isWebKit&&Array.from(x2.call(r,'input[type="range"]')).forEach(s=>{this.bind(s,"input",o=>He.updateRangeFill.call(r,o.target))}),r.config.toggleInvert&&!Q.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{r.currentTime!==0&&(r.config.invertTime=!r.config.invertTime,He.timeUpdate.call(r))}),this.bind(n.inputs.volume,i,s=>{r.volume=s.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",s=>{n.controls.hover=!r.touch&&s.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(s=>!s.contains(n.container)).forEach(s=>{this.bind(s,"mouseenter mouseleave",o=>{n.controls&&(n.controls.hover=!r.touch&&o.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",s=>{n.controls.pressed=["mousedown","touchstart"].includes(s.type)}),this.bind(n.controls,"focusin",()=>{const{config:s,timers:o}=r;Mr(n.controls,s.classNames.noTransition,!0),Br.toggleControls.call(r,!0),setTimeout(()=>{Mr(n.controls,s.classNames.noTransition,!1)},0);const a=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout(()=>Br.toggleControls.call(r,!1),a)}),this.bind(n.inputs.volume,"wheel",s=>{const o=s.webkitDirectionInvertedFromDevice,[a,c]=[s.deltaX,-s.deltaY].map(d=>o?-d:d),u=Math.sign(Math.abs(a)>Math.abs(c)?a:c);r.increaseVolume(u/50);const{volume:l}=r.media;(u===1&&l<1||u===-1&&l>0)&&s.preventDefault()},"volume",!1)}),this.player=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(t){const{player:r}=this,{elements:n}=r,{key:i,type:s,altKey:o,ctrlKey:a,metaKey:c,shiftKey:u}=t,l=s==="keydown",d=l&&i===this.lastKey;if(!(o||a||c||u)&&i){if(l){const g=document.activeElement;if(Q.element(g)){const{editable:m}=r.config.selectors,{seek:b}=n.inputs;if(g!==b&&_d(g,m)||t.key===" "&&_d(g,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(i)&&(t.preventDefault(),t.stopPropagation()),i){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d||(h=parseInt(i,10),r.currentTime=r.duration/10*h);break;case" ":case"k":d||Mc(r.togglePlay());break;case"ArrowUp":r.increaseVolume(.1);break;case"ArrowDown":r.decreaseVolume(.1);break;case"m":d||(r.muted=!r.muted);break;case"ArrowRight":r.forward();break;case"ArrowLeft":r.rewind();break;case"f":r.fullscreen.toggle();break;case"c":d||r.toggleCaptions();break;case"l":r.loop=!r.loop}i==="Escape"&&!r.fullscreen.usingNative&&r.fullscreen.active&&r.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var h}}toggleMenu(t){He.toggleMenu.call(this.player,t)}}function Eat(e,t){return e(t={exports:{}},t.exports),t.exports}var kat=Eat(function(e,t){e.exports=function(){var r=function(){},n={},i={},s={};function o(h,g){h=h.push?h:[h];var m,b,k,w=[],E=h.length,A=E;for(m=function(M,R){R.length&&w.push(M),--A||g(w)};E--;)b=h[E],(k=i[b])?m(b,k):(s[b]=s[b]||[]).push(m)}function a(h,g){if(h){var m=s[h];if(i[h]=g,m)for(;m.length;)m[0](h,g),m.splice(0,1)}}function c(h,g){h.call&&(h={success:h}),g.length?(h.error||r)(g):(h.success||r)(h)}function u(h,g,m,b){var k,w,E=document,A=m.async,M=(m.numRetries||0)+1,R=m.before||r,N=h.replace(/[\?|#].*$/,""),z=h.replace(/^(css|img)!/,"");b=b||0,/(^css!|\.css$)/.test(N)?((w=E.createElement("link")).rel="stylesheet",w.href=z,(k="hideFocus"in w)&&w.relList&&(k=0,w.rel="preload",w.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(N)?(w=E.createElement("img")).src=z:((w=E.createElement("script")).src=h,w.async=A===void 0||A),w.onload=w.onerror=w.onbeforeload=function(F){var L=F.type[0];if(k)try{w.sheet.cssText.length||(L="e")}catch(B){B.code!=18&&(L="e")}if(L=="e"){if((b+=1)<M)return u(h,g,m,b)}else if(w.rel=="preload"&&w.as=="style")return w.rel="stylesheet";g(h,L,F.defaultPrevented)},R(h,w)!==!1&&E.head.appendChild(w)}function l(h,g,m){var b,k,w=(h=h.push?h:[h]).length,E=w,A=[];for(b=function(M,R,N){if(R=="e"&&A.push(M),R=="b"){if(!N)return;A.push(M)}--w||g(A)},k=0;k<E;k++)u(h[k],b,m)}function d(h,g,m){var b,k;if(g&&g.trim&&(b=g),k=(b?m:g)||{},b){if(b in n)throw"LoadJS";n[b]=!0}function w(E,A){l(h,function(M){c(k,M),E&&c({success:E,error:A},M),a(b,M)},k)}if(k.returnPromise)return new Promise(w);w()}return d.ready=function(h,g){return o(h,function(m){c(g,m)}),d},d.done=function(h){a(h,[])},d.reset=function(){n={},i={},s={}},d.isDefined=function(h){return h in n},d}()});function LM(e){return new Promise((t,r)=>{kat(e,{success:t,error:r})})}function Aat(e){return Q.empty(e)?null:Q.number(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}function Sat(e){const t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return t&&t.length===5?t[4]:null}function xg(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Ot.call(this,this.media,e?"play":"pause"))}const hS={setup(){const e=this;Mr(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,u1.call(e),Q.object(window.Vimeo)?hS.ready.call(e):LM(e.config.urls.vimeo.sdk).then(()=>{hS.ready.call(e)}).catch(t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)})},ready(){const e=this,t=e.config.vimeo,{premium:r,referrerPolicy:n,...i}=t;let s=e.media.getAttribute("src"),o="";Q.empty(s)?(s=e.media.getAttribute(e.config.attributes.embed.id),o=e.media.getAttribute(e.config.attributes.embed.hash)):o=Sat(s);const a=o?{h:o}:{};r&&Object.assign(i,{controls:!1,sidedock:!1});const c=Cre({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...a,...i}),u=Aat(s),l=Tt("iframe"),d=fS(e.config.urls.vimeo.iframe,u,c);if(l.setAttribute("src",d),l.setAttribute("allowfullscreen",""),l.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Q.empty(n)||l.setAttribute("referrerPolicy",n),r||!t.customControls)l.setAttribute("data-poster",e.poster),e.media=A3(l,e.media);else{const E=Tt("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});E.appendChild(l),e.media=A3(E,e.media)}t.customControls||zb(fS(e.config.urls.vimeo.api,d)).then(E=>{!Q.empty(E)&&E.thumbnail_url&&Br.setPoster.call(e,E.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(l,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(xg.call(e,!0),e.embed.play()),e.media.pause=()=>(xg.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:h}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>h,set(E){const{embed:A,media:M,paused:R,volume:N}=e,z=R&&!A.hasPlayed;M.seeking=!0,Ot.call(e,M,"seeking"),Promise.resolve(z&&A.setVolume(0)).then(()=>A.setCurrentTime(E)).then(()=>z&&A.pause()).then(()=>z&&A.setVolume(N)).catch(()=>{})}});let g=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>g,set(E){e.embed.setPlaybackRate(E).then(()=>{g=E,Ot.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:m}=e.config;Object.defineProperty(e.media,"volume",{get:()=>m,set(E){e.embed.setVolume(E).then(()=>{m=E,Ot.call(e,e.media,"volumechange")})}});let{muted:b}=e.config;Object.defineProperty(e.media,"muted",{get:()=>b,set(E){const A=!!Q.boolean(E)&&E;e.embed.setMuted(!!A||e.config.muted).then(()=>{b=A,Ot.call(e,e.media,"volumechange")})}});let k,{loop:w}=e.config;Object.defineProperty(e.media,"loop",{get:()=>w,set(E){const A=Q.boolean(E)?E:e.config.loop.active;e.embed.setLoop(A).then(()=>{w=A})}}),e.embed.getVideoUrl().then(E=>{k=E,He.setDownloadUrl.call(e)}).catch(E=>{this.debug.warn(E)}),Object.defineProperty(e.media,"currentSrc",{get:()=>k}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(E=>{const[A,M]=E;e.embed.ratio=_re(A,M),u1.call(this)}),e.embed.setAutopause(e.config.autopause).then(E=>{e.config.autopause=E}),e.embed.getVideoTitle().then(E=>{e.config.title=E,Br.setTitle.call(this)}),e.embed.getCurrentTime().then(E=>{h=E,Ot.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(E=>{e.media.duration=E,Ot.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(E=>{e.media.textTracks=E,gr.setup.call(e)}),e.embed.on("cuechange",({cues:E=[]})=>{const A=E.map(M=>mat(M.text));gr.updateCues.call(e,A)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(E=>{xg.call(e,!E),E||Ot.call(e,e.media,"playing")}),Q.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{Ot.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{Ot.call(e,e.media,"playing")}),e.embed.on("play",()=>{xg.call(e,!0),Ot.call(e,e.media,"playing")}),e.embed.on("pause",()=>{xg.call(e,!1)}),e.embed.on("timeupdate",E=>{e.media.seeking=!1,h=E.seconds,Ot.call(e,e.media,"timeupdate")}),e.embed.on("progress",E=>{e.media.buffered=E.percent,Ot.call(e,e.media,"progress"),parseInt(E.percent,10)===1&&Ot.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(A=>{A!==e.media.duration&&(e.media.duration=A,Ot.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,Ot.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,Ot.call(e,e.media,"ended")}),e.embed.on("error",E=>{e.media.error=E,Ot.call(e,e.media,"error")}),t.customControls&&setTimeout(()=>Br.build.call(e),0)}};function Cat(e){return Q.empty(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}function Eg(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Ot.call(this,this.media,e?"play":"pause"))}function Iat(e){return e.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const fv={setup(){if(Mr(this.elements.wrapper,this.config.classNames.embed,!0),Q.object(window.YT)&&Q.function(window.YT.Player))fv.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{Q.function(e)&&e(),fv.ready.call(this)},LM(this.config.urls.youtube.sdk).catch(t=>{this.debug.warn("YouTube API failed to load",t)})}},getTitle(e){zb(fS(this.config.urls.youtube.api,e)).then(t=>{if(Q.object(t)){const{title:r,height:n,width:i}=t;this.config.title=r,Br.setTitle.call(this),this.embed.ratio=_re(i,n)}u1.call(this)}).catch(()=>{u1.call(this)})},ready(){const e=this,t=e.config.youtube,r=e.media&&e.media.getAttribute("id");if(!Q.empty(r)&&r.startsWith("youtube-"))return;let n=e.media.getAttribute("src");Q.empty(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));const i=Cat(n),s=Tt("div",{id:dat(e.provider),"data-poster":t.customControls?e.poster:void 0});if(e.media=A3(s,e.media),t.customControls){const o=a=>`https://i.ytimg.com/vi/${i}/${a}default.jpg`;lv(o("maxres"),121).catch(()=>lv(o("sd"),121)).catch(()=>lv(o("hq"))).then(a=>Br.setPoster.call(e,a.src)).then(a=>{a.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:i,host:Iat(t),playerVars:Mn({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(o){if(!e.media.error){const a=o.data,c={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[a]||"An unknown error occurred";e.media.error={code:a,message:c},Ot.call(e,e.media,"error")}},onPlaybackRateChange(o){const a=o.target;e.media.playbackRate=a.getPlaybackRate(),Ot.call(e,e.media,"ratechange")},onReady(o){if(Q.function(e.media.play))return;const a=o.target;fv.getTitle.call(e,i),e.media.play=()=>{Eg.call(e,!0),a.playVideo()},e.media.pause=()=>{Eg.call(e,!1),a.pauseVideo()},e.media.stop=()=>{a.stopVideo()},e.media.duration=a.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(a.getCurrentTime()),set(d){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,Ot.call(e,e.media,"seeking"),a.seekTo(d)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>a.getPlaybackRate(),set(d){a.setPlaybackRate(d)}});let{volume:c}=e.config;Object.defineProperty(e.media,"volume",{get:()=>c,set(d){c=d,a.setVolume(100*c),Ot.call(e,e.media,"volumechange")}});let{muted:u}=e.config;Object.defineProperty(e.media,"muted",{get:()=>u,set(d){const h=Q.boolean(d)?d:u;u=h,a[h?"mute":"unMute"](),a.setVolume(100*c),Ot.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>a.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const l=a.getAvailablePlaybackRates();e.options.speed=l.filter(d=>e.config.speed.options.includes(d)),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),Ot.call(e,e.media,"timeupdate"),Ot.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=a.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBuffered<e.media.buffered)&&Ot.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,e.media.buffered===1&&(clearInterval(e.timers.buffering),Ot.call(e,e.media,"canplaythrough"))},200),t.customControls&&setTimeout(()=>Br.build.call(e),50)},onStateChange(o){const a=o.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(o.data)&&(e.media.seeking=!1,Ot.call(e,e.media,"seeked")),o.data){case-1:Ot.call(e,e.media,"timeupdate"),e.media.buffered=a.getVideoLoadedFraction(),Ot.call(e,e.media,"progress");break;case 0:Eg.call(e,!1),e.media.loop?(a.stopVideo(),a.playVideo()):Ot.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(Eg.call(e,!0),Ot.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{Ot.call(e,e.media,"timeupdate")},50),e.media.duration!==a.getDuration()&&(e.media.duration=a.getDuration(),Ot.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),Eg.call(e,!1);break;case 3:Ot.call(e,e.media,"waiting")}Ot.call(e,e.elements.container,"statechange",!1,{code:o.data})}}})}},Mre={setup(){this.media?(Mr(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Mr(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Mr(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Tt("div",{class:this.config.classNames.video}),bre(this.media,this.elements.wrapper),this.elements.poster=Tt("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?of.setup.call(this):this.isYouTube?fv.setup.call(this):this.isVimeo&&hS.setup.call(this)):this.debug.warn("No media element found!")}};class Mat{constructor(t){Ve(this,"load",()=>{this.enabled&&(Q.object(window.google)&&Q.object(window.google.ima)?this.ready():LM(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),Ve(this,"ready",()=>{var r;this.enabled||((r=this).manager&&r.manager.destroy(),r.elements.displayContainer&&r.elements.displayContainer.destroy(),r.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),Ve(this,"setupIMA",()=>{this.elements.container=Tt("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,r=>this.onAdsManagerLoaded(r),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,r=>this.onAdError(r),!1),this.requestAds()}),Ve(this,"requestAds",()=>{const{container:r}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=r.offsetWidth,n.linearAdSlotHeight=r.offsetHeight,n.nonLinearAdSlotWidth=r.offsetWidth,n.nonLinearAdSlotHeight=r.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),Ve(this,"pollCountdown",(r=!1)=>{if(!r)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=b6(Math.max(this.manager.getRemainingTime(),0)),i=`${pi.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),Ve(this,"onAdsManagerLoaded",r=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=r.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,i=>this.onAdError(i)),Object.keys(google.ima.AdEvent.Type).forEach(i=>{this.manager.addEventListener(google.ima.AdEvent.Type[i],s=>this.onAdEvent(s))}),this.trigger("loaded")}),Ve(this,"addCuePoints",()=>{Q.empty(this.cuePoints)||this.cuePoints.forEach(r=>{if(r!==0&&r!==-1&&r<this.player.duration){const n=this.player.elements.progress;if(Q.element(n)){const i=100/this.player.duration*r,s=Tt("span",{class:this.player.config.classNames.cues});s.style.left=`${i.toString()}%`,n.appendChild(s)}}})}),Ve(this,"onAdEvent",r=>{const{container:n}=this.player.elements,i=r.getAd(),s=r.getAdData();switch((o=>{Ot.call(this.player,this.player.media,`ads${o.replace(/_/g,"").toLowerCase()}`)})(r.type),r.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=n.offsetWidth,i.height=n.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:s.adError&&this.player.debug.warn(`Non-fatal ad error: ${s.adError.getMessage()}`)}}),Ve(this,"onAdError",r=>{this.cancel(),this.player.debug.warn("Ads error",r)}),Ve(this,"listeners",()=>{const{container:r}=this.player.elements;let n;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{n=this.player.currentTime}),this.player.on("seeked",()=>{const i=this.player.currentTime;Q.empty(this.cuePoints)||this.cuePoints.forEach((s,o)=>{n<s&&s<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(r.offsetWidth,r.offsetHeight,google.ima.ViewMode.NORMAL)})}),Ve(this,"play",()=>{const{container:r}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(r.offsetWidth,r.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),Ve(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Mc(this.player.media.play())}),Ve(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),Ve(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),Ve(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(r=>{this.on("loaded",r),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),Ve(this,"trigger",(r,...n)=>{const i=this.events[r];Q.array(i)&&i.forEach(s=>{Q.function(s)&&s.apply(this,n)})}),Ve(this,"on",(r,n)=>(Q.array(this.events[r])||(this.events[r]=[]),this.events[r].push(n),this)),Ve(this,"startSafetyTimer",(r,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},r)}),Ve(this,"clearSafetyTimer",r=>{Q.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${r}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=t,this.config=t.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((r,n)=>{this.on("loaded",r),this.on("error",n)}),this.load()}get enabled(){const{config:t}=this;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!Q.empty(t.publisherId)||Q.url(t.tagUrl))}get tagUrl(){const{config:t}=this;return Q.url(t.tagUrl)?t.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Cre({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:t.publisherId})}`}}function $re(e=0,t=0,r=255){return Math.min(Math.max(e,t),r)}const $at=e=>{const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(r=>{const n={};r.split(/\r\n|\n|\r/).forEach(i=>{if(Q.number(n.startTime)){if(!Q.empty(i.trim())&&Q.empty(n.text)){const s=i.trim().split("#xywh=");[n.text]=s,s[1]&&([n.x,n.y,n.w,n.h]=s[1].split(","))}}else{const s=i.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);s&&(n.startTime=60*Number(s[1]||0)*60+60*Number(s[2])+Number(s[3])+ +`0.${s[4]}`,n.endTime=60*Number(s[6]||0)*60+60*Number(s[7])+Number(s[8])+ +`0.${s[9]}`)}}),n.text&&t.push(n)}),t},wq=(e,t)=>{const r={};return e>t.width/t.height?(r.width=t.width,r.height=1/e*t.width):(r.height=t.height,r.width=e*t.height),r};class pS{constructor(t){Ve(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),Ve(this,"getThumbnails",()=>new Promise(r=>{const{src:n}=this.player.config.previewThumbnails;if(Q.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((s,o)=>s.height-o.height),this.player.debug.log("Preview thumbnails",this.thumbnails),r()};if(Q.function(n))n(s=>{this.thumbnails=s,i()});else{const s=(Q.string(n)?[n]:n).map(o=>this.getThumbnail(o));Promise.all(s).then(i)}})),Ve(this,"getThumbnail",r=>new Promise(n=>{zb(r).then(i=>{const s={frames:$at(i),height:null,urlPrefix:""};s.frames[0].text.startsWith("/")||s.frames[0].text.startsWith("http://")||s.frames[0].text.startsWith("https://")||(s.urlPrefix=r.substring(0,r.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{s.height=o.naturalHeight,s.width=o.naturalWidth,this.thumbnails.push(s),n()},o.src=s.urlPrefix+s.frames[0].text})})),Ve(this,"startMove",r=>{if(this.loaded&&Q.event(r)&&["touchmove","mousemove"].includes(r.type)&&this.player.media.duration){if(r.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,i;const s=this.player.elements.progress.getBoundingClientRect(),o=100/s.width*(r.pageX-s.left);this.seekTime=this.player.media.duration*(o/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=r.pageX,this.elements.thumb.time.innerText=b6(this.seekTime);const a=(n=this.player.config.markers)===null||n===void 0||(i=n.points)===null||i===void 0?void 0:i.find(({time:c})=>c===Math.round(this.seekTime));a&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${a.label}<br>`)}this.showImageAtCurrentTime()}}),Ve(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),Ve(this,"startScrubbing",r=>{(Q.nullOrUndefined(r.button)||r.button===!1||r.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),Ve(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):DM.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),Ve(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),Ve(this,"render",()=>{this.elements.thumb.container=Tt("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Tt("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const r=Tt("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Tt("span",{},"00:00"),r.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(r),Q.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Tt("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),Ve(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),Ve(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const r=this.thumbnails[0].frames.findIndex(s=>this.seekTime>=s.startTime&&this.seekTime<=s.endTime),n=r>=0;let i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((s,o)=>{this.loadedImages.includes(s.frames[r].text)&&(i=o)}),r!==this.showingThumb&&(this.showingThumb=r,this.loadImage(i)))}),Ve(this,"loadImage",(r=0)=>{const n=this.showingThumb,i=this.thumbnails[r],{urlPrefix:s}=i,o=i.frames[n],a=i.frames[n].text,c=s+a;if(this.currentImageElement&&this.currentImageElement.dataset.filename===a)this.showImage(this.currentImageElement,o,r,n,a,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const u=new Image;u.src=c,u.dataset.index=n,u.dataset.filename=a,this.showingThumbFilename=a,this.player.debug.log(`Loading image: ${c}`),u.onload=()=>this.showImage(u,o,r,n,a,!0),this.loadingImage=u,this.removeOldImages(u)}}),Ve(this,"showImage",(r,n,i,s,o,a=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${s}. qual: ${i}. newimg: ${a}`),this.setImageSizeAndOffset(r,n),a&&(this.currentImageContainer.appendChild(r),this.currentImageElement=r,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(s,!0).then(this.preloadNearby(s,!1)).then(this.getHigherQuality(i,r,n,o))}),Ve(this,"removeOldImages",r=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(n.dataset.index!==r.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:s}=this;setTimeout(()=>{s.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},i)}})}),Ve(this,"preloadNearby",(r,n=!0)=>new Promise(i=>{setTimeout(()=>{const s=this.thumbnails[0].frames[r].text;if(this.showingThumbFilename===s){let o;o=n?this.thumbnails[0].frames.slice(r):this.thumbnails[0].frames.slice(0,r).reverse();let a=!1;o.forEach(c=>{const u=c.text;if(u!==s&&!this.loadedImages.includes(u)){a=!0,this.player.debug.log(`Preloading thumb filename: ${u}`);const{urlPrefix:l}=this.thumbnails[0],d=l+u,h=new Image;h.src=d,h.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${u}`),this.loadedImages.includes(u)||this.loadedImages.push(u),i()}}}),a||i()}},300)})),Ve(this,"getHigherQuality",(r,n,i,s)=>{if(r<this.thumbnails.length-1){let o=n.naturalHeight;this.usingSprites&&(o=i.h),o<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===s&&(this.player.debug.log(`Showing higher quality thumb for: ${s}`),this.loadImage(r+1))},300)}}),Ve(this,"toggleThumbContainer",(r=!1,n=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,r),!r&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),Ve(this,"toggleScrubbingContainer",(r=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,r),r||(this.showingThumb=null,this.showingThumbFilename=null)}),Ve(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),Ve(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:r}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(r.clientHeight>20&&r.clientWidth<20){const n=Math.floor(r.clientHeight*this.thumbAspectRatio);r.style.width=`${n}px`}else if(r.clientHeight<20&&r.clientWidth>20){const n=Math.floor(r.clientWidth/this.thumbAspectRatio);r.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);r.style.height=`${this.thumbContainerHeight}px`,r.style.width=`${n}px`}this.setThumbContainerPos()}),Ve(this,"setThumbContainerPos",()=>{const r=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,s=n.left-r.left+10,o=n.right-r.left-i.clientWidth-10,a=this.mousePosX-r.left-i.clientWidth/2,c=$re(a,s,o);i.style.left=`${c}px`,i.style.setProperty("--preview-arrow-offset",a-c+"px")}),Ve(this,"setScrubbingContainerSize",()=>{const{width:r,height:n}=wq(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${r}px`,this.elements.scrubbing.container.style.height=`${n}px`}),Ve(this,"setImageSizeAndOffset",(r,n)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/n.h;r.style.height=r.naturalHeight*i+"px",r.style.width=r.naturalWidth*i+"px",r.style.left=`-${n.x*i}px`,r.style.top=`-${n.y*i}px`}),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:t}=wq(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return t}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}const gS={insertElements(e,t){Q.string(t)?gq(e,this.media,{src:t}):Q.array(t)&&t.forEach(r=>{gq(e,this.media,r)})},change(e){mre(e,"sources.length")?(of.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],Fu(this.media),this.media=null,Q.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:r}=e,[{provider:n=Kl.html5,src:i}]=t,s=n==="html5"?r:"div",o=n==="html5"?{}:{src:i};Object.assign(this,{provider:n,type:r,supported:$n.check(r,n,this.config.playsinline),media:Tt(s,o)}),this.elements.container.appendChild(this.media),Q.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),Q.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Br.addStyleHook.call(this),this.isHTML5&&gS.insertElements.call(this,"source",t),this.config.title=e.title,Mre.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&gS.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Br.build.call(this),this.isHTML5&&this.media.load(),Q.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new pS(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class k2{constructor(t,r){if(Ve(this,"play",()=>Q.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Mc(this.media.play())),this.media.play()):null),Ve(this,"pause",()=>this.playing&&Q.function(this.media.pause)?this.media.pause():null),Ve(this,"togglePlay",a=>(Q.boolean(a)?a:!this.playing)?this.play():this.pause()),Ve(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):Q.function(this.media.stop)&&this.media.stop()}),Ve(this,"restart",()=>{this.currentTime=0}),Ve(this,"rewind",a=>{this.currentTime-=Q.number(a)?a:this.config.seekTime}),Ve(this,"forward",a=>{this.currentTime+=Q.number(a)?a:this.config.seekTime}),Ve(this,"increaseVolume",a=>{const c=this.media.muted?0:this.volume;this.volume=c+(Q.number(a)?a:0)}),Ve(this,"decreaseVolume",a=>{this.increaseVolume(-a)}),Ve(this,"airplay",()=>{$n.airplay&&this.media.webkitShowPlaybackTargetPicker()}),Ve(this,"toggleControls",a=>{if(this.supported.ui&&!this.isAudio){const c=S3(this.elements.container,this.config.classNames.hideControls),u=a===void 0?void 0:!a,l=Mr(this.elements.container,this.config.classNames.hideControls,u);if(l&&Q.array(this.config.controls)&&this.config.controls.includes("settings")&&!Q.empty(this.config.settings)&&He.toggleMenu.call(this,!1),l!==c){const d=l?"controlshidden":"controlsshown";Ot.call(this,this.media,d)}return!l}return!1}),Ve(this,"on",(a,c)=>{sr.call(this,this.elements.container,a,c)}),Ve(this,"once",(a,c)=>{DM.call(this,this.elements.container,a,c)}),Ve(this,"off",(a,c)=>{m6(this.elements.container,a,c)}),Ve(this,"destroy",(a,c=!1)=>{if(!this.ready)return;const u=()=>{document.body.style.overflow="",this.embed=null,c?(Object.keys(this.elements).length&&(Fu(this.elements.buttons.play),Fu(this.elements.captions),Fu(this.elements.controls),Fu(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),Q.function(a)&&a()):(uat.call(this),of.cancelRequests.call(this),A3(this.elements.original,this.elements.container),Ot.call(this,this.elements.original,"destroyed",!0),Q.function(a)&&a.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Br.toggleNativeControls.call(this,!0),u()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&Q.function(this.embed.destroy)&&this.embed.destroy(),u()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(u),setTimeout(u,200))}),Ve(this,"supports",a=>$n.mime.call(this,a)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=$n.touch,this.media=t,Q.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||Q.nodeList(this.media)||Q.array(this.media))&&(this.media=this.media[0]),this.config=Mn({},Ire,k2.defaults,r||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new _at(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",$n),Q.nullOrUndefined(this.media)||!Q.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!$n.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const i=this.media.tagName.toLowerCase();let s=null,o=null;switch(i){case"div":if(s=this.media.querySelector("iframe"),Q.element(s)){if(o=Sre(s.getAttribute("src")),this.provider=vat(o.toString()),this.elements.container=this.media,this.media=s,this.elements.container.className="",o.search.length){const a=["1","true"];a.includes(o.searchParams.get("autoplay"))&&(this.config.autoplay=!0),a.includes(o.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=a.includes(o.searchParams.get("playsinline")),this.config.youtube.hl=o.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Q.empty(this.provider)||!Object.values(Kl).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=rx.video;break;case"video":case"audio":this.type=i,this.provider=Kl.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=$n.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new xat(this),this.storage=new Ere(this),this.media.plyr=this,Q.element(this.elements.container)||(this.elements.container=Tt("div"),bre(this.media,this.elements.container)),Br.migrateStyles.call(this),Br.addStyleHook.call(this),Mre.setup.call(this),this.config.debug&&sr.call(this,this.elements.container,this.config.events.join(" "),a=>{this.debug.log(`event: ${a.type}`)}),this.fullscreen=new ja(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Br.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Mat(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Mc(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new pS(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Kl.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Kl.youtube}get isVimeo(){return this.provider===Kl.vimeo}get isVideo(){return this.type===rx.video}get isAudio(){return this.type===rx.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(t){if(!this.duration)return;const r=Q.number(t)&&t>0;this.media.currentTime=r?Math.min(t,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:t}=this.media;return Q.number(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const t=parseFloat(this.config.duration),r=(this.media||{}).duration,n=Q.number(r)&&r!==1/0?r:0;return t||n}set volume(t){let r=t;Q.string(r)&&(r=Number(r)),Q.number(r)||(r=this.storage.get("volume")),Q.number(r)||({volume:r}=this.config),r>1&&(r=1),r<0&&(r=0),this.config.volume=r,this.media.volume=r,!Q.empty(t)&&this.muted&&r>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(t){let r=t;Q.boolean(r)||(r=this.storage.get("muted")),Q.boolean(r)||(r=this.config.muted),this.config.muted=r,this.media.muted=r}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(t){let r=null;Q.number(t)&&(r=t),Q.number(r)||(r=this.storage.get("speed")),Q.number(r)||(r=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:i}=this;r=$re(r,n,i),this.config.speed.selected=r,setTimeout(()=>{this.media&&(this.media.playbackRate=r)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(t){const r=this.config.quality,n=this.options.quality;if(!n.length)return;let i=[!Q.empty(t)&&Number(t),this.storage.get("quality"),r.selected,r.default].find(Q.number),s=!0;if(!n.includes(i)){const o=yre(n,i);this.debug.warn(`Unsupported quality option: ${i}, using ${o} instead`),i=o,s=!1}r.selected=i,this.media.quality=i,s&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(t){const r=Q.boolean(t)?t:this.config.loop.active;this.config.loop.active=r,this.media.loop=r}get loop(){return!!this.media.loop}set source(t){gS.change.call(this,t)}get source(){return this.media.currentSrc}get download(){const{download:t}=this.config.urls;return Q.url(t)?t:this.source}set download(t){Q.url(t)&&(this.config.urls.download=t,He.setDownloadUrl.call(this))}set poster(t){this.isVideo?Br.setPoster.call(this,t,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const t=C3(RM.call(this));return Q.array(t)?t.join(":"):t}set ratio(t){this.isVideo?Q.string(t)&&vre(t)?(this.config.ratio=C3(t),u1.call(this)):this.debug.error(`Invalid aspect ratio specified (${t})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(t){this.config.autoplay=Q.boolean(t)?t:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(t){gr.toggle.call(this,t,!1)}set currentTrack(t){gr.set.call(this,t,!1),gr.setup.call(this)}get currentTrack(){const{toggled:t,currentTrack:r}=this.captions;return t?r:-1}set language(t){gr.setLanguage.call(this,t,!1)}get language(){return(gr.getCurrentTrack.call(this)||{}).language}set pip(t){if(!$n.pip)return;const r=Q.boolean(t)?t:!this.pip;Q.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(r?tx.active:tx.inactive),Q.function(this.media.requestPictureInPicture)&&(!this.pip&&r?this.media.requestPictureInPicture():this.pip&&!r&&document.exitPictureInPicture())}get pip(){return $n.pip?Q.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===tx.active:null}setPreviewThumbnails(t){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,t),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new pS(this))}static supported(t,r){return $n.check(t,r)}static loadSprite(t,r){return kre(t,r)}static setup(t,r={}){let n=null;return Q.string(t)?n=Array.from(document.querySelectorAll(t)):Q.nodeList(t)?n=Array.from(t):Q.array(t)&&(n=t.filter(Q.element)),Q.empty(n)?null:n.map(i=>new k2(i,r))}}k2.defaults=sat(Ire);var Fg={name:"VuePlyr",props:{options:{type:Object,required:!1,default(){return{}}}},data(){return{player:{}}},computed:{opts(){const e=this.options;return Object.prototype.hasOwnProperty.call(this.options,"hideYouTubeDOMError")||(e.hideYouTubeDOMError=!0),e}},mounted(){this.player=new k2(this.$el,this.opts)},beforeUnmount(){try{this.player.destroy()}catch(e){this.opts.hideYouTubeDOMError&&e.message==="The YouTube player is not attached to the DOM."||console.error(e)}},render(){const e=this.$slots.default;return typeof e=="function"?e()[0]:e}};Fg.__file="lib/VuePlyr.vue";Fg.install=(e,t={})=>{t.plyr&&(Fg.props.options.default=()=>({...t.plyr})),e.component(Fg.name,Fg)};var dv={exports:{}},Tat=dv.exports,vq;function Nat(){return vq||(vq=1,function(e,t){(function(r,n){n()})(Tat,function(){function r(u,l){return typeof l>"u"?l={autoBom:!1}:typeof l!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function n(u,l,d){var h=new XMLHttpRequest;h.open("GET",u),h.responseType="blob",h.onload=function(){c(h.response,l,d)},h.onerror=function(){console.error("could not download file")},h.send()}function i(u){var l=new XMLHttpRequest;l.open("HEAD",u,!1);try{l.send()}catch{}return 200<=l.status&&299>=l.status}function s(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(l)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Un=="object"&&Un.global===Un?Un:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(u,l,d){var h=o.URL||o.webkitURL,g=document.createElement("a");l=l||u.name||"download",g.download=l,g.rel="noopener",typeof u=="string"?(g.href=u,g.origin===location.origin?s(g):i(g.href)?n(u,l,d):s(g,g.target="_blank")):(g.href=h.createObjectURL(u),setTimeout(function(){h.revokeObjectURL(g.href)},4e4),setTimeout(function(){s(g)},0))}:"msSaveOrOpenBlob"in navigator?function(u,l,d){if(l=l||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(r(u,d),l);else if(i(u))n(u,l,d);else{var h=document.createElement("a");h.href=u,h.target="_blank",setTimeout(function(){s(h)})}}:function(u,l,d,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof u=="string")return n(u,l,d);var g=u.type==="application/octet-stream",m=/constructor/i.test(o.HTMLElement)||o.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||g&&m||a)&&typeof FileReader<"u"){var k=new FileReader;k.onloadend=function(){var A=k.result;A=b?A:A.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=A:location=A,h=null},k.readAsDataURL(u)}else{var w=o.URL||o.webkitURL,E=w.createObjectURL(u);h?h.location=E:location.href=E,h=null,setTimeout(function(){w.revokeObjectURL(E)},4e4)}});o.saveAs=c.saveAs=c,e.exports=c})}(dv)),dv.exports}var Dmt=Nat(),Oat={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};function jat(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Pat(e,t,r){var n=typeof t.fill=="string"?[t.fill]:t.fill||[],i=[],s=t.theme||r.theme;switch(s){case"outline":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.multiColor.outFillColor),i.push(typeof n[2]=="string"?n[2]:r.colors.multiColor.innerStrokeColor),i.push(typeof n[3]=="string"?n[3]:r.colors.multiColor.innerFillColor);break}return{size:t.size||r.size,strokeWidth:t.strokeWidth||r.strokeWidth,strokeLinecap:t.strokeLinecap||r.strokeLinecap,strokeLinejoin:t.strokeLinejoin||r.strokeLinejoin,colors:i,id:e}}var Dat=Symbol("icon-context");function zM(e,t,r){var n={name:"icon-"+e,props:["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","spin"],setup:function(s){var o=jat(),a=W3(Dat,Oat);return function(){var c=s.size,u=s.strokeWidth,l=s.strokeLinecap,d=s.strokeLinejoin,h=s.theme,g=s.fill,m=s.spin,b=Pat(o,{size:c,strokeWidth:u,strokeLinecap:l,strokeLinejoin:d,theme:h,fill:g},a),k=[a.prefix+"-icon"];return k.push(a.prefix+"-icon-"+e),t&&a.rtl&&k.push(a.prefix+"-icon-rtl"),m&&k.push(a.prefix+"-icon-spin"),ia("span",{class:k.join(" ")},[r(b)])}}};return n}const Rmt=zM("pause-one",!1,function(e){return ia("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[ia("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),ia("path",{d:"M19 18V30",stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),ia("path",{d:"M29 18V30",stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),Lmt=zM("play",!0,function(e){return ia("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[ia("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),ia("path",{d:"M20 24V17.0718L26 20.5359L32 24L26 27.4641L20 30.9282V24Z",fill:e.colors[3],stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null)])}),zmt=zM("volume-small",!0,function(e){return ia("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[ia("path",{d:"M24 6V42C17 42 11.7985 32.8391 11.7985 32.8391H6C4.89543 32.8391 4 31.9437 4 30.8391V17.0108C4 15.9062 4.89543 15.0108 6 15.0108H11.7985C11.7985 15.0108 17 6 24 6Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),ia("path",{d:"M32 15L32 15C32.6232 15.5565 33.1881 16.1797 33.6841 16.8588C35.1387 18.8504 36 21.3223 36 24C36 26.6545 35.1535 29.1067 33.7218 31.0893C33.2168 31.7885 32.6391 32.4293 32 33",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])});var ix,_q;function Rat(){if(_q)return ix;_q=1;function e(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function d(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(m.length===0)return"";for(var b=0,k=0,w=0,E=m.length;w!==E&&m[w]===0;)w++,b++;for(var A=(E-w)*l+1>>>0,M=new Uint8Array(A);w!==E;){for(var R=m[w],N=0,z=A-1;(R!==0||N<k)&&z!==-1;z--,N++)R+=256*M[z]>>>0,M[z]=R%a>>>0,R=R/a>>>0;if(R!==0)throw new Error("Non-zero carry");k=N,w++}for(var F=A-k;F!==A&&M[F]===0;)F++;for(var L=c.repeat(b);F<A;++F)L+=t.charAt(M[F]);return L}function h(m){if(typeof m!="string")throw new TypeError("Expected String");if(m.length===0)return new Uint8Array;for(var b=0,k=0,w=0;m[b]===c;)k++,b++;for(var E=(m.length-b)*u+1>>>0,A=new Uint8Array(E);m[b];){var M=m.charCodeAt(b);if(M>255)return;var R=r[M];if(R===255)return;for(var N=0,z=E-1;(R!==0||N<w)&&z!==-1;z--,N++)R+=a*A[z]>>>0,A[z]=R%256>>>0,R=R/256>>>0;if(R!==0)throw new Error("Non-zero carry");w=N,b++}for(var F=E-w;F!==E&&A[F]===0;)F++;for(var L=new Uint8Array(k+(E-F)),B=k;F!==E;)L[B++]=A[F++];return L}function g(m){var b=h(m);if(b)return b;throw new Error("Non-base"+a+" character")}return{encode:d,decodeUnsafe:h,decode:g}}return ix=e,ix}var sx,xq;function Lat(){return xq||(xq=1,sx=Rat()("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),sx}var zat=Lat();const Ec=Js(zat);let Sw;const Bat=new Uint8Array(16);function Fat(){if(!Sw&&(Sw=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sw(Bat)}const zi=[];for(let e=0;e<256;++e)zi.push((e+256).toString(16).slice(1));function Uat(e,t=0){return zi[e[t+0]]+zi[e[t+1]]+zi[e[t+2]]+zi[e[t+3]]+"-"+zi[e[t+4]]+zi[e[t+5]]+"-"+zi[e[t+6]]+zi[e[t+7]]+"-"+zi[e[t+8]]+zi[e[t+9]]+"-"+zi[e[t+10]]+zi[e[t+11]]+zi[e[t+12]]+zi[e[t+13]]+zi[e[t+14]]+zi[e[t+15]]}const qat=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Eq={randomUUID:qat};function Hat(e,t,r){if(Eq.randomUUID&&!e)return Eq.randomUUID();e=e||{};const n=e.random||(e.rng||Fat)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Uat(n)}function mS(e){return e.version===void 0}function ox(e){return mS(e)?e.serialize({verifySignatures:!1,requireAllSignatures:!1}):e.serialize()}var Tre=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?s(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})};function ax(e){return Tre(this,void 0,void 0,function*(){try{return yield e.request({method:"wallet_getSnaps"}),!0}catch{return!1}})}function Wat(){return Tre(this,void 0,void 0,function*(){try{const e=window.ethereum;if(!e)return null;if(e.providers&&Array.isArray(e.providers)){const t=e.providers;for(const r of t)if(yield ax(r))return r}if(e.detected&&Array.isArray(e.detected)){const t=e.detected;for(const r of t)if(yield ax(r))return r}return(yield ax(e))?e:null}catch(e){return console.error(e),null}})}const Vat="solana:mainnet",Kat="solana:devnet",Gat="solana:testnet",Zat="solana:localnet",Nre=[Vat,Kat,Gat,Zat];function cx(e){return Nre.includes(e)}var D0=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},R0=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},hv,pv,gv,mv,bv,yv;const Yat=Nre,Jat=[TC,NC,IK];class y6{get address(){return D0(this,hv,"f")}get publicKey(){return D0(this,pv,"f").slice()}get chains(){return D0(this,gv,"f").slice()}get features(){return D0(this,mv,"f").slice()}get label(){return D0(this,bv,"f")}get icon(){return D0(this,yv,"f")}constructor({address:t,publicKey:r,label:n,icon:i}){hv.set(this,void 0),pv.set(this,void 0),gv.set(this,void 0),mv.set(this,void 0),bv.set(this,void 0),yv.set(this,void 0),new.target===y6&&Object.freeze(this),R0(this,hv,t,"f"),R0(this,pv,r,"f"),R0(this,gv,Yat,"f"),R0(this,mv,Jat,"f"),R0(this,bv,n,"f"),R0(this,yv,i,"f")}}hv=new WeakMap,pv=new WeakMap,gv=new WeakMap,mv=new WeakMap,bv=new WeakMap,yv=new WeakMap;var Ia=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?s(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})};class w6 extends G2{constructor(t){super(),this._network="mainnet-beta",this._iframeParams={},this._element=null,this._iframe=null,this._publicKey=null,this._account=null,this._isConnected=!1,this._connectHandler=null,this._messageHandlers={},this._handleEvent=r=>{var n,i;switch(r.type){case"connect":{this._collapseIframe(),!((n=r.data)===null||n===void 0)&&n.publicKey?(this._publicKey=r.data.publicKey,this._isConnected=!0,this._connectHandler&&(this._connectHandler.resolve(),this._connectHandler=null),this._connected()):(this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),this._disconnected());return}case"disconnect":{this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),this._disconnected();return}case"accountChanged":{!((i=r.data)===null||i===void 0)&&i.publicKey?(this._publicKey=r.data.publicKey,this.emit("accountChanged",this.publicKey),this._standardConnected()):(this.emit("accountChanged",void 0),this._standardDisconnected());return}default:return}},this._handleResize=r=>{r.resizeMode==="full"?r.params.mode==="fullscreen"?this._expandIframe():r.params.mode==="hide"&&this._collapseIframe():r.resizeMode==="coordinates"&&this._resizeIframe(r.params)},this._handleMessage=r=>{var n;if(((n=r.data)===null||n===void 0?void 0:n.channel)!=="solflareIframeToWalletAdapter")return;const i=r.data.data||{};if(i.type==="event")this._handleEvent(i.event);else if(i.type==="resize")this._handleResize(i);else if(i.type==="response"&&this._messageHandlers[i.id]){const{resolve:s,reject:o}=this._messageHandlers[i.id];delete this._messageHandlers[i.id],i.error?o(i.error):s(i.result)}},this._removeElement=()=>{this._element&&(this._element.remove(),this._element=null)},this._removeDanglingElements=()=>{const r=document.getElementsByClassName("solflare-metamask-wallet-adapter-iframe");for(const n of r)n.parentElement&&n.remove()},this._injectElement=()=>{this._removeElement(),this._removeDanglingElements();const r=Object.assign(Object.assign({},this._iframeParams),{mm:!0,v:1,cluster:this._network||"mainnet-beta",origin:window.location.origin||"",title:document.title||""}),n=Object.keys(r).map(s=>`${s}=${encodeURIComponent(r[s])}`).join("&"),i=`${w6.IFRAME_URL}?${n}`;this._element=document.createElement("div"),this._element.className="solflare-metamask-wallet-adapter-iframe",this._element.innerHTML=`
1643
1643
  <iframe src='${i}' style='position: fixed; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; border: none; border-radius: 0; z-index: 99999; color-scheme: auto;' allowtransparency='true'></iframe>
1644
1644
  `,document.body.appendChild(this._element),this._iframe=this._element.querySelector("iframe"),window.addEventListener("message",this._handleMessage,!1)},this._collapseIframe=()=>{this._iframe&&(this._iframe.style.top="",this._iframe.style.right="",this._iframe.style.height="2px",this._iframe.style.width="2px")},this._expandIframe=()=>{this._iframe&&(this._iframe.style.top="0px",this._iframe.style.bottom="0px",this._iframe.style.left="0px",this._iframe.style.right="0px",this._iframe.style.width="100%",this._iframe.style.height="100%")},this._resizeIframe=r=>{this._iframe&&(this._iframe.style.top=isFinite(r.top)?`${r.top}px`:"",this._iframe.style.bottom=isFinite(r.bottom)?`${r.bottom}px`:"",this._iframe.style.left=isFinite(r.left)?`${r.left}px`:"",this._iframe.style.right=isFinite(r.right)?`${r.right}px`:"",this._iframe.style.width=isFinite(r.width)?`${r.width}px`:r.width,this._iframe.style.height=isFinite(r.height)?`${r.height}px`:r.height)},this._sendIframeMessage=r=>{if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");return new Promise((n,i)=>{var s,o;const a=Hat();this._messageHandlers[a]={resolve:n,reject:i},(o=(s=this._iframe)===null||s===void 0?void 0:s.contentWindow)===null||o===void 0||o.postMessage({channel:"solflareWalletAdapterToIframe",data:Object.assign({id:a},r)},"*")})},this._connected=()=>{this._isConnected=!0,this.emit("connect",this.publicKey),this._standardConnected()},this._disconnected=()=>{this._publicKey=null,this._isConnected=!1,window.removeEventListener("message",this._handleMessage,!1),this._removeElement(),this.emit("disconnect"),this._standardDisconnected()},this._standardConnected=()=>{if(!this.publicKey)return;const r=this.publicKey.toString();(!this._account||this._account.address!==r)&&(this._account=new y6({address:r,publicKey:this.publicKey.toBytes()}),this.emit("standard_change",{accounts:this.standardAccounts}))},this._standardDisconnected=()=>{this._account&&(this._account=null,this.emit("standard_change",{accounts:this.standardAccounts}))},t?.network&&(this._network=t?.network),window.SolflareMetaMaskParams&&(this._iframeParams=Object.assign(Object.assign({},this._iframeParams),window.SolflareMetaMaskParams)),t?.params&&(this._iframeParams=Object.assign(Object.assign({},this._iframeParams),t?.params))}get publicKey(){return this._publicKey?new bt(this._publicKey):null}get standardAccount(){return this._account}get standardAccounts(){return this._account?[this._account]:[]}get isConnected(){return this._isConnected}get connected(){return this.isConnected}get autoApprove(){return!1}connect(){return Ia(this,void 0,void 0,function*(){this.connected||(this._injectElement(),yield new Promise((t,r)=>{this._connectHandler={resolve:t,reject:r}}))})}disconnect(){return Ia(this,void 0,void 0,function*(){yield this._sendIframeMessage({method:"disconnect"}),this._disconnected()})}signTransaction(t){var r;return Ia(this,void 0,void 0,function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const n=ox(t),i=yield this._sendIframeMessage({method:"signTransactionV2",params:{transaction:Ec.encode(n)}}),{transaction:s}=i;return mS(t)?ua.from(Ec.decode(s)):Hs.deserialize(Ec.decode(s))}catch(n){throw new Error(((r=n?.toString)===null||r===void 0?void 0:r.call(n))||"Failed to sign transaction")}})}signAllTransactions(t){var r;return Ia(this,void 0,void 0,function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const n=t.map(s=>ox(s)),{transactions:i}=yield this._sendIframeMessage({method:"signAllTransactionsV2",params:{transactions:n.map(s=>Ec.encode(s))}});return i.map((s,o)=>mS(t[o])?ua.from(Ec.decode(s)):Hs.deserialize(Ec.decode(s)))}catch(n){throw new Error(((r=n?.toString)===null||r===void 0?void 0:r.call(n))||"Failed to sign transactions")}})}signAndSendTransaction(t,r){var n;return Ia(this,void 0,void 0,function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const i=ox(t),{signature:s}=yield this._sendIframeMessage({method:"signAndSendTransaction",params:{transaction:Ec.encode(i),options:r}});return s}catch(i){throw new Error(((n=i?.toString)===null||n===void 0?void 0:n.call(i))||"Failed to sign and send transaction")}})}signMessage(t,r="utf8"){var n;return Ia(this,void 0,void 0,function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const{signature:i}=yield this._sendIframeMessage({method:"signMessage",params:{data:Ec.encode(t),display:r}});return Uint8Array.from(Ec.decode(i))}catch(i){throw new Error(((n=i?.toString)===null||n===void 0?void 0:n.call(i))||"Failed to sign message")}})}sign(t,r="utf8"){return Ia(this,void 0,void 0,function*(){return yield this.signMessage(t,r)})}static isSupported(){return Ia(this,void 0,void 0,function*(){return!!(yield Wat())})}standardSignAndSendTransaction(...t){return Ia(this,void 0,void 0,function*(){if(!this.connected)throw new Error("not connected");const r=[];if(t.length===1){const{transaction:n,account:i,chain:s,options:o}=t[0],{minContextSlot:a,preflightCommitment:c,skipPreflight:u,maxRetries:l}=o||{};if(i!==this._account)throw new Error("invalid account");if(!cx(s))throw new Error("invalid chain");const d=yield this.signAndSendTransaction(Hs.deserialize(n),{preflightCommitment:c,minContextSlot:a,maxRetries:l,skipPreflight:u});r.push({signature:Ec.decode(d)})}else if(t.length>1)for(const n of t)r.push(...yield this.standardSignAndSendTransaction(n));return r})}standardSignTransaction(...t){return Ia(this,void 0,void 0,function*(){if(!this.connected)throw new Error("not connected");const r=[];if(t.length===1){const{transaction:n,account:i,chain:s}=t[0];if(i!==this._account)throw new Error("invalid account");if(s&&!cx(s))throw new Error("invalid chain");const o=yield this.signTransaction(Hs.deserialize(n));r.push({signedTransaction:o.serialize()})}else if(t.length>1){let n;for(const o of t){if(o.account!==this._account)throw new Error("invalid account");if(o.chain){if(!cx(o.chain))throw new Error("invalid chain");if(n){if(o.chain!==n)throw new Error("conflicting chain")}else n=o.chain}}const i=t.map(({transaction:o})=>Hs.deserialize(o)),s=yield this.signAllTransactions(i);r.push(...s.map(o=>({signedTransaction:o.serialize()})))}return r})}standardSignMessage(...t){return Ia(this,void 0,void 0,function*(){if(!this.connected)throw new Error("not connected");const r=[];if(t.length===1){const{message:n,account:i}=t[0];if(i!==this._account)throw new Error("invalid account");const s=yield this.signMessage(n);r.push({signedMessage:n,signature:s})}else if(t.length>1)for(const n of t)r.push(...yield this.standardSignMessage(n));return r})}}w6.IFRAME_URL="https://widget.solflare.com/";const Xat=Object.freeze(Object.defineProperty({__proto__:null,StandardSolflareMetaMaskWalletAccount:y6,default:w6},Symbol.toStringTag,{value:"Module"}));var Qat=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ore=function(e){Qat(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(G2),ux,kq;function ect(){if(kq)return ux;kq=1;function e(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function d(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(m.length===0)return"";for(var b=0,k=0,w=0,E=m.length;w!==E&&m[w]===0;)w++,b++;for(var A=(E-w)*l+1>>>0,M=new Uint8Array(A);w!==E;){for(var R=m[w],N=0,z=A-1;(R!==0||N<k)&&z!==-1;z--,N++)R+=256*M[z]>>>0,M[z]=R%a>>>0,R=R/a>>>0;if(R!==0)throw new Error("Non-zero carry");k=N,w++}for(var F=A-k;F!==A&&M[F]===0;)F++;for(var L=c.repeat(b);F<A;++F)L+=t.charAt(M[F]);return L}function h(m){if(typeof m!="string")throw new TypeError("Expected String");if(m.length===0)return new Uint8Array;for(var b=0,k=0,w=0;m[b]===c;)k++,b++;for(var E=(m.length-b)*u+1>>>0,A=new Uint8Array(E);m[b];){var M=m.charCodeAt(b);if(M>255)return;var R=r[M];if(R===255)return;for(var N=0,z=E-1;(R!==0||N<w)&&z!==-1;z--,N++)R+=a*A[z]>>>0,A[z]=R%256>>>0,R=R/256>>>0;if(R!==0)throw new Error("Non-zero carry");w=N,b++}for(var F=E-w;F!==E&&A[F]===0;)F++;for(var L=new Uint8Array(k+(E-F)),B=k;F!==E;)L[B++]=A[F++];return L}function g(m){var b=h(m);if(b)return b;throw new Error("Non-base"+a+" character")}return{encode:d,decodeUnsafe:h,decode:g}}return ux=e,ux}var lx,Aq;function tct(){return Aq||(Aq=1,lx=ect()("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),lx}var rct=tct();const na=Js(rct);var nct=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),bS=function(){return bS=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},bS.apply(this,arguments)},fx=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?s(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},dx=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Sq=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},ict=function(e){nct(t,e);function t(r,n){var i=e.call(this)||this;if(i._handleMessage=function(s){if(i._injectedProvider&&s.source===window||s.origin===i._providerUrl.origin&&s.source===i._popup){if(s.data.method==="connected"){var o=new bt(s.data.params.publicKey);(!i._publicKey||!i._publicKey.equals(o))&&(i._publicKey&&!i._publicKey.equals(o)&&i._handleDisconnect(),i._publicKey=o,i._autoApprove=!!s.data.params.autoApprove,i.emit("connect",i._publicKey))}else if(s.data.method==="disconnected")i._handleDisconnect();else if((s.data.result||s.data.error)&&i._responsePromises.has(s.data.id)){var a=Sq(i._responsePromises.get(s.data.id),2),c=a[0],u=a[1];s.data.result?c(s.data.result):u(new Error(s.data.error))}}},i._handleConnect=function(){return i._handlerAdded||(i._handlerAdded=!0,window.addEventListener("message",i._handleMessage),window.addEventListener("beforeunload",i.disconnect)),i._injectedProvider?new Promise(function(s){i._sendRequest("connect",{}),s()}):(window.name="parent",i._popup=window.open(i._providerUrl.toString(),"_blank","location,resizable,width=460,height=675"),new Promise(function(s){i.once("connect",s)}))},i._handleDisconnect=function(){i._handlerAdded&&(i._handlerAdded=!1,window.removeEventListener("message",i._handleMessage),window.removeEventListener("beforeunload",i.disconnect)),i._publicKey&&(i._publicKey=null,i.emit("disconnect")),i._responsePromises.forEach(function(s,o){var a=Sq(s,2);a[0];var c=a[1];i._responsePromises.delete(o),c("Wallet disconnected")})},i._sendRequest=function(s,o){return fx(i,void 0,void 0,function(){var a,c=this;return dx(this,function(u){if(s!=="connect"&&!this.connected)throw new Error("Wallet not connected");return a=this._nextRequestId,++this._nextRequestId,[2,new Promise(function(l,d){c._responsePromises.set(a,[l,d]),c._injectedProvider?c._injectedProvider.postMessage({jsonrpc:"2.0",id:a,method:s,params:bS({network:c._network},o)}):(c._popup.postMessage({jsonrpc:"2.0",id:a,method:s,params:o},c._providerUrl.origin),c.autoApprove||c._popup.focus())})]})})},i.connect=function(){return i._popup&&i._popup.close(),i._handleConnect()},i.disconnect=function(){return fx(i,void 0,void 0,function(){return dx(this,function(s){switch(s.label){case 0:return this._injectedProvider?[4,this._sendRequest("disconnect",{})]:[3,2];case 1:s.sent(),s.label=2;case 2:return this._popup&&this._popup.close(),this._handleDisconnect(),[2]}})})},i.sign=function(s,o){return fx(i,void 0,void 0,function(){var a,c,u;return dx(this,function(l){switch(l.label){case 0:if(!(s instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return[4,this._sendRequest("sign",{data:s,display:o})];case 1:return a=l.sent(),c=na.decode(a.signature),u=new bt(a.publicKey),[2,{signature:c,publicKey:u}]}})})},oct(r))i._injectedProvider=r;else if(sct(r))i._providerUrl=new URL(r),i._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:n}).toString();else throw new Error("provider parameter must be an injected provider or a URL string.");return i._network=n,i._publicKey=null,i._autoApprove=!1,i._popup=null,i._handlerAdded=!1,i._nextRequestId=1,i._responsePromises=new Map,i}return Object.defineProperty(t.prototype,"publicKey",{get:function(){return this._publicKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"connected",{get:function(){return this._publicKey!==null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoApprove",{get:function(){return this._autoApprove},enumerable:!1,configurable:!0}),t}(G2);function sct(e){return typeof e=="string"}function oct(e){return act(e)&&cct(e.postMessage)}function act(e){return typeof e=="object"&&e!==null}function cct(e){return typeof e=="function"}var uct=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wf=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?s(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},Vf=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},lct=function(e){uct(t,e);function t(r,n,i){var s=e.call(this)||this;return s._instance=null,s.handleMessage=function(o){},s._sendRequest=function(o,a){return Wf(s,void 0,void 0,function(){var c,u;return Vf(this,function(l){switch(l.label){case 0:return!((c=this._instance)===null||c===void 0)&&c.sendRequest?[4,this._instance.sendRequest(o,a)]:[3,2];case 1:return[2,l.sent()];case 2:return!((u=this._instance)===null||u===void 0)&&u._sendRequest?[4,this._instance._sendRequest(o,a)]:[3,4];case 3:return[2,l.sent()];case 4:throw new Error("Unsupported version of `@project-serum/sol-wallet-adapter`")}})})},s._handleConnect=function(){s.emit("connect")},s._handleDisconnect=function(){window.clearInterval(s._pollTimer),s.emit("disconnect")},s._network=n,s._provider=i,s}return Object.defineProperty(t.prototype,"publicKey",{get:function(){return this._instance.publicKey||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"connected",{get:function(){return this._instance.connected||!1},enumerable:!1,configurable:!0}),t.prototype.connect=function(){return Wf(this,void 0,void 0,function(){var r=this;return Vf(this,function(n){switch(n.label){case 0:return this._instance=new ict(this._provider,this._network),this._instance.on("connect",this._handleConnect),this._instance.on("disconnect",this._handleDisconnect),this._pollTimer=window.setInterval(function(){var i,s;((s=(i=r._instance)===null||i===void 0?void 0:i._popup)===null||s===void 0?void 0:s.closed)!==!1&&r._handleDisconnect()},200),[4,this._instance.connect()];case 1:return n.sent(),[2]}})})},t.prototype.disconnect=function(){return Wf(this,void 0,void 0,function(){return Vf(this,function(r){switch(r.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return this._instance.removeAllListeners("connect"),this._instance.removeAllListeners("disconnect"),[4,this._instance.disconnect()];case 1:return r.sent(),[2]}})})},t.prototype.signTransaction=function(r){return Wf(this,void 0,void 0,function(){var n;return Vf(this,function(i){switch(i.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._sendRequest("signTransactionV2",{transaction:na.encode(r)})];case 1:return n=i.sent().transaction,[2,na.decode(n)]}})})},t.prototype.signAllTransactions=function(r){return Wf(this,void 0,void 0,function(){var n;return Vf(this,function(i){switch(i.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._sendRequest("signAllTransactionsV2",{transactions:r.map(function(s){return na.encode(s)})})];case 1:return n=i.sent().transactions,[2,n.map(function(s){return na.decode(s)})]}})})},t.prototype.signAndSendTransaction=function(r,n){return Wf(this,void 0,void 0,function(){var i;return Vf(this,function(s){switch(s.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._sendRequest("signAndSendTransaction",{transaction:na.encode(r),options:n})];case 1:return i=s.sent(),[2,i.signature]}})})},t.prototype.signMessage=function(r,n){return n===void 0&&(n="hex"),Wf(this,void 0,void 0,function(){var i;return Vf(this,function(s){switch(s.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._instance.sign(r,n)];case 1:return i=s.sent().signature,[2,Uint8Array.from(i)]}})})},t}(Ore);let Cw;const fct=new Uint8Array(16);function dct(){if(!Cw&&(Cw=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cw(fct)}const Bi=[];for(let e=0;e<256;++e)Bi.push((e+256).toString(16).slice(1));function hct(e,t=0){return Bi[e[t+0]]+Bi[e[t+1]]+Bi[e[t+2]]+Bi[e[t+3]]+"-"+Bi[e[t+4]]+Bi[e[t+5]]+"-"+Bi[e[t+6]]+Bi[e[t+7]]+"-"+Bi[e[t+8]]+Bi[e[t+9]]+"-"+Bi[e[t+10]]+Bi[e[t+11]]+Bi[e[t+12]]+Bi[e[t+13]]+Bi[e[t+14]]+Bi[e[t+15]]}const pct=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Cq={randomUUID:pct};function gct(e,t,r){if(Cq.randomUUID&&!e)return Cq.randomUUID();e=e||{};const n=e.random||(e.rng||dct)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,hct(n)}var mct=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),yS=function(){return yS=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},yS.apply(this,arguments)},L0=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?s(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},z0=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Iq=function(e){mct(t,e);function t(r,n){var i=this,s;return i=e.call(this)||this,i._publicKey=null,i._messageHandlers={},i.handleMessage=function(o){if(i._messageHandlers[o.id]){var a=i._messageHandlers[o.id],c=a.resolve,u=a.reject;delete i._messageHandlers[o.id],o.error?u(o.error):c(o.result)}},i._sendMessage=function(o){if(!i.connected)throw new Error("Wallet not connected");return new Promise(function(a,c){var u,l,d=gct();i._messageHandlers[d]={resolve:a,reject:c},(l=(u=i._iframe)===null||u===void 0?void 0:u.contentWindow)===null||l===void 0||l.postMessage({channel:"solflareWalletAdapterToIframe",data:yS({id:d},o)},"*")})},i._iframe=r,i._publicKey=new bt((s=n?.toString)===null||s===void 0?void 0:s.call(n)),i}return Object.defineProperty(t.prototype,"publicKey",{get:function(){return this._publicKey||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"connected",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.connect=function(){return L0(this,void 0,void 0,function(){return z0(this,function(r){return[2]})})},t.prototype.disconnect=function(){return L0(this,void 0,void 0,function(){return z0(this,function(r){switch(r.label){case 0:return[4,this._sendMessage({method:"disconnect"})];case 1:return r.sent(),[2]}})})},t.prototype.signTransaction=function(r){var n;return L0(this,void 0,void 0,function(){var i,s;return z0(this,function(o){switch(o.label){case 0:if(!this.connected)throw new Error("Wallet not connected");o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._sendMessage({method:"signTransaction",params:{transaction:na.encode(r)}})];case 2:return i=o.sent(),[2,na.decode(i)];case 3:throw s=o.sent(),new Error(((n=s?.toString)===null||n===void 0?void 0:n.call(s))||"Failed to sign transaction");case 4:return[2]}})})},t.prototype.signAllTransactions=function(r){var n;return L0(this,void 0,void 0,function(){var i,s;return z0(this,function(o){switch(o.label){case 0:if(!this.connected)throw new Error("Wallet not connected");o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._sendMessage({method:"signAllTransactions",params:{transactions:r.map(function(a){return na.encode(a)})}})];case 2:return i=o.sent(),[2,i.map(function(a){return na.decode(a)})];case 3:throw s=o.sent(),new Error(((n=s?.toString)===null||n===void 0?void 0:n.call(s))||"Failed to sign transactions");case 4:return[2]}})})},t.prototype.signAndSendTransaction=function(r,n){var i;return L0(this,void 0,void 0,function(){var s,o;return z0(this,function(a){switch(a.label){case 0:if(!this.connected)throw new Error("Wallet not connected");a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._sendMessage({method:"signAndSendTransaction",params:{transaction:na.encode(r),options:n}})];case 2:return s=a.sent(),[2,s];case 3:throw o=a.sent(),new Error(((i=o?.toString)===null||i===void 0?void 0:i.call(o))||"Failed to sign and send transaction");case 4:return[2]}})})},t.prototype.signMessage=function(r,n){var i;return n===void 0&&(n="hex"),L0(this,void 0,void 0,function(){var s,o;return z0(this,function(a){switch(a.label){case 0:if(!this.connected)throw new Error("Wallet not connected");a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._sendMessage({method:"signMessage",params:{data:r,display:n}})];case 2:return s=a.sent(),[2,Uint8Array.from(na.decode(s))];case 3:throw o=a.sent(),new Error(((i=o?.toString)===null||i===void 0?void 0:i.call(o))||"Failed to sign message");case 4:return[2]}})})},t}(Ore);function kg(e){return e.version===void 0}var bct="1.4.2",yct=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),hm=function(){return hm=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},hm.apply(this,arguments)},Rl=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?s(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},Ll=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},wct=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vct=function(e){yct(t,e);function t(r){var n=e.call(this)||this;return n._network="mainnet-beta",n._provider=null,n._iframeParams={},n._adapterInstance=null,n._element=null,n._iframe=null,n._connectHandler=null,n._flutterHandlerInterval=null,n._handleEvent=function(i){var s,o,a,c;switch(i.type){case"connect_native_web":{n._collapseIframe(),n._adapterInstance=new lct(n._iframe,n._network,((s=i.data)===null||s===void 0?void 0:s.provider)||n._provider||"https://solflare.com/provider"),n._adapterInstance.on("connect",n._webConnected),n._adapterInstance.on("disconnect",n._webDisconnected),n._adapterInstance.connect(),n._setPreferredAdapter("native_web");return}case"connect":{n._collapseIframe(),n._adapterInstance=new Iq(n._iframe,((o=i.data)===null||o===void 0?void 0:o.publicKey)||""),n._adapterInstance.connect(),n._setPreferredAdapter((a=i.data)===null||a===void 0?void 0:a.adapter),n._connectHandler&&(n._connectHandler.resolve(),n._connectHandler=null),n.emit("connect",n.publicKey);return}case"disconnect":{n._connectHandler&&(n._connectHandler.reject(),n._connectHandler=null),n._disconnected(),n.emit("disconnect");return}case"accountChanged":{!((c=i.data)===null||c===void 0)&&c.publicKey?(n._adapterInstance=new Iq(n._iframe,i.data.publicKey),n._adapterInstance.connect(),n.emit("accountChanged",n.publicKey)):n.emit("accountChanged",void 0);return}case"collapse":{n._collapseIframe();return}default:return}},n._handleResize=function(i){i.resizeMode==="full"?i.params.mode==="fullscreen"?n._expandIframe():i.params.mode==="hide"&&n._collapseIframe():i.resizeMode==="coordinates"&&n._iframe&&(n._iframe.style.top=isFinite(i.params.top)?"".concat(i.params.top,"px"):"",n._iframe.style.bottom=isFinite(i.params.bottom)?"".concat(i.params.bottom,"px"):"",n._iframe.style.left=isFinite(i.params.left)?"".concat(i.params.left,"px"):"",n._iframe.style.right=isFinite(i.params.right)?"".concat(i.params.right,"px"):"",n._iframe.style.width=isFinite(i.params.width)?"".concat(i.params.width,"px"):i.params.width,n._iframe.style.height=isFinite(i.params.height)?"".concat(i.params.height,"px"):i.params.height)},n._handleMessage=function(i){var s;if(((s=i.data)===null||s===void 0?void 0:s.channel)==="solflareIframeToWalletAdapter"){var o=i.data.data||{};o.type==="event"?n._handleEvent(o.event):o.type==="resize"?n._handleResize(o):o.type==="response"&&n._adapterInstance&&n._adapterInstance.handleMessage(o)}},n._removeElement=function(){n._flutterHandlerInterval!==null&&(clearInterval(n._flutterHandlerInterval),n._flutterHandlerInterval=null),n._element&&(n._element.remove(),n._element=null)},n._removeDanglingElements=function(){var i,s,o=document.getElementsByClassName("solflare-wallet-adapter-iframe");try{for(var a=wct(o),c=a.next();!c.done;c=a.next()){var u=c.value;u.parentElement&&u.remove()}}catch(l){i={error:l}}finally{try{c&&!c.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}},n._injectElement=function(){n._removeElement(),n._removeDanglingElements();var i=hm(hm({},n._iframeParams),{cluster:n._network||"mainnet-beta",origin:window.location.origin||"",title:document.title||"",version:1,sdkVersion:bct}),s=n._getPreferredAdapter();s&&(i.adapter=s),n._provider&&(i.provider=n._provider);var o=Object.keys(i).map(function(c){return"".concat(c,"=").concat(encodeURIComponent(i[c]))}).join("&"),a="".concat(t.IFRAME_URL,"?").concat(o);n._element=document.createElement("div"),n._element.className="solflare-wallet-adapter-iframe",n._element.innerHTML=`
1645
1645
  <iframe src='`.concat(a,`' referrerPolicy='strict-origin-when-cross-origin' style='position: fixed; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; border: none; border-radius: 0; z-index: 99999; color-scheme: auto;' allowtransparency='true'></iframe>
@@ -5561,4 +5561,4 @@ Minimum version required to store current data is: `+D+`.
5561
5561
  <path d="M42.3709 10.0536C41.2489 10.0536 40.5889 9.21765 40.5889 8.1103C40.5889 7.01035 41.2489 6.16699 42.3709 6.16699C43.4929 6.16699 44.1529 7.01035 44.1529 8.1103C44.1529 9.21765 43.4929 10.0536 42.3709 10.0536ZM42.3709 9.51096C43.1775 9.51096 43.4856 8.82164 43.4856 8.10296C43.4856 7.39163 43.1775 6.70966 42.3709 6.70966C41.5642 6.70966 41.2562 7.39163 41.2562 8.10296C41.2562 8.82164 41.5642 9.51096 42.3709 9.51096Z" fill="#F6F6F6"/>
5562
5562
  <path d="M38.2805 10.0536C37.1952 10.0536 36.5132 9.22499 36.5132 8.1103C36.5132 7.00302 37.1952 6.16699 38.2805 6.16699C39.1972 6.16699 40.0038 6.68766 39.9159 8.27896H37.1805C37.2319 8.96103 37.5472 9.5183 38.2805 9.5183C38.7718 9.5183 39.0945 9.21765 39.2045 8.87299H39.8499C39.7472 9.48903 39.1679 10.0536 38.2805 10.0536ZM37.1952 7.78765H39.2852C39.2338 7.04696 38.8892 6.70232 38.2805 6.70232C37.6132 6.70232 37.2832 7.18635 37.1952 7.78765Z" fill="#F6F6F6"/>
5563
5563
  <path d="M33.3828 9.95773V6.26172H34.0501V6.88506C34.2848 6.47439 34.6882 6.26172 35.1061 6.26172H35.9935V6.88506H35.0548C34.4682 6.88506 34.0501 7.26638 34.0501 8.00706V9.95773H33.3828Z" fill="#F6F6F6"/>
5564
- </svg>`,rht=Object.freeze(Object.defineProperty({__proto__:null,reownSvg:tht},Symbol.toStringTag,{value:"Module"}));export{o0t as $,Oht as A,xht as B,iS as C,Eht as D,oW as E,jht as F,oht as G,aht as H,Yht as I,Lht as J,n0t as K,r0t as L,Ght as M,Zht as N,vht as O,Uht as P,Kht as Q,Hht as R,Q3 as S,s0t as T,uht as U,qht as V,Sht as W,Wht as X,pht as Y,mht as Z,lht as _,hht as a,vpt as a$,bht as a0,Dht as a1,Pht as a2,cht as a3,a0t as a4,Le as a5,f0t as a6,She as a7,B0e as a8,d0t as a9,Ppt as aA,ipt as aB,rpt as aC,T0t as aD,N0t as aE,lpt as aF,qpt as aG,H0t as aH,Npt as aI,q0t as aJ,O0t as aK,ypt as aL,Y0t as aM,R0t as aN,Wpt as aO,Q0t as aP,spt as aQ,U0t as aR,_0t as aS,k0t as aT,Bpt as aU,_pt as aV,Hpt as aW,ebe as aX,W0t as aY,j0t as aZ,Tpt as a_,u0t as aa,l0t as ab,h0t as ac,tV as ad,m0t as ae,b0t as af,Ept as ag,F0t as ah,v0t as ai,mpt as aj,G0t as ak,A0t as al,K0t as am,Cpt as an,w0t as ao,P0t as ap,Fpt as aq,S0t as ar,y0t as as,xpt as at,Opt as au,$pt as av,gpt as aw,bpt as ax,B0t as ay,I0t as az,Jse as b,ept as b0,wpt as b1,Vpt as b2,upt as b3,E0t as b4,J0t as b5,Lpt as b6,C0t as b7,Mpt as b8,Rpt as b9,c1t as bA,Nmt as bB,qE as bC,a1t as bD,o1t as bE,Omt as bF,dpt as bG,kpt as bH,Ipt as bI,L0t as bJ,Rht as bK,p0t as bL,g0t as bM,Nht as bN,Va as bO,jmt as bP,Fg as bQ,Xht as bR,Qht as bS,Pmt as bT,c0t as bU,Dmt as bV,Rmt as bW,Lmt as bX,Vht as bY,i1t as bZ,x0t as ba,D0t as bb,opt as bc,Spt as bd,Z0t as be,z0t as bf,Kpt as bg,$0t as bh,zpt as bi,cpt as bj,jpt as bk,fpt as bl,Upt as bm,ppt as bn,V0t as bo,npt as bp,hpt as bq,Dpt as br,X0t as bs,apt as bt,tpt as bu,Apt as bv,tbe as bw,M0t as bx,u1t as by,l1t as bz,Bht as c,Iht as d,Jht as e,fht as f,Js as g,Tht as h,Zpt as i,Mht as j,Cht as k,Fht as l,zht as m,ght as n,dht as o,yht as p,$ht as q,Aht as r,wht as s,Tce as t,kht as u,e0t as v,t0t as w,_ht as x,i0t as y,Qse as z};
5564
+ </svg>`,rht=Object.freeze(Object.defineProperty({__proto__:null,reownSvg:tht},Symbol.toStringTag,{value:"Module"}));export{o0t as $,Oht as A,xht as B,iS as C,Eht as D,oW as E,jht as F,oht as G,aht as H,Yht as I,Lht as J,n0t as K,r0t as L,Ght as M,Zht as N,vht as O,Uht as P,Kht as Q,Hht as R,Q3 as S,s0t as T,uht as U,qht as V,Sht as W,Wht as X,pht as Y,mht as Z,lht as _,hht as a,_pt as a$,bht as a0,Dht as a1,Pht as a2,cht as a3,a0t as a4,Le as a5,f0t as a6,She as a7,B0e as a8,d0t as a9,Dpt as aA,spt as aB,npt as aC,T0t as aD,N0t as aE,fpt as aF,Hpt as aG,H0t as aH,Opt as aI,q0t as aJ,O0t as aK,wpt as aL,Y0t as aM,R0t as aN,Vpt as aO,Q0t as aP,opt as aQ,U0t as aR,_0t as aS,k0t as aT,Fpt as aU,xpt as aV,Wpt as aW,ebe as aX,W0t as aY,j0t as aZ,Npt as a_,u0t as aa,l0t as ab,h0t as ac,tV as ad,m0t as ae,b0t as af,kpt as ag,F0t as ah,v0t as ai,bpt as aj,G0t as ak,A0t as al,K0t as am,Ipt as an,w0t as ao,P0t as ap,Upt as aq,S0t as ar,y0t as as,Ept as at,jpt as au,Tpt as av,mpt as aw,ypt as ax,B0t as ay,I0t as az,Jse as b,ept as b0,vpt as b1,Kpt as b2,lpt as b3,E0t as b4,J0t as b5,zpt as b6,C0t as b7,$pt as b8,Lpt as b9,f1t as bA,u1t as bB,Omt as bC,qE as bD,c1t as bE,a1t as bF,jmt as bG,hpt as bH,Apt as bI,Mpt as bJ,L0t as bK,Rht as bL,p0t as bM,g0t as bN,Nht as bO,Va as bP,Pmt as bQ,Fg as bR,Xht as bS,Qht as bT,Dmt as bU,c0t as bV,Rmt as bW,Lmt as bX,zmt as bY,Vht as bZ,s1t as b_,x0t as ba,D0t as bb,apt as bc,Cpt as bd,Z0t as be,z0t as bf,Gpt as bg,$0t as bh,Bpt as bi,upt as bj,Ppt as bk,dpt as bl,qpt as bm,gpt as bn,V0t as bo,ipt as bp,ppt as bq,Rpt as br,X0t as bs,cpt as bt,tpt as bu,rpt as bv,Spt as bw,tbe as bx,M0t as by,l1t as bz,Bht as c,Iht as d,Jht as e,fht as f,Js as g,Tht as h,Ypt as i,Mht as j,Cht as k,Fht as l,zht as m,ght as n,dht as o,yht as p,$ht as q,Aht as r,wht as s,Tce as t,kht as u,e0t as v,t0t as w,_ht as x,i0t as y,Qse as z};