@dcl/shop 0.1.0-28788415697.commit-92a0131 → 0.1.0-28849951791.commit-e0fa315

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 (201) hide show
  1. package/assets/Assets-uXzVK3Qk.js +1 -0
  2. package/assets/Cart-B_feHFWP.js +1 -0
  3. package/assets/{CircularProgress-B0lRHBCP.js → CircularProgress-MlGhFCHM.js} +1 -1
  4. package/assets/{Collection-DpUFjy6q.js → Collection-HISXJvQ9.js} +1 -1
  5. package/assets/{ConstantsUtil-D9t4gp4-.js → ConstantsUtil-DOBrEopM.js} +1 -1
  6. package/assets/{Creator-BIgvo89M.js → Creator-DckKaL-1.js} +1 -1
  7. package/assets/{ExchangeController-BxGELXaJ.js → ExchangeController-Baa0YVeA.js} +1 -1
  8. package/assets/GetCredits-DqKwryal.js +2 -0
  9. package/assets/{HelpersUtil-JEAWoPWy.js → HelpersUtil-BVXkvMyH.js} +1 -1
  10. package/assets/ImportListings-3PSkCxI9.js +1 -0
  11. package/assets/ItemDetail-Ck5cudTI.js +1 -0
  12. package/assets/{LoadMore-DB6TwvRe.js → LoadMore-Cae84rui.js} +1 -1
  13. package/assets/Market-r9wggpqR.js +1 -0
  14. package/assets/MenuItem-CTKZTFhj.js +82 -0
  15. package/assets/MyAssets-DbjlwVgI.js +1 -0
  16. package/assets/{MyFavorites-LznRvK5N.js → MyFavorites-CUJsTl4U.js} +1 -1
  17. package/assets/{MyPurchases-BM1Uxpk1.js → MyPurchases-D231IumZ.js} +1 -1
  18. package/assets/{NetworkUtil-CSluj-ND.js → NetworkUtil-aE1iGnVj.js} +1 -1
  19. package/assets/NotFound-MYCYhimC.js +1 -0
  20. package/assets/{RealCheckout-DbSQfCUZ.js → RealCheckout-_Z3g7ZbH.js} +1 -1
  21. package/assets/ShopFooterInner-gDzKrctg.js +24 -0
  22. package/assets/{SkeletonCards-yV2mi4oc.js → SkeletonCards-D9qg3FUs.js} +1 -1
  23. package/assets/{Success-CkhrWNlU.js → Success-vyQPaFjH.js} +1 -1
  24. package/assets/{SvgIcon-o9nhGFxM.js → SvgIcon-DHNKm7fg.js} +1 -1
  25. package/assets/{SwapController-C1nqmWnS.js → SwapController-C28NtHea.js} +1 -1
  26. package/assets/{TradeService-BOr6_BxE.js → TradeService-CV6tm-S-.js} +1 -1
  27. package/assets/{W3MFrameProviderSingleton-Drovl6ew.js → W3MFrameProviderSingleton-CPW2Gx43.js} +3 -3
  28. package/assets/{WebCryptoP256-C468KsvN.js → WebCryptoP256-CJ8gEFrP.js} +1 -1
  29. package/assets/{basic-CfT3tKSs.js → basic-Cp5xCH29.js} +1 -1
  30. package/assets/{biconomy-BRQR4sBp.js → biconomy-DE6VN2MK.js} +1 -1
  31. package/assets/{browser-tNtPL9tA.js → browser-Ch1J123w.js} +1 -1
  32. package/assets/{browser-ponyfill-DgNUJw98.js → browser-ponyfill-Be08WuKC.js} +1 -1
  33. package/assets/{buy-C-Rj-xp5.js → buy-DW_YPH6-.js} +1 -1
  34. package/assets/{buy-gasless-BmoACMRr.js → buy-gasless-C0vjtz9e.js} +1 -1
  35. package/assets/{ccip-c6S7TqyR.js → ccip-CO-J9tPJ.js} +1 -1
  36. package/assets/{ccip-0BllB1E2.js → ccip-Dw1-xWm0.js} +1 -1
  37. package/assets/{chains-L33YnVne.js → chains-BQfW7JAQ.js} +1 -1
  38. package/assets/{collection-WeXeyjAn.js → collection-gU9snfSG.js} +1 -1
  39. package/assets/colors-LINLm1ux.js +1 -0
  40. package/assets/{common-CKF0Kl8D.js → common-CcOIK3mx.js} +1 -1
  41. package/assets/{controller-dlBlTbYB.js → controller-Dp-L0bGU.js} +2 -2
  42. package/assets/{core-Bl_sLfyx.js → core-DOKNMejd.js} +4 -4
  43. package/assets/{custom-CNFVifWV.js → custom-DrZvVkR4.js} +1 -1
  44. package/assets/{data-capture-SDMekFnt.js → data-capture-CWmntLCH.js} +1 -1
  45. package/assets/{decimals-CSVlCZb3.js → decimals-BpJkRsKM.js} +1 -1
  46. package/assets/decimals-D1rmvFNT.js +1 -0
  47. package/assets/{detectExtension-CGFTREd-.js → detectExtension-BOrmaly3.js} +1 -1
  48. package/assets/{email-CYnr2jcE.js → email-DTaLpEKv.js} +1 -1
  49. package/assets/{embedded-wallet-W7SWJ6st.js → embedded-wallet-DVickMII.js} +1 -1
  50. package/assets/{engine-UOkAfyVN.js → engine-Cyf0wDMH.js} +1 -1
  51. package/assets/{estimate-l1-fee-D_bpSDla.js → estimate-l1-fee-Ci_3qNsd.js} +1 -1
  52. package/assets/eth_estimateGas-Bu7KbsjJ.js +1 -0
  53. package/assets/{eth_getStorageAt-D3dzlnBk.js → eth_getStorageAt-gEhkd3Dl.js} +1 -1
  54. package/assets/eth_getTransactionCount-CZrmDIpa.js +1 -0
  55. package/assets/{ethereum-BT-rALS5.js → ethereum-XjVKsXdf.js} +1 -1
  56. package/assets/{ethers-DbXGgxrh.js → ethers-CU3Ctw5k.js} +1 -1
  57. package/assets/{extractIPFS-DGHj61b1.js → extractIPFS-HSGbtFdH.js} +1 -1
  58. package/assets/{features-DENKVFit.js → features-CjtSZKbI.js} +1 -1
  59. package/assets/{fetchTokenMetadata-D85asFLD.js → fetchTokenMetadata-DcoAGAFy.js} +2 -2
  60. package/assets/{fortmatic-fqRJiMUL.js → fortmatic-86Dpmkig.js} +1 -1
  61. package/assets/{generateUtilityClasses-DXz6v4wN.js → generateUtilityClasses-DMMGtITh.js} +2 -2
  62. package/assets/get-ecosystem-wallet-info-GpWofI03.js +1 -0
  63. package/assets/{getBalance-D2EO4aBF.js → getBalance-IAhn1Sx7.js} +2 -2
  64. package/assets/{getInstalledModules-D4PNkmVO.js → getInstalledModules-Clea_yJr.js} +1 -1
  65. package/assets/{getNFT-BESsQ4oH.js → getNFT-BkaCCDU5.js} +1 -1
  66. package/assets/{getNFT-Ddh7bEJQ.js → getNFT-CbT_NWLy.js} +2 -2
  67. package/assets/{hashTypedData-C9QOz9pr.js → hashTypedData-DAd66wY6.js} +1 -1
  68. package/assets/{hashTypedData-Bx3nzvk8.js → hashTypedData-PYLB7hJl.js} +1 -1
  69. package/assets/import-dVEuzimB.js +1 -0
  70. package/assets/{in-app-wallet-calls-Df158hbr.js → in-app-wallet-calls-l67EA4DZ.js} +1 -1
  71. package/assets/{index-Dk9zDQwk.js → index-7rWaFD7f.js} +1 -1
  72. package/assets/{index-K4m_AYVk.js → index-B0--HMVL.js} +3 -3
  73. package/assets/{index-soJZoLvF.js → index-B1ZF46Ko.js} +1 -1
  74. package/assets/{index-p2GbBPES.js → index-B3P6BPci.js} +1 -1
  75. package/assets/{index-aTH_VwVx.js → index-B67hpoq5.js} +1 -1
  76. package/assets/{index-BkFksbUM.js → index-B6lLVyUf.js} +1 -1
  77. package/assets/{index-kV1vUp3Z.js → index-B94ghhpu.js} +1 -1
  78. package/assets/{index-BC7-fNQN.js → index-BKA2Kk9C.js} +1 -1
  79. package/assets/{index-DBg2eXPN.js → index-BVcNzXap.js} +1 -1
  80. package/assets/{index-3SuxDGIz.js → index-BWbKKFVK.js} +1 -1
  81. package/assets/{index-BGGbU05t.js → index-BYg62rD6.js} +1 -1
  82. package/assets/{index-DFJRGUDh.js → index-B_NuPdf0.js} +1 -1
  83. package/assets/{index-BEqhzSDF.js → index-BcZPRgUv.js} +1 -1
  84. package/assets/{index-VSv5weX8.js → index-Bd4x7TMP.js} +1 -1
  85. package/assets/{index-DoTsdAEj.js → index-BeUILvqM.js} +1 -1
  86. package/assets/{index-boWBUFDv.js → index-BjptEpaJ.js} +1 -1
  87. package/assets/{index-DYf2mXDi.js → index-Bl9N3aWR.js} +1 -1
  88. package/assets/{index-Cre0gJrZ.js → index-BrR0WZ0Y.js} +1 -1
  89. package/assets/{index-BqV4-5lu.js → index-BuedKT8D.js} +2 -2
  90. package/assets/{index-TLgW5WZT.js → index-Bv11rzVa.js} +1 -1
  91. package/assets/{index-CIxFIqFU.js → index-C6uhDE9h.js} +1 -1
  92. package/assets/{index-wj8CVNfJ.js → index-C7St4Q5o.js} +1 -1
  93. package/assets/{index-DFrHyvod.js → index-CAXOAo7E.js} +1 -1
  94. package/assets/index-CENUxZfv.js +4 -0
  95. package/assets/{index-WQHztqda.js → index-CbyAJw4-.js} +1 -1
  96. package/assets/{index-CfLoF7Qe.js → index-CcUfpaSP.js} +1 -1
  97. package/assets/{index-D6h-NdP-.js → index-CcsWoBJK.js} +1 -1
  98. package/assets/{index-LSdKGFoq.js → index-CdO-kfoS.js} +1 -1
  99. package/assets/{index-BQWuxKdW.js → index-CqnsV9lR.js} +1 -1
  100. package/assets/{index-m4zZXBld.js → index-CsVrdKM8.js} +1 -1
  101. package/assets/{index-B4P5FnkC.js → index-Ctj09Wx6.js} +1 -1
  102. package/assets/index-CuBAn4iR.js +1 -0
  103. package/assets/{index-75Ps2rGt.js → index-D1gEge8-.js} +3 -3
  104. package/assets/{index-B5lBgsVo.js → index-D3oE2u-n.js} +1 -1
  105. package/assets/{index-BpRV6pU7.js → index-D5JjqjjU.js} +1 -1
  106. package/assets/index-D9XZpwfV.js +95 -0
  107. package/assets/{index-CORb4fda.js → index-DHG_C-Ye.js} +1 -1
  108. package/assets/{index-u6DTe7Nz.js → index-DOLdge0g.js} +1 -1
  109. package/assets/{index-DUOCGq8U.js → index-DURh1PEo.js} +1 -1
  110. package/assets/{index-B3m29cNt.js → index-DVcL7J_t.js} +1 -1
  111. package/assets/{index-ykRzQjuZ.js → index-Df6GKZpc.js} +2 -2
  112. package/assets/{index-CvVHPcFb.js → index-DnQG3NAn.js} +1 -1
  113. package/assets/{index-C6ImpJyG.js → index-DqnX5uAR.js} +1 -1
  114. package/assets/{index-DaBA0yRd.js → index-Dv41StGm.js} +1 -1
  115. package/assets/index-DxWP3gak.js +7 -0
  116. package/assets/index-Pws_ODuR.css +1 -0
  117. package/assets/index-ZxkJeEpU.js +1 -0
  118. package/assets/{index-BwMgLDly.js → index-a4k6LaYK.js} +1 -1
  119. package/assets/{index-SBOBxQlc.js → index-bJ6HAtiK.js} +1 -1
  120. package/assets/{index-CBLO6USL.js → index-jCrNn234.js} +1 -1
  121. package/assets/{index-C631qzTG.js → index-o2j-czuk.js} +1 -1
  122. package/assets/{index-DdlK5WYO.js → index-o3xLbiUm.js} +1 -1
  123. package/assets/{index-kSZb6Dua.js → index-rk-RtPGh.js} +1 -1
  124. package/assets/{index-bwiQJCJg.js → index-u77btqjQ.js} +2 -2
  125. package/assets/{index-yPxvUW6S.js → index-u8nH4Rw0.js} +1 -1
  126. package/assets/{index-BUE1aXpM.js → index-uzc4dT8s.js} +1 -1
  127. package/assets/{index-63GX_n07.js → index-zVvLDKBh.js} +2 -2
  128. package/assets/{index-B4VK7VPX.js → index-zbujtMDB.js} +1 -1
  129. package/assets/{index.es-C0c_PfHy.js → index.es-CYMyZCD-.js} +1 -1
  130. package/assets/{index.es-BRKHDF5O.js → index.es-DJUkBdGr.js} +1 -1
  131. package/assets/{index.es-CO_XF63k.js → index.es-UvEfkSna.js} +4 -4
  132. package/assets/{localBatchGatewayRequest-Coptu8fQ.js → localBatchGatewayRequest-C9D88kZr.js} +1 -1
  133. package/assets/{mana-rate-RN1C71HA.js → mana-rate-Dx_lqKWQ.js} +1 -1
  134. package/assets/{native-BJmDxbqB.js → native-zogUBnfz.js} +1 -1
  135. package/assets/network-CCTP_tzM.js +1 -0
  136. package/assets/{networks-Dk1wsaJ8.js → networks-KbQXXD7P.js} +1 -1
  137. package/assets/{onramp-8Ursi6WH.js → onramp-iekcmGjJ.js} +1 -1
  138. package/assets/{openzeppelin-DoezFh1a.js → openzeppelin-41206uN_.js} +1 -1
  139. package/assets/{ownerOf-Be35NH6y.js → ownerOf-DH7SAQYs.js} +1 -1
  140. package/assets/{parseNft-B8RddWyu.js → parseNft-Dy8OsAtf.js} +2 -2
  141. package/assets/{parseSignature-BCXOdvDq.js → parseSignature-BiaWpR8i.js} +1 -1
  142. package/assets/{parseSignature-B9N92FV1.js → parseSignature-D9IuPuaA.js} +3 -3
  143. package/assets/{pay-with-exchange-CLsRdRnD.js → pay-with-exchange-D0U4VJXZ.js} +1 -1
  144. package/assets/{qr-overlay-CfKat5Nj.js → qr-overlay-35KmnL99.js} +3 -3
  145. package/assets/{react-E8ng6RF2.js → react-4iaCnQ6n.js} +1 -1
  146. package/assets/{receive-Bpba7exF.js → receive-D80uh9Rj.js} +1 -1
  147. package/assets/{resolveImplementation-COEuR_c6.js → resolveImplementation-BuxyNBBw.js} +1 -1
  148. package/assets/{rpc-CA14ywXy.js → rpc-CV4XQPwJ.js} +1 -1
  149. package/assets/{secp256k1-BYTveHSI.js → secp256k1-Bz9G1VTq.js} +1 -1
  150. package/assets/{secp256k1-BxNXIPx_.js → secp256k1-CZj9lLpY.js} +1 -1
  151. package/assets/{secp256k1-VCKU6ZbV.js → secp256k1-lf00rTSa.js} +1 -1
  152. package/assets/{send-CKEWBVZR.js → send-CZjs1yZc.js} +1 -1
  153. package/assets/{send-batch-transaction-kRaDbHFW.js → send-batch-transaction-uDBYU3an.js} +1 -1
  154. package/assets/{send-eip712-transaction-BdAsbdUC.js → send-eip712-transaction-DR18L-sh.js} +2 -2
  155. package/assets/{send-gasless-transaction-umbide8L.js → send-gasless-transaction-BfuwoIYy.js} +2 -2
  156. package/assets/{sendRawTransaction-9yflHgsx.js → sendRawTransaction-BUgSPkVd.js} +3 -3
  157. package/assets/{serializeTransaction-Cl_9QLOo.js → serializeTransaction-Dmi33xSK.js} +1 -1
  158. package/assets/{session-proposal-CAuTXnKi.js → session-proposal-BOa4yxBl.js} +1 -1
  159. package/assets/{session-request-CuMQl9E8.js → session-request-Bcaq75nd.js} +2 -2
  160. package/assets/{sha256-4KqSLEWF.js → sha256-zMI7s0-F.js} +1 -1
  161. package/assets/{signing-CHdT_Ot8.js → signing-Cvv8O8BI.js} +5 -5
  162. package/assets/{socials-9xnPXlWI.js → socials-C_Nw_-aT.js} +1 -1
  163. package/assets/{swaps-DJp-RCo5.js → swaps-DrEprVp5.js} +1 -1
  164. package/assets/{thirdweb-T9OwwIQ6.js → thirdweb-D3908hZR.js} +3 -3
  165. package/assets/{totalSupply-D_X-_ZDw.js → totalSupply-CpI009r1.js} +1 -1
  166. package/assets/{transactionReceipt-BTJ1sQrj.js → transactionReceipt-CRiBJ28i.js} +1 -1
  167. package/assets/{transactions-C6sC5BaM.js → transactions-63jnvtFL.js} +1 -1
  168. package/assets/{useInfiniteGrid-et3T-1IY.js → useInfiniteGrid-xOdKaR3H.js} +1 -1
  169. package/assets/{utils-BZTXwsyT.js → utils-kxirIM46.js} +1 -1
  170. package/assets/{verifyHash-CudNiAgH.js → verifyHash-BR9R1RG0.js} +1 -1
  171. package/assets/{w3m-modal-DIuoUtJk.js → w3m-modal-BlMrqGaw.js} +1 -1
  172. package/assets/{w3m-modal-BxYBckMB.js → w3m-modal-lZE_ZuOa.js} +1 -1
  173. package/assets/{wait-for-tx-receipt-CygP4VsC.js → wait-for-tx-receipt-Do82Sucy.js} +1 -1
  174. package/assets/{wallet-kind-BTWNHcc9.js → wallet-kind-WAQetlRX.js} +1 -1
  175. package/assets/{wallets-CsiIl2HG.js → wallets-CoP2jTeJ.js} +6 -6
  176. package/assets/{web-connector-BkMDTCh_.js → web-connector-uOzuTTW_.js} +3 -3
  177. package/assets/{writeContract-C8FPneHs.js → writeContract-D-hfmcKA.js} +1 -1
  178. package/assets/{zora-sepolia-BF9oR096.js → zora-sepolia-BMTSsYE9.js} +1 -1
  179. package/assets/{zoraTestnet-CQZ9NUll.js → zoraTestnet-BMgpy9AE.js} +1 -1
  180. package/index.html +8 -8
  181. package/package.json +2 -2
  182. package/assets/Assets-C0yakYaS.js +0 -1
  183. package/assets/Cart-CcietwVV.js +0 -1
  184. package/assets/GetCredits-BkyWsDk5.js +0 -2
  185. package/assets/ImportListings-_ZmYZr75.js +0 -1
  186. package/assets/ItemDetail-5H1R8AEJ.js +0 -1
  187. package/assets/Market-DjypWFj5.js +0 -1
  188. package/assets/MyAssets-CrobB3dP.js +0 -1
  189. package/assets/NotFound-DW9xW0V2.js +0 -1
  190. package/assets/decimals-DoXdKj3t.js +0 -1
  191. package/assets/eth_estimateGas-CtUEH79c.js +0 -1
  192. package/assets/eth_getTransactionCount-n2pPwlEw.js +0 -1
  193. package/assets/get-ecosystem-wallet-info-D5g78AMe.js +0 -1
  194. package/assets/import-CDNhzcDz.js +0 -1
  195. package/assets/index-C13awi5n.js +0 -74
  196. package/assets/index-CVEOS5BF.css +0 -1
  197. package/assets/index-ChPBLIHl.js +0 -1
  198. package/assets/index-D7_2_7YY.js +0 -85
  199. package/assets/index-DSxKsQSh.js +0 -1
  200. package/assets/index-z01aMwFk.js +0 -7
  201. package/assets/network-DRh88abw.js +0 -1
@@ -1,74 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DSxKsQSh.js","assets/react-E8ng6RF2.js","assets/network-DRh88abw.js","assets/SvgIcon-o9nhGFxM.js","assets/generateUtilityClasses-DXz6v4wN.js","assets/ethers-DbXGgxrh.js","assets/index-63GX_n07.js","assets/index-D7_2_7YY.js","assets/index-B5lBgsVo.js","assets/CircularProgress-B0lRHBCP.js","assets/TradeService-BOr6_BxE.js","assets/index-kV1vUp3Z.js","assets/Assets-C0yakYaS.js","assets/SkeletonCards-yV2mi4oc.js","assets/LoadMore-DB6TwvRe.js","assets/useInfiniteGrid-et3T-1IY.js","assets/Market-DjypWFj5.js","assets/mana-rate-RN1C71HA.js","assets/buy-C-Rj-xp5.js","assets/buy-gasless-BmoACMRr.js","assets/ItemDetail-5H1R8AEJ.js","assets/ItemDetail-BLC5ggDg.css","assets/Collection-DpUFjy6q.js","assets/collection-WeXeyjAn.js","assets/collection-Ds5shVfK.css","assets/Creator-BIgvo89M.js","assets/MyAssets-CrobB3dP.js","assets/import-CDNhzcDz.js","assets/wallet-kind-BTWNHcc9.js","assets/MyAssets-BjiqkBzd.css","assets/MyFavorites-LznRvK5N.js","assets/MyPurchases-BM1Uxpk1.js","assets/ImportListings-_ZmYZr75.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-CcietwVV.js","assets/GetCredits-BkyWsDk5.js","assets/Success-CkhrWNlU.js","assets/NotFound-DW9xW0V2.js"])))=>i.map(i=>d[i]);
2
- var gC=Object.defineProperty;var q_=e=>{throw TypeError(e)};var _C=(e,t,r)=>t in e?gC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Dn=(e,t,r)=>_C(e,typeof t!="symbol"?t+"":t,r),Vl=(e,t,r)=>t.has(e)||q_("Cannot "+r);var ue=(e,t,r)=>(Vl(e,t,"read from private field"),r?r.call(e):t.get(e)),ze=(e,t,r)=>t.has(e)?q_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),je=(e,t,r,n)=>(Vl(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),tt=(e,t,r)=>(Vl(e,t,"access private method"),r);var Su=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return ue(e,t,n)}});import{r as Be,j as ee,l as TA,g as SA,R as IA,c as Iy,L as Jc,b as al,m as $n,d as EC,n as vC,o as sr,N as bC,p as TC,B as SC}from"./react-E8ng6RF2.js";import{g as Xc,p as zc,W as IC,m as RC,h as k_,f as RA}from"./ethers-DbXGgxrh.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var vo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qi,Fn,Oa,fA,wC=(fA=class extends vo{constructor(){super();ze(this,qi);ze(this,Fn);ze(this,Oa);je(this,Oa,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ue(this,Fn)||this.setEventListener(ue(this,Oa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,Fn))==null||t.call(this),je(this,Fn,void 0))}setEventListener(t){var r;je(this,Oa,t),(r=ue(this,Fn))==null||r.call(this),je(this,Fn,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){ue(this,qi)!==t&&(je(this,qi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ue(this,qi)=="boolean"?ue(this,qi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},qi=new WeakMap,Fn=new WeakMap,Oa=new WeakMap,fA),fg=new wC,AC={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Vn,dg,pA,OC=(pA=class{constructor(){ze(this,Vn,AC);ze(this,dg,!1)}setTimeoutProvider(e){je(this,Vn,e)}setTimeout(e,t){return ue(this,Vn).setTimeout(e,t)}clearTimeout(e){ue(this,Vn).clearTimeout(e)}setInterval(e,t){return ue(this,Vn).setInterval(e,t)}clearInterval(e){ue(this,Vn).clearInterval(e)}},Vn=new WeakMap,dg=new WeakMap,pA),Li=new OC;function NC(e){setTimeout(e,0)}var PC=typeof window>"u"||"Deno"in globalThis;function hr(){}function CC(e,t){return typeof e=="function"?e(t):e}function Ry(e){return typeof e=="number"&&e>=0&&e!==1/0}function wA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Jn(e,t){return typeof e=="function"?e(t):e}function Sr(e,t){return typeof e=="function"?e(t):e}function B_(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==pg(s,t.options))return!1}else if(!ao(t.queryKey,s))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function U_(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(io(t.options.mutationKey)!==io(a))return!1}else if(!ao(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function pg(e,t){return((t==null?void 0:t.queryKeyHashFn)||io)(e)}function io(e){return JSON.stringify(e,(t,r)=>Ay(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function ao(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ao(e[r],t[r])):!1}var MC=Object.prototype.hasOwnProperty;function AA(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=F_(e)&&F_(t);if(!n&&!(Ay(e)&&Ay(t)))return t;const a=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),o=s.length,u=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c],m=e[d],p=t[d];if(m===p){u[d]=m,(n?c<a:MC.call(e,d))&&l++;continue}if(m===null||p===null||typeof m!="object"||typeof p!="object"){u[d]=p;continue}const v=AA(m,p,r+1);u[d]=v,v===m&&l++}return a===o&&l===a?e:u}function wy(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function F_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ay(e){if(!V_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!V_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function V_(e){return Object.prototype.toString.call(e)==="[object Object]"}function jC(e){return new Promise(t=>{Li.setTimeout(t,e)})}function Oy(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?AA(e,t):t}function XG(e){return e}function DC(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function $C(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var mg=Symbol();function OA(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===mg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function NA(e,t){return typeof e=="function"?e(...t):!!e}function LC(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var so=(()=>{let e=()=>PC;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ny(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var qC=NC;function kC(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=qC;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(u=>{r(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||s()}return u},batchCalls:o=>(...u)=>{a(()=>{o(...u)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Kt=kC(),Na,Hn,Pa,mA,BC=(mA=class extends vo{constructor(){super();ze(this,Na,!0);ze(this,Hn);ze(this,Pa);je(this,Pa,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){ue(this,Hn)||this.setEventListener(ue(this,Pa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,Hn))==null||t.call(this),je(this,Hn,void 0))}setEventListener(t){var r;je(this,Pa,t),(r=ue(this,Hn))==null||r.call(this),je(this,Hn,t(this.setOnline.bind(this)))}setOnline(t){ue(this,Na)!==t&&(je(this,Na,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ue(this,Na)}},Na=new WeakMap,Hn=new WeakMap,Pa=new WeakMap,mA),Qc=new BC;function UC(e){return Math.min(1e3*2**e,3e4)}function PA(e){return(e??"online")==="online"?Qc.isOnline():!0}var Py=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function CA(e){let t=!1,r=0,n;const i=Ny(),a=()=>i.status!=="pending",s=w=>{var R;if(!a()){const O=new Py(w);m(O),(R=e.onCancel)==null||R.call(e,O)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>fg.isFocused()&&(e.networkMode==="always"||Qc.isOnline())&&e.canRun(),c=()=>PA(e.networkMode)&&e.canRun(),d=w=>{a()||(n==null||n(),i.resolve(w))},m=w=>{a()||(n==null||n(),i.reject(w))},p=()=>new Promise(w=>{var R;n=O=>{(a()||l())&&w(O)},(R=e.onPause)==null||R.call(e)}).then(()=>{var w;n=void 0,a()||(w=e.onContinue)==null||w.call(e)}),v=()=>{if(a())return;let w;const R=r===0?e.initialPromise:void 0;try{w=R??e.fn()}catch(O){w=Promise.reject(O)}Promise.resolve(w).then(d).catch(O=>{var S;if(a())return;const f=e.retry??(so.isServer()?0:3),E=e.retryDelay??UC,b=typeof E=="function"?E(r,O):E,h=f===!0||typeof f=="number"&&r<f||typeof f=="function"&&f(r,O);if(t||!h){m(O);return}r++,(S=e.onFail)==null||S.call(e,r,O),jC(b).then(()=>l()?void 0:p()).then(()=>{t?m(O):v()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?v():p().then(v),i)}}var ki,hA,MA=(hA=class{constructor(){ze(this,ki)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ry(this.gcTime)&&je(this,ki,Li.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(so.isServer()?1/0:300*1e3))}clearGcTimeout(){ue(this,ki)!==void 0&&(Li.clearTimeout(ue(this,ki)),je(this,ki,void 0))}},ki=new WeakMap,hA);function FC(e){return{onFetch:(t,r)=>{var c,d,m,p,v;const n=t.options,i=(m=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],s=((v=t.state.data)==null?void 0:v.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let w=!1;const R=E=>{LC(E,()=>t.signal,()=>w=!0)},O=OA(t.options,t.fetchOptions),f=async(E,b,h)=>{if(w)return Promise.reject(t.signal.reason);if(b==null&&E.pages.length)return Promise.resolve(E);const A=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:b,direction:h?"backward":"forward",meta:t.options.meta};return R(Y),Y})(),P=await O(A),{maxPages:k}=t.options,z=h?$C:DC;return{pages:z(E.pages,P,k),pageParams:z(E.pageParams,b,k)}};if(i&&a.length){const E=i==="backward",b=E?jA:Cy,h={pages:a,pageParams:s},S=b(n,h);o=await f(h,S,E)}else{const E=e??a.length;do{const b=u===0?s[0]??n.initialPageParam:Cy(n,o);if(u>0&&b==null)break;o=await f(o,b),u++}while(u<E)}return o};t.options.persister?t.fetchFn=()=>{var w,R;return(R=(w=t.options).persister)==null?void 0:R.call(w,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function Cy(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function jA(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function QG(e,t){return t?Cy(e,t)!=null:!1}function ZG(e,t){return!t||!e.getPreviousPageParam?!1:jA(e,t)!=null}var Ca,Bi,Ma,Rr,Ui,Ht,ho,Fi,Tr,DA,Tn,yA,VC=(yA=class extends MA{constructor(t){super();ze(this,Tr);ze(this,Ca);ze(this,Bi);ze(this,Ma);ze(this,Rr);ze(this,Ui);ze(this,Ht);ze(this,ho);ze(this,Fi);je(this,Fi,!1),je(this,ho,t.defaultOptions),this.setOptions(t.options),this.observers=[],je(this,Ui,t.client),je(this,Rr,ue(this,Ui).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,je(this,Bi,G_(this.options)),this.state=t.state??ue(this,Bi),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ca)}get promise(){var t;return(t=ue(this,Ht))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,ho),...t},t!=null&&t._type&&je(this,Ca,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=G_(this.options);r.data!==void 0&&(this.setState(H_(r.data,r.dataUpdatedAt)),je(this,Bi,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,Rr).remove(this)}setData(t,r){const n=Oy(this.state.data,t,this.options);return tt(this,Tr,Tn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){tt(this,Tr,Tn).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=ue(this,Ht))==null?void 0:n.promise;return(i=ue(this,Ht))==null||i.cancel(t),r?r.then(hr).catch(hr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,Bi)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Sr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Jn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!wA(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,Ht))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,Ht))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ue(this,Rr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(ue(this,Ht)&&(ue(this,Fi)||tt(this,Tr,DA).call(this)?ue(this,Ht).cancel({revert:!0}):ue(this,Ht).cancelRetry()),this.scheduleGc()),ue(this,Rr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,Tr,Tn).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,m,p,v,w,R,O,f,E;if(this.state.fetchStatus!=="idle"&&((l=ue(this,Ht))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ue(this,Ht))return ue(this,Ht).continueRetry(),ue(this,Ht).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(h=>h.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(je(this,Fi,!0),n.signal)})},a=()=>{const b=OA(this.options,r),S=(()=>{const A={client:ue(this,Ui),queryKey:this.queryKey,meta:this.meta};return i(A),A})();return je(this,Fi,!1),this.options.persister?this.options.persister(b,S,this):b(S)},o=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,Ui),state:this.state,fetchFn:a};return i(b),b})(),u=ue(this,Ca)==="infinite"?FC(this.options.pages):this.options.behavior;u==null||u.onFetch(o,this),je(this,Ma,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&tt(this,Tr,Tn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),je(this,Ht,CA({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof Py&&b.revert&&this.setState({...ue(this,Ma),fetchStatus:"idle"}),n.abort()},onFail:(b,h)=>{tt(this,Tr,Tn).call(this,{type:"failed",failureCount:b,error:h})},onPause:()=>{tt(this,Tr,Tn).call(this,{type:"pause"})},onContinue:()=>{tt(this,Tr,Tn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await ue(this,Ht).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(p=(m=ue(this,Rr).config).onSuccess)==null||p.call(m,b,this),(w=(v=ue(this,Rr).config).onSettled)==null||w.call(v,b,this.state.error,this),b}catch(b){if(b instanceof Py){if(b.silent)return ue(this,Ht).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw tt(this,Tr,Tn).call(this,{type:"error",error:b}),(O=(R=ue(this,Rr).config).onError)==null||O.call(R,b,this),(E=(f=ue(this,Rr).config).onSettled)==null||E.call(f,this.state.data,b,this),b}finally{this.scheduleGc()}}},Ca=new WeakMap,Bi=new WeakMap,Ma=new WeakMap,Rr=new WeakMap,Ui=new WeakMap,Ht=new WeakMap,ho=new WeakMap,Fi=new WeakMap,Tr=new WeakSet,DA=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Tn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...$A(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...H_(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return je(this,Ma,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ue(this,Rr).notify({query:this,type:"updated",action:t})})},yA);function $A(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:PA(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function H_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function G_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var mr,it,yo,ur,Vi,ja,Rn,Gn,go,Da,$a,Hi,Gi,zn,La,ht,Ps,My,jy,Dy,$y,Ly,qy,ky,LA,gA,HC=(gA=class extends vo{constructor(t,r){super();ze(this,ht);ze(this,mr);ze(this,it);ze(this,yo);ze(this,ur);ze(this,Vi);ze(this,ja);ze(this,Rn);ze(this,Gn);ze(this,go);ze(this,Da);ze(this,$a);ze(this,Hi);ze(this,Gi);ze(this,zn);ze(this,La,new Set);this.options=r,je(this,mr,t),je(this,Gn,null),je(this,Rn,Ny()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,it).addObserver(this),z_(ue(this,it),this.options)?tt(this,ht,Ps).call(this):this.updateResult(),tt(this,ht,$y).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return By(ue(this,it),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return By(ue(this,it),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,ht,Ly).call(this),tt(this,ht,qy).call(this),ue(this,it).removeObserver(this)}setOptions(t){const r=this.options,n=ue(this,it);if(this.options=ue(this,mr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sr(this.options.enabled,ue(this,it))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,ht,ky).call(this),ue(this,it).setOptions(this.options),r._defaulted&&!wy(this.options,r)&&ue(this,mr).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,it),observer:this});const i=this.hasListeners();i&&W_(ue(this,it),n,this.options,r)&&tt(this,ht,Ps).call(this),this.updateResult(),i&&(ue(this,it)!==n||Sr(this.options.enabled,ue(this,it))!==Sr(r.enabled,ue(this,it))||Jn(this.options.staleTime,ue(this,it))!==Jn(r.staleTime,ue(this,it)))&&tt(this,ht,My).call(this);const a=tt(this,ht,jy).call(this);i&&(ue(this,it)!==n||Sr(this.options.enabled,ue(this,it))!==Sr(r.enabled,ue(this,it))||a!==ue(this,zn))&&tt(this,ht,Dy).call(this,a)}getOptimisticResult(t){const r=ue(this,mr).getQueryCache().build(ue(this,mr),t),n=this.createResult(r,t);return zC(this,n)&&(je(this,ur,n),je(this,ja,this.options),je(this,Vi,ue(this,it).state)),n}getCurrentResult(){return ue(this,ur)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&ue(this,Rn).status==="pending"&&ue(this,Rn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){ue(this,La).add(t)}getCurrentQuery(){return ue(this,it)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=ue(this,mr).defaultQueryOptions(t),n=ue(this,mr).getQueryCache().build(ue(this,mr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return tt(this,ht,Ps).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,ur)))}createResult(t,r){var k;const n=ue(this,it),i=this.options,a=ue(this,ur),s=ue(this,Vi),o=ue(this,ja),l=t!==n?t.state:ue(this,yo),{state:c}=t;let d={...c},m=!1,p;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&z_(t,r),W=z&&W_(t,n,r,i);(Y||W)&&(d={...d,...$A(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:v,errorUpdatedAt:w,status:R}=d;p=d.data;let O=!1;if(r.placeholderData!==void 0&&p===void 0&&R==="pending"){let z;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(z=a.data,O=!0):z=typeof r.placeholderData=="function"?r.placeholderData((k=ue(this,$a))==null?void 0:k.state.data,ue(this,$a)):r.placeholderData,z!==void 0&&(R="success",p=Oy(a==null?void 0:a.data,z,r),m=!0)}if(r.select&&p!==void 0&&!O)if(a&&p===(s==null?void 0:s.data)&&r.select===ue(this,go))p=ue(this,Da);else try{je(this,go,r.select),p=r.select(p),p=Oy(a==null?void 0:a.data,p,r),je(this,Da,p),je(this,Gn,null)}catch(z){je(this,Gn,z)}ue(this,Gn)&&(v=ue(this,Gn),p=ue(this,Da),w=Date.now(),R="error");const f=d.fetchStatus==="fetching",E=R==="pending",b=R==="error",h=E&&f,S=p!==void 0,P={status:R,fetchStatus:d.fetchStatus,isPending:E,isSuccess:R==="success",isError:b,isInitialLoading:h,isLoading:h,data:p,dataUpdatedAt:d.dataUpdatedAt,error:v,errorUpdatedAt:w,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:f,isRefetching:f&&!E,isLoadingError:b&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:b&&S,isStale:hg(t,r),refetch:this.refetch,promise:ue(this,Rn),isEnabled:Sr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=P.data!==void 0,Y=P.status==="error"&&!z,W=ce=>{Y?ce.reject(P.error):z&&ce.resolve(P.data)},U=()=>{const ce=je(this,Rn,P.promise=Ny());W(ce)},F=ue(this,Rn);switch(F.status){case"pending":t.queryHash===n.queryHash&&W(F);break;case"fulfilled":(Y||P.data!==F.value)&&U();break;case"rejected":(!Y||P.error!==F.reason)&&U();break}}return P}updateResult(){const t=ue(this,ur),r=this.createResult(ue(this,it),this.options);if(je(this,Vi,ue(this,it).state),je(this,ja,this.options),ue(this,Vi).data!==void 0&&je(this,$a,ue(this,it)),wy(r,t))return;je(this,ur,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,La).size)return!0;const s=new Set(a??ue(this,La));return this.options.throwOnError&&s.add("error"),Object.keys(ue(this,ur)).some(o=>{const u=o;return ue(this,ur)[u]!==t[u]&&s.has(u)})};tt(this,ht,LA).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,ht,$y).call(this)}},mr=new WeakMap,it=new WeakMap,yo=new WeakMap,ur=new WeakMap,Vi=new WeakMap,ja=new WeakMap,Rn=new WeakMap,Gn=new WeakMap,go=new WeakMap,Da=new WeakMap,$a=new WeakMap,Hi=new WeakMap,Gi=new WeakMap,zn=new WeakMap,La=new WeakMap,ht=new WeakSet,Ps=function(t){tt(this,ht,ky).call(this);let r=ue(this,it).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(hr)),r},My=function(){tt(this,ht,Ly).call(this);const t=Jn(this.options.staleTime,ue(this,it));if(so.isServer()||ue(this,ur).isStale||!Ry(t))return;const n=wA(ue(this,ur).dataUpdatedAt,t)+1;je(this,Hi,Li.setTimeout(()=>{ue(this,ur).isStale||this.updateResult()},n))},jy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,it)):this.options.refetchInterval)??!1},Dy=function(t){tt(this,ht,qy).call(this),je(this,zn,t),!(so.isServer()||Sr(this.options.enabled,ue(this,it))===!1||!Ry(ue(this,zn))||ue(this,zn)===0)&&je(this,Gi,Li.setInterval(()=>{(this.options.refetchIntervalInBackground||fg.isFocused())&&tt(this,ht,Ps).call(this)},ue(this,zn)))},$y=function(){tt(this,ht,My).call(this),tt(this,ht,Dy).call(this,tt(this,ht,jy).call(this))},Ly=function(){ue(this,Hi)!==void 0&&(Li.clearTimeout(ue(this,Hi)),je(this,Hi,void 0))},qy=function(){ue(this,Gi)!==void 0&&(Li.clearInterval(ue(this,Gi)),je(this,Gi,void 0))},ky=function(){const t=ue(this,mr).getQueryCache().build(ue(this,mr),this.options);if(t===ue(this,it))return;const r=ue(this,it);je(this,it,t),je(this,yo,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},LA=function(t){Kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(ue(this,ur))}),ue(this,mr).getQueryCache().notify({query:ue(this,it),type:"observerResultsUpdated"})})},gA);function GC(e,t){return Sr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Sr(t.retryOnMount,e)===!1)}function z_(e,t){return GC(e,t)||e.state.data!==void 0&&By(e,t,t.refetchOnMount)}function By(e,t,r){if(Sr(t.enabled,e)!==!1&&Jn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&hg(e,t)}return!1}function W_(e,t,r,n){return(e!==t||Sr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&hg(e,r)}function hg(e,t){return Sr(t.enabled,e)!==!1&&e.isStaleByTime(Jn(t.staleTime,e))}function zC(e,t){return!wy(e.getCurrentResult(),t)}var _o,rn,nr,zi,nn,kn,_A,WC=(_A=class extends MA{constructor(t){super();ze(this,nn);ze(this,_o);ze(this,rn);ze(this,nr);ze(this,zi);je(this,_o,t.client),this.mutationId=t.mutationId,je(this,nr,t.mutationCache),je(this,rn,[]),this.state=t.state||YC(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ue(this,rn).includes(t)||(ue(this,rn).push(t),this.clearGcTimeout(),ue(this,nr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,rn,ue(this,rn).filter(r=>r!==t)),this.scheduleGc(),ue(this,nr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,rn).length||(this.state.status==="pending"?this.scheduleGc():ue(this,nr).remove(this))}continue(){var t;return((t=ue(this,zi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,u,l,c,d,m,p,v,w,R,O,f,E,b,h,S,A;const r=()=>{tt(this,nn,kn).call(this,{type:"continue"})},n={client:ue(this,_o),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,zi,CA({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,k)=>{tt(this,nn,kn).call(this,{type:"failed",failureCount:P,error:k})},onPause:()=>{tt(this,nn,kn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,nr).canRun(this)}));const i=this.state.status==="pending",a=!ue(this,zi).canStart();try{if(i)r();else{tt(this,nn,kn).call(this,{type:"pending",variables:t,isPaused:a}),ue(this,nr).config.onMutate&&await ue(this,nr).config.onMutate(t,this,n);const k=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));k!==this.state.context&&tt(this,nn,kn).call(this,{type:"pending",context:k,variables:t,isPaused:a})}const P=await ue(this,zi).start();return await((l=(u=ue(this,nr).config).onSuccess)==null?void 0:l.call(u,P,t,this.state.context,this,n)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,P,t,this.state.context,n)),await((p=(m=ue(this,nr).config).onSettled)==null?void 0:p.call(m,P,null,this.state.variables,this.state.context,this,n)),await((w=(v=this.options).onSettled)==null?void 0:w.call(v,P,null,t,this.state.context,n)),tt(this,nn,kn).call(this,{type:"success",data:P}),P}catch(P){try{await((O=(R=ue(this,nr).config).onError)==null?void 0:O.call(R,P,t,this.state.context,this,n))}catch(k){Promise.reject(k)}try{await((E=(f=this.options).onError)==null?void 0:E.call(f,P,t,this.state.context,n))}catch(k){Promise.reject(k)}try{await((h=(b=ue(this,nr).config).onSettled)==null?void 0:h.call(b,void 0,P,this.state.variables,this.state.context,this,n))}catch(k){Promise.reject(k)}try{await((A=(S=this.options).onSettled)==null?void 0:A.call(S,void 0,P,t,this.state.context,n))}catch(k){Promise.reject(k)}throw tt(this,nn,kn).call(this,{type:"error",error:P}),P}finally{ue(this,nr).runNext(this)}}},_o=new WeakMap,rn=new WeakMap,nr=new WeakMap,zi=new WeakMap,nn=new WeakSet,kn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Kt.batch(()=>{ue(this,rn).forEach(n=>{n.onMutationUpdate(t)}),ue(this,nr).notify({mutation:this,type:"updated",action:t})})},_A);function YC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wn,qr,Eo,EA,KC=(EA=class extends vo{constructor(t={}){super();ze(this,wn);ze(this,qr);ze(this,Eo);this.config=t,je(this,wn,new Set),je(this,qr,new Map),je(this,Eo,0)}build(t,r,n){const i=new WC({client:t,mutationCache:this,mutationId:++Su(this,Eo)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,wn).add(t);const r=Iu(t);if(typeof r=="string"){const n=ue(this,qr).get(r);n?n.push(t):ue(this,qr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ue(this,wn).delete(t)){const r=Iu(t);if(typeof r=="string"){const n=ue(this,qr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&ue(this,qr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Iu(t);if(typeof r=="string"){const n=ue(this,qr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Iu(t);if(typeof r=="string"){const i=(n=ue(this,qr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kt.batch(()=>{ue(this,wn).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,wn).clear(),ue(this,qr).clear()})}getAll(){return Array.from(ue(this,wn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>U_(r,n))}findAll(t={}){return this.getAll().filter(r=>U_(t,r))}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(hr))))}},wn=new WeakMap,qr=new WeakMap,Eo=new WeakMap,EA);function Iu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var an,vA,JC=(vA=class extends vo{constructor(t={}){super();ze(this,an);this.config=t,je(this,an,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??pg(i,r);let s=this.get(a);return s||(s=new VC({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){ue(this,an).has(t.queryHash)||(ue(this,an).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ue(this,an).get(t.queryHash);r&&(t.destroy(),r===t&&ue(this,an).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,an).get(t)}getAll(){return[...ue(this,an).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>B_(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>B_(t,n)):r}notify(t){Kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},an=new WeakMap,vA),Dt,Wn,Yn,qa,ka,Kn,Ba,Ua,bA,XC=(bA=class{constructor(e={}){ze(this,Dt);ze(this,Wn);ze(this,Yn);ze(this,qa);ze(this,ka);ze(this,Kn);ze(this,Ba);ze(this,Ua);je(this,Dt,e.queryCache||new JC),je(this,Wn,e.mutationCache||new KC),je(this,Yn,e.defaultOptions||{}),je(this,qa,new Map),je(this,ka,new Map),je(this,Kn,0)}mount(){Su(this,Kn)._++,ue(this,Kn)===1&&(je(this,Ba,fg.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Dt).onFocus())})),je(this,Ua,Qc.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Dt).onOnline())})))}unmount(){var e,t;Su(this,Kn)._--,ue(this,Kn)===0&&((e=ue(this,Ba))==null||e.call(this),je(this,Ba,void 0),(t=ue(this,Ua))==null||t.call(this),je(this,Ua,void 0))}isFetching(e){return ue(this,Dt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,Wn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Dt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=ue(this,Dt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Jn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return ue(this,Dt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=ue(this,Dt).get(n.queryHash),a=i==null?void 0:i.state.data,s=CC(t,a);if(s!==void 0)return ue(this,Dt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Kt.batch(()=>ue(this,Dt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Dt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=ue(this,Dt);Kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=ue(this,Dt);return Kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Kt.batch(()=>ue(this,Dt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(hr).catch(hr)}invalidateQueries(e,t={}){return Kt.batch(()=>(ue(this,Dt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Kt.batch(()=>ue(this,Dt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(hr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(hr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=ue(this,Dt).build(this,t);return r.isStaleByTime(Jn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hr).catch(hr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hr).catch(hr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Qc.isOnline()?ue(this,Wn).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Dt)}getMutationCache(){return ue(this,Wn)}getDefaultOptions(){return ue(this,Yn)}setDefaultOptions(e){je(this,Yn,e)}setQueryDefaults(e,t){ue(this,qa).set(io(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,qa).values()],r={};return t.forEach(n=>{ao(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,ka).set(io(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,ka).values()],r={};return t.forEach(n=>{ao(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ue(this,Yn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=pg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===mg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,Yn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Dt).clear(),ue(this,Wn).clear()}},Dt=new WeakMap,Wn=new WeakMap,Yn=new WeakMap,qa=new WeakMap,ka=new WeakMap,Kn=new WeakMap,Ba=new WeakMap,Ua=new WeakMap,bA),qA=Be.createContext(void 0),QC=e=>{const t=Be.useContext(qA);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZC=({client:e,children:t})=>(Be.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),ee.jsx(qA.Provider,{value:e,children:t})),kA=Be.createContext(!1),xC=()=>Be.useContext(kA);kA.Provider;function eM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var tM=Be.createContext(eM()),rM=()=>Be.useContext(tM),nM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?NA(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},iM=e=>{Be.useEffect(()=>{e.clearReset()},[e])},aM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||NA(r,[e.error,n])),sM=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oM=(e,t)=>e.isLoading&&e.isFetching&&!t,uM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Y_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function cM(e,t,r){var p,v,w,R;const n=xC(),i=rM(),a=QC(),s=a.defaultQueryOptions(e);(v=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||v.call(p,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,sM(s),nM(s,i,o),iM(i);const l=!a.getQueryCache().get(s.queryHash),[c]=Be.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),m=!n&&u;if(Be.useSyncExternalStore(Be.useCallback(O=>{const f=m?c.subscribe(Kt.batchCalls(O)):hr;return c.updateResult(),f},[c,m]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Be.useEffect(()=>{c.setOptions(s)},[s,c]),uM(s,d))throw Y_(s,c,i);if(aM({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((R=(w=a.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||R.call(w,s,d),s.experimental_prefetchInRender&&!so.isServer()&&oM(d,n)){const O=l?Y_(s,c,i):o==null?void 0:o.promise;O==null||O.catch(hr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function sl(e,t){return cM(e,HC)}const lM="modulepreload",dM=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-28788415697.commit-92a0131/"+e},K_={},Xt=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let s=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=s(r.map(l=>{if(l=dM(l),l in K_)return;K_[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":lM,c||(m.as="script"),m.crossOrigin="",m.href=l,u&&m.setAttribute("nonce",u),document.head.appendChild(m),c)return new Promise((p,v)=>{m.addEventListener("load",p),m.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},BA=Object.prototype.toString;function yg(e){switch(BA.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return On(e,Error)}}function Ja(e,t){return BA.call(e)===`[object ${t}]`}function gg(e){return Ja(e,"ErrorEvent")}function J_(e){return Ja(e,"DOMError")}function fM(e){return Ja(e,"DOMException")}function un(e){return Ja(e,"String")}function _g(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Eg(e){return e===null||_g(e)||typeof e!="object"&&typeof e!="function"}function Ki(e){return Ja(e,"Object")}function ol(e){return typeof Event<"u"&&On(e,Event)}function pM(e){return typeof Element<"u"&&On(e,Element)}function mM(e){return Ja(e,"RegExp")}function Xa(e){return!!(e&&e.then&&typeof e.then=="function")}function hM(e){return Ki(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function UA(e){return typeof e=="number"&&e!==e}function On(e,t){try{return e instanceof t}catch{return!1}}function FA(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Ia(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function X_(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{FA(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function yM(e,t,r=!1){return un(e)?mM(t)?t.test(e):un(t)?r?e===t:e.includes(t):!1:!1}function bo(e,t=[],r=!1){return t.some(n=>yM(e,n,r))}function gM(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!On(s.originalException,Error))return;const o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=_M(Uy(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Uy(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(On(n[i],Error)){Q_(s,o);const l=e(t,n[i]),c=u.length;Z_(l,i,c,o),u=Uy(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(On(l,Error)){Q_(s,o);const d=e(t,l),m=u.length;Z_(d,`errors[${c}]`,m,o),u=Uy(e,t,r,l,i,[d,...u],d,m)}}),u}function Q_(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Z_(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function _M(e,t){return e.map(r=>(r.value&&(r.value=Ia(r.value,t)),r))}function Ru(e){return e&&e.Math==Math?e:void 0}const at=typeof globalThis=="object"&&Ru(globalThis)||typeof window=="object"&&Ru(window)||typeof self=="object"&&Ru(self)||typeof Xc=="object"&&Ru(Xc)||(function(){return this})()||{};function vg(){return at}function ul(e,t,r){const n=r||at,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const Ra=vg(),EM=80;function Fa(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,i=[];let a=0,s=0;const o=" > ",u=o.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||EM;for(;r&&a++<n&&(l=vM(r,c),!(l==="html"||a>1&&s+i.length*u+l.length>=d));)i.push(l),s+=l.length,r=r.parentNode;return i.reverse().join(o)}catch{return"<unknown>"}}function vM(e,t){const r=e,n=[];let i,a,s,o,u;if(!r||!r.tagName)return"";if(Ra.HTMLElement&&r instanceof HTMLElement&&r.dataset&&r.dataset.sentryComponent)return r.dataset.sentryComponent;n.push(r.tagName.toLowerCase());const l=t&&t.length?t.filter(d=>r.getAttribute(d)).map(d=>[d,r.getAttribute(d)]):null;if(l&&l.length)l.forEach(d=>{n.push(`[${d[0]}="${d[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),i=r.className,i&&un(i))for(a=i.split(/\s+/),u=0;u<a.length;u++)n.push(`.${a[u]}`);const c=["aria-label","type","name","title","alt"];for(u=0;u<c.length;u++)s=c[u],o=r.getAttribute(s),o&&n.push(`[${s}="${o}"]`);return n.join("")}function bM(){try{return Ra.document.location.href}catch{return""}}function TM(e){return Ra.document&&Ra.document.querySelector?Ra.document.querySelector(e):null}function VA(e){if(!Ra.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const Qa=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,SM="Sentry Logger ",Fy=["debug","info","warn","error","log","assert","trace"],Zc={};function To(e){if(!("console"in at))return e();const t=at.console,r={},n=Object.keys(Zc);n.forEach(i=>{const a=Zc[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function IM(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Qa?Fy.forEach(r=>{t[r]=(...n)=>{e&&To(()=>{at.console[r](`${SM}[${r}]:`,...n)})}}):Fy.forEach(r=>{t[r]=()=>{}}),t}const Re=IM(),RM=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function wM(e){return e==="http"||e==="https"}function ea(e,t=!1){const{host:r,path:n,pass:i,port:a,projectId:s,protocol:o,publicKey:u}=e;return`${o}://${u}${t&&i?`:${i}`:""}@${r}${a?`:${a}`:""}/${n&&`${n}/`}${s}`}function AM(e){const t=RM.exec(e);if(!t){To(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,i="",a,s="",o]=t.slice(1);let u="",l=o;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const d=l.match(/^\d+/);d&&(l=d[0])}return HA({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function HA(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function OM(e){if(!Qa)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Re.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?wM(n)?t&&isNaN(parseInt(t,10))?(Re.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Re.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(Re.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function GA(e){const t=typeof e=="string"?AM(e):HA(e);if(!(!t||!OM(t)))return t}class sn extends Error{constructor(t,r="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function Jt(e,t,r){if(!(t in e))return;const n=e[t],i=r(n);typeof i=="function"&&zA(i,n),e[t]=i}function Ji(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{Qa&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function zA(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,Ji(e,"__sentry_original__",t)}catch{}}function bg(e){return e.__sentry_original__}function NM(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function WA(e){if(yg(e))return{message:e.message,name:e.name,stack:e.stack,...eE(e)};if(ol(e)){const t={type:e.type,target:x_(e.target),currentTarget:x_(e.currentTarget),...eE(e)};return typeof CustomEvent<"u"&&On(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function x_(e){try{return pM(e)?Fa(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function eE(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function PM(e,t=40){const r=Object.keys(WA(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return Ia(r[0],t);for(let n=r.length;n>0;n--){const i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length?i:Ia(i,t)}return""}function kt(e){return Vy(e,new Map)}function Vy(e,t){if(CM(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const i of Object.keys(e))typeof e[i]<"u"&&(n[i]=Vy(e[i],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(i=>{n.push(Vy(i,t))}),n}return e}function CM(e){if(!Ki(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const YA=50,tE=/\(error: (.*)\)/,rE=/captureMessage|captureException/;function KA(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{const i=[],a=r.split(`
3
- `);for(let s=n;s<a.length;s++){const o=a[s];if(o.length>1024)continue;const u=tE.test(o)?o.replace(tE,"$1"):o;if(!u.match(/\S*Error: /)){for(const l of t){const c=l(u);if(c){i.push(c);break}}if(i.length>=YA)break}}return jM(i)}}function MM(e){return Array.isArray(e)?KA(...e):e}function jM(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),rE.test(t[t.length-1].function||"")&&(t.pop(),rE.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,YA).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const Hl="<anonymous>";function Nn(e){try{return!e||typeof e!="function"?Hl:e.name||Hl}catch{return Hl}}const Wc={},nE={};function ta(e,t){Wc[e]=Wc[e]||[],Wc[e].push(t)}function ra(e,t){nE[e]||(t(),nE[e]=!0)}function Br(e,t){const r=e&&Wc[e];if(r)for(const n of r)try{n(t)}catch(i){Qa&&Re.error(`Error while triggering instrumentation handler.
4
- Type: ${e}
5
- Name: ${Nn(n)}
6
- Error:`,i)}}function DM(e){const t="console";ta(t,e),ra(t,$M)}function $M(){"console"in at&&Fy.forEach(function(e){e in at.console&&Jt(at.console,e,function(t){return Zc[e]=t,function(...r){Br("console",{args:r,level:e});const i=Zc[e];i&&i.apply(at.console,r)}})})}function pt(){const e=at,t=e.crypto||e.msCrypto;let r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function JA(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Un(e){const{message:t,event_id:r}=e;if(t)return t;const n=JA(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Hy(e,t,r){const n=e.exception=e.exception||{},i=n.values=n.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type="Error")}function oo(e,t){const r=JA(e);if(!r)return;const n={type:"generic",handled:!0},i=r.mechanism;if(r.mechanism={...n,...i,...t},t&&"data"in t){const a={...i&&i.data,...t.data};r.mechanism.data=a}}function iE(e){if(e&&e.__sentry_captured__)return!0;try{Ji(e,"__sentry_captured__",!0)}catch{}return!1}function Tg(e){return Array.isArray(e)?e:[e]}const va=at,LM=1e3;let aE,Gy,zy;function qM(e){ta("dom",e),ra("dom",kM)}function kM(){if(!va.document)return;const e=Br.bind(null,"dom"),t=sE(e,!0);va.document.addEventListener("click",t,!1),va.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const n=va[r]&&va[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Jt(n,"addEventListener",function(i){return function(a,s,o){if(a==="click"||a=="keypress")try{const u=this,l=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},c=l[a]=l[a]||{refCount:0};if(!c.handler){const d=sE(e);c.handler=d,i.call(this,a,d,o)}c.refCount++}catch{}return i.call(this,a,s,o)}}),Jt(n,"removeEventListener",function(i){return function(a,s,o){if(a==="click"||a=="keypress")try{const u=this,l=u.__sentry_instrumentation_handlers__||{},c=l[a];c&&(c.refCount--,c.refCount<=0&&(i.call(this,a,c.handler,o),c.handler=void 0,delete l[a]),Object.keys(l).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,a,s,o)}}))})}function BM(e){if(e.type!==Gy)return!1;try{if(!e.target||e.target._sentryId!==zy)return!1}catch{}return!0}function UM(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function sE(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=FM(r);if(UM(r.type,n))return;Ji(r,"_sentryCaptured",!0),n&&!n._sentryId&&Ji(n,"_sentryId",pt());const i=r.type==="keypress"?"input":r.type;BM(r)||(e({event:r,name:i,global:t}),Gy=r.type,zy=n?n._sentryId:void 0),clearTimeout(aE),aE=va.setTimeout(()=>{zy=void 0,Gy=void 0},LM)}}function FM(e){try{return e.target}catch{return null}}const Wy=vg();function XA(){if(!("fetch"in Wy))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Yy(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function VM(){if(typeof EdgeRuntime=="string")return!0;if(!XA())return!1;if(Yy(Wy.fetch))return!0;let e=!1;const t=Wy.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=Yy(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){Qa&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function QA(e){const t="fetch";ta(t,e),ra(t,HM)}function HM(){VM()&&Jt(at,"fetch",function(e){return function(...t){const{method:r,url:n}=GM(t),i={args:t,fetchData:{method:r,url:n},startTimestamp:Date.now()};return Br("fetch",{...i}),e.apply(at,t).then(a=>{const s={...i,endTimestamp:Date.now(),response:a};return Br("fetch",s),a},a=>{const s={...i,endTimestamp:Date.now(),error:a};throw Br("fetch",s),a})}})}function Ky(e,t){return!!e&&typeof e=="object"&&!!e[t]}function oE(e){return typeof e=="string"?e:e?Ky(e,"url")?e.url:e.toString?e.toString():"":""}function GM(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:oE(r),method:Ky(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:oE(t),method:Ky(t,"method")?String(t.method).toUpperCase():"GET"}}let wu=null;function ZA(e){const t="error";ta(t,e),ra(t,zM)}function zM(){wu=at.onerror,at.onerror=function(e,t,r,n,i){return Br("error",{column:n,error:i,line:r,msg:e,url:t}),wu&&!wu.__SENTRY_LOADER__?wu.apply(this,arguments):!1},at.onerror.__SENTRY_INSTRUMENTED__=!0}let Au=null;function xA(e){const t="unhandledrejection";ta(t,e),ra(t,WM)}function WM(){Au=at.onunhandledrejection,at.onunhandledrejection=function(e){return Br("unhandledrejection",e),Au&&!Au.__SENTRY_LOADER__?Au.apply(this,arguments):!0},at.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ou=vg();function YM(){const e=Ou.chrome,t=e&&e.app&&e.app.runtime,r="history"in Ou&&!!Ou.history.pushState&&!!Ou.history.replaceState;return!t&&r}const ls=at;let Nu;function Sg(e){const t="history";ta(t,e),ra(t,KM)}function KM(){if(!YM())return;const e=ls.onpopstate;ls.onpopstate=function(...r){const n=ls.location.href,i=Nu;if(Nu=n,Br("history",{from:i,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){const i=n.length>2?n[2]:void 0;if(i){const a=Nu,s=String(i);Nu=s,Br("history",{from:a,to:s})}return r.apply(this,n)}}Jt(ls.history,"pushState",t),Jt(ls.history,"replaceState",t)}const JM=at,ba="__sentry_xhr_v3__";function eO(e){ta("xhr",e),ra("xhr",XM)}function XM(){if(!JM.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;Jt(e,"open",function(t){return function(...r){const n=Date.now(),i=un(r[0])?r[0].toUpperCase():void 0,a=QM(r[1]);if(!i||!a)return t.apply(this,r);this[ba]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const s=()=>{const o=this[ba];if(o&&this.readyState===4){try{o.status_code=this.status}catch{}const u={args:[i,a],endTimestamp:Date.now(),startTimestamp:n,xhr:this};Br("xhr",u)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Jt(this,"onreadystatechange",function(o){return function(...u){return s(),o.apply(this,u)}}):this.addEventListener("readystatechange",s),Jt(this,"setRequestHeader",function(o){return function(...u){const[l,c]=u,d=this[ba];return d&&un(l)&&un(c)&&(d.request_headers[l.toLowerCase()]=c),o.apply(this,u)}}),t.apply(this,r)}}),Jt(e,"send",function(t){return function(...r){const n=this[ba];if(!n)return t.apply(this,r);r[0]!==void 0&&(n.body=r[0]);const i={args:[n.method,n.url],startTimestamp:Date.now(),xhr:this};return Br("xhr",i),t.apply(this,r)}})}function QM(e){if(un(e))return e;try{return e.toString()}catch{}}function ZM(){return"npm"}function xM(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let a=0;a<t.length;a++)if(t[a]===i)return!0;return t.push(i),!1}function n(i){if(e)t.delete(i);else for(let a=0;a<t.length;a++)if(t[a]===i){t.splice(a,1);break}}return[r,n]}function Bn(e,t=100,r=1/0){try{return Jy("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function tO(e,t=3,r=100*1024){const n=Bn(e,t);return nj(n)>r?tO(e,t-1,r):n}function Jy(e,t,r=1/0,n=1/0,i=xM()){const[a,s]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!UA(t))return t;const o=ej(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;const u=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(u===0)return o.replace("object ","");if(a(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const p=l.toJSON();return Jy("",p,u-1,n,i)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const m=WA(t);for(const p in m){if(!Object.prototype.hasOwnProperty.call(m,p))continue;if(d>=n){c[p]="[MaxProperties ~]";break}const v=m[p];c[p]=Jy(p,v,u-1,n,i),d++}return s(t),c}function ej(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof Xc<"u"&&t===Xc)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(FA(t))return"[VueViewModel]";if(hM(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Nn(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=tj(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function tj(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function rj(e){return~-encodeURI(e).split(/%..|./).length}function nj(e){return rj(JSON.stringify(e))}var Sn;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(Sn||(Sn={}));function Va(e){return new yr(t=>{t(e)})}function Ig(e){return new yr((t,r)=>{r(e)})}class yr{constructor(t){yr.prototype.__init.call(this),yr.prototype.__init2.call(this),yr.prototype.__init3.call(this),yr.prototype.__init4.call(this),this._state=Sn.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new yr((n,i)=>{this._handlers.push([!1,a=>{if(!t)n(a);else try{n(t(a))}catch(s){i(s)}},a=>{if(!r)i(a);else try{n(r(a))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new yr((r,n)=>{let i,a;return this.then(s=>{a=!1,i=s,t&&t()},s=>{a=!0,i=s,t&&t()}).then(()=>{if(a){n(i);return}r(i)})})}__init(){this._resolve=t=>{this._setResult(Sn.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Sn.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===Sn.PENDING){if(Xa(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Sn.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===Sn.RESOLVED&&r[1](this._value),this._state===Sn.REJECTED&&r[2](this._value),r[0]=!0)})}}}function ij(e){const t=[];function r(){return e===void 0||t.length<e}function n(s){return t.splice(t.indexOf(s),1)[0]}function i(s){if(!r())return Ig(new sn("Not adding Promise because buffer limit was reached."));const o=s();return t.indexOf(o)===-1&&t.push(o),o.then(()=>n(o)).then(null,()=>n(o).then(null,()=>{})),o}function a(s){return new yr((o,u)=>{let l=t.length;if(!l)return o(!0);const c=setTimeout(()=>{s&&s>0&&o(!1)},s);t.forEach(d=>{Va(d).then(()=>{--l||(clearTimeout(c),o(!0))},u)})})}return{$:t,add:i,drain:a}}function Wi(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}const aj=["fatal","error","warning","log","info","debug"];function sj(e){return e==="warn"?"warning":aj.includes(e)?e:"log"}const rO=1e3;function na(){return Date.now()/rO}function oj(){const{performance:e}=at;if(!e||!e.now)return na;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/rO}const ia=oj(),Ar=(()=>{const{performance:e}=at;if(!e||!e.now)return;const t=3600*1e3,r=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,a=i<t,s=e.timing&&e.timing.navigationStart,u=typeof s=="number"?Math.abs(s+r-n):t,l=u<t;return a||l?i<=u?e.timeOrigin:s:n})(),Xy="baggage",nO="sentry-",uj=/^sentry-/,cj=8192;function lj(e){if(!un(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((n,i)=>{const a=uE(i);for(const s of Object.keys(a))n[s]=a[s];return n},{});else{if(!e)return;t=uE(e)}const r=Object.entries(t).reduce((n,[i,a])=>{if(i.match(uj)){const s=i.slice(nO.length);n[s]=a}return n},{});if(Object.keys(r).length>0)return r}function iO(e){if(!e)return;const t=Object.entries(e).reduce((r,[n,i])=>(i&&(r[`${nO}${n}`]=i),r),{});return dj(t)}function uE(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(t[r]=n,t),{})}function dj(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[r,n],i)=>{const a=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,s=i===0?a:`${t},${a}`;return s.length>cj?(Qa&&Re.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}const fj=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function pj(e){if(!e)return;const t=e.match(fj);if(!t)return;let r;return t[3]==="1"?r=!0:t[3]==="0"&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}function mj(e,t){const r=pj(e),n=lj(t),{traceId:i,parentSpanId:a,parentSampled:s}=r||{};return r?{traceId:i||pt(),parentSpanId:a||pt().substring(16),spanId:pt().substring(16),sampled:s,dsc:n||{}}:{traceId:i||pt(),spanId:pt().substring(16)}}function Rg(e=pt(),t=pt().substring(16),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function aa(e,t=[]){return[e,t]}function hj(e,t){const[r,n]=e;return[r,[...n,t]]}function cE(e,t){const r=e[1];for(const n of r){const i=n[0].type;if(t(n,i))return!0}return!1}function Qy(e,t){return(t||new TextEncoder).encode(e)}function yj(e,t){const[r,n]=e;let i=JSON.stringify(r);function a(s){typeof i=="string"?i=typeof s=="string"?i+s:[Qy(i,t),s]:i.push(typeof s=="string"?Qy(s,t):s)}for(const s of n){const[o,u]=s;if(a(`
7
- ${JSON.stringify(o)}
8
- `),typeof u=="string"||u instanceof Uint8Array)a(u);else{let l;try{l=JSON.stringify(u)}catch{l=JSON.stringify(Bn(u))}a(l)}}return typeof i=="string"?i:gj(i)}function gj(e){const t=e.reduce((i,a)=>i+a.length,0),r=new Uint8Array(t);let n=0;for(const i of e)r.set(i,n),n+=i.length;return r}function _j(e,t){const r=typeof e.data=="string"?Qy(e.data,t):e.data;return[kt({type:"attachment",length:r.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),r]}const Ej={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function lE(e){return Ej[e]}function aO(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function vj(e,t,r,n){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:ea(n)},...i&&{trace:kt({...i})}}}function bj(e,t,r){const n=[{type:"client_report"},{timestamp:na(),discarded_events:e}];return aa(t?{dsn:t}:{},[n])}const Tj=60*1e3;function Sj(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?Tj:n-t}function Ij(e,t){return e[t]||e.all||0}function Rj(e,t,r=Date.now()){return Ij(e,t)>r}function wj(e,{statusCode:t,headers:r},n=Date.now()){const i={...e},a=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(a)for(const o of a.trim().split(",")){const[u,l,,,c]=o.split(":",5),d=parseInt(u,10),m=(isNaN(d)?60:d)*1e3;if(!l)i.all=n+m;else for(const p of l.split(";"))p==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(i[p]=n+m):i[p]=n+m}else s?i.all=n+Sj(s,n):t===429&&(i.all=n+60*1e3);return i}const It=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,cl="production";function wg(){return ul("globalEventProcessors",()=>[])}function Aj(e){wg().push(e)}function xc(e,t,r,n=0){return new yr((i,a)=>{const s=e[n];if(t===null||typeof s!="function")i(t);else{const o=s({...t},r);It&&s.id&&o===null&&Re.log(`Event processor "${s.id}" dropped event`),Xa(o)?o.then(u=>xc(e,u,r,n+1).then(i)).then(null,a):xc(e,o,r,n+1).then(i).then(null,a)}})}function sO(e){const t=ia(),r={sid:pt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Oj(r)};return e&&Xi(r,e),r}function Xi(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ia(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:pt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function oO(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),Xi(e,r)}function Oj(e){return kt({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const Nj=1;function Pj(e){const{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:a,status:s,tags:o,origin:u}=uo(e);return kt({data:n,op:i,parent_span_id:a,span_id:t,status:s,tags:o,trace_id:r,origin:u})}function uo(e){return Cj(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Cj(e){return typeof e.getSpanJSON=="function"}function Mj(e){const{traceFlags:t}=e.spanContext();return!!(t&Nj)}function jj(e,t,r,n,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,u={...t,event_id:t.event_id||r.event_id||pt(),timestamp:t.timestamp||na()},l=r.integrations||e.integrations.map(R=>R.name);Dj(u,e),qj(u,l),t.type===void 0&&$j(u,e.stackParser);const c=Bj(n,r.captureContext);r.mechanism&&oo(u,r.mechanism);const d=i&&i.getEventProcessors?i.getEventProcessors():[],m=Zj().getScopeData();if(a){const R=a.getScopeData();mE(m,R)}if(c){const R=c.getScopeData();mE(m,R)}const p=[...r.attachments||[],...m.attachments];p.length&&(r.attachments=p),mO(u,m);const v=[...d,...wg(),...m.eventProcessors];return xc(v,u,r).then(R=>(R&&Lj(R),typeof s=="number"&&s>0?kj(R,s,o):R))}function Dj(e,t){const{environment:r,release:n,dist:i,maxValueLength:a=250}=t;"environment"in e||(e.environment="environment"in t?r:cl),e.release===void 0&&n!==void 0&&(e.release=n),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=Ia(e.message,a));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Ia(s.value,a));const o=e.request;o&&o.url&&(o.url=Ia(o.url,a))}const dE=new WeakMap;function $j(e,t){const r=at._sentryDebugIds;if(!r)return;let n;const i=dE.get(t);i?n=i:(n=new Map,dE.set(t,n));const a=Object.keys(r).reduce((s,o)=>{let u;const l=n.get(o);l?u=l:(u=t(o),n.set(o,u));for(let c=u.length-1;c>=0;c--){const d=u[c];if(d.filename){s[d.filename]=r[o];break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=a[o.filename])})})}catch{}}function Lj(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.keys(t).forEach(n=>{r.push({type:"sourcemap",code_file:n,debug_id:t[n]})})}function qj(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function kj(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Bn(i.data,t,r)}}))},...e.user&&{user:Bn(e.user,t,r)},...e.contexts&&{contexts:Bn(e.contexts,t,r)},...e.extra&&{extra:Bn(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=Bn(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(i=>{const a=uo(i).data;return a&&(i.data=Bn(a,t,r)),i})),n}function Bj(e,t){if(!t)return e;const r=e?e.clone():new co;return r.update(t),r}function Uj(e){if(e)return Fj(e)?{captureContext:e}:Hj(e)?{captureContext:e}:e}function Fj(e){return e instanceof co||typeof e=="function"}const Vj=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Hj(e){return Object.keys(e).some(t=>Vj.includes(t))}function Ag(e,t){return Ur().captureException(e,Uj(t))}function uO(e,t){return Ur().captureEvent(e,t)}function Qi(e,t){Ur().addBreadcrumb(e,t)}function Gj(e){Ur().setUser(e)}function cO(...e){const t=Ur();if(e.length===2){const[r,n]=e;return r?t.withScope(()=>(t.getStackTop().scope=r,n(r))):t.withScope(n)}return t.withScope(e[0])}function cr(){return Ur().getClient()}function So(){return Ur().getScope()}function fE(e){const t=cr(),r=dl(),n=So(),{release:i,environment:a=cl}=t&&t.getOptions()||{},{userAgent:s}=at.navigator||{},o=sO({release:i,environment:a,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),u=r.getSession();return u&&u.status==="ok"&&Xi(u,{status:"exited"}),lO(),r.setSession(o),n.setSession(o),o}function lO(){const e=dl(),t=So(),r=t.getSession()||e.getSession();r&&oO(r),dO(),e.setSession(),t.setSession()}function dO(){const e=dl(),t=So(),r=cr(),n=t.getSession()||e.getSession();n&&r&&r.captureSession&&r.captureSession(n)}function pE(e=!1){if(e){lO();return}dO()}function fO(e){return e.transaction}function pO(e,t,r){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=r&&r.getUser()||{},s=kt({environment:n.environment||cl,release:n.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function zj(e){const t=cr();if(!t)return{};const r=pO(uo(e).trace_id||"",t,So()),n=fO(e);if(!n)return r;const i=n&&n._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:a,source:s}=n.metadata;a!=null&&(r.sample_rate=`${a}`);const o=uo(n);return s&&s!=="url"&&(r.transaction=o.description),r.sampled=String(Mj(n)),t.emit&&t.emit("createDsc",r),r}function mO(e,t){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;Wj(e,t),n&&Jj(e,n),Xj(e,r),Yj(e,i),Kj(e,a)}function mE(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,sdkProcessingMetadata:o,breadcrumbs:u,fingerprint:l,eventProcessors:c,attachments:d,propagationContext:m,transactionName:p,span:v}=t;ds(e,"extra",r),ds(e,"tags",n),ds(e,"user",i),ds(e,"contexts",a),ds(e,"sdkProcessingMetadata",o),s&&(e.level=s),p&&(e.transactionName=p),v&&(e.span=v),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...m}}function ds(e,t,r){if(r&&Object.keys(r).length){e[t]={...e[t]};for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[t][n]=r[n])}}function Wj(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,transactionName:o}=t,u=kt(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=kt(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const c=kt(i);c&&Object.keys(c).length&&(e.user={...c,...e.user});const d=kt(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),o&&(e.transaction=o)}function Yj(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function Kj(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Jj(e,t){e.contexts={trace:Pj(t),...e.contexts};const r=fO(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:zj(t),...e.sdkProcessingMetadata};const n=uo(r).description;n&&(e.tags={transaction:n,...e.tags})}}function Xj(e,t){e.fingerprint=e.fingerprint?Tg(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const Qj=100;let Gl,co=class Yc{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=hE()}static clone(t){return t?t.clone():new Yc}clone(){const t=new Yc;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Xi(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t;if(r instanceof Yc){const n=r.getScopeData();this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&Object.keys(n.user).length&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint.length&&(this._fingerprint=n.fingerprint),r.getRequestSession()&&(this._requestSession=r.getRequestSession()),n.propagationContext&&(this._propagationContext=n.propagationContext)}else if(Ki(r)){const n=t;this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession),n.propagationContext&&(this._propagationContext=n.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=hE(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:Qj;if(n<=0)return this;const i={timestamp:na(),...t},a=this._breadcrumbs;return a.push(i),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:r,_contexts:n,_tags:i,_extra:a,_user:s,_level:o,_fingerprint:u,_eventProcessors:l,_propagationContext:c,_sdkProcessingMetadata:d,_transactionName:m,_span:p}=this;return{breadcrumbs:t,attachments:r,contexts:n,tags:i,extra:a,user:s,level:o,fingerprint:u||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:d,transactionName:m,span:p}}applyToEvent(t,r={},n=[]){mO(t,this.getScopeData());const i=[...n,...wg(),...this._eventProcessors];return xc(i,t,r)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:pt();if(!this._client)return Re.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...r,event_id:n},this),n}captureMessage(t,r,n){const i=n&&n.event_id?n.event_id:pt();if(!this._client)return Re.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i},this),i}captureEvent(t,r){const n=r&&r.event_id?r.event_id:pt();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(Re.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function Zj(){return Gl||(Gl=new co),Gl}function hE(){return{traceId:pt(),spanId:pt().substring(16)}}const Zy="7.120.3",hO=parseFloat(Zy),xj=100;let yO=class{constructor(t,r,n,i=hO){this._version=i;let a;r?a=r:(a=new co,a.setClient(t));let s;n?s=n:(s=new co,s.setClient(t)),this._stack=[{scope:a}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version<t}bindClient(t){const r=this.getStackTop();r.client=t,r.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const r=this.pushScope();let n;try{n=t(r)}catch(i){throw this.popScope(),i}return Xa(n)?n.then(i=>(this.popScope(),i),i=>{throw this.popScope(),i}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,r){const n=this._lastEventId=r&&r.event_id?r.event_id:pt(),i=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:i,...r,event_id:n}),n}captureMessage(t,r,n){const i=this._lastEventId=n&&n.event_id?n.event_id:pt(),a=new Error(t);return this.getScope().captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i}),i}captureEvent(t,r){const n=r&&r.event_id?r.event_id:pt();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...r,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,r){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=xj}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const u={timestamp:na(),...t},l=a?To(()=>a(u,r)):u;l!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",l,r),n.addBreadcrumb(l,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,r){this.getScope().setTag(t,r),this.getIsolationScope().setTag(t,r)}setExtra(t,r){this.getScope().setExtra(t,r),this.getIsolationScope().setExtra(t,r)}setContext(t,r){this.getScope().setContext(t,r),this.getIsolationScope().setContext(t,r)}configureScope(t){const{scope:r,client:n}=this.getStackTop();n&&t(r)}run(t){const r=yE(this);try{t(this)}finally{yE(r)}}getIntegration(t){const r=this.getClient();if(!r)return null;try{return r.getIntegration(t)}catch{return It&&Re.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,r){const n=this._callExtensionMethod("startTransaction",t,r);return It&&!n&&(this.getClient()?Re.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
9
- Sentry.addTracingExtensions();
10
- Sentry.init({...});
11
- `):Re.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const r=this.getStackTop().scope,n=r.getSession();n&&oO(n),this._sendSessionUpdate(),r.setSession()}startSession(t){const{scope:r,client:n}=this.getStackTop(),{release:i,environment:a=cl}=n&&n.getOptions()||{},{userAgent:s}=at.navigator||{},o=sO({release:i,environment:a,user:r.getUser(),...s&&{userAgent:s},...t}),u=r.getSession&&r.getSession();return u&&u.status==="ok"&&Xi(u,{status:"exited"}),this.endSession(),r.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),r=t&&t.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:r}=this.getStackTop(),n=t.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_callExtensionMethod(t,...r){const i=ll().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[t]=="function")return i.extensions[t].apply(this,r);It&&Re.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function ll(){return at.__SENTRY__=at.__SENTRY__||{extensions:{},hub:void 0},at}function yE(e){const t=ll(),r=xy(t);return gO(t,e),r}function Ur(){const e=ll();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return eD(e)}function dl(){return Ur().getIsolationScope()}function eD(e=ll()){return(!tD(e)||xy(e).isOlderThan(hO))&&gO(e,new yO),xy(e)}function tD(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function xy(e){return ul("hub",()=>new yO,e)}function gO(e,t){if(!e)return!1;const r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}function rD(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function nD(e,t,r,n){const i=aO(r),a={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!n&&t&&{dsn:ea(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return aa(a,[s])}function iD(e,t,r,n){const i=aO(r),a=e.type&&e.type!=="replay_event"?e.type:"event";rD(e,r&&r.sdk);const s=vj(e,i,n,t);return delete e.sdkProcessingMetadata,aa(s,[[{type:a},e]])}const aD="7";function _O(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function sD(e){return`${_O(e)}${e.projectId}/envelope/`}function oD(e,t){return NM({sentry_key:e.publicKey,sentry_version:aD,...t&&{sentry_client:`${t.name}/${t.version}`}})}function uD(e,t={}){const r=typeof t=="string"?t:t.tunnel,n=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return r||`${sD(e)}?${oD(e,n)}`}function cD(e,t){const r=GA(e);if(!r)return"";const n=`${_O(r)}embed/error-page/`;let i=`dsn=${ea(r)}`;for(const a in t)if(a!=="dsn"&&a!=="onClose")if(a==="user"){const s=t.user;if(!s)continue;s.name&&(i+=`&name=${encodeURIComponent(s.name)}`),s.email&&(i+=`&email=${encodeURIComponent(s.email)}`)}else i+=`&${encodeURIComponent(a)}=${encodeURIComponent(t[a])}`;return`${n}?${i}`}const gE=[];function lD(e){const t={};return e.forEach(r=>{const{name:n}=r,i=t[n];i&&!i.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.keys(t).map(r=>t[r])}function dD(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let n;Array.isArray(r)?n=[...t,...r]:typeof r=="function"?n=Tg(r(t)):n=t;const i=lD(n),a=pD(i,s=>s.name==="Debug");if(a!==-1){const[s]=i.splice(a,1);i.push(s)}return i}function fD(e,t){const r={};return t.forEach(n=>{n&&EO(e,n,r)}),r}function _E(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function EO(e,t,r){if(r[t.name]){It&&Re.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,gE.indexOf(t.name)===-1&&(t.setupOnce(Aj,Ur),gE.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,a)=>n(i,a,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const n=t.processEvent.bind(t),i=Object.assign((a,s)=>n(a,s,e),{id:t.name});e.addEventProcessor(i)}It&&Re.log(`Integration installed: ${t.name}`)}function pD(e,t){for(let r=0;r<e.length;r++)if(t(e[r])===!0)return r;return-1}function Qn(e,t){return Object.assign(function(...n){return t(...n)},{id:e})}function mD(e){let t="";for(const r of e){const n=Object.entries(r.tags),i=n.length>0?`|#${n.map(([a,s])=>`${a}:${s}`).join(",")}`:"";t+=`${r.name}@${r.unit}:${r.metric}|${r.metricType}${i}|T${r.timestamp}
12
- `}return t}function hD(e,t,r,n){const i={sent_at:new Date().toISOString()};r&&r.sdk&&(i.sdk={name:r.sdk.name,version:r.sdk.version}),n&&t&&(i.dsn=ea(t));const a=yD(e);return aa(i,[a])}function yD(e){const t=mD(e);return[{type:"statsd",length:t.length},t]}const EE="Not capturing exception because it's already been captured.";class gD{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=GA(t.dsn):It&&Re.warn("No DSN provided, client will not send events."),this._dsn){const r=uD(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}}captureException(t,r,n){if(iE(t)){It&&Re.log(EE);return}let i=r&&r.event_id;return this._process(this.eventFromException(t,r).then(a=>this._captureEvent(a,r,n)).then(a=>{i=a})),i}captureMessage(t,r,n,i){let a=n&&n.event_id;const s=_g(t)?t:String(t),o=Eg(t)?this.eventFromMessage(s,r,n):this.eventFromException(t,n);return this._process(o.then(u=>this._captureEvent(u,n,i)).then(u=>{a=u})),a}captureEvent(t,r,n){if(r&&r.originalException&&iE(r.originalException)){It&&Re.log(EE);return}let i=r&&r.event_id;const s=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,r,s||n).then(o=>{i=o})),i}captureSession(t){typeof t.release!="string"?It&&Re.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Xi(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(n=>r.flush(t).then(i=>n&&i))):Va(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return It&&Re.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const r=this._integrations[t.name];EO(this,t,this._integrations),r||_E(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=iD(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of r.attachments||[])n=hj(n,_j(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(n);i&&i.then(a=>this.emit("afterSendEvent",t,a),null)}sendSession(t){const r=nD(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}recordDroppedEvent(t,r,n){if(this._options.sendClientReports){const i=typeof n=="number"?n:1,a=`${t}:${r}`;It&&Re.log(`Recording outcome: "${a}"${i>1?` (${i} times)`:""}`),this._outcomes[a]=(this._outcomes[a]||0)+i}}captureAggregateMetrics(t){It&&Re.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const r=hD(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}on(t,r){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(r)}emit(t,...r){this._hooks[t]&&this._hooks[t].forEach(n=>n(...r))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=fD(this,t),_E(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,r){let n=!1,i=!1;const a=r.exception&&r.exception.values;if(a){i=!0;for(const u of a){const l=u.mechanism;if(l&&l.handled===!1){n=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Xi(t,{...n&&{status:"crashed"},errors:t.errors||Number(i||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new yr(r=>{let n=0;const i=1,a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),r(!0)):(n+=i,t&&n>=t&&(clearInterval(a),r(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n,i=dl()){const a=this.getOptions(),s=Object.keys(this._integrations);return!r.integrations&&s.length>0&&(r.integrations=s),this.emit("preprocessEvent",t,r),jj(a,t,r,n,this,i).then(o=>{if(o===null)return o;const u={...i.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(o.contexts&&o.contexts.trace)&&u){const{traceId:c,spanId:d,parentSpanId:m,dsc:p}=u;o.contexts={trace:{trace_id:c,span_id:d,parent_span_id:m},...o.contexts};const v=p||pO(c,this,n);o.sdkProcessingMetadata={dynamicSamplingContext:v,...o.sdkProcessingMetadata}}return o})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(i=>i.event_id,i=>{if(It){const a=i;a.logLevel==="log"?Re.log(a.message):Re.warn(a)}})}_processEvent(t,r,n){const i=this.getOptions(),{sampleRate:a}=i,s=bO(t),o=vO(t),u=t.type||"error",l=`before send for type \`${u}\``;if(o&&typeof a=="number"&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",t),Ig(new sn(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const c=u==="replay_event"?"replay":u,m=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,m).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",c,t),new sn("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return p;const w=ED(i,p,r);return _D(w,l)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",c,t),s){const O=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",O)}throw new sn(`${l} returned \`null\`, will not send event.`,"log")}const v=n&&n.getSession();if(!s&&v&&this._updateSessionFromEvent(v,p),s){const R=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,O=p.spans?p.spans.length:0,f=R-O;f>0&&this.recordDroppedEvent("before_send","span",f)}const w=p.transaction_info;if(s&&w&&p.transaction!==t.transaction){const R="custom";p.transaction_info={...w,source:R}}return this.sendEvent(p,r),p}).then(null,p=>{throw p instanceof sn?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new sn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
13
- Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,r=>{It&&Re.error("Error while sending event:",r)});It&&Re.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(r=>{const[n,i]=r.split(":");return{reason:n,category:i,quantity:t[r]}})}}function _D(e,t){const r=`${t} must return \`null\` or a valid event.`;if(Xa(e))return e.then(n=>{if(!Ki(n)&&n!==null)throw new sn(r);return n},n=>{throw new sn(`${t} rejected with ${n}`)});if(!Ki(e)&&e!==null)throw new sn(r);return e}function ED(e,t,r){const{beforeSend:n,beforeSendTransaction:i}=e;if(vO(t)&&n)return n(t,r);if(bO(t)&&i){if(t.spans){const a=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(t,r)}return t}function vO(e){return e.type===void 0}function bO(e){return e.type==="transaction"}function vD(e,t){t.debug===!0&&(It?Re.enable():To(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),So().update(t.initialScope);const n=new e(t);bD(n),TD(n)}function bD(e){const r=Ur().getStackTop();r.client=e,r.scope.setClient(e)}function TD(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const SD=30;function TO(e,t,r=ij(e.bufferSize||SD)){let n={};const i=s=>r.drain(s);function a(s){const o=[];if(cE(s,(d,m)=>{const p=lE(m);if(Rj(n,p)){const v=vE(d,m);e.recordDroppedEvent("ratelimit_backoff",p,v)}else o.push(d)}),o.length===0)return Va();const u=aa(s[0],o),l=d=>{cE(u,(m,p)=>{const v=vE(m,p);e.recordDroppedEvent(d,lE(p),v)})},c=()=>t({body:yj(u,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&It&&Re.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=wj(n,d),d),d=>{throw l("network_error"),d});return r.add(c).then(d=>d,d=>{if(d instanceof sn)return It&&Re.error("Skipped sending event because buffer is full."),l("queue_overflow"),Va();throw d})}return a.__sentry__baseTransport__=!0,{send:a,flush:i}}function vE(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function SO(e,t,r=[t],n="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:r.map(a=>({name:`${n}:@sentry/${a}`,version:Zy})),version:Zy}),e._metadata=i}const ID=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],RD=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],IO="InboundFilters",wD=((e={})=>({name:IO,setupOnce(){},processEvent(t,r,n){const i=n.getOptions(),a=AD(e,i);return OD(t,a)?null:t}})),RO=wD;Qn(IO,RO);function AD(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ID],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:RD],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function OD(e,t){return t.ignoreInternal&&DD(e)?(It&&Re.warn(`Event dropped due to being internal Sentry Error.
14
- Event: ${Un(e)}`),!0):ND(e,t.ignoreErrors)?(It&&Re.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
15
- Event: ${Un(e)}`),!0):PD(e,t.ignoreTransactions)?(It&&Re.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
16
- Event: ${Un(e)}`),!0):CD(e,t.denyUrls)?(It&&Re.warn(`Event dropped due to being matched by \`denyUrls\` option.
17
- Event: ${Un(e)}.
18
- Url: ${el(e)}`),!0):MD(e,t.allowUrls)?!1:(It&&Re.warn(`Event dropped due to not being matched by \`allowUrls\` option.
19
- Event: ${Un(e)}.
20
- Url: ${el(e)}`),!0)}function ND(e,t){return e.type||!t||!t.length?!1:jD(e).some(r=>bo(r,t))}function PD(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?bo(r,t):!1}function CD(e,t){if(!t||!t.length)return!1;const r=el(e);return r?bo(r,t):!1}function MD(e,t){if(!t||!t.length)return!0;const r=el(e);return r?bo(r,t):!0}function jD(e){const t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),It&&t.length===0&&Re.error(`Could not extract message for event ${Un(e)}`),t}function DD(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function $D(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function el(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?$D(t):null}catch{return It&&Re.error(`Cannot extract url for event ${Un(e)}`),null}}let bE;const wO="FunctionToString",TE=new WeakMap,LD=(()=>({name:wO,setupOnce(){bE=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=bg(this),r=TE.has(cr())&&t!==void 0?t:this;return bE.apply(r,e)}}catch{}},setup(e){TE.set(e,!0)}})),AO=LD;Qn(wO,AO);const dt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,OO="production";function qD(){return ul("globalEventProcessors",()=>[])}function eg(e,t,r,n=0){return new yr((i,a)=>{const s=e[n];if(t===null||typeof s!="function")i(t);else{const o=s({...t},r);dt&&s.id&&o===null&&Re.log(`Event processor "${s.id}" dropped event`),Xa(o)?o.then(u=>eg(e,u,r,n+1).then(i)).then(null,a):eg(e,o,r,n+1).then(i).then(null,a)}})}function kD(e){const t=ia(),r={sid:pt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>UD(r)};return e&&fl(r,e),r}function fl(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ia(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:pt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function BD(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),fl(e,r)}function UD(e){return kt({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const FD=0,NO=1;function Og(e){const{spanId:t,traceId:r}=e.spanContext(),{data:n,op:i,parent_span_id:a,status:s,tags:o,origin:u}=gr(e);return kt({data:n,op:i,parent_span_id:a,span_id:t,status:s,tags:o,trace_id:r,origin:u})}function pl(e){const{traceId:t,spanId:r}=e.spanContext(),n=Ng(e);return Rg(t,r,n)}function ml(e){return typeof e=="number"?SE(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?SE(e.getTime()):ia()}function SE(e){return e>9999999999?e/1e3:e}function gr(e){return VD(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function VD(e){return typeof e.getSpanJSON=="function"}function Ng(e){const{traceFlags:t}=e.spanContext();return!!(t&NO)}function Za(){return es().getClient()}function xa(){return es().getScope()}function tl(e){return e.transaction}function Pg(e,t,r){const n=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:a}=r&&r.getUser()||{},s=kt({environment:n.environment||OO,release:n.release,user_segment:a,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function Ha(e){const t=Za();if(!t)return{};const r=Pg(gr(e).trace_id||"",t,xa()),n=tl(e);if(!n)return r;const i=n&&n._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:a,source:s}=n.metadata;a!=null&&(r.sample_rate=`${a}`);const o=gr(n);return s&&s!=="url"&&(r.transaction=o.description),r.sampled=String(Ng(n)),t.emit&&t.emit("createDsc",r),r}function HD(e,t){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;GD(e,t),n&&YD(e,n),KD(e,r),zD(e,i),WD(e,a)}function GD(e,t){const{extra:r,tags:n,user:i,contexts:a,level:s,transactionName:o}=t,u=kt(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=kt(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const c=kt(i);c&&Object.keys(c).length&&(e.user={...c,...e.user});const d=kt(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),o&&(e.transaction=o)}function zD(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function WD(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function YD(e,t){e.contexts={trace:Og(t),...e.contexts};const r=tl(t);if(r){e.sdkProcessingMetadata={dynamicSamplingContext:Ha(t),...e.sdkProcessingMetadata};const n=gr(r).description;n&&(e.tags={transaction:n,...e.tags})}}function KD(e,t){e.fingerprint=e.fingerprint?Tg(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const JD=100;class wa{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=IE()}static clone(t){return t?t.clone():new wa}clone(){const t=new wa;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&fl(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t;if(r instanceof wa){const n=r.getScopeData();this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&Object.keys(n.user).length&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint.length&&(this._fingerprint=n.fingerprint),r.getRequestSession()&&(this._requestSession=r.getRequestSession()),n.propagationContext&&(this._propagationContext=n.propagationContext)}else if(Ki(r)){const n=t;this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession),n.propagationContext&&(this._propagationContext=n.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=IE(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:JD;if(n<=0)return this;const i={timestamp:na(),...t},a=this._breadcrumbs;return a.push(i),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:r,_contexts:n,_tags:i,_extra:a,_user:s,_level:o,_fingerprint:u,_eventProcessors:l,_propagationContext:c,_sdkProcessingMetadata:d,_transactionName:m,_span:p}=this;return{breadcrumbs:t,attachments:r,contexts:n,tags:i,extra:a,user:s,level:o,fingerprint:u||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:d,transactionName:m,span:p}}applyToEvent(t,r={},n=[]){HD(t,this.getScopeData());const i=[...n,...qD(),...this._eventProcessors];return eg(i,t,r)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:pt();if(!this._client)return Re.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...r,event_id:n},this),n}captureMessage(t,r,n){const i=n&&n.event_id?n.event_id:pt();if(!this._client)return Re.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i},this),i}captureEvent(t,r){const n=r&&r.event_id?r.event_id:pt();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(Re.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function IE(){return{traceId:pt(),spanId:pt().substring(16)}}const XD="7.120.3",PO=parseFloat(XD),QD=100;class CO{constructor(t,r,n,i=PO){this._version=i;let a;r?a=r:(a=new wa,a.setClient(t));let s;n?s=n:(s=new wa,s.setClient(t)),this._stack=[{scope:a}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version<t}bindClient(t){const r=this.getStackTop();r.client=t,r.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const r=this.pushScope();let n;try{n=t(r)}catch(i){throw this.popScope(),i}return Xa(n)?n.then(i=>(this.popScope(),i),i=>{throw this.popScope(),i}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,r){const n=this._lastEventId=r&&r.event_id?r.event_id:pt(),i=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:i,...r,event_id:n}),n}captureMessage(t,r,n){const i=this._lastEventId=n&&n.event_id?n.event_id:pt(),a=new Error(t);return this.getScope().captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i}),i}captureEvent(t,r){const n=r&&r.event_id?r.event_id:pt();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...r,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,r){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=QD}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const u={timestamp:na(),...t},l=a?To(()=>a(u,r)):u;l!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",l,r),n.addBreadcrumb(l,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,r){this.getScope().setTag(t,r),this.getIsolationScope().setTag(t,r)}setExtra(t,r){this.getScope().setExtra(t,r),this.getIsolationScope().setExtra(t,r)}setContext(t,r){this.getScope().setContext(t,r),this.getIsolationScope().setContext(t,r)}configureScope(t){const{scope:r,client:n}=this.getStackTop();n&&t(r)}run(t){const r=RE(this);try{t(this)}finally{RE(r)}}getIntegration(t){const r=this.getClient();if(!r)return null;try{return r.getIntegration(t)}catch{return dt&&Re.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,r){const n=this._callExtensionMethod("startTransaction",t,r);return dt&&!n&&(this.getClient()?Re.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
21
- Sentry.addTracingExtensions();
22
- Sentry.init({...});
23
- `):Re.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const r=this.getStackTop().scope,n=r.getSession();n&&BD(n),this._sendSessionUpdate(),r.setSession()}startSession(t){const{scope:r,client:n}=this.getStackTop(),{release:i,environment:a=OO}=n&&n.getOptions()||{},{userAgent:s}=at.navigator||{},o=kD({release:i,environment:a,user:r.getUser(),...s&&{userAgent:s},...t}),u=r.getSession&&r.getSession();return u&&u.status==="ok"&&fl(u,{status:"exited"}),this.endSession(),r.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),r=t&&t.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:r}=this.getStackTop(),n=t.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_callExtensionMethod(t,...r){const i=Io().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[t]=="function")return i.extensions[t].apply(this,r);dt&&Re.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Io(){return at.__SENTRY__=at.__SENTRY__||{extensions:{},hub:void 0},at}function RE(e){const t=Io(),r=tg(t);return MO(t,e),r}function es(){const e=Io();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return ZD(e)}function Cg(){return es().getIsolationScope()}function ZD(e=Io()){return(!xD(e)||tg(e).isOlderThan(PO))&&MO(e,new CO),tg(e)}function xD(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function tg(e){return ul("hub",()=>new CO,e)}function MO(e,t){if(!e)return!1;const r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}function Zi(e){return es().getScope().getTransaction()}let wE=!1;function e$(){wE||(wE=!0,ZA(rg),xA(rg))}function rg(){const e=Zi();if(e){const t="internal_error";dt&&Re.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}rg.tag="sentry_tracingErrorCallback";var AE;(function(e){e.Ok="ok";const r="deadline_exceeded";e.DeadlineExceeded=r;const n="unauthenticated";e.Unauthenticated=n;const i="permission_denied";e.PermissionDenied=i;const a="not_found";e.NotFound=a;const s="resource_exhausted";e.ResourceExhausted=s;const o="invalid_argument";e.InvalidArgument=o;const u="unimplemented";e.Unimplemented=u;const l="unavailable";e.Unavailable=l;const c="internal_error";e.InternalError=c;const d="unknown_error";e.UnknownError=d;const m="cancelled";e.Cancelled=m;const p="already_exists";e.AlreadyExists=p;const v="failed_precondition";e.FailedPrecondition=v;const w="aborted";e.Aborted=w;const R="out_of_range";e.OutOfRange=R;const O="data_loss";e.DataLoss=O})(AE||(AE={}));function t$(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function Mg(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const r=t$(t);r!=="unknown_error"&&e.setStatus(r)}function ts(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Za(),r=e||t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}function jO(e){if(!ts())return;const t=i$(e),r=es(),n=e.scope?e.scope.getSpan():r$();if(e.onlyIfParent&&!n)return;const s=(e.scope||xa()).clone();return n$(r,{parentSpan:n,spanContext:t,forceTransaction:e.forceTransaction,scope:s})}function r$(){return xa().getSpan()}function n$(e,{parentSpan:t,spanContext:r,forceTransaction:n,scope:i}){if(!ts())return;const a=Cg();let s;if(t&&!n)s=t.startChild(r);else if(t){const o=Ha(t),{traceId:u,spanId:l}=t.spanContext(),c=Ng(t);s=e.startTransaction({traceId:u,parentSpanId:l,parentSampled:c,...r,metadata:{dynamicSamplingContext:o,...r.metadata}})}else{const{traceId:o,dsc:u,parentSpanId:l,sampled:c}={...a.getPropagationContext(),...i.getPropagationContext()};s=e.startTransaction({traceId:o,parentSpanId:l,parentSampled:c,...r,metadata:{dynamicSamplingContext:u,...r.metadata}})}return i.setSpan(s),a$(s,i,a),s}function i$(e){if(e.startTime){const t={...e};return t.startTimestamp=ml(e.startTime),delete t.startTime,t}return e}const DO="_sentryScope",$O="_sentryIsolationScope";function a$(e,t,r){e&&(Ji(e,$O,r),Ji(e,DO,t))}function s$(e){return{scope:e[DO],isolationScope:e[$O]}}const Aa="sentry.source",Ta="sentry.sample_rate",Pu="sentry.op",Sa="sentry.origin",o$="profile_id";class LO{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class hl{constructor(t={}){this._traceId=t.traceId||pt(),this._spanId=t.spanId||pt().substring(16),this._startTime=t.startTimestamp||ia(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[Sa]:t.origin||"manual",[Pu]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[Pu]}set op(t){this.setAttribute(Pu,t)}get origin(){return this._attributes[Sa]}set origin(t){this.setAttribute(Sa,t)}spanContext(){const{_spanId:t,_traceId:r,_sampled:n}=this;return{spanId:t,traceId:r,traceFlags:n?NO:FD}}startChild(t){const r=new hl({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r);const n=tl(this);if(r.transaction=n,dt&&n){const i=t&&t.op||"< unknown op >",a=gr(r).description||"< unknown name >",s=n.spanContext().spanId,o=`[Tracing] Starting '${i}' span on transaction '${a}' (${s}).`;Re.log(o),this._logMessage=o}return r}setTag(t,r){return this.tags={...this.tags,[t]:r},this}setData(t,r){return this.data={...this.data,[t]:r},this}setAttribute(t,r){r===void 0?delete this._attributes[t]:this._attributes[t]=r}setAttributes(t){Object.keys(t).forEach(r=>this.setAttribute(r,t[r]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return Mg(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;const r=tl(this);if(dt&&r&&r.spanContext().spanId!==this._spanId){const n=this._logMessage;n&&Re.log(n.replace("Starting","Finishing"))}this._endTime=ml(t)}toTraceparent(){return pl(this)}toContext(){return kt({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return Og(this)}getSpanJSON(){return kt({data:this._getData(),description:this._name,op:this._attributes[Pu],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Sa],_metrics_summary:void 0,profile_id:this._attributes[o$],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:r}=this,n=Object.keys(t).length>0,i=Object.keys(r).length>0;if(!(!n&&!i))return n&&i?{...t,...r}:n?t:r}}class qO extends hl{constructor(t,r){super(t),this._contexts={},this._hub=r||es(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;const n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[Aa]&&{source:this._attributes[Aa]},...this._attributes[Ta]&&{sampleRate:this._attributes[Ta]}}}set metadata(t){this._metadata=t}setName(t,r="custom"){this._name=t,this.setAttribute(Aa,r)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new LO(t)),this.spanRecorder.add(this)}setContext(t,r){r===null?delete this._contexts[t]:this._contexts[t]=r}setMeasurement(t,r,n=""){this._measurements[t]={value:r,unit:n}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){const r=ml(t),n=this._finishTransaction(r);if(n)return this._hub.captureEvent(n)}toContext(){const t=super.toContext();return kt({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Ha(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(dt&&Re.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);const r=this._hub.getClient();if(r&&r.emit&&r.emit("finishTransaction",this),this._sampled!==!0){dt&&Re.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),r&&r.recordDroppedEvent("sample_rate","transaction");return}const n=this.spanRecorder?this.spanRecorder.spans.filter(c=>c!==this&&gr(c).timestamp):[];if(this._trimEnd&&n.length>0){const c=n.map(d=>gr(d).timestamp).filter(Boolean);this._endTime=c.reduce((d,m)=>d>m?d:m)}const{scope:i,isolationScope:a}=s$(this),{metadata:s}=this,{source:o}=s,u={contexts:{...this._contexts,trace:Og(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...s,capturedSpanScope:i,capturedSpanIsolationScope:a,...kt({dynamicSamplingContext:Ha(this)})},_metrics_summary:void 0,...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(dt&&Re.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),u.measurements=this._measurements),dt&&Re.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),u}}const Kc={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},u$="finishReason",ha=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class c$ extends LO{constructor(t,r,n,i){super(i),this._pushActivity=t,this._popActivity=r,this.transactionSpanId=n}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const r=t.end;t.end=(...n)=>(this._popActivity(t.spanContext().spanId),r.apply(t,n)),gr(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class l$ extends qO{constructor(t,r,n=Kc.idleTimeout,i=Kc.finalTimeout,a=Kc.heartbeatInterval,s=!1,o=!1){super(t,r),this._idleHub=r,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=a,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=ha[4],this._autoFinishAllowed=!o,s&&(dt&&Re.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),r.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=ha[3],this.end())},this._finalTimeout)}end(t){const r=ml(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(u$,this._finishReason),this.spanRecorder){dt&&Re.log("[Tracing] finishing IdleTransaction",new Date(r*1e3).toISOString(),this.op);for(const n of this._beforeFinishCallbacks)n(this,r);this.spanRecorder.spans=this.spanRecorder.spans.filter(n=>{if(n.spanContext().spanId===this.spanContext().spanId)return!0;gr(n).timestamp||(n.setStatus("cancelled"),n.end(r),dt&&Re.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(n,void 0,2)));const{start_timestamp:i,timestamp:a}=gr(n),s=i&&i<r,o=(this._finalTimeout+this._idleTimeout)/1e3,u=a&&i&&a-i<o;if(dt){const l=JSON.stringify(n,void 0,2);s?u||Re.log("[Tracing] discarding Span since it finished after Transaction final timeout",l):Re.log("[Tracing] discarding Span since it happened after Transaction was finished",l)}return s&&u}),dt&&Re.log("[Tracing] flushing IdleTransaction")}else dt&&Re.log("[Tracing] No active IdleTransaction");if(this._onScope){const n=this._idleHub.getScope();n.getTransaction()===this&&n.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const r=i=>{this._finished||this._pushActivity(i)},n=i=>{this._finished||this._popActivity(i)};this.spanRecorder=new c$(r,n,this.spanContext().spanId,t),dt&&Re.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:r}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=r===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=ha[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(dt&&Re.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=ha[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),dt&&Re.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,dt&&Re.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(dt&&Re.log(`[Tracing] popActivity ${t}`),delete this.activities[t],dt&&Re.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const r=ia();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=ha[5],this.end(r)):this._restartIdleTimeout(r+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(dt&&Re.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=ha[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){dt&&Re.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function kO(e,t,r){if(!ts(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(Ta,Number(e.sampled)),e;let n;return typeof t.tracesSampler=="function"?(n=t.tracesSampler(r),e.setAttribute(Ta,Number(n))):r.parentSampled!==void 0?n=r.parentSampled:typeof t.tracesSampleRate<"u"?(n=t.tracesSampleRate,e.setAttribute(Ta,Number(n))):(n=1,e.setAttribute(Ta,n)),BO(n)?n?(e.sampled=Math.random()<n,e.sampled?(dt&&Re.log(`[Tracing] starting ${e.op} transaction - ${gr(e).description}`),e):(dt&&Re.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),e)):(dt&&Re.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(dt&&Re.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function BO(e){return UA(e)||!(typeof e=="number"||typeof e=="boolean")?(dt&&Re.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(dt&&Re.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function d$(){const t=this.getScope().getSpan();return t?{"sentry-trace":pl(t)}:{}}function f$(e,t){const r=this.getClient(),n=r&&r.getOptions()||{},i=n.instrumenter||"sentry",a=e.instrumenter||"sentry";i!==a&&(dt&&Re.error(`A transaction was started with instrumenter=\`${a}\`, but the SDK is configured with the \`${i}\` instrumenter.
24
- The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let s=new qO(e,this);return s=kO(s,n,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),s.isRecording()&&s.initSpanRecorder(n._experiments&&n._experiments.maxSpans),r&&r.emit&&r.emit("startTransaction",s),s}function OE(e,t,r,n,i,a,s,o=!1){const u=e.getClient(),l=u&&u.getOptions()||{};let c=new l$(t,e,r,n,s,i,o);return c=kO(c,l,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...a}),c.isRecording()&&c.initSpanRecorder(l._experiments&&l._experiments.maxSpans),u&&u.emit&&u.emit("startTransaction",c),c}function p$(){const e=Io();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=f$),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=d$),e$())}function m$(e,t,r){const n=Zi();n&&n.setMeasurement(e,t,r)}function h$(e,t){const r={sent_at:new Date().toISOString()};t&&(r.dsn=ea(t));const n=e.map(y$);return aa(r,n)}function y$(e){return[{type:"span"},e]}const Rt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Xe=at;function g$(){Xe.document?Xe.document.addEventListener("visibilitychange",()=>{const e=Zi();if(Xe.document.hidden&&e){const t="cancelled",{op:r,status:n}=gr(e);Rt&&Re.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${r}`),n||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}}):Rt&&Re.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Ro=(e,t,r)=>{let n,i;return a=>{t.value>=0&&(a||r)&&(i=t.value-(n||0),(i||n===void 0)&&(n=t.value,t.delta=i,e(t)))}},_$=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,E$=()=>{const e=Xe.performance.timing,t=Xe.performance.navigation.type,r={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const n in e)n!=="navigationStart"&&n!=="toJSON"&&(r[n]=Math.max(e[n]-e.navigationStart,0));return r},yl=()=>Xe.__WEB_VITALS_POLYFILL__?Xe.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||E$()):Xe.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],jg=()=>{const e=yl();return e&&e.activationStart||0},wo=(e,t)=>{const r=yl();let n="navigate";return r&&(Xe.document&&Xe.document.prerendering||jg()>0?n="prerender":n=r.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:_$(),navigationType:n}},rs=(e,t,r)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const n=new PerformanceObserver(i=>{t(i.getEntries())});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch{}},Ao=(e,t)=>{const r=n=>{(n.type==="pagehide"||Xe.document.visibilityState==="hidden")&&(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};Xe.document&&(addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0))},v$=(e,t={})=>{const r=wo("CLS",0);let n,i=0,a=[];const s=u=>{u.forEach(l=>{if(!l.hadRecentInput){const c=a[0],d=a[a.length-1];i&&a.length!==0&&l.startTime-d.startTime<1e3&&l.startTime-c.startTime<5e3?(i+=l.value,a.push(l)):(i=l.value,a=[l]),i>r.value&&(r.value=i,r.entries=a,n&&n())}})},o=rs("layout-shift",s);if(o){n=Ro(e,r,t.reportAllChanges);const u=()=>{s(o.takeRecords()),n(!0)};return Ao(u),u}};let rl=-1;const b$=()=>{Xe.document&&Xe.document.visibilityState&&(rl=Xe.document.visibilityState==="hidden"&&!Xe.document.prerendering?0:1/0)},T$=()=>{Ao(({timeStamp:e})=>{rl=e},!0)},Dg=()=>(rl<0&&(b$(),T$()),{get firstHiddenTime(){return rl}}),S$=e=>{const t=Dg(),r=wo("FID");let n;const i=o=>{o.startTime<t.firstHiddenTime&&(r.value=o.processingStart-o.startTime,r.entries.push(o),n(!0))},a=o=>{o.forEach(i)},s=rs("first-input",a);n=Ro(e,r),s&&Ao(()=>{a(s.takeRecords()),s.disconnect()},!0)};let UO=0,zl=1/0,Cu=0;const I$=e=>{e.forEach(t=>{t.interactionId&&(zl=Math.min(zl,t.interactionId),Cu=Math.max(Cu,t.interactionId),UO=Cu?(Cu-zl)/7+1:0)})};let ng;const R$=()=>ng?UO:performance.interactionCount||0,w$=()=>{"interactionCount"in performance||ng||(ng=rs("event",I$,{type:"event",buffered:!0,durationThreshold:0}))},FO=()=>R$(),NE=10,In=[],Wl={},PE=e=>{const t=In[In.length-1],r=Wl[e.interactionId];if(r||In.length<NE||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{const n={id:e.interactionId,latency:e.duration,entries:[e]};Wl[n.id]=n,In.push(n)}In.sort((n,i)=>i.latency-n.latency),In.splice(NE).forEach(n=>{delete Wl[n.id]})}},A$=()=>{const e=Math.min(In.length-1,Math.floor(FO()/50));return In[e]},O$=(e,t)=>{t=t||{},w$();const r=wo("INP");let n;const i=s=>{s.forEach(u=>{u.interactionId&&PE(u),u.entryType==="first-input"&&!In.some(c=>c.entries.some(d=>u.duration===d.duration&&u.startTime===d.startTime))&&PE(u)});const o=A$();o&&o.latency!==r.value&&(r.value=o.latency,r.entries=o.entries,n())},a=rs("event",i,{durationThreshold:t.durationThreshold||40});n=Ro(e,r,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Ao(()=>{i(a.takeRecords()),r.value<0&&FO()>0&&(r.value=0,r.entries=[]),n(!0)}))},CE={},N$=e=>{const t=Dg(),r=wo("LCP");let n;const i=s=>{const o=s[s.length-1];if(o){const u=Math.max(o.startTime-jg(),0);u<t.firstHiddenTime&&(r.value=u,r.entries=[o],n())}},a=rs("largest-contentful-paint",i);if(a){n=Ro(e,r);const s=()=>{CE[r.id]||(i(a.takeRecords()),a.disconnect(),CE[r.id]=!0,n(!0))};return["keydown","click"].forEach(o=>{Xe.document&&addEventListener(o,s,{once:!0,capture:!0})}),Ao(s,!0),s}},ig=e=>{Xe.document&&(Xe.document.prerendering?addEventListener("prerenderingchange",()=>ig(e),!0):Xe.document.readyState!=="complete"?addEventListener("load",()=>ig(e),!0):setTimeout(e,0))},P$=(e,t)=>{t=t||{};const r=wo("TTFB"),n=Ro(e,r,t.reportAllChanges);ig(()=>{const i=yl();if(i){if(r.value=Math.max(i.responseStart-jg(),0),r.value<0||r.value>performance.now())return;r.entries=[i],n(!0)}})},to={},nl={};let VO,HO,GO,zO,WO;function C$(e,t=!1){return Oo("cls",e,L$,VO,t)}function M$(e,t=!1){return Oo("lcp",e,k$,GO,t)}function j$(e){return Oo("ttfb",e,B$,zO)}function D$(e){return Oo("fid",e,q$,HO)}function $$(e){return Oo("inp",e,U$,WO)}function lo(e,t){return YO(e,t),nl[e]||(F$(e),nl[e]=!0),KO(e,t)}function ns(e,t){const r=to[e];if(!(!r||!r.length))for(const n of r)try{n(t)}catch(i){Rt&&Re.error(`Error while triggering instrumentation handler.
25
- Type: ${e}
26
- Name: ${Nn(n)}
27
- Error:`,i)}}function L$(){return v$(e=>{ns("cls",{metric:e}),VO=e},{reportAllChanges:!0})}function q$(){return S$(e=>{ns("fid",{metric:e}),HO=e})}function k$(){return N$(e=>{ns("lcp",{metric:e}),GO=e})}function B$(){return P$(e=>{ns("ttfb",{metric:e}),zO=e})}function U$(){return O$(e=>{ns("inp",{metric:e}),WO=e})}function Oo(e,t,r,n,i=!1){YO(e,t);let a;return nl[e]||(a=r(),nl[e]=!0),n&&t({metric:n}),KO(e,t,i?a:void 0)}function F$(e){const t={};e==="event"&&(t.durationThreshold=0),rs(e,r=>{ns(e,{entries:r})},t)}function YO(e,t){to[e]=to[e]||[],to[e].push(t)}function KO(e,t,r){return()=>{r&&r();const n=to[e];if(!n)return;const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}function Yl(e){return typeof e=="number"&&isFinite(e)}function Ga(e,{startTimestamp:t,...r}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...r})}const V$=2147483647;function Bt(e){return e/1e3}function $g(){return Xe&&Xe.addEventListener&&Xe.performance}let ME=0,$t={},tn,ro;function H$(){const e=$g();if(e&&Ar){e.mark&&Xe.performance.mark("sentry-tracing-init");const t=J$(),r=Y$(),n=K$(),i=X$();return()=>{t(),r(),n(),i()}}return()=>{}}function G$(){lo("longtask",({entries:e})=>{for(const t of e){const r=Zi();if(!r)return;const n=Bt(Ar+t.startTime),i=Bt(t.duration);r.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}})}function z$(){lo("event",({entries:e})=>{for(const t of e){const r=Zi();if(!r)return;if(t.name==="click"){const n=Bt(Ar+t.startTime),i=Bt(t.duration),a={description:Fa(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i},s=VA(t.target);s&&(a.attributes={"ui.component_name":s}),r.startChild(a)}}})}function W$(e,t){if($g()&&Ar){const n=Q$(e,t);return()=>{n()}}return()=>{}}function Y$(){return C$(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Rt&&Re.log("[Measurements] Adding CLS"),$t.cls={value:e.value,unit:""},ro=t)},!0)}function K$(){return M$(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Rt&&Re.log("[Measurements] Adding LCP"),$t.lcp={value:e.value,unit:"millisecond"},tn=t)},!0)}function J$(){return D$(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const r=Bt(Ar),n=Bt(t.startTime);Rt&&Re.log("[Measurements] Adding FID"),$t.fid={value:e.value,unit:"millisecond"},$t["mark.fid"]={value:r+n,unit:"second"}})}function X$(){return j$(({metric:e})=>{e.entries[e.entries.length-1]&&(Rt&&Re.log("[Measurements] Adding TTFB"),$t.ttfb={value:e.value,unit:"millisecond"})})}const jE={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Q$(e,t){return $$(({metric:r})=>{if(r.value===void 0)return;const n=r.entries.find(E=>E.duration===r.value&&jE[E.name]!==void 0),i=Za();if(!n||!i)return;const a=jE[n.name],s=i.getOptions(),o=Bt(Ar+n.startTime),u=Bt(r.value),l=n.interactionId!==void 0?e[n.interactionId]:void 0;if(l===void 0)return;const{routeName:c,parentContext:d,activeTransaction:m,user:p,replayId:v}=l,w=p!==void 0?p.email||p.id||p.ip_address:void 0,R=m!==void 0?m.getProfileId():void 0,O=new hl({startTimestamp:o,endTimestamp:o+u,op:`ui.interaction.${a}`,name:Fa(n.target),attributes:{release:s.release,environment:s.environment,transaction:c,...w!==void 0&&w!==""?{user:w}:{},...R!==void 0?{profile_id:R}:{},...v!==void 0?{replay_id:v}:{}},exclusiveTime:r.value,measurements:{inp:{value:r.value,unit:"millisecond"}}}),f=sL(d,s,t);if(f&&Math.random()<f){const E=O?h$([O],i.getDsn()):void 0,b=i&&i.getTransport();b&&E&&b.send(E).then(null,h=>{Rt&&Re.error("Error while sending interaction:",h)});return}})}function Z$(e){const t=$g();if(!t||!Xe.performance.getEntries||!Ar)return;Rt&&Re.log("[Tracing] Adding & adjusting spans using Performance API");const r=Bt(Ar),n=t.getEntries(),{op:i,start_timestamp:a}=gr(e);if(n.slice(ME).forEach(s=>{const o=Bt(s.startTime),u=Bt(s.duration);if(!(e.op==="navigation"&&a&&r+o<a))switch(s.entryType){case"navigation":{eL(e,s,r);break}case"mark":case"paint":case"measure":{x$(e,s,o,u,r);const l=Dg(),c=s.startTime<l.firstHiddenTime;s.name==="first-paint"&&c&&(Rt&&Re.log("[Measurements] Adding FP"),$t.fp={value:s.startTime,unit:"millisecond"}),s.name==="first-contentful-paint"&&c&&(Rt&&Re.log("[Measurements] Adding FCP"),$t.fcp={value:s.startTime,unit:"millisecond"});break}case"resource":{rL(e,s,s.name,o,u,r);break}}}),ME=Math.max(n.length-1,0),nL(e),i==="pageload"){aL($t),["fcp","fp","lcp"].forEach(o=>{if(!$t[o]||!a||r>=a)return;const u=$t[o].value,l=r+Bt(u),c=Math.abs((l-a)*1e3),d=c-u;Rt&&Re.log(`[Measurements] Normalized ${o} from ${u} to ${c} (${d})`),$t[o].value=c});const s=$t["mark.fid"];s&&$t.fid&&(Ga(e,{description:"first input delay",endTimestamp:s.value+Bt($t.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:s.value}),delete $t["mark.fid"]),"fcp"in $t||delete $t.cls,Object.keys($t).forEach(o=>{m$(o,$t[o].value,$t[o].unit)}),iL(e)}tn=void 0,ro=void 0,$t={}}function x$(e,t,r,n,i){const a=i+r,s=a+n;return Ga(e,{description:t.name,endTimestamp:s,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:a}),a}function eL(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{Mu(e,t,n,r)}),Mu(e,t,"secureConnection",r,"TLS/SSL","connectEnd"),Mu(e,t,"fetch",r,"cache","domainLookupStart"),Mu(e,t,"domainLookup",r,"DNS"),tL(e,t,r)}function Mu(e,t,r,n,i,a){const s=a?t[a]:t[`${r}End`],o=t[`${r}Start`];!o||!s||Ga(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||r,startTimestamp:n+Bt(o),endTimestamp:n+Bt(s)})}function tL(e,t,r){t.responseEnd&&(Ga(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:r+Bt(t.requestStart),endTimestamp:r+Bt(t.responseEnd)}),Ga(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:r+Bt(t.responseStart),endTimestamp:r+Bt(t.responseEnd)}))}function rL(e,t,r,n,i,a){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const s=Wi(r),o={};Kl(o,t,"transferSize","http.response_transfer_size"),Kl(o,t,"encodedBodySize","http.response_content_length"),Kl(o,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(o["resource.render_blocking_status"]=t.renderBlockingStatus),s.protocol&&(o["url.scheme"]=s.protocol.split(":").pop()),s.host&&(o["server.address"]=s.host),o["url.same_origin"]=r.includes(Xe.location.origin);const u=a+n,l=u+i;Ga(e,{description:r.replace(Xe.location.origin,""),endTimestamp:l,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:u,data:o})}function nL(e){const t=Xe.navigator;if(!t)return;const r=t.connection;r&&(r.effectiveType&&e.setTag("effectiveConnectionType",r.effectiveType),r.type&&e.setTag("connectionType",r.type),Yl(r.rtt)&&($t["connection.rtt"]={value:r.rtt,unit:"millisecond"})),Yl(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Yl(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function iL(e){tn&&(Rt&&Re.log("[Measurements] Adding LCP Data"),tn.element&&e.setTag("lcp.element",Fa(tn.element)),tn.id&&e.setTag("lcp.id",tn.id),tn.url&&e.setTag("lcp.url",tn.url.trim().slice(0,200)),e.setTag("lcp.size",tn.size)),ro&&ro.sources&&(Rt&&Re.log("[Measurements] Adding CLS Data"),ro.sources.forEach((t,r)=>e.setTag(`cls.source.${r+1}`,Fa(t.node))))}function Kl(e,t,r,n){const i=t[r];i!=null&&i<V$&&(e[n]=i)}function aL(e){const t=yl();if(!t)return;const{responseStart:r,requestStart:n}=t;n<=r&&(Rt&&Re.log("[Measurements] Adding TTFB Request Time"),e["ttfb.requestTime"]={value:r-n,unit:"millisecond"})}function sL(e,t,r){if(!ts(t))return!1;let n;return e!==void 0&&typeof t.tracesSampler=="function"?n=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:Xe.location}):e!==void 0&&e.sampled!==void 0?n=e.sampled:typeof t.tracesSampleRate<"u"?n=t.tracesSampleRate:n=1,BO(n)?n===!0?r:n===!1?0:n*r:(Rt&&Re.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function oL(e,t,r,n,i="auto.http.browser"){if(!ts()||!e.fetchData)return;const a=t(e.fetchData.url);if(e.endTimestamp&&a){const p=e.fetchData.__span;if(!p)return;const v=n[p];v&&(lL(v,e),delete n[p]);return}const s=xa(),o=Za(),{method:u,url:l}=e.fetchData,c=cL(l),d=c?Wi(c).host:void 0,m=a?jO({name:`${u} ${l}`,onlyIfParent:!0,attributes:{url:l,type:"fetch","http.method":u,"http.url":c,"server.address":d,[Sa]:i},op:"http.client"}):void 0;if(m&&(e.fetchData.__span=m.spanContext().spanId,n[m.spanContext().spanId]=m),r(e.fetchData.url)&&o){const p=e.args[0];e.args[1]=e.args[1]||{};const v=e.args[1];v.headers=uL(p,o,s,v,m)}return m}function uL(e,t,r,n,i){const a=i||r.getSpan(),s=Cg(),{traceId:o,spanId:u,sampled:l,dsc:c}={...s.getPropagationContext(),...r.getPropagationContext()},d=a?pl(a):Rg(o,u,l),m=iO(c||(a?Ha(a):Pg(o,t,r))),p=n.headers||(typeof Request<"u"&&On(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&On(p,Headers)){const v=new Headers(p);return v.append("sentry-trace",d),m&&v.append(Xy,m),v}else if(Array.isArray(p)){const v=[...p,["sentry-trace",d]];return m&&v.push([Xy,m]),v}else{const v="baggage"in p?p.baggage:void 0,w=[];return Array.isArray(v)?w.push(...v):v&&w.push(v),m&&w.push(m),{...p,"sentry-trace":d,baggage:w.length>0?w.join(","):void 0}}else return{"sentry-trace":d,baggage:m}}function cL(e){try{return new URL(e).href}catch{return}}function lL(e,t){if(t.response){Mg(e,t.response.status);const r=t.response&&t.response.headers&&t.response.headers.get("content-length");if(r){const n=parseInt(r);n>0&&e.setAttribute("http.response_content_length",n)}}else t.error&&e.setStatus("internal_error");e.end()}const ag=["localhost",/^\/(?!\/)/],sg={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:ag,tracePropagationTargets:ag};function dL(e){const{traceFetch:t,traceXHR:r,tracePropagationTargets:n,tracingOrigins:i,shouldCreateSpanForRequest:a,enableHTTPTimings:s}={traceFetch:sg.traceFetch,traceXHR:sg.traceXHR,...e},o=typeof a=="function"?a:c=>!0,u=c=>hL(c,n||i),l={};t&&QA(c=>{const d=oL(c,o,u,l);if(d){const m=JO(c.fetchData.url),p=m?Wi(m).host:void 0;d.setAttributes({"http.url":m,"server.address":p})}s&&d&&DE(d)}),r&&eO(c=>{const d=yL(c,o,u,l);s&&d&&DE(d)})}function fL(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function DE(e){const{url:t}=gr(e).data||{};if(!t||typeof t!="string")return;const r=lo("resource",({entries:n})=>{n.forEach(i=>{fL(i)&&i.name.endsWith(t)&&(mL(i).forEach(s=>e.setAttribute(...s)),setTimeout(r))})})}function pL(e){let t="unknown",r="unknown",n="";for(const i of e){if(i==="/"){[t,r]=e.split("/");break}if(!isNaN(Number(i))){t=n==="h"?"http":n,r=e.split(n)[1];break}n+=i}return n===e&&(t=n),{name:t,version:r}}function Zr(e=0){return((Ar||performance.timeOrigin)+e)/1e3}function mL(e){const{name:t,version:r}=pL(e.nextHopProtocol),n=[];return n.push(["network.protocol.version",r],["network.protocol.name",t]),Ar?[...n,["http.request.redirect_start",Zr(e.redirectStart)],["http.request.fetch_start",Zr(e.fetchStart)],["http.request.domain_lookup_start",Zr(e.domainLookupStart)],["http.request.domain_lookup_end",Zr(e.domainLookupEnd)],["http.request.connect_start",Zr(e.connectStart)],["http.request.secure_connection_start",Zr(e.secureConnectionStart)],["http.request.connection_end",Zr(e.connectEnd)],["http.request.request_start",Zr(e.requestStart)],["http.request.response_start",Zr(e.responseStart)],["http.request.response_end",Zr(e.responseEnd)]]:n}function hL(e,t){return bo(e,t||ag)}function yL(e,t,r,n){const i=e.xhr,a=i&&i[ba];if(!ts()||!i||i.__sentry_own_request__||!a)return;const s=t(a.url);if(e.endTimestamp&&s){const p=i.__sentry_xhr_span_id__;if(!p)return;const v=n[p];v&&a.status_code!==void 0&&(Mg(v,a.status_code),v.end(),delete n[p]);return}const o=xa(),u=Cg(),l=JO(a.url),c=l?Wi(l).host:void 0,d=s?jO({name:`${a.method} ${a.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":a.method,"http.url":l,url:a.url,"server.address":c,[Sa]:"auto.http.browser"},op:"http.client"}):void 0;d&&(i.__sentry_xhr_span_id__=d.spanContext().spanId,n[i.__sentry_xhr_span_id__]=d);const m=Za();if(i.setRequestHeader&&r(a.url)&&m){const{traceId:p,spanId:v,sampled:w,dsc:R}={...u.getPropagationContext(),...o.getPropagationContext()},O=d?pl(d):Rg(p,v,w),f=iO(R||(d?Ha(d):Pg(p,m,o)));gL(i,O,f)}return d}function gL(e,t,r){try{e.setRequestHeader("sentry-trace",t),r&&e.setRequestHeader(Xy,r)}catch{}}function JO(e){try{return new URL(e,Xe.location.origin).href}catch{return}}function _L(e,t=!0,r=!0){if(!Xe||!Xe.location){Rt&&Re.warn("Could not initialize routing instrumentation due to invalid location");return}let n=Xe.location.href,i;t&&(i=e({name:Xe.location.pathname,startTimestamp:Ar?Ar/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),r&&Sg(({to:a,from:s})=>{if(s===void 0&&n&&n.indexOf(a)!==-1){n=void 0;return}s!==a&&(n=void 0,i&&(Rt&&Re.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.end()),i=e({name:Xe.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const EL="BrowserTracing",vL={...Kc,markBackgroundTransactions:!0,routingInstrumentation:_L,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...sg},$E=10;class bL{constructor(t){this.name=EL,this._hasSetTracePropagationTargets=!1,p$(),Rt&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...vL,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=H$(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&W$(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&G$(),this.options._experiments.enableInteractions&&z$(),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,r){this._getCurrentHub=r;const i=r().getClient(),a=i&&i.getOptions(),{routingInstrumentation:s,startTransactionOnLocationChange:o,startTransactionOnPageLoad:u,markBackgroundTransactions:l,traceFetch:c,traceXHR:d,shouldCreateSpanForRequest:m,enableHTTPTimings:p,_experiments:v}=this.options,w=a&&a.tracePropagationTargets,R=w||this.options.tracePropagationTargets;Rt&&this._hasSetTracePropagationTargets&&w&&Re.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),s(O=>{const f=this._createRouteTransaction(O);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(f,O,r),f},u,o),l&&g$(),v.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),dL({traceFetch:c,traceXHR:d,tracePropagationTargets:R,shouldCreateSpanForRequest:m,enableHTTPTimings:p})}_createRouteTransaction(t){if(!this._getCurrentHub){Rt&&Re.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}const r=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:i,finalTimeout:a,heartbeatInterval:s}=this.options,o=t.op==="pageload";let u;if(o){const p=o?LE("sentry-trace"):"",v=o?LE("baggage"):void 0,{traceId:w,dsc:R,parentSpanId:O,sampled:f}=mj(p,v);u={traceId:w,parentSpanId:O,parentSampled:f,...t,metadata:{...t.metadata,dynamicSamplingContext:R},trimEnd:!0}}else u={trimEnd:!0,...t};const l=typeof n=="function"?n(u):u,c=l===void 0?{...u,sampled:!1}:l;c.metadata=c.name!==u.name?{...c.metadata,source:"custom"}:c.metadata,this._latestRoute.name=c.name,this._latestRoute.context=c,c.sampled===!1&&Rt&&Re.log(`[Tracing] Will not send ${c.op} transaction because of beforeNavigate.`),Rt&&Re.log(`[Tracing] Starting ${c.op} transaction on scope`);const{location:d}=Xe,m=OE(r,c,i,a,!0,{location:d},s,o);return o&&Xe.document&&(Xe.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(Xe.document.readyState)&&m.sendAutoFinishSignal()}),["interactive","complete"].includes(Xe.document.readyState)&&m.sendAutoFinishSignal()),m.registerBeforeFinishCallback(p=>{this._collectWebVitals(),Z$(p)}),m}_registerInteractionListener(){let t;const r=()=>{const{idleTimeout:n,finalTimeout:i,heartbeatInterval:a}=this.options,s="ui.action.click",o=Zi();if(o&&o.op&&["navigation","pageload"].includes(o.op)){Rt&&Re.warn(`[Tracing] Did not create ${s} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub){Rt&&Re.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){Rt&&Re.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}const u=this._getCurrentHub(),{location:l}=Xe,c={name:this._latestRoute.name,op:s,trimEnd:!0,data:{[Aa]:this._latestRoute.context?TL(this._latestRoute.context):"url"}};t=OE(u,c,n,i,!0,{location:l},a)};["click"].forEach(n=>{Xe.document&&addEventListener(n,r,{once:!1,capture:!0})})}_registerInpInteractionListener(){const t=({entries:r})=>{const n=Za(),i=n!==void 0&&n.getIntegrationByName!==void 0?n.getIntegrationByName("Replay"):void 0,a=i!==void 0?i.getReplayId():void 0,s=Zi(),o=xa(),u=o!==void 0?o.getUser():void 0;r.forEach(l=>{if(SL(l)){const c=l.interactionId;if(c===void 0)return;const d=this._interactionIdToRouteNameMapping[c],m=l.duration,p=l.startTime,v=Object.keys(this._interactionIdToRouteNameMapping),w=v.length>0?v.reduce((R,O)=>this._interactionIdToRouteNameMapping[R].duration<this._interactionIdToRouteNameMapping[O].duration?R:O):void 0;if(l.entryType==="first-input"&&v.map(O=>this._interactionIdToRouteNameMapping[O]).some(O=>O.duration===m&&O.startTime===p)||!c)return;if(d)d.duration=Math.max(d.duration,m);else if(v.length<$E||w===void 0||m>this._interactionIdToRouteNameMapping[w].duration){const R=this._latestRoute.name,O=this._latestRoute.context;R&&O&&(w&&Object.keys(this._interactionIdToRouteNameMapping).length>=$E&&delete this._interactionIdToRouteNameMapping[w],this._interactionIdToRouteNameMapping[c]={routeName:R,duration:m,parentContext:O,user:u,activeTransaction:s,replayId:a,startTime:p})}}})};lo("event",t),lo("first-input",t)}}function LE(e){const t=TM(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function TL(e){const t=e.attributes&&e.attributes[Aa],r=e.data&&e.data[Aa],n=e.metadata&&e.metadata.source;return t||r||n}function SL(e){return"duration"in e}const ct=at;let og=0;function XO(){return og>0}function IL(){og++,setTimeout(()=>{og--})}function za(e,t={},r){if(typeof e!="function")return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(bg(e))return e}catch{return e}const n=function(){const i=Array.prototype.slice.call(arguments);try{const a=i.map(s=>za(s,t));return e.apply(this,a)}catch(a){throw IL(),cO(s=>{s.addEventProcessor(o=>(t.mechanism&&(Hy(o,void 0),oo(o,t.mechanism)),o.extra={...o.extra,arguments:i},o)),Ag(a)}),a}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}catch{}zA(n,e),Ji(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const wr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function QO(e,t){const r=Lg(e,t),n={type:t&&t.name,value:OL(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function RL(e,t,r,n){const i=cr(),a=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:ol(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:CL(t,{isUnhandledRejection:n})}]},extra:{__serialized__:tO(t,a)}};if(r){const o=Lg(e,r);o.length&&(s.exception.values[0].stacktrace={frames:o})}return s}function Jl(e,t){return{exception:{values:[QO(e,t)]}}}function Lg(e,t){const r=t.stacktrace||t.stack||"",n=AL(t);try{return e(r,n)}catch{}return[]}const wL=/Minified React error #\d+;/i;function AL(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(wL.test(e.message))return 1}return 0}function OL(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function NL(e,t,r,n){const i=r&&r.syntheticException||void 0,a=qg(e,t,i,n);return oo(a),a.level="error",r&&r.event_id&&(a.event_id=r.event_id),Va(a)}function PL(e,t,r="info",n,i){const a=n&&n.syntheticException||void 0,s=ug(e,t,a,i);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),Va(s)}function qg(e,t,r,n,i){let a;if(gg(t)&&t.error)return Jl(e,t.error);if(J_(t)||fM(t)){const s=t;if("stack"in t)a=Jl(e,t);else{const o=s.name||(J_(s)?"DOMError":"DOMException"),u=s.message?`${o}: ${s.message}`:o;a=ug(e,u,r,n),Hy(a,u)}return"code"in s&&(a.tags={...a.tags,"DOMException.code":`${s.code}`}),a}return yg(t)?Jl(e,t):Ki(t)||ol(t)?(a=RL(e,t,r,i),oo(a,{synthetic:!0}),a):(a=ug(e,t,r,n),Hy(a,`${t}`),oo(a,{synthetic:!0}),a)}function ug(e,t,r,n){const i={};if(n&&r){const a=Lg(e,r);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]})}if(_g(t)){const{__sentry_template_string__:a,__sentry_template_values__:s}=t;return i.logentry={message:a,params:s},i}return i.message=t,i}function CL(e,{isUnhandledRejection:t}){const r=PM(e),n=t?"promise rejection":"exception";return gg(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:ol(e)?`Event \`${ML(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function ML(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function jL(e,{metadata:t,tunnel:r,dsn:n}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:ea(n)}},a=DL(e);return aa(i,[a])}function DL(e){return[{type:"user_report"},e]}class $L extends gD{constructor(t){const r=ct.SENTRY_SDK_SOURCE||ZM();SO(t,"browser",["browser"],r),super(t),t.sendClientReports&&ct.document&&ct.document.addEventListener("visibilitychange",()=>{ct.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return NL(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return PL(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){wr&&Re.warn("SDK not enabled, will not capture user feedback.");return}const r=jL(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(r)}_prepareEvent(t,r,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){wr&&Re.log("No outcomes to send");return}if(!this._dsn){wr&&Re.log("No dsn provided, will not send outcomes");return}wr&&Re.log("Sending outcomes:",t);const r=bj(t,this._options.tunnel&&ea(this._dsn));this._sendEnvelope(r)}}let Cs;function LL(){if(Cs)return Cs;if(Yy(ct.fetch))return Cs=ct.fetch.bind(ct);const e=ct.document;let t=ct.fetch;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r);const n=r.contentWindow;n&&n.fetch&&(t=n.fetch),e.head.removeChild(r)}catch(r){wr&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return Cs=t.bind(ct)}function qL(){Cs=void 0}function kL(e,t=LL()){let r=0,n=0;function i(a){const s=a.body.length;r+=s,n++;const o={body:a.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};try{return t(e.url,o).then(u=>(r-=s,n--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return qL(),r-=s,n--,Ig(u)}}return TO(e,i)}const BL=4;function UL(e){function t(r){return new yr((n,i)=>{const a=new XMLHttpRequest;a.onerror=i,a.onreadystatechange=()=>{a.readyState===BL&&n({statusCode:a.status,headers:{"x-sentry-rate-limits":a.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":a.getResponseHeader("Retry-After")}})},a.open("POST",e.url);for(const s in e.headers)Object.prototype.hasOwnProperty.call(e.headers,s)&&a.setRequestHeader(s,e.headers[s]);a.send(r.body)})}return TO(e,t)}const gl="?",FL=30,VL=40,HL=50;function kg(e,t,r,n){const i={filename:e,function:t,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}const GL=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zL=/\((\S*)(?::(\d+))(?::(\d+))\)/,WL=e=>{const t=GL.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const a=zL.exec(t[2]);a&&(t[2]=a[1],t[3]=a[2],t[4]=a[3])}const[n,i]=ZO(t[1]||gl,t[2]);return kg(i,n,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},YL=[FL,WL],KL=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,JL=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,XL=e=>{const t=KL.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=JL.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let n=t[3],i=t[1]||gl;return[i,n]=ZO(i,n),kg(n,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},QL=[HL,XL],ZL=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,xL=e=>{const t=ZL.exec(e);return t?kg(t[2],t[1]||gl,+t[3],t[4]?+t[4]:void 0):void 0},eq=[VL,xL],tq=[YL,QL,eq],rq=KA(...tq),ZO=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:gl,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},ju=1024,xO="Breadcrumbs",nq=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:xO,setupOnce(){},setup(r){t.console&&DM(sq(r)),t.dom&&qM(aq(r,t.dom)),t.xhr&&eO(oq(r)),t.fetch&&QA(uq(r)),t.history&&Sg(cq(r)),t.sentry&&r.on&&r.on("beforeSendEvent",iq(r))}}}),eN=nq;Qn(xO,eN);function iq(e){return function(r){cr()===e&&Qi({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:Un(r)},{event:r})}}function aq(e,t){return function(n){if(cr()!==e)return;let i,a,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>ju&&(wr&&Re.warn(`\`dom.maxStringLength\` cannot exceed ${ju}, but a value of ${o} was configured. Sentry will use ${ju} instead.`),o=ju),typeof s=="string"&&(s=[s]);try{const l=n.event,c=lq(l)?l.target:l;i=Fa(c,{keyAttrs:s,maxStringLength:o}),a=VA(c)}catch{i="<unknown>"}if(i.length===0)return;const u={category:`ui.${n.name}`,message:i};a&&(u.data={"ui.component_name":a}),Qi(u,{event:n.event,name:n.name,global:n.global})}}function sq(e){return function(r){if(cr()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:sj(r.level),message:X_(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${X_(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Qi(n,{input:r.args,level:r.level})}}function oq(e){return function(r){if(cr()!==e)return;const{startTimestamp:n,endTimestamp:i}=r,a=r.xhr[ba];if(!n||!i||!a)return;const{method:s,url:o,status_code:u,body:l}=a,c={method:s,url:o,status_code:u},d={xhr:r.xhr,input:l,startTimestamp:n,endTimestamp:i};Qi({category:"xhr",data:c,type:"http"},d)}}function uq(e){return function(r){if(cr()!==e)return;const{startTimestamp:n,endTimestamp:i}=r;if(i&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){const a=r.fetchData,s={data:r.error,input:r.args,startTimestamp:n,endTimestamp:i};Qi({category:"fetch",data:a,level:"error",type:"http"},s)}else{const a=r.response,s={...r.fetchData,status_code:a&&a.status},o={input:r.args,response:a,startTimestamp:n,endTimestamp:i};Qi({category:"fetch",data:s,type:"http"},o)}}}function cq(e){return function(r){if(cr()!==e)return;let n=r.from,i=r.to;const a=Wi(ct.location.href);let s=n?Wi(n):void 0;const o=Wi(i);(!s||!s.path)&&(s=a),a.protocol===o.protocol&&a.host===o.host&&(i=o.relative),a.protocol===s.protocol&&a.host===s.host&&(n=s.relative),Qi({category:"navigation",data:{from:n,to:i}})}}function lq(e){return!!e&&!!e.target}const tN="Dedupe",dq=(()=>{let e;return{name:tN,setupOnce(){},processEvent(t){if(t.type)return t;try{if(fq(t,e))return wr&&Re.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),rN=dq;Qn(tN,rN);function fq(e,t){return t?!!(pq(e,t)||mq(e,t)):!1}function pq(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!iN(e,t)||!nN(e,t))}function mq(e,t){const r=qE(t),n=qE(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!iN(e,t)||!nN(e,t))}function nN(e,t){let r=kE(e),n=kE(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){const a=n[i],s=r[i];if(a.filename!==s.filename||a.lineno!==s.lineno||a.colno!==s.colno||a.function!==s.function)return!1}return!0}function iN(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function qE(e){return e.exception&&e.exception.values&&e.exception.values[0]}function kE(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const aN="GlobalHandlers",hq=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:aN,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(yq(r),BE("onerror")),t.onunhandledrejection&&(gq(r),BE("onunhandledrejection"))}}}),sN=hq;Qn(aN,sN);function yq(e){ZA(t=>{const{stackParser:r,attachStacktrace:n}=uN();if(cr()!==e||XO())return;const{msg:i,url:a,line:s,column:o,error:u}=t,l=u===void 0&&un(i)?vq(i,a,s,o):oN(qg(r,u||i,void 0,n,!1),a,s,o);l.level="error",uO(l,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function gq(e){xA(t=>{const{stackParser:r,attachStacktrace:n}=uN();if(cr()!==e||XO())return;const i=_q(t),a=Eg(i)?Eq(i):qg(r,i,void 0,n,!0);a.level="error",uO(a,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function _q(e){if(Eg(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function Eq(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function vq(e,t,r,n){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let a=gg(e)?e.message:e,s="Error";const o=a.match(i);return o&&(s=o[1],a=o[2]),oN({exception:{values:[{type:s,value:a}]}},t,r,n)}function oN(e,t,r,n){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},u=o.frames=o.frames||[],l=isNaN(parseInt(n,10))?void 0:n,c=isNaN(parseInt(r,10))?void 0:r,d=un(t)&&t.length>0?t:bM();return u.length===0&&u.push({colno:l,filename:d,function:"?",in_app:!0,lineno:c}),e}function BE(e){wr&&Re.log(`Global Handler attached: ${e}`)}function uN(){const e=cr();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const cN="HttpContext",bq=(()=>({name:cN,setupOnce(){},preprocessEvent(e){if(!ct.navigator&&!ct.location&&!ct.document)return;const t=e.request&&e.request.url||ct.location&&ct.location.href,{referrer:r}=ct.document||{},{userAgent:n}=ct.navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},a={...e.request,...t&&{url:t},headers:i};e.request=a}})),lN=bq;Qn(cN,lN);const Tq="cause",Sq=5,dN="LinkedErrors",Iq=((e={})=>{const t=e.limit||Sq,r=e.key||Tq;return{name:dN,setupOnce(){},preprocessEvent(n,i,a){const s=a.getOptions();gM(QO,s.stackParser,s.maxValueLength,r,t,n,i)}}}),fN=Iq;Qn(dN,fN);const Rq=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],pN="TryCatch",wq=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:pN,setupOnce(){t.setTimeout&&Jt(ct,"setTimeout",UE),t.setInterval&&Jt(ct,"setInterval",UE),t.requestAnimationFrame&&Jt(ct,"requestAnimationFrame",Aq),t.XMLHttpRequest&&"XMLHttpRequest"in ct&&Jt(XMLHttpRequest.prototype,"send",Oq);const r=t.eventTarget;r&&(Array.isArray(r)?r:Rq).forEach(Nq)}}}),mN=wq;Qn(pN,mN);function UE(e){return function(...t){const r=t[0];return t[0]=za(r,{mechanism:{data:{function:Nn(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Aq(e){return function(t){return e.apply(this,[za(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Nn(e)},handled:!1,type:"instrument"}})])}}function Oq(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in r&&typeof r[i]=="function"&&Jt(r,i,function(a){const s={mechanism:{data:{function:i,handler:Nn(a)},handled:!1,type:"instrument"}},o=bg(a);return o&&(s.mechanism.data.handler=Nn(o)),za(a,s)})}),e.apply(this,t)}}function Nq(e){const t=ct,r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Jt(r,"addEventListener",function(n){return function(i,a,s){try{typeof a.handleEvent=="function"&&(a.handleEvent=za(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Nn(a),target:e},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,za(a,{mechanism:{data:{function:"addEventListener",handler:Nn(a),target:e},handled:!1,type:"instrument"}}),s])}}),Jt(r,"removeEventListener",function(n){return function(i,a,s){const o=a;try{const u=o&&o.__sentry_wrapped__;u&&n.call(this,i,u,s)}catch{}return n.call(this,i,o,s)}}))}const Pq=[RO(),AO(),mN(),eN(),sN(),fN(),rN(),lN()];function Cq(e){return[...Pq]}function Mq(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Cq()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),ct.SENTRY_RELEASE&&ct.SENTRY_RELEASE.id&&(e.release=ct.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:MM(e.stackParser||rq),integrations:dD(e),transport:e.transport||(XA()?kL:UL)};vD($L,t),e.autoSessionTracking&&jq()}const FE=(e={},t=Ur())=>{if(!ct.document){wr&&Re.error("Global document not defined in showReportDialog call");return}const{client:r,scope:n}=t.getStackTop(),i=e.dsn||r&&r.getDsn();if(!i){wr&&Re.error("DSN not configured for showReportDialog call");return}n&&(e.user={...n.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const a=ct.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=cD(i,e),e.onLoad&&(a.onload=e.onLoad);const{onClose:s}=e;if(s){const u=l=>{if(l.data==="__sentry_reportdialog_closed__")try{s()}finally{ct.removeEventListener("message",u)}};ct.addEventListener("message",u)}const o=ct.document.head||ct.document.body;o?o.appendChild(a):wr&&Re.error("Not injecting report dialog. No injection point found in HTML")};function jq(){if(typeof ct.document>"u"){wr&&Re.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}fE({ignoreDuration:!0}),pE(),Sg(({from:e,to:t})=>{e!==void 0&&e!==t&&(fE({ignoreDuration:!0}),pE())})}function Dq(e){const t={...e};SO(t,"react"),Mq(t)}var Xl={exports:{}},mt={};/** @license React v16.13.1
28
- * react-is.production.min.js
29
- *
30
- * Copyright (c) Facebook, Inc. and its affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var VE;function $q(){if(VE)return mt;VE=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,R=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function E(h){if(typeof h=="object"&&h!==null){var S=h.$$typeof;switch(S){case t:switch(h=h.type,h){case u:case l:case n:case a:case i:case d:return h;default:switch(h=h&&h.$$typeof,h){case o:case c:case v:case p:case s:return h;default:return S}}case r:return S}}}function b(h){return E(h)===l}return mt.AsyncMode=u,mt.ConcurrentMode=l,mt.ContextConsumer=o,mt.ContextProvider=s,mt.Element=t,mt.ForwardRef=c,mt.Fragment=n,mt.Lazy=v,mt.Memo=p,mt.Portal=r,mt.Profiler=a,mt.StrictMode=i,mt.Suspense=d,mt.isAsyncMode=function(h){return b(h)||E(h)===u},mt.isConcurrentMode=b,mt.isContextConsumer=function(h){return E(h)===o},mt.isContextProvider=function(h){return E(h)===s},mt.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},mt.isForwardRef=function(h){return E(h)===c},mt.isFragment=function(h){return E(h)===n},mt.isLazy=function(h){return E(h)===v},mt.isMemo=function(h){return E(h)===p},mt.isPortal=function(h){return E(h)===r},mt.isProfiler=function(h){return E(h)===a},mt.isStrictMode=function(h){return E(h)===i},mt.isSuspense=function(h){return E(h)===d},mt.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===l||h===a||h===i||h===d||h===m||typeof h=="object"&&h!==null&&(h.$$typeof===v||h.$$typeof===p||h.$$typeof===s||h.$$typeof===o||h.$$typeof===c||h.$$typeof===R||h.$$typeof===O||h.$$typeof===f||h.$$typeof===w)},mt.typeOf=E,mt}var HE;function Lq(){return HE||(HE=1,Xl.exports=$q()),Xl.exports}var Ql,GE;function qq(){if(GE)return Ql;GE=1;var e=Lq(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=n,a[e.Memo]=i;function s(v){return e.isMemo(v)?i:a[v.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;function p(v,w,R){if(typeof w!="string"){if(m){var O=d(w);O&&O!==m&&p(v,O,R)}var f=u(w);l&&(f=f.concat(l(w)));for(var E=s(v),b=s(w),h=0;h<f.length;++h){var S=f[h];if(!r[S]&&!(R&&R[S])&&!(b&&b[S])&&!(E&&E[S])){var A=c(w,S);try{o(v,S,A)}catch{}}}}return v}return Ql=p,Ql}qq();const kq=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Bq(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const zE={componentStack:null,error:null,eventId:null};function Uq(e,t){const r=new WeakMap;function n(i,a){if(!r.has(i)){if(i.cause)return r.set(i,!0),n(i.cause,a);i.cause=a}}n(e,t)}class Bg extends Be.Component{constructor(t){super(t),Bg.prototype.__init.call(this),this.state=zE,this._openFallbackReportDialog=!0;const r=cr();r&&r.on&&t.showDialog&&(this._openFallbackReportDialog=!1,r.on("afterSendEvent",n=>{!n.type&&n.event_id===this._lastEventId&&FE({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;cO(o=>{if(Bq(Be.version)&&yg(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,Uq(t,l)}n&&n(o,t,r);const u=Ag(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&FE({...s,eventId:u})),this.setState({error:t,componentStack:r,eventId:u})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:i}=this.props;i&&i(t,r,n)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:i}=this.state;t&&t(r,n,i),this.setState(zE)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let i;return typeof t=="function"?i=t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):i=t,Be.isValidElement(i)?i:(t&&kq&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const Fq=Be.lazy(()=>Xt(()=>import("./index-DSxKsQSh.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.Navbar})));function Vq(e){return ee.jsx(Be.Suspense,{fallback:ee.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:ee.jsx(Fq,{...e})})}const Hq={},WE=e=>{let t;const r=new Set,n=(c,d)=>{const m=typeof c=="function"?c(t):c;if(!Object.is(m,t)){const p=t;t=d??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(v=>v(t,p))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(Hq?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},l=t=e(n,i,u);return u},Gq=e=>e?WE(e):WE;var Zl={exports:{}},xl={},ed={exports:{}},td={};/**
35
- * @license React
36
- * use-sync-external-store-shim.production.js
37
- *
38
- * Copyright (c) Meta Platforms, Inc. and affiliates.
39
- *
40
- * This source code is licensed under the MIT license found in the
41
- * LICENSE file in the root directory of this source tree.
42
- */var YE;function zq(){if(YE)return td;YE=1;var e=TA();function t(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function o(d,m){var p=m(),v=n({inst:{value:p,getSnapshot:m}}),w=v[0].inst,R=v[1];return a(function(){w.value=p,w.getSnapshot=m,u(w)&&R({inst:w})},[d,p,m]),i(function(){return u(w)&&R({inst:w}),d(function(){u(w)&&R({inst:w})})},[d]),s(p),p}function u(d){var m=d.getSnapshot;d=d.value;try{var p=m();return!r(d,p)}catch{return!0}}function l(d,m){return m()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:o;return td.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,td}var KE;function Wq(){return KE||(KE=1,ed.exports=zq()),ed.exports}/**
43
- * @license React
44
- * use-sync-external-store-shim/with-selector.production.js
45
- *
46
- * Copyright (c) Meta Platforms, Inc. and affiliates.
47
- *
48
- * This source code is licensed under the MIT license found in the
49
- * LICENSE file in the root directory of this source tree.
50
- */var JE;function Yq(){if(JE)return xl;JE=1;var e=TA(),t=Wq();function r(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,s=e.useEffect,o=e.useMemo,u=e.useDebugValue;return xl.useSyncExternalStoreWithSelector=function(l,c,d,m,p){var v=a(null);if(v.current===null){var w={hasValue:!1,value:null};v.current=w}else w=v.current;v=o(function(){function O(S){if(!f){if(f=!0,E=S,S=m(S),p!==void 0&&w.hasValue){var A=w.value;if(p(A,S))return b=A}return b=S}if(A=b,n(E,S))return A;var P=m(S);return p!==void 0&&p(A,P)?(E=S,A):(E=S,b=P)}var f=!1,E,b,h=d===void 0?null:d;return[function(){return O(c())},h===null?void 0:function(){return O(h())}]},[c,d,m,p]);var R=i(l,v[0],v[1]);return s(function(){w.hasValue=!0,w.value=R},[R]),u(R),R},xl}var XE;function Kq(){return XE||(XE=1,Zl.exports=Yq()),Zl.exports}var Jq=Kq();const Xq=SA(Jq),hN={},{useDebugValue:Qq}=IA,{useSyncExternalStoreWithSelector:Zq}=Xq;let QE=!1;const xq=e=>e;function ek(e,t=xq,r){(hN?"production":void 0)!=="production"&&r&&!QE&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),QE=!0);const n=Zq(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return Qq(n),n}const ZE=e=>{(hN?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?Gq(e):e,r=(n,i)=>ek(t,n,i);return Object.assign(r,t),r},No=e=>e?ZE(e):ZE;var Or={},Zn={},xn={},rd={},Nr={},Du={exports:{}},nd={},hn={},ei={},id={},ad={},sd={},xE;function fo(){return xE||(xE=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((E,b)=>`${E}${b}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((E,b)=>(b instanceof r&&(E[b.str]=(E[b.str]||0)+1),E),{})}}e._Code=n,e.nil=new n("");function i(O,...f){const E=[O[0]];let b=0;for(;b<f.length;)o(E,f[b]),E.push(O[++b]);return new n(E)}e._=i;const a=new n("+");function s(O,...f){const E=[p(O[0])];let b=0;for(;b<f.length;)E.push(a),o(E,f[b]),E.push(a,p(O[++b]));return u(E),new n(E)}e.str=s;function o(O,f){f instanceof n?O.push(...f._items):f instanceof r?O.push(f):O.push(d(f))}e.addCodeArg=o;function u(O){let f=1;for(;f<O.length-1;){if(O[f]===a){const E=l(O[f-1],O[f+1]);if(E!==void 0){O.splice(f-1,3,E);continue}O[f++]="+"}f++}}function l(O,f){if(f==='""')return O;if(O==='""')return f;if(typeof O=="string")return f instanceof r||O[O.length-1]!=='"'?void 0:typeof f!="string"?`${O.slice(0,-1)}${f}"`:f[0]==='"'?O.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(O instanceof r))return`"${O}${f.slice(1)}`}function c(O,f){return f.emptyStr()?O:O.emptyStr()?f:s`${O}${f}`}e.strConcat=c;function d(O){return typeof O=="number"||typeof O=="boolean"||O===null?O:p(Array.isArray(O)?O.join(","):O)}function m(O){return new n(p(O))}e.stringify=m;function p(O){return JSON.stringify(O).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=p;function v(O){return typeof O=="string"&&e.IDENTIFIER.test(O)?new n(`.${O}`):i`[${O}]`}e.getProperty=v;function w(O){if(typeof O=="string"&&e.IDENTIFIER.test(O))return new n(`${O}`);throw new Error(`CodeGen: invalid export name: ${O}, use explicit $id name mapping`)}e.getEsmExportName=w;function R(O){return new n(O.toString())}e.regexpCode=R})(sd)),sd}var od={},ev;function tv(){return ev||(ev=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=fo();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:l,parent:c}={}){this._names={},this._prefixes=l,this._parent=c}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const c=this._names[l]||this._nameGroup(l);return`${l}${c.index++}`}_nameGroup(l){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=i;class a extends t.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:d}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(c)}[${d}]`}}e.ValueScopeName=a;const s=(0,t._)`\n`;class o extends i{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?s:t.nil}}get(){return this._scope}name(l){return new a(l,this._newName(l))}value(l,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(l),{prefix:p}=m,v=(d=c.key)!==null&&d!==void 0?d:c.ref;let w=this._values[p];if(w){const f=w.get(v);if(f)return f}else w=this._values[p]=new Map;w.set(v,m);const R=this._scope[p]||(this._scope[p]=[]),O=R.length;return R[O]=c.ref,m.setValue(c,{property:p,itemIndex:O}),m}getValue(l,c){const d=this._values[l];if(d)return d.get(c)}scopeRefs(l,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${l}${d.scopePath}`})}scopeCode(l=this._values,c,d){return this._reduceValues(l,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},c,d)}_reduceValues(l,c,d={},m){let p=t.nil;for(const v in l){const w=l[v];if(!w)continue;const R=d[v]=d[v]||new Map;w.forEach(O=>{if(R.has(O))return;R.set(O,n.Started);let f=c(O);if(f){const E=this.opts.es5?e.varKinds.var:e.varKinds.const;p=(0,t._)`${p}${E} ${O} = ${f};${this.opts._n}`}else if(f=m==null?void 0:m(O))p=(0,t._)`${p}${f}${this.opts._n}`;else throw new r(O);R.set(O,n.Completed)})}return p}}e.ValueScope=o})(od)),od}var rv;function Ke(){return rv||(rv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=fo(),r=tv();var n=fo();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=tv();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(N,D){return this}}class s extends a{constructor(N,D,Z){super(),this.varKind=N,this.name=D,this.rhs=Z}render({es5:N,_n:D}){const Z=N?r.varKinds.var:this.varKind,Ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${Z} ${this.name}${Ee};`+D}optimizeNames(N,D){if(N[this.name.str])return this.rhs&&(this.rhs=F(this.rhs,N,D)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(N,D,Z){super(),this.lhs=N,this.rhs=D,this.sideEffects=Z}render({_n:N}){return`${this.lhs} = ${this.rhs};`+N}optimizeNames(N,D){if(!(this.lhs instanceof t.Name&&!N[this.lhs.str]&&!this.sideEffects))return this.rhs=F(this.rhs,N,D),this}get names(){const N=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(N,this.rhs)}}class u extends o{constructor(N,D,Z,Ee){super(N,Z,Ee),this.op=D}render({_n:N}){return`${this.lhs} ${this.op}= ${this.rhs};`+N}}class l extends a{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`${this.label}:`+N}}class c extends a{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`break${this.label?` ${this.label}`:""};`+N}}class d extends a{constructor(N){super(),this.error=N}render({_n:N}){return`throw ${this.error};`+N}get names(){return this.error.names}}class m extends a{constructor(N){super(),this.code=N}render({_n:N}){return`${this.code};`+N}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(N,D){return this.code=F(this.code,N,D),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class p extends a{constructor(N=[]){super(),this.nodes=N}render(N){return this.nodes.reduce((D,Z)=>D+Z.render(N),"")}optimizeNodes(){const{nodes:N}=this;let D=N.length;for(;D--;){const Z=N[D].optimizeNodes();Array.isArray(Z)?N.splice(D,1,...Z):Z?N[D]=Z:N.splice(D,1)}return N.length>0?this:void 0}optimizeNames(N,D){const{nodes:Z}=this;let Ee=Z.length;for(;Ee--;){const _e=Z[Ee];_e.optimizeNames(N,D)||(ce(N,_e.names),Z.splice(Ee,1))}return Z.length>0?this:void 0}get names(){return this.nodes.reduce((N,D)=>W(N,D.names),{})}}class v extends p{render(N){return"{"+N._n+super.render(N)+"}"+N._n}}class w extends p{}class R extends v{}R.kind="else";class O extends v{constructor(N,D){super(D),this.condition=N}render(N){let D=`if(${this.condition})`+super.render(N);return this.else&&(D+="else "+this.else.render(N)),D}optimizeNodes(){super.optimizeNodes();const N=this.condition;if(N===!0)return this.nodes;let D=this.else;if(D){const Z=D.optimizeNodes();D=this.else=Array.isArray(Z)?new R(Z):Z}if(D)return N===!1?D instanceof O?D:D.nodes:this.nodes.length?this:new O(se(N),D instanceof O?[D]:D.nodes);if(!(N===!1||!this.nodes.length))return this}optimizeNames(N,D){var Z;if(this.else=(Z=this.else)===null||Z===void 0?void 0:Z.optimizeNames(N,D),!!(super.optimizeNames(N,D)||this.else))return this.condition=F(this.condition,N,D),this}get names(){const N=super.names;return U(N,this.condition),this.else&&W(N,this.else.names),N}}O.kind="if";class f extends v{}f.kind="for";class E extends f{constructor(N){super(),this.iteration=N}render(N){return`for(${this.iteration})`+super.render(N)}optimizeNames(N,D){if(super.optimizeNames(N,D))return this.iteration=F(this.iteration,N,D),this}get names(){return W(super.names,this.iteration.names)}}class b extends f{constructor(N,D,Z,Ee){super(),this.varKind=N,this.name=D,this.from=Z,this.to=Ee}render(N){const D=N.es5?r.varKinds.var:this.varKind,{name:Z,from:Ee,to:_e}=this;return`for(${D} ${Z}=${Ee}; ${Z}<${_e}; ${Z}++)`+super.render(N)}get names(){const N=U(super.names,this.from);return U(N,this.to)}}class h extends f{constructor(N,D,Z,Ee){super(),this.loop=N,this.varKind=D,this.name=Z,this.iterable=Ee}render(N){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(N)}optimizeNames(N,D){if(super.optimizeNames(N,D))return this.iterable=F(this.iterable,N,D),this}get names(){return W(super.names,this.iterable.names)}}class S extends v{constructor(N,D,Z){super(),this.name=N,this.args=D,this.async=Z}render(N){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(N)}}S.kind="func";class A extends p{render(N){return"return "+super.render(N)}}A.kind="return";class P extends v{render(N){let D="try"+super.render(N);return this.catch&&(D+=this.catch.render(N)),this.finally&&(D+=this.finally.render(N)),D}optimizeNodes(){var N,D;return super.optimizeNodes(),(N=this.catch)===null||N===void 0||N.optimizeNodes(),(D=this.finally)===null||D===void 0||D.optimizeNodes(),this}optimizeNames(N,D){var Z,Ee;return super.optimizeNames(N,D),(Z=this.catch)===null||Z===void 0||Z.optimizeNames(N,D),(Ee=this.finally)===null||Ee===void 0||Ee.optimizeNames(N,D),this}get names(){const N=super.names;return this.catch&&W(N,this.catch.names),this.finally&&W(N,this.finally.names),N}}class k extends v{constructor(N){super(),this.error=N}render(N){return`catch(${this.error})`+super.render(N)}}k.kind="catch";class z extends v{render(N){return"finally"+super.render(N)}}z.kind="finally";class Y{constructor(N,D={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...D,_n:D.lines?`
51
- `:""},this._extScope=N,this._scope=new r.Scope({parent:N}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(N){return this._scope.name(N)}scopeName(N){return this._extScope.name(N)}scopeValue(N,D){const Z=this._extScope.value(N,D);return(this._values[Z.prefix]||(this._values[Z.prefix]=new Set)).add(Z),Z}getScopeValue(N,D){return this._extScope.getValue(N,D)}scopeRefs(N){return this._extScope.scopeRefs(N,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(N,D,Z,Ee){const _e=this._scope.toName(D);return Z!==void 0&&Ee&&(this._constants[_e.str]=Z),this._leafNode(new s(N,_e,Z)),_e}const(N,D,Z){return this._def(r.varKinds.const,N,D,Z)}let(N,D,Z){return this._def(r.varKinds.let,N,D,Z)}var(N,D,Z){return this._def(r.varKinds.var,N,D,Z)}assign(N,D,Z){return this._leafNode(new o(N,D,Z))}add(N,D){return this._leafNode(new u(N,e.operators.ADD,D))}code(N){return typeof N=="function"?N():N!==t.nil&&this._leafNode(new m(N)),this}object(...N){const D=["{"];for(const[Z,Ee]of N)D.length>1&&D.push(","),D.push(Z),(Z!==Ee||this.opts.es5)&&(D.push(":"),(0,t.addCodeArg)(D,Ee));return D.push("}"),new t._Code(D)}if(N,D,Z){if(this._blockNode(new O(N)),D&&Z)this.code(D).else().code(Z).endIf();else if(D)this.code(D).endIf();else if(Z)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(N){return this._elseNode(new O(N))}else(){return this._elseNode(new R)}endIf(){return this._endBlockNode(O,R)}_for(N,D){return this._blockNode(N),D&&this.code(D).endFor(),this}for(N,D){return this._for(new E(N),D)}forRange(N,D,Z,Ee,_e=this.opts.es5?r.varKinds.var:r.varKinds.let){const Se=this._scope.toName(N);return this._for(new b(_e,Se,D,Z),()=>Ee(Se))}forOf(N,D,Z,Ee=r.varKinds.const){const _e=this._scope.toName(N);if(this.opts.es5){const Se=D instanceof t.Name?D:this.var("_arr",D);return this.forRange("_i",0,(0,t._)`${Se}.length`,Ie=>{this.var(_e,(0,t._)`${Se}[${Ie}]`),Z(_e)})}return this._for(new h("of",Ee,_e,D),()=>Z(_e))}forIn(N,D,Z,Ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(N,(0,t._)`Object.keys(${D})`,Z);const _e=this._scope.toName(N);return this._for(new h("in",Ee,_e,D),()=>Z(_e))}endFor(){return this._endBlockNode(f)}label(N){return this._leafNode(new l(N))}break(N){return this._leafNode(new c(N))}return(N){const D=new A;if(this._blockNode(D),this.code(N),D.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(N,D,Z){if(!D&&!Z)throw new Error('CodeGen: "try" without "catch" and "finally"');const Ee=new P;if(this._blockNode(Ee),this.code(N),D){const _e=this.name("e");this._currNode=Ee.catch=new k(_e),D(_e)}return Z&&(this._currNode=Ee.finally=new z,this.code(Z)),this._endBlockNode(k,z)}throw(N){return this._leafNode(new d(N))}block(N,D){return this._blockStarts.push(this._nodes.length),N&&this.code(N).endBlock(D),this}endBlock(N){const D=this._blockStarts.pop();if(D===void 0)throw new Error("CodeGen: not in self-balancing block");const Z=this._nodes.length-D;if(Z<0||N!==void 0&&Z!==N)throw new Error(`CodeGen: wrong number of nodes: ${Z} vs ${N} expected`);return this._nodes.length=D,this}func(N,D=t.nil,Z,Ee){return this._blockNode(new S(N,D,Z)),Ee&&this.code(Ee).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(N=1){for(;N-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(N){return this._currNode.nodes.push(N),this}_blockNode(N){this._currNode.nodes.push(N),this._nodes.push(N)}_endBlockNode(N,D){const Z=this._currNode;if(Z instanceof N||D&&Z instanceof D)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${D?`${N.kind}/${D.kind}`:N.kind}"`)}_elseNode(N){const D=this._currNode;if(!(D instanceof O))throw new Error('CodeGen: "else" without "if"');return this._currNode=D.else=N,this}get _root(){return this._nodes[0]}get _currNode(){const N=this._nodes;return N[N.length-1]}set _currNode(N){const D=this._nodes;D[D.length-1]=N}}e.CodeGen=Y;function W(H,N){for(const D in N)H[D]=(H[D]||0)+(N[D]||0);return H}function U(H,N){return N instanceof t._CodeOrName?W(H,N.names):H}function F(H,N,D){if(H instanceof t.Name)return Z(H);if(!Ee(H))return H;return new t._Code(H._items.reduce((_e,Se)=>(Se instanceof t.Name&&(Se=Z(Se)),Se instanceof t._Code?_e.push(...Se._items):_e.push(Se),_e),[]));function Z(_e){const Se=D[_e.str];return Se===void 0||N[_e.str]!==1?_e:(delete N[_e.str],Se)}function Ee(_e){return _e instanceof t._Code&&_e._items.some(Se=>Se instanceof t.Name&&N[Se.str]===1&&D[Se.str]!==void 0)}}function ce(H,N){for(const D in N)H[D]=(H[D]||0)-(N[D]||0)}function se(H){return typeof H=="boolean"||typeof H=="number"||H===null?!H:(0,t._)`!${L(H)}`}e.not=se;const ne=j(e.operators.AND);function X(...H){return H.reduce(ne)}e.and=X;const K=j(e.operators.OR);function $(...H){return H.reduce(K)}e.or=$;function j(H){return(N,D)=>N===t.nil?D:D===t.nil?N:(0,t._)`${L(N)} ${H} ${L(D)}`}function L(H){return H instanceof t.Name?H:(0,t._)`(${H})`}})(ad)),ad}var Ze={},nv;function lt(){if(nv)return Ze;nv=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.checkStrictMode=Ze.getErrorPath=Ze.Type=Ze.useFunc=Ze.setEvaluated=Ze.evaluatedPropsToName=Ze.mergeEvaluated=Ze.eachItem=Ze.unescapeJsonPointer=Ze.escapeJsonPointer=Ze.escapeFragment=Ze.unescapeFragment=Ze.schemaRefOrVal=Ze.schemaHasRulesButRef=Ze.schemaHasRules=Ze.checkUnknownRules=Ze.alwaysValidSchema=Ze.toHash=void 0;const e=Ke(),t=fo();function r(h){const S={};for(const A of h)S[A]=!0;return S}Ze.toHash=r;function n(h,S){return typeof S=="boolean"?S:Object.keys(S).length===0?!0:(i(h,S),!a(S,h.self.RULES.all))}Ze.alwaysValidSchema=n;function i(h,S=h.schema){const{opts:A,self:P}=h;if(!A.strictSchema||typeof S=="boolean")return;const k=P.RULES.keywords;for(const z in S)k[z]||b(h,`unknown keyword: "${z}"`)}Ze.checkUnknownRules=i;function a(h,S){if(typeof h=="boolean")return!h;for(const A in h)if(S[A])return!0;return!1}Ze.schemaHasRules=a;function s(h,S){if(typeof h=="boolean")return!h;for(const A in h)if(A!=="$ref"&&S.all[A])return!0;return!1}Ze.schemaHasRulesButRef=s;function o({topSchemaRef:h,schemaPath:S},A,P,k){if(!k){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,e._)`${A}`}return(0,e._)`${h}${S}${(0,e.getProperty)(P)}`}Ze.schemaRefOrVal=o;function u(h){return d(decodeURIComponent(h))}Ze.unescapeFragment=u;function l(h){return encodeURIComponent(c(h))}Ze.escapeFragment=l;function c(h){return typeof h=="number"?`${h}`:h.replace(/~/g,"~0").replace(/\//g,"~1")}Ze.escapeJsonPointer=c;function d(h){return h.replace(/~1/g,"/").replace(/~0/g,"~")}Ze.unescapeJsonPointer=d;function m(h,S){if(Array.isArray(h))for(const A of h)S(A);else S(h)}Ze.eachItem=m;function p({mergeNames:h,mergeToName:S,mergeValues:A,resultToName:P}){return(k,z,Y,W)=>{const U=Y===void 0?z:Y instanceof e.Name?(z instanceof e.Name?h(k,z,Y):S(k,z,Y),Y):z instanceof e.Name?(S(k,Y,z),z):A(z,Y);return W===e.Name&&!(U instanceof e.Name)?P(k,U):U}}Ze.mergeEvaluated={props:p({mergeNames:(h,S,A)=>h.if((0,e._)`${A} !== true && ${S} !== undefined`,()=>{h.if((0,e._)`${S} === true`,()=>h.assign(A,!0),()=>h.assign(A,(0,e._)`${A} || {}`).code((0,e._)`Object.assign(${A}, ${S})`))}),mergeToName:(h,S,A)=>h.if((0,e._)`${A} !== true`,()=>{S===!0?h.assign(A,!0):(h.assign(A,(0,e._)`${A} || {}`),w(h,A,S))}),mergeValues:(h,S)=>h===!0?!0:{...h,...S},resultToName:v}),items:p({mergeNames:(h,S,A)=>h.if((0,e._)`${A} !== true && ${S} !== undefined`,()=>h.assign(A,(0,e._)`${S} === true ? true : ${A} > ${S} ? ${A} : ${S}`)),mergeToName:(h,S,A)=>h.if((0,e._)`${A} !== true`,()=>h.assign(A,S===!0?!0:(0,e._)`${A} > ${S} ? ${A} : ${S}`)),mergeValues:(h,S)=>h===!0?!0:Math.max(h,S),resultToName:(h,S)=>h.var("items",S)})};function v(h,S){if(S===!0)return h.var("props",!0);const A=h.var("props",(0,e._)`{}`);return S!==void 0&&w(h,A,S),A}Ze.evaluatedPropsToName=v;function w(h,S,A){Object.keys(A).forEach(P=>h.assign((0,e._)`${S}${(0,e.getProperty)(P)}`,!0))}Ze.setEvaluated=w;const R={};function O(h,S){return h.scopeValue("func",{ref:S,code:R[S.code]||(R[S.code]=new t._Code(S.code))})}Ze.useFunc=O;var f;(function(h){h[h.Num=0]="Num",h[h.Str=1]="Str"})(f||(Ze.Type=f={}));function E(h,S,A){if(h instanceof e.Name){const P=S===f.Num;return A?P?(0,e._)`"[" + ${h} + "]"`:(0,e._)`"['" + ${h} + "']"`:P?(0,e._)`"/" + ${h}`:(0,e._)`"/" + ${h}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,e.getProperty)(h).toString():"/"+c(h)}Ze.getErrorPath=E;function b(h,S,A=h.opts.strictSchema){if(A){if(S=`strict mode: ${S}`,A===!0)throw new Error(S);h.self.logger.warn(S)}}return Ze.checkStrictMode=b,Ze}var $u={},iv;function Pn(){if(iv)return $u;iv=1,Object.defineProperty($u,"__esModule",{value:!0});const e=Ke(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return $u.default=t,$u}var av;function Po(){return av||(av=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=Ke(),r=lt(),n=Pn();e.keywordError={message:({keyword:R})=>(0,t.str)`must pass "${R}" keyword validation`},e.keyword$DataError={message:({keyword:R,schemaType:O})=>O?(0,t.str)`"${R}" keyword must be ${O} ($data)`:(0,t.str)`"${R}" keyword is invalid ($data)`};function i(R,O=e.keywordError,f,E){const{it:b}=R,{gen:h,compositeRule:S,allErrors:A}=b,P=d(R,O,f);E??(S||A)?u(h,P):l(b,(0,t._)`[${P}]`)}e.reportError=i;function a(R,O=e.keywordError,f){const{it:E}=R,{gen:b,compositeRule:h,allErrors:S}=E,A=d(R,O,f);u(b,A),h||S||l(E,n.default.vErrors)}e.reportExtraError=a;function s(R,O){R.assign(n.default.errors,O),R.if((0,t._)`${n.default.vErrors} !== null`,()=>R.if(O,()=>R.assign((0,t._)`${n.default.vErrors}.length`,O),()=>R.assign(n.default.vErrors,null)))}e.resetErrorsCount=s;function o({gen:R,keyword:O,schemaValue:f,data:E,errsCount:b,it:h}){if(b===void 0)throw new Error("ajv implementation error");const S=R.name("err");R.forRange("i",b,n.default.errors,A=>{R.const(S,(0,t._)`${n.default.vErrors}[${A}]`),R.if((0,t._)`${S}.instancePath === undefined`,()=>R.assign((0,t._)`${S}.instancePath`,(0,t.strConcat)(n.default.instancePath,h.errorPath))),R.assign((0,t._)`${S}.schemaPath`,(0,t.str)`${h.errSchemaPath}/${O}`),h.opts.verbose&&(R.assign((0,t._)`${S}.schema`,f),R.assign((0,t._)`${S}.data`,E))})}e.extendErrors=o;function u(R,O){const f=R.const("err",O);R.if((0,t._)`${n.default.vErrors} === null`,()=>R.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),R.code((0,t._)`${n.default.errors}++`)}function l(R,O){const{gen:f,validateName:E,schemaEnv:b}=R;b.$async?f.throw((0,t._)`new ${R.ValidationError}(${O})`):(f.assign((0,t._)`${E}.errors`,O),f.return(!1))}const c={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(R,O,f){const{createErrors:E}=R.it;return E===!1?(0,t._)`{}`:m(R,O,f)}function m(R,O,f={}){const{gen:E,it:b}=R,h=[p(b,f),v(R,f)];return w(R,O,h),E.object(...h)}function p({errorPath:R},{instancePath:O}){const f=O?(0,t.str)`${R}${(0,r.getErrorPath)(O,r.Type.Str)}`:R;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function v({keyword:R,it:{errSchemaPath:O}},{schemaPath:f,parentSchema:E}){let b=E?O:(0,t.str)`${O}/${R}`;return f&&(b=(0,t.str)`${b}${(0,r.getErrorPath)(f,r.Type.Str)}`),[c.schemaPath,b]}function w(R,{params:O,message:f},E){const{keyword:b,data:h,schemaValue:S,it:A}=R,{opts:P,propertyName:k,topSchemaRef:z,schemaPath:Y}=A;E.push([c.keyword,b],[c.params,typeof O=="function"?O(R):O||(0,t._)`{}`]),P.messages&&E.push([c.message,typeof f=="function"?f(R):f]),P.verbose&&E.push([c.schema,S],[c.parentSchema,(0,t._)`${z}${Y}`],[n.default.data,h]),k&&E.push([c.propertyName,k])}})(id)),id}var sv;function tk(){if(sv)return ei;sv=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.boolOrEmptySchema=ei.topBoolOrEmptySchema=void 0;const e=Po(),t=Ke(),r=Pn(),n={message:"boolean schema is false"};function i(o){const{gen:u,schema:l,validateName:c}=o;l===!1?s(o,!1):typeof l=="object"&&l.$async===!0?u.return(r.default.data):(u.assign((0,t._)`${c}.errors`,null),u.return(!0))}ei.topBoolOrEmptySchema=i;function a(o,u){const{gen:l,schema:c}=o;c===!1?(l.var(u,!1),s(o)):l.var(u,!0)}ei.boolOrEmptySchema=a;function s(o,u){const{gen:l,data:c}=o,d={gen:l,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)(d,n,void 0,u)}return ei}var Yt={},ti={},ov;function yN(){if(ov)return ti;ov=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.getRules=ti.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(i){return typeof i=="string"&&t.has(i)}ti.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return ti.getRules=n,ti}var yn={},uv;function gN(){if(uv)return yn;uv=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.shouldUseRule=yn.shouldUseGroup=yn.schemaHasRulesForType=void 0;function e({schema:n,self:i},a){const s=i.RULES.types[a];return s&&s!==!0&&t(n,s)}yn.schemaHasRulesForType=e;function t(n,i){return i.rules.some(a=>r(n,a))}yn.shouldUseGroup=t;function r(n,i){var a;return n[i.keyword]!==void 0||((a=i.definition.implements)===null||a===void 0?void 0:a.some(s=>n[s]!==void 0))}return yn.shouldUseRule=r,yn}var cv;function il(){if(cv)return Yt;cv=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.reportTypeError=Yt.checkDataTypes=Yt.checkDataType=Yt.coerceAndCheckDataType=Yt.getJSONTypes=Yt.getSchemaTypes=Yt.DataType=void 0;const e=yN(),t=gN(),r=Po(),n=Ke(),i=lt();var a;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(a||(Yt.DataType=a={}));function s(f){const E=o(f.type);if(E.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!E.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&E.push("null")}return E}Yt.getSchemaTypes=s;function o(f){const E=Array.isArray(f)?f:f?[f]:[];if(E.every(e.isJSONType))return E;throw new Error("type must be JSONType or JSONType[]: "+E.join(","))}Yt.getJSONTypes=o;function u(f,E){const{gen:b,data:h,opts:S}=f,A=c(E,S.coerceTypes),P=E.length>0&&!(A.length===0&&E.length===1&&(0,t.schemaHasRulesForType)(f,E[0]));if(P){const k=v(E,h,S.strictNumbers,a.Wrong);b.if(k,()=>{A.length?d(f,E,A):R(f)})}return P}Yt.coerceAndCheckDataType=u;const l=new Set(["string","number","integer","boolean","null"]);function c(f,E){return E?f.filter(b=>l.has(b)||E==="array"&&b==="array"):[]}function d(f,E,b){const{gen:h,data:S,opts:A}=f,P=h.let("dataType",(0,n._)`typeof ${S}`),k=h.let("coerced",(0,n._)`undefined`);A.coerceTypes==="array"&&h.if((0,n._)`${P} == 'object' && Array.isArray(${S}) && ${S}.length == 1`,()=>h.assign(S,(0,n._)`${S}[0]`).assign(P,(0,n._)`typeof ${S}`).if(v(E,S,A.strictNumbers),()=>h.assign(k,S))),h.if((0,n._)`${k} !== undefined`);for(const Y of b)(l.has(Y)||Y==="array"&&A.coerceTypes==="array")&&z(Y);h.else(),R(f),h.endIf(),h.if((0,n._)`${k} !== undefined`,()=>{h.assign(S,k),m(f,k)});function z(Y){switch(Y){case"string":h.elseIf((0,n._)`${P} == "number" || ${P} == "boolean"`).assign(k,(0,n._)`"" + ${S}`).elseIf((0,n._)`${S} === null`).assign(k,(0,n._)`""`);return;case"number":h.elseIf((0,n._)`${P} == "boolean" || ${S} === null
52
- || (${P} == "string" && ${S} && ${S} == +${S})`).assign(k,(0,n._)`+${S}`);return;case"integer":h.elseIf((0,n._)`${P} === "boolean" || ${S} === null
53
- || (${P} === "string" && ${S} && ${S} == +${S} && !(${S} % 1))`).assign(k,(0,n._)`+${S}`);return;case"boolean":h.elseIf((0,n._)`${S} === "false" || ${S} === 0 || ${S} === null`).assign(k,!1).elseIf((0,n._)`${S} === "true" || ${S} === 1`).assign(k,!0);return;case"null":h.elseIf((0,n._)`${S} === "" || ${S} === 0 || ${S} === false`),h.assign(k,null);return;case"array":h.elseIf((0,n._)`${P} === "string" || ${P} === "number"
54
- || ${P} === "boolean" || ${S} === null`).assign(k,(0,n._)`[${S}]`)}}}function m({gen:f,parentData:E,parentDataProperty:b},h){f.if((0,n._)`${E} !== undefined`,()=>f.assign((0,n._)`${E}[${b}]`,h))}function p(f,E,b,h=a.Correct){const S=h===a.Correct?n.operators.EQ:n.operators.NEQ;let A;switch(f){case"null":return(0,n._)`${E} ${S} null`;case"array":A=(0,n._)`Array.isArray(${E})`;break;case"object":A=(0,n._)`${E} && typeof ${E} == "object" && !Array.isArray(${E})`;break;case"integer":A=P((0,n._)`!(${E} % 1) && !isNaN(${E})`);break;case"number":A=P();break;default:return(0,n._)`typeof ${E} ${S} ${f}`}return h===a.Correct?A:(0,n.not)(A);function P(k=n.nil){return(0,n.and)((0,n._)`typeof ${E} == "number"`,k,b?(0,n._)`isFinite(${E})`:n.nil)}}Yt.checkDataType=p;function v(f,E,b,h){if(f.length===1)return p(f[0],E,b,h);let S;const A=(0,i.toHash)(f);if(A.array&&A.object){const P=(0,n._)`typeof ${E} != "object"`;S=A.null?P:(0,n._)`!${E} || ${P}`,delete A.null,delete A.array,delete A.object}else S=n.nil;A.number&&delete A.integer;for(const P in A)S=(0,n.and)(S,p(P,E,b,h));return S}Yt.checkDataTypes=v;const w={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:E})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${E}}`};function R(f){const E=O(f);(0,r.reportError)(E,w)}Yt.reportTypeError=R;function O(f){const{gen:E,data:b,schema:h}=f,S=(0,i.schemaRefOrVal)(f,h,"type");return{gen:E,keyword:"type",data:b,schema:h.type,schemaCode:S,schemaValue:S,parentSchema:h,params:{},it:f}}return Yt}var fs={},lv;function rk(){if(lv)return fs;lv=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.assignDefaults=void 0;const e=Ke(),t=lt();function r(i,a){const{properties:s,items:o}=i.schema;if(a==="object"&&s)for(const u in s)n(i,u,s[u].default);else a==="array"&&Array.isArray(o)&&o.forEach((u,l)=>n(i,l,u.default))}fs.assignDefaults=r;function n(i,a,s){const{gen:o,compositeRule:u,data:l,opts:c}=i;if(s===void 0)return;const d=(0,e._)`${l}${(0,e.getProperty)(a)}`;if(u){(0,t.checkStrictMode)(i,`default is ignored for: ${d}`);return}let m=(0,e._)`${d} === undefined`;c.useDefaults==="empty"&&(m=(0,e._)`${m} || ${d} === null || ${d} === ""`),o.if(m,(0,e._)`${d} = ${(0,e.stringify)(s)}`)}return fs}var Pr={},yt={},dv;function Fr(){if(dv)return yt;dv=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.validateUnion=yt.validateArray=yt.usePattern=yt.callValidateCode=yt.schemaProperties=yt.allSchemaProperties=yt.noPropertyInData=yt.propertyInData=yt.isOwnProperty=yt.hasPropFunc=yt.reportMissingProp=yt.checkMissingProp=yt.checkReportMissingProp=void 0;const e=Ke(),t=lt(),r=Pn(),n=lt();function i(f,E){const{gen:b,data:h,it:S}=f;b.if(c(b,h,E,S.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${E}`},!0),f.error()})}yt.checkReportMissingProp=i;function a({gen:f,data:E,it:{opts:b}},h,S){return(0,e.or)(...h.map(A=>(0,e.and)(c(f,E,A,b.ownProperties),(0,e._)`${S} = ${A}`)))}yt.checkMissingProp=a;function s(f,E){f.setParams({missingProperty:E},!0),f.error()}yt.reportMissingProp=s;function o(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}yt.hasPropFunc=o;function u(f,E,b){return(0,e._)`${o(f)}.call(${E}, ${b})`}yt.isOwnProperty=u;function l(f,E,b,h){const S=(0,e._)`${E}${(0,e.getProperty)(b)} !== undefined`;return h?(0,e._)`${S} && ${u(f,E,b)}`:S}yt.propertyInData=l;function c(f,E,b,h){const S=(0,e._)`${E}${(0,e.getProperty)(b)} === undefined`;return h?(0,e.or)(S,(0,e.not)(u(f,E,b))):S}yt.noPropertyInData=c;function d(f){return f?Object.keys(f).filter(E=>E!=="__proto__"):[]}yt.allSchemaProperties=d;function m(f,E){return d(E).filter(b=>!(0,t.alwaysValidSchema)(f,E[b]))}yt.schemaProperties=m;function p({schemaCode:f,data:E,it:{gen:b,topSchemaRef:h,schemaPath:S,errorPath:A},it:P},k,z,Y){const W=Y?(0,e._)`${f}, ${E}, ${h}${S}`:E,U=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,A)],[r.default.parentData,P.parentData],[r.default.parentDataProperty,P.parentDataProperty],[r.default.rootData,r.default.rootData]];P.opts.dynamicRef&&U.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const F=(0,e._)`${W}, ${b.object(...U)}`;return z!==e.nil?(0,e._)`${k}.call(${z}, ${F})`:(0,e._)`${k}(${F})`}yt.callValidateCode=p;const v=(0,e._)`new RegExp`;function w({gen:f,it:{opts:E}},b){const h=E.unicodeRegExp?"u":"",{regExp:S}=E.code,A=S(b,h);return f.scopeValue("pattern",{key:A.toString(),ref:A,code:(0,e._)`${S.code==="new RegExp"?v:(0,n.useFunc)(f,S)}(${b}, ${h})`})}yt.usePattern=w;function R(f){const{gen:E,data:b,keyword:h,it:S}=f,A=E.name("valid");if(S.allErrors){const k=E.let("valid",!0);return P(()=>E.assign(k,!1)),k}return E.var(A,!0),P(()=>E.break()),A;function P(k){const z=E.const("len",(0,e._)`${b}.length`);E.forRange("i",0,z,Y=>{f.subschema({keyword:h,dataProp:Y,dataPropType:t.Type.Num},A),E.if((0,e.not)(A),k)})}}yt.validateArray=R;function O(f){const{gen:E,schema:b,keyword:h,it:S}=f;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(z=>(0,t.alwaysValidSchema)(S,z))&&!S.opts.unevaluated)return;const P=E.let("valid",!1),k=E.name("_valid");E.block(()=>b.forEach((z,Y)=>{const W=f.subschema({keyword:h,schemaProp:Y,compositeRule:!0},k);E.assign(P,(0,e._)`${P} || ${k}`),f.mergeValidEvaluated(W,k)||E.if((0,e.not)(P))})),f.result(P,()=>f.reset(),()=>f.error(!0))}return yt.validateUnion=O,yt}var fv;function nk(){if(fv)return Pr;fv=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.validateKeywordUsage=Pr.validSchemaType=Pr.funcKeywordCode=Pr.macroKeywordCode=void 0;const e=Ke(),t=Pn(),r=Fr(),n=Po();function i(m,p){const{gen:v,keyword:w,schema:R,parentSchema:O,it:f}=m,E=p.macro.call(f.self,R,O,f),b=l(v,w,E);f.opts.validateSchema!==!1&&f.self.validateSchema(E,!0);const h=v.name("valid");m.subschema({schema:E,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${w}`,topSchemaRef:b,compositeRule:!0},h),m.pass(h,()=>m.error(!0))}Pr.macroKeywordCode=i;function a(m,p){var v;const{gen:w,keyword:R,schema:O,parentSchema:f,$data:E,it:b}=m;u(b,p);const h=!E&&p.compile?p.compile.call(b.self,O,f,b):p.validate,S=l(w,R,h),A=w.let("valid");m.block$data(A,P),m.ok((v=p.valid)!==null&&v!==void 0?v:A);function P(){if(p.errors===!1)Y(),p.modifying&&s(m),W(()=>m.error());else{const U=p.async?k():z();p.modifying&&s(m),W(()=>o(m,U))}}function k(){const U=w.let("ruleErrs",null);return w.try(()=>Y((0,e._)`await `),F=>w.assign(A,!1).if((0,e._)`${F} instanceof ${b.ValidationError}`,()=>w.assign(U,(0,e._)`${F}.errors`),()=>w.throw(F))),U}function z(){const U=(0,e._)`${S}.errors`;return w.assign(U,null),Y(e.nil),U}function Y(U=p.async?(0,e._)`await `:e.nil){const F=b.opts.passContext?t.default.this:t.default.self,ce=!("compile"in p&&!E||p.schema===!1);w.assign(A,(0,e._)`${U}${(0,r.callValidateCode)(m,S,F,ce)}`,p.modifying)}function W(U){var F;w.if((0,e.not)((F=p.valid)!==null&&F!==void 0?F:A),U)}}Pr.funcKeywordCode=a;function s(m){const{gen:p,data:v,it:w}=m;p.if(w.parentData,()=>p.assign(v,(0,e._)`${w.parentData}[${w.parentDataProperty}]`))}function o(m,p){const{gen:v}=m;v.if((0,e._)`Array.isArray(${p})`,()=>{v.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${p} : ${t.default.vErrors}.concat(${p})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(m)},()=>m.error())}function u({schemaEnv:m},p){if(p.async&&!m.$async)throw new Error("async keyword in sync schema")}function l(m,p,v){if(v===void 0)throw new Error(`keyword "${p}" failed to compile`);return m.scopeValue("keyword",typeof v=="function"?{ref:v}:{ref:v,code:(0,e.stringify)(v)})}function c(m,p,v=!1){return!p.length||p.some(w=>w==="array"?Array.isArray(m):w==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==w||v&&typeof m>"u")}Pr.validSchemaType=c;function d({schema:m,opts:p,self:v,errSchemaPath:w},R,O){if(Array.isArray(R.keyword)?!R.keyword.includes(O):R.keyword!==O)throw new Error("ajv implementation error");const f=R.dependencies;if(f!=null&&f.some(E=>!Object.prototype.hasOwnProperty.call(m,E)))throw new Error(`parent schema must have dependencies of ${O}: ${f.join(",")}`);if(R.validateSchema&&!R.validateSchema(m[O])){const b=`keyword "${O}" value is invalid at path "${w}": `+v.errorsText(R.validateSchema.errors);if(p.validateSchema==="log")v.logger.error(b);else throw new Error(b)}}return Pr.validateKeywordUsage=d,Pr}var gn={},pv;function ik(){if(pv)return gn;pv=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.extendSubschemaMode=gn.extendSubschemaData=gn.getSubschema=void 0;const e=Ke(),t=lt();function r(a,{keyword:s,schemaProp:o,schema:u,schemaPath:l,errSchemaPath:c,topSchemaRef:d}){if(s!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const m=a.schema[s];return o===void 0?{schema:m,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:m[o],schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,t.escapeFragment)(o)}`}}if(u!==void 0){if(l===void 0||c===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:d,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}gn.getSubschema=r;function n(a,s,{dataProp:o,dataPropType:u,data:l,dataTypes:c,propertyName:d}){if(l!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=s;if(o!==void 0){const{errorPath:v,dataPathArr:w,opts:R}=s,O=m.let("data",(0,e._)`${s.data}${(0,e.getProperty)(o)}`,!0);p(O),a.errorPath=(0,e.str)`${v}${(0,t.getErrorPath)(o,u,R.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${o}`,a.dataPathArr=[...w,a.parentDataProperty]}if(l!==void 0){const v=l instanceof e.Name?l:m.let("data",l,!0);p(v),d!==void 0&&(a.propertyName=d)}c&&(a.dataTypes=c);function p(v){a.data=v,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,v]}}gn.extendSubschemaData=n;function i(a,{jtdDiscriminator:s,jtdMetadata:o,compositeRule:u,createErrors:l,allErrors:c}){u!==void 0&&(a.compositeRule=u),l!==void 0&&(a.createErrors=l),c!==void 0&&(a.allErrors=c),a.jtdDiscriminator=s,a.jtdMetadata=o}return gn.extendSubschemaMode=i,gn}var or={},ud,mv;function Ug(){return mv||(mv=1,ud=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var s=a[i];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}),ud}var cd={exports:{}},hv;function ak(){if(hv)return cd.exports;hv=1;var e=cd.exports=function(n,i,a){typeof i=="function"&&(a=i,i={}),a=i.cb||a;var s=typeof a=="function"?a:a.pre||function(){},o=a.post||function(){};t(i,s,o,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,i,a,s,o,u,l,c,d,m){if(s&&typeof s=="object"&&!Array.isArray(s)){i(s,o,u,l,c,d,m);for(var p in s){var v=s[p];if(Array.isArray(v)){if(p in e.arrayKeywords)for(var w=0;w<v.length;w++)t(n,i,a,v[w],o+"/"+p+"/"+w,u,o,p,s,w)}else if(p in e.propsKeywords){if(v&&typeof v=="object")for(var R in v)t(n,i,a,v[R],o+"/"+p+"/"+r(R),u,o,p,s,R)}else(p in e.keywords||n.allKeys&&!(p in e.skipKeywords))&&t(n,i,a,v,o+"/"+p,u,o,p,s)}a(s,o,u,l,c,d,m)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return cd.exports}var yv;function _l(){if(yv)return or;yv=1,Object.defineProperty(or,"__esModule",{value:!0}),or.getSchemaRefs=or.resolveUrl=or.normalizeId=or._getFullPath=or.getFullPath=or.inlineRef=void 0;const e=lt(),t=Ug(),r=ak(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(w,R=!0){return typeof w=="boolean"?!0:R===!0?!s(w):R?o(w)<=R:!1}or.inlineRef=i;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(w){for(const R in w){if(a.has(R))return!0;const O=w[R];if(Array.isArray(O)&&O.some(s)||typeof O=="object"&&s(O))return!0}return!1}function o(w){let R=0;for(const O in w){if(O==="$ref")return 1/0;if(R++,!n.has(O)&&(typeof w[O]=="object"&&(0,e.eachItem)(w[O],f=>R+=o(f)),R===1/0))return 1/0}return R}function u(w,R="",O){O!==!1&&(R=d(R));const f=w.parse(R);return l(w,f)}or.getFullPath=u;function l(w,R){return w.serialize(R).split("#")[0]+"#"}or._getFullPath=l;const c=/#\/?$/;function d(w){return w?w.replace(c,""):""}or.normalizeId=d;function m(w,R,O){return O=d(O),w.resolve(R,O)}or.resolveUrl=m;const p=/^[a-z_][-a-z0-9._]*$/i;function v(w,R){if(typeof w=="boolean")return{};const{schemaId:O,uriResolver:f}=this.opts,E=d(w[O]||R),b={"":E},h=u(f,E,!1),S={},A=new Set;return r(w,{allKeys:!0},(z,Y,W,U)=>{if(U===void 0)return;const F=h+Y;let ce=b[U];typeof z[O]=="string"&&(ce=se.call(this,z[O])),ne.call(this,z.$anchor),ne.call(this,z.$dynamicAnchor),b[Y]=ce;function se(X){const K=this.opts.uriResolver.resolve;if(X=d(ce?K(ce,X):X),A.has(X))throw k(X);A.add(X);let $=this.refs[X];return typeof $=="string"&&($=this.refs[$]),typeof $=="object"?P(z,$.schema,X):X!==d(F)&&(X[0]==="#"?(P(z,S[X],X),S[X]=z):this.refs[X]=F),X}function ne(X){if(typeof X=="string"){if(!p.test(X))throw new Error(`invalid anchor "${X}"`);se.call(this,`#${X}`)}}}),S;function P(z,Y,W){if(Y!==void 0&&!t(z,Y))throw k(W)}function k(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return or.getSchemaRefs=v,or}var gv;function Co(){if(gv)return hn;gv=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.getData=hn.KeywordCxt=hn.validateFunctionCode=void 0;const e=tk(),t=il(),r=gN(),n=il(),i=rk(),a=nk(),s=ik(),o=Ke(),u=Pn(),l=_l(),c=lt(),d=Po();function m(ie){if(h(ie)&&(A(ie),b(ie))){R(ie);return}p(ie,()=>(0,e.topBoolOrEmptySchema)(ie))}hn.validateFunctionCode=m;function p({gen:ie,validateName:le,schema:fe,schemaEnv:me,opts:Te},we){Te.code.es5?ie.func(le,(0,o._)`${u.default.data}, ${u.default.valCxt}`,me.$async,()=>{ie.code((0,o._)`"use strict"; ${f(fe,Te)}`),w(ie,Te),ie.code(we)}):ie.func(le,(0,o._)`${u.default.data}, ${v(Te)}`,me.$async,()=>ie.code(f(fe,Te)).code(we))}function v(ie){return(0,o._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${ie.dynamicRef?(0,o._)`, ${u.default.dynamicAnchors}={}`:o.nil}}={}`}function w(ie,le){ie.if(u.default.valCxt,()=>{ie.var(u.default.instancePath,(0,o._)`${u.default.valCxt}.${u.default.instancePath}`),ie.var(u.default.parentData,(0,o._)`${u.default.valCxt}.${u.default.parentData}`),ie.var(u.default.parentDataProperty,(0,o._)`${u.default.valCxt}.${u.default.parentDataProperty}`),ie.var(u.default.rootData,(0,o._)`${u.default.valCxt}.${u.default.rootData}`),le.dynamicRef&&ie.var(u.default.dynamicAnchors,(0,o._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{ie.var(u.default.instancePath,(0,o._)`""`),ie.var(u.default.parentData,(0,o._)`undefined`),ie.var(u.default.parentDataProperty,(0,o._)`undefined`),ie.var(u.default.rootData,u.default.data),le.dynamicRef&&ie.var(u.default.dynamicAnchors,(0,o._)`{}`)})}function R(ie){const{schema:le,opts:fe,gen:me}=ie;p(ie,()=>{fe.$comment&&le.$comment&&U(ie),z(ie),me.let(u.default.vErrors,null),me.let(u.default.errors,0),fe.unevaluated&&O(ie),P(ie),F(ie)})}function O(ie){const{gen:le,validateName:fe}=ie;ie.evaluated=le.const("evaluated",(0,o._)`${fe}.evaluated`),le.if((0,o._)`${ie.evaluated}.dynamicProps`,()=>le.assign((0,o._)`${ie.evaluated}.props`,(0,o._)`undefined`)),le.if((0,o._)`${ie.evaluated}.dynamicItems`,()=>le.assign((0,o._)`${ie.evaluated}.items`,(0,o._)`undefined`))}function f(ie,le){const fe=typeof ie=="object"&&ie[le.schemaId];return fe&&(le.code.source||le.code.process)?(0,o._)`/*# sourceURL=${fe} */`:o.nil}function E(ie,le){if(h(ie)&&(A(ie),b(ie))){S(ie,le);return}(0,e.boolOrEmptySchema)(ie,le)}function b({schema:ie,self:le}){if(typeof ie=="boolean")return!ie;for(const fe in ie)if(le.RULES.all[fe])return!0;return!1}function h(ie){return typeof ie.schema!="boolean"}function S(ie,le){const{schema:fe,gen:me,opts:Te}=ie;Te.$comment&&fe.$comment&&U(ie),Y(ie),W(ie);const we=me.const("_errs",u.default.errors);P(ie,we),me.var(le,(0,o._)`${we} === ${u.default.errors}`)}function A(ie){(0,c.checkUnknownRules)(ie),k(ie)}function P(ie,le){if(ie.opts.jtd)return se(ie,[],!1,le);const fe=(0,t.getSchemaTypes)(ie.schema),me=(0,t.coerceAndCheckDataType)(ie,fe);se(ie,fe,!me,le)}function k(ie){const{schema:le,errSchemaPath:fe,opts:me,self:Te}=ie;le.$ref&&me.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(le,Te.RULES)&&Te.logger.warn(`$ref: keywords ignored in schema at path "${fe}"`)}function z(ie){const{schema:le,opts:fe}=ie;le.default!==void 0&&fe.useDefaults&&fe.strictSchema&&(0,c.checkStrictMode)(ie,"default is ignored in the schema root")}function Y(ie){const le=ie.schema[ie.opts.schemaId];le&&(ie.baseId=(0,l.resolveUrl)(ie.opts.uriResolver,ie.baseId,le))}function W(ie){if(ie.schema.$async&&!ie.schemaEnv.$async)throw new Error("async schema in sync schema")}function U({gen:ie,schemaEnv:le,schema:fe,errSchemaPath:me,opts:Te}){const we=fe.$comment;if(Te.$comment===!0)ie.code((0,o._)`${u.default.self}.logger.log(${we})`);else if(typeof Te.$comment=="function"){const Ue=(0,o.str)`${me}/$comment`,Ye=ie.scopeValue("root",{ref:le.root});ie.code((0,o._)`${u.default.self}.opts.$comment(${we}, ${Ue}, ${Ye}.schema)`)}}function F(ie){const{gen:le,schemaEnv:fe,validateName:me,ValidationError:Te,opts:we}=ie;fe.$async?le.if((0,o._)`${u.default.errors} === 0`,()=>le.return(u.default.data),()=>le.throw((0,o._)`new ${Te}(${u.default.vErrors})`)):(le.assign((0,o._)`${me}.errors`,u.default.vErrors),we.unevaluated&&ce(ie),le.return((0,o._)`${u.default.errors} === 0`))}function ce({gen:ie,evaluated:le,props:fe,items:me}){fe instanceof o.Name&&ie.assign((0,o._)`${le}.props`,fe),me instanceof o.Name&&ie.assign((0,o._)`${le}.items`,me)}function se(ie,le,fe,me){const{gen:Te,schema:we,data:Ue,allErrors:Ye,opts:et,self:Je}=ie,{RULES:st}=Je;if(we.$ref&&(et.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(we,st))){Te.block(()=>Ee(ie,"$ref",st.all.$ref.definition));return}et.jtd||X(ie,le),Te.block(()=>{for(const gt of st.rules)Mt(gt);Mt(st.post)});function Mt(gt){(0,r.shouldUseGroup)(we,gt)&&(gt.type?(Te.if((0,n.checkDataType)(gt.type,Ue,et.strictNumbers)),ne(ie,gt),le.length===1&&le[0]===gt.type&&fe&&(Te.else(),(0,n.reportTypeError)(ie)),Te.endIf()):ne(ie,gt),Ye||Te.if((0,o._)`${u.default.errors} === ${me||0}`))}}function ne(ie,le){const{gen:fe,schema:me,opts:{useDefaults:Te}}=ie;Te&&(0,i.assignDefaults)(ie,le.type),fe.block(()=>{for(const we of le.rules)(0,r.shouldUseRule)(me,we)&&Ee(ie,we.keyword,we.definition,le.type)})}function X(ie,le){ie.schemaEnv.meta||!ie.opts.strictTypes||(K(ie,le),ie.opts.allowUnionTypes||$(ie,le),j(ie,ie.dataTypes))}function K(ie,le){if(le.length){if(!ie.dataTypes.length){ie.dataTypes=le;return}le.forEach(fe=>{H(ie.dataTypes,fe)||D(ie,`type "${fe}" not allowed by context "${ie.dataTypes.join(",")}"`)}),N(ie,le)}}function $(ie,le){le.length>1&&!(le.length===2&&le.includes("null"))&&D(ie,"use allowUnionTypes to allow union type keyword")}function j(ie,le){const fe=ie.self.RULES.all;for(const me in fe){const Te=fe[me];if(typeof Te=="object"&&(0,r.shouldUseRule)(ie.schema,Te)){const{type:we}=Te.definition;we.length&&!we.some(Ue=>L(le,Ue))&&D(ie,`missing type "${we.join(",")}" for keyword "${me}"`)}}}function L(ie,le){return ie.includes(le)||le==="number"&&ie.includes("integer")}function H(ie,le){return ie.includes(le)||le==="integer"&&ie.includes("number")}function N(ie,le){const fe=[];for(const me of ie.dataTypes)H(le,me)?fe.push(me):le.includes("integer")&&me==="number"&&fe.push("integer");ie.dataTypes=fe}function D(ie,le){const fe=ie.schemaEnv.baseId+ie.errSchemaPath;le+=` at "${fe}" (strictTypes)`,(0,c.checkStrictMode)(ie,le,ie.opts.strictTypes)}class Z{constructor(le,fe,me){if((0,a.validateKeywordUsage)(le,fe,me),this.gen=le.gen,this.allErrors=le.allErrors,this.keyword=me,this.data=le.data,this.schema=le.schema[me],this.$data=fe.$data&&le.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(le,this.schema,me,this.$data),this.schemaType=fe.schemaType,this.parentSchema=le.schema,this.params={},this.it=le,this.def=fe,this.$data)this.schemaCode=le.gen.const("vSchema",Ie(this.$data,le));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,fe.schemaType,fe.allowUndefined))throw new Error(`${me} value must be ${JSON.stringify(fe.schemaType)}`);("code"in fe?fe.trackErrors:fe.errors!==!1)&&(this.errsCount=le.gen.const("_errs",u.default.errors))}result(le,fe,me){this.failResult((0,o.not)(le),fe,me)}failResult(le,fe,me){this.gen.if(le),me?me():this.error(),fe?(this.gen.else(),fe(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(le,fe){this.failResult((0,o.not)(le),void 0,fe)}fail(le){if(le===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(le),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(le){if(!this.$data)return this.fail(le);const{schemaCode:fe}=this;this.fail((0,o._)`${fe} !== undefined && (${(0,o.or)(this.invalid$data(),le)})`)}error(le,fe,me){if(fe){this.setParams(fe),this._error(le,me),this.setParams({});return}this._error(le,me)}_error(le,fe){(le?d.reportExtraError:d.reportError)(this,this.def.error,fe)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(le){this.allErrors||this.gen.if(le)}setParams(le,fe){fe?Object.assign(this.params,le):this.params=le}block$data(le,fe,me=o.nil){this.gen.block(()=>{this.check$data(le,me),fe()})}check$data(le=o.nil,fe=o.nil){if(!this.$data)return;const{gen:me,schemaCode:Te,schemaType:we,def:Ue}=this;me.if((0,o.or)((0,o._)`${Te} === undefined`,fe)),le!==o.nil&&me.assign(le,!0),(we.length||Ue.validateSchema)&&(me.elseIf(this.invalid$data()),this.$dataError(),le!==o.nil&&me.assign(le,!1)),me.else()}invalid$data(){const{gen:le,schemaCode:fe,schemaType:me,def:Te,it:we}=this;return(0,o.or)(Ue(),Ye());function Ue(){if(me.length){if(!(fe instanceof o.Name))throw new Error("ajv implementation error");const et=Array.isArray(me)?me:[me];return(0,o._)`${(0,n.checkDataTypes)(et,fe,we.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}function Ye(){if(Te.validateSchema){const et=le.scopeValue("validate$data",{ref:Te.validateSchema});return(0,o._)`!${et}(${fe})`}return o.nil}}subschema(le,fe){const me=(0,s.getSubschema)(this.it,le);(0,s.extendSubschemaData)(me,this.it,le),(0,s.extendSubschemaMode)(me,le);const Te={...this.it,...me,items:void 0,props:void 0};return E(Te,fe),Te}mergeEvaluated(le,fe){const{it:me,gen:Te}=this;me.opts.unevaluated&&(me.props!==!0&&le.props!==void 0&&(me.props=c.mergeEvaluated.props(Te,le.props,me.props,fe)),me.items!==!0&&le.items!==void 0&&(me.items=c.mergeEvaluated.items(Te,le.items,me.items,fe)))}mergeValidEvaluated(le,fe){const{it:me,gen:Te}=this;if(me.opts.unevaluated&&(me.props!==!0||me.items!==!0))return Te.if(fe,()=>this.mergeEvaluated(le,o.Name)),!0}}hn.KeywordCxt=Z;function Ee(ie,le,fe,me){const Te=new Z(ie,fe,le);"code"in fe?fe.code(Te,me):Te.$data&&fe.validate?(0,a.funcKeywordCode)(Te,fe):"macro"in fe?(0,a.macroKeywordCode)(Te,fe):(fe.compile||fe.validate)&&(0,a.funcKeywordCode)(Te,fe)}const _e=/^\/(?:[^~]|~0|~1)*$/,Se=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ie(ie,{dataLevel:le,dataNames:fe,dataPathArr:me}){let Te,we;if(ie==="")return u.default.rootData;if(ie[0]==="/"){if(!_e.test(ie))throw new Error(`Invalid JSON-pointer: ${ie}`);Te=ie,we=u.default.rootData}else{const Je=Se.exec(ie);if(!Je)throw new Error(`Invalid JSON-pointer: ${ie}`);const st=+Je[1];if(Te=Je[2],Te==="#"){if(st>=le)throw new Error(et("property/index",st));return me[le-st]}if(st>le)throw new Error(et("data",st));if(we=fe[le-st],!Te)return we}let Ue=we;const Ye=Te.split("/");for(const Je of Ye)Je&&(we=(0,o._)`${we}${(0,o.getProperty)((0,c.unescapeJsonPointer)(Je))}`,Ue=(0,o._)`${Ue} && ${we}`);return Ue;function et(Je,st){return`Cannot access ${Je} ${st} levels up, current level is ${le}`}}return hn.getData=Ie,hn}var Lu={},_v;function Fg(){if(_v)return Lu;_v=1,Object.defineProperty(Lu,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Lu.default=e,Lu}var qu={},Ev;function El(){if(Ev)return qu;Ev=1,Object.defineProperty(qu,"__esModule",{value:!0});const e=_l();class t extends Error{constructor(n,i,a,s){super(s||`can't resolve reference ${a} from id ${i}`),this.missingRef=(0,e.resolveUrl)(n,i,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return qu.default=t,qu}var vr={},vv;function Vg(){if(vv)return vr;vv=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.resolveSchema=vr.getCompilingSchema=vr.resolveRef=vr.compileSchema=vr.SchemaEnv=void 0;const e=Ke(),t=Fg(),r=Pn(),n=_l(),i=lt(),a=Co();class s{constructor(O){var f;this.refs={},this.dynamicAnchors={};let E;typeof O.schema=="object"&&(E=O.schema),this.schema=O.schema,this.schemaId=O.schemaId,this.root=O.root||this,this.baseId=(f=O.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(E==null?void 0:E[O.schemaId||"$id"]),this.schemaPath=O.schemaPath,this.localRefs=O.localRefs,this.meta=O.meta,this.$async=E==null?void 0:E.$async,this.refs={}}}vr.SchemaEnv=s;function o(R){const O=c.call(this,R);if(O)return O;const f=(0,n.getFullPath)(this.opts.uriResolver,R.root.baseId),{es5:E,lines:b}=this.opts.code,{ownProperties:h}=this.opts,S=new e.CodeGen(this.scope,{es5:E,lines:b,ownProperties:h});let A;R.$async&&(A=S.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=S.scopeName("validate");R.validateName=P;const k={gen:S,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:S.scopeValue("schema",this.opts.code.source===!0?{ref:R.schema,code:(0,e.stringify)(R.schema)}:{ref:R.schema}),validateName:P,ValidationError:A,schema:R.schema,schemaEnv:R,rootId:f,baseId:R.baseId||f,schemaPath:e.nil,errSchemaPath:R.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(R),(0,a.validateFunctionCode)(k),S.optimize(this.opts.code.optimize);const Y=S.toString();z=`${S.scopeRefs(r.default.scope)}return ${Y}`,this.opts.code.process&&(z=this.opts.code.process(z,R));const U=new Function(`${r.default.self}`,`${r.default.scope}`,z)(this,this.scope.get());if(this.scope.value(P,{ref:U}),U.errors=null,U.schema=R.schema,U.schemaEnv=R,R.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:P,validateCode:Y,scopeValues:S._values}),this.opts.unevaluated){const{props:F,items:ce}=k;U.evaluated={props:F instanceof e.Name?void 0:F,items:ce instanceof e.Name?void 0:ce,dynamicProps:F instanceof e.Name,dynamicItems:ce instanceof e.Name},U.source&&(U.source.evaluated=(0,e.stringify)(U.evaluated))}return R.validate=U,R}catch(Y){throw delete R.validate,delete R.validateName,z&&this.logger.error("Error compiling schema, function code:",z),Y}finally{this._compilations.delete(R)}}vr.compileSchema=o;function u(R,O,f){var E;f=(0,n.resolveUrl)(this.opts.uriResolver,O,f);const b=R.refs[f];if(b)return b;let h=m.call(this,R,f);if(h===void 0){const S=(E=R.localRefs)===null||E===void 0?void 0:E[f],{schemaId:A}=this.opts;S&&(h=new s({schema:S,schemaId:A,root:R,baseId:O}))}if(h!==void 0)return R.refs[f]=l.call(this,h)}vr.resolveRef=u;function l(R){return(0,n.inlineRef)(R.schema,this.opts.inlineRefs)?R.schema:R.validate?R:o.call(this,R)}function c(R){for(const O of this._compilations)if(d(O,R))return O}vr.getCompilingSchema=c;function d(R,O){return R.schema===O.schema&&R.root===O.root&&R.baseId===O.baseId}function m(R,O){let f;for(;typeof(f=this.refs[O])=="string";)O=f;return f||this.schemas[O]||p.call(this,R,O)}function p(R,O){const f=this.opts.uriResolver.parse(O),E=(0,n._getFullPath)(this.opts.uriResolver,f);let b=(0,n.getFullPath)(this.opts.uriResolver,R.baseId,void 0);if(Object.keys(R.schema).length>0&&E===b)return w.call(this,f,R);const h=(0,n.normalizeId)(E),S=this.refs[h]||this.schemas[h];if(typeof S=="string"){const A=p.call(this,R,S);return typeof(A==null?void 0:A.schema)!="object"?void 0:w.call(this,f,A)}if(typeof(S==null?void 0:S.schema)=="object"){if(S.validate||o.call(this,S),h===(0,n.normalizeId)(O)){const{schema:A}=S,{schemaId:P}=this.opts,k=A[P];return k&&(b=(0,n.resolveUrl)(this.opts.uriResolver,b,k)),new s({schema:A,schemaId:P,root:R,baseId:b})}return w.call(this,f,S)}}vr.resolveSchema=p;const v=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(R,{baseId:O,schema:f,root:E}){var b;if(((b=R.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const A of R.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const P=f[(0,i.unescapeFragment)(A)];if(P===void 0)return;f=P;const k=typeof f=="object"&&f[this.opts.schemaId];!v.has(A)&&k&&(O=(0,n.resolveUrl)(this.opts.uriResolver,O,k))}let h;if(typeof f!="boolean"&&f.$ref&&!(0,i.schemaHasRulesButRef)(f,this.RULES)){const A=(0,n.resolveUrl)(this.opts.uriResolver,O,f.$ref);h=p.call(this,E,A)}const{schemaId:S}=this.opts;if(h=h||new s({schema:f,schemaId:S,root:E,baseId:O}),h.schema!==h.root.schema)return h}return vr}const sk="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",ok="Meta-schema for $data reference (JSON AnySchema extension proposal)",uk="object",ck=["$data"],lk={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},dk=!1,fk={$id:sk,description:ok,type:uk,required:ck,properties:lk,additionalProperties:dk};var ku={},ps={exports:{}},ld,bv;function _N(){if(bv)return ld;bv=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),r=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),n=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function a(h){let S="",A=0,P=0;for(P=0;P<h.length;P++)if(A=h[P].charCodeAt(0),A!==48){if(!(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102))return"";S+=h[P];break}for(P+=1;P<h.length;P++){if(A=h[P].charCodeAt(0),!(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102))return"";S+=h[P]}return S}const s=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(h){return h.length=0,!0}function u(h,S,A){if(h.length){const P=a(h);if(P!=="")S.push(P);else return A.error=!0,!1;h.length=0}return!0}function l(h){let S=0;const A={error:!1,address:"",zone:""},P=[],k=[];let z=!1,Y=!1,W=u;for(let U=0;U<h.length;U++){const F=h[U];if(!(F==="["||F==="]"))if(F===":"){if(z===!0&&(Y=!0),!W(k,P,A))break;if(++S>7){A.error=!0;break}U>0&&h[U-1]===":"&&(z=!0),P.push(":");continue}else if(F==="%"){if(!W(k,P,A))break;W=o}else{k.push(F);continue}}return k.length&&(W===o?A.zone=k.join(""):Y?P.push(k.join("")):P.push(a(k))),A.address=P.join(""),A}function c(h){if(d(h,":")<2)return{host:h,isIPV6:!1};const S=l(h);if(S.error)return{host:h,isIPV6:!1};{let A=S.address,P=S.address;return S.zone&&(A+="%"+S.zone,P+="%25"+S.zone),{host:A,isIPV6:!0,escapedHost:P}}}function d(h,S){let A=0;for(let P=0;P<h.length;P++)h[P]===S&&A++;return A}function m(h){let S=h;const A=[];let P=-1,k=0;for(;k=S.length;){if(k===1){if(S===".")break;if(S==="/"){A.push("/");break}else{A.push(S);break}}else if(k===2){if(S[0]==="."){if(S[1]===".")break;if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&(S[1]==="."||S[1]==="/")){A.push("/");break}}else if(k===3&&S==="/.."){A.length!==0&&A.pop(),A.push("/");break}if(S[0]==="."){if(S[1]==="."){if(S[2]==="/"){S=S.slice(3);continue}}else if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&S[1]==="."){if(S[2]==="/"){S=S.slice(2);continue}else if(S[2]==="."&&S[3]==="/"){S=S.slice(3),A.length!==0&&A.pop();continue}}if((P=S.indexOf("/",1))===-1){A.push(S);break}else A.push(S.slice(0,P)),S=S.slice(P)}return A.join("")}const p={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},v=/[@/?#:]/g,w=/[@/?#]/g;function R(h,S){const A=S?w:v;return A.lastIndex=0,h.replace(A,P=>p[P])}function O(h,S=!1){if(h.indexOf("%")===-1)return h;let A="";for(let P=0;P<h.length;P++){if(h[P]==="%"&&P+2<h.length){const k=h.slice(P+1,P+3);if(r(k)){const z=k.toUpperCase(),Y=String.fromCharCode(parseInt(z,16));S&&n(Y)?A+=Y:A+="%"+z,P+=2;continue}}A+=h[P]}return A}function f(h){let S="";for(let A=0;A<h.length;A++){if(h[A]==="%"&&A+2<h.length){const P=h.slice(A+1,A+3);if(r(P)){const k=P.toUpperCase(),z=String.fromCharCode(parseInt(k,16));z!=="."&&n(z)?S+=z:S+="%"+k,A+=2;continue}}i(h[A])?S+=h[A]:S+=escape(h[A])}return S}function E(h){let S="";for(let A=0;A<h.length;A++){if(h[A]==="%"&&A+2<h.length){const P=h.slice(A+1,A+3);if(r(P)){S+="%"+P.toUpperCase(),A+=2;continue}}S+=escape(h[A])}return S}function b(h){const S=[];if(h.userinfo!==void 0&&(S.push(h.userinfo),S.push("@")),h.host!==void 0){let A=unescape(h.host);if(!t(A)){const P=c(A);P.isIPV6===!0?A=`[${P.escapedHost}]`:A=R(A,!1)}S.push(A)}return(typeof h.port=="number"||typeof h.port=="string")&&(S.push(":"),S.push(String(h.port))),S.length?S.join(""):void 0}return ld={nonSimpleDomain:s,recomposeAuthority:b,reescapeHostDelimiters:R,normalizePercentEncoding:O,normalizePathEncoding:f,escapePreservingEscapes:E,removeDotSegments:m,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:a},ld}var dd,Tv;function pk(){if(Tv)return dd;Tv=1;const{isUUID:e}=_N(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(h){return r.indexOf(h)!==-1}function i(h){return h.secure===!0?!0:h.secure===!1?!1:h.scheme?h.scheme.length===3&&(h.scheme[0]==="w"||h.scheme[0]==="W")&&(h.scheme[1]==="s"||h.scheme[1]==="S")&&(h.scheme[2]==="s"||h.scheme[2]==="S"):!1}function a(h){return h.host||(h.error=h.error||"HTTP URIs must have a host."),h}function s(h){const S=String(h.scheme).toLowerCase()==="https";return(h.port===(S?443:80)||h.port==="")&&(h.port=void 0),h.path||(h.path="/"),h}function o(h){return h.secure=i(h),h.resourceName=(h.path||"/")+(h.query?"?"+h.query:""),h.path=void 0,h.query=void 0,h}function u(h){if((h.port===(i(h)?443:80)||h.port==="")&&(h.port=void 0),typeof h.secure=="boolean"&&(h.scheme=h.secure?"wss":"ws",h.secure=void 0),h.resourceName){const[S,A]=h.resourceName.split("?");h.path=S&&S!=="/"?S:void 0,h.query=A,h.resourceName=void 0}return h.fragment=void 0,h}function l(h,S){if(!h.path)return h.error="URN can not be parsed",h;const A=h.path.match(t);if(A){const P=S.scheme||h.scheme||"urn";h.nid=A[1].toLowerCase(),h.nss=A[2];const k=`${P}:${S.nid||h.nid}`,z=b(k);h.path=void 0,z&&(h=z.parse(h,S))}else h.error=h.error||"URN can not be parsed.";return h}function c(h,S){if(h.nid===void 0)throw new Error("URN without nid cannot be serialized");const A=S.scheme||h.scheme||"urn",P=h.nid.toLowerCase(),k=`${A}:${S.nid||P}`,z=b(k);z&&(h=z.serialize(h,S));const Y=h,W=h.nss;return Y.path=`${P||S.nid}:${W}`,S.skipEscape=!0,Y}function d(h,S){const A=h;return A.uuid=A.nss,A.nss=void 0,!S.tolerant&&(!A.uuid||!e(A.uuid))&&(A.error=A.error||"UUID is not valid."),A}function m(h){const S=h;return S.nss=(h.uuid||"").toLowerCase(),S}const p={scheme:"http",domainHost:!0,parse:a,serialize:s},v={scheme:"https",domainHost:p.domainHost,parse:a,serialize:s},w={scheme:"ws",domainHost:!0,parse:o,serialize:u},R={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},E={http:p,https:v,ws:w,wss:R,urn:{scheme:"urn",parse:l,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(E,null);function b(h){return h&&(E[h]||E[h.toLowerCase()])||void 0}return dd={wsIsSecure:i,SCHEMES:E,isValidSchemeName:n,getSchemeHandler:b},dd}var Sv;function mk(){if(Sv)return ps.exports;Sv=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizePercentEncoding:n,normalizePathEncoding:i,escapePreservingEscapes:a,reescapeHostDelimiters:s,isIPv4:o,nonSimpleDomain:u}=_N(),{SCHEMES:l,getSchemeHandler:c}=pk();function d(P,k){return typeof P=="string"?P=b(P,k):typeof P=="object"&&(P=E(w(P,k),k)),P}function m(P,k,z){const Y=z?Object.assign({scheme:"null"},z):{scheme:"null"},W=p(E(P,Y),E(k,Y),Y,!0);return Y.skipEscape=!0,w(W,Y)}function p(P,k,z,Y){const W={};return Y||(P=E(w(P,z),z),k=E(w(k,z),z)),z=z||{},!z.tolerant&&k.scheme?(W.scheme=k.scheme,W.userinfo=k.userinfo,W.host=k.host,W.port=k.port,W.path=t(k.path||""),W.query=k.query):(k.userinfo!==void 0||k.host!==void 0||k.port!==void 0?(W.userinfo=k.userinfo,W.host=k.host,W.port=k.port,W.path=t(k.path||""),W.query=k.query):(k.path?(k.path[0]==="/"?W.path=t(k.path):((P.userinfo!==void 0||P.host!==void 0||P.port!==void 0)&&!P.path?W.path="/"+k.path:P.path?W.path=P.path.slice(0,P.path.lastIndexOf("/")+1)+k.path:W.path=k.path,W.path=t(W.path)),W.query=k.query):(W.path=P.path,k.query!==void 0?W.query=k.query:W.query=P.query),W.userinfo=P.userinfo,W.host=P.host,W.port=P.port),W.scheme=P.scheme),W.fragment=k.fragment,W}function v(P,k,z){const Y=S(P,z),W=S(k,z);return Y!==void 0&&W!==void 0&&Y.toLowerCase()===W.toLowerCase()}function w(P,k){const z={host:P.host,scheme:P.scheme,userinfo:P.userinfo,port:P.port,path:P.path,query:P.query,nid:P.nid,nss:P.nss,uuid:P.uuid,fragment:P.fragment,reference:P.reference,resourceName:P.resourceName,secure:P.secure,error:""},Y=Object.assign({},k),W=[],U=c(Y.scheme||z.scheme);U&&U.serialize&&U.serialize(z,Y),z.path!==void 0&&(Y.skipEscape?z.path=n(z.path):(z.path=a(z.path),z.scheme!==void 0&&(z.path=z.path.split("%3A").join(":")))),Y.reference!=="suffix"&&z.scheme&&W.push(z.scheme,":");const F=r(z);if(F!==void 0&&(Y.reference!=="suffix"&&W.push("//"),W.push(F),z.path&&z.path[0]!=="/"&&W.push("/")),z.path!==void 0){let ce=z.path;!Y.absolutePath&&(!U||!U.absolutePath)&&(ce=t(ce)),F===void 0&&ce[0]==="/"&&ce[1]==="/"&&(ce="/%2F"+ce.slice(2)),W.push(ce)}return z.query!==void 0&&W.push("?",z.query),z.fragment!==void 0&&W.push("#",z.fragment),W.join("")}const R=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function O(P,k){if(k[2]!==void 0&&P.path&&P.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof P.port=="number"&&(P.port<0||P.port>65535))return"URI port is malformed."}function f(P,k){const z=Object.assign({},k),Y={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let W=!1,U=!1;z.reference==="suffix"&&(z.scheme?P=z.scheme+":"+P:P="//"+P);const F=P.match(R);if(F){Y.scheme=F[1],Y.userinfo=F[3],Y.host=F[4],Y.port=parseInt(F[5],10),Y.path=F[6]||"",Y.query=F[7],Y.fragment=F[8],isNaN(Y.port)&&(Y.port=F[5]);const ce=O(Y,F);if(ce!==void 0&&(Y.error=Y.error||ce,W=!0),Y.host)if(o(Y.host)===!1){const X=e(Y.host);Y.host=X.host.toLowerCase(),U=X.isIPV6}else U=!0;Y.scheme===void 0&&Y.userinfo===void 0&&Y.host===void 0&&Y.port===void 0&&Y.query===void 0&&!Y.path?Y.reference="same-document":Y.scheme===void 0?Y.reference="relative":Y.fragment===void 0?Y.reference="absolute":Y.reference="uri",z.reference&&z.reference!=="suffix"&&z.reference!==Y.reference&&(Y.error=Y.error||"URI is not a "+z.reference+" reference.");const se=c(z.scheme||Y.scheme);if(!z.unicodeSupport&&(!se||!se.unicodeSupport)&&Y.host&&(z.domainHost||se&&se.domainHost)&&U===!1&&u(Y.host))try{Y.host=new URL("http://"+Y.host).hostname}catch(ne){Y.error=Y.error||"Host's domain name can not be converted to ASCII: "+ne}if((!se||se&&!se.skipNormalize)&&(P.indexOf("%")!==-1&&(Y.scheme!==void 0&&(Y.scheme=unescape(Y.scheme)),Y.host!==void 0&&(Y.host=s(unescape(Y.host),U))),Y.path&&(Y.path=i(Y.path)),Y.fragment))try{Y.fragment=encodeURI(decodeURIComponent(Y.fragment))}catch{Y.error=Y.error||"URI malformed"}se&&se.parse&&se.parse(Y,z)}else Y.error=Y.error||"URI can not be parsed.";return{parsed:Y,malformedAuthorityOrPort:W}}function E(P,k){return f(P,k).parsed}function b(P,k){return h(P,k).normalized}function h(P,k){const{parsed:z,malformedAuthorityOrPort:Y}=f(P,k);return{normalized:Y?P:w(z,k),malformedAuthorityOrPort:Y}}function S(P,k){if(typeof P=="string"){const{normalized:z,malformedAuthorityOrPort:Y}=h(P,k);return Y?void 0:z}if(typeof P=="object")return w(P,k)}const A={SCHEMES:l,normalize:d,resolve:m,resolveComponent:p,equal:v,serialize:w,parse:E};return ps.exports=A,ps.exports.default=A,ps.exports.fastUri=A,ps.exports}var Iv;function hk(){if(Iv)return ku;Iv=1,Object.defineProperty(ku,"__esModule",{value:!0});const e=mk();return e.code='require("ajv/dist/runtime/uri").default',ku.default=e,ku}var Rv;function yk(){return Rv||(Rv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Co();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=Ke();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Fg(),i=El(),a=yN(),s=Vg(),o=Ke(),u=_l(),l=il(),c=lt(),d=fk,m=hk(),p=($,j)=>new RegExp($,j);p.code="new RegExp";const v=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),R={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},O={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function E($){var j,L,H,N,D,Z,Ee,_e,Se,Ie,ie,le,fe,me,Te,we,Ue,Ye,et,Je,st,Mt,gt,Ut,_t;const Qt=$.strict,Zt=(j=$.code)===null||j===void 0?void 0:j.optimize,ft=Zt===!0||Zt===void 0?1:Zt||0,_r=(H=(L=$.code)===null||L===void 0?void 0:L.regExp)!==null&&H!==void 0?H:p,M=(N=$.uriResolver)!==null&&N!==void 0?N:m.default;return{strictSchema:(Z=(D=$.strictSchema)!==null&&D!==void 0?D:Qt)!==null&&Z!==void 0?Z:!0,strictNumbers:(_e=(Ee=$.strictNumbers)!==null&&Ee!==void 0?Ee:Qt)!==null&&_e!==void 0?_e:!0,strictTypes:(Ie=(Se=$.strictTypes)!==null&&Se!==void 0?Se:Qt)!==null&&Ie!==void 0?Ie:"log",strictTuples:(le=(ie=$.strictTuples)!==null&&ie!==void 0?ie:Qt)!==null&&le!==void 0?le:"log",strictRequired:(me=(fe=$.strictRequired)!==null&&fe!==void 0?fe:Qt)!==null&&me!==void 0?me:!1,code:$.code?{...$.code,optimize:ft,regExp:_r}:{optimize:ft,regExp:_r},loopRequired:(Te=$.loopRequired)!==null&&Te!==void 0?Te:f,loopEnum:(we=$.loopEnum)!==null&&we!==void 0?we:f,meta:(Ue=$.meta)!==null&&Ue!==void 0?Ue:!0,messages:(Ye=$.messages)!==null&&Ye!==void 0?Ye:!0,inlineRefs:(et=$.inlineRefs)!==null&&et!==void 0?et:!0,schemaId:(Je=$.schemaId)!==null&&Je!==void 0?Je:"$id",addUsedSchema:(st=$.addUsedSchema)!==null&&st!==void 0?st:!0,validateSchema:(Mt=$.validateSchema)!==null&&Mt!==void 0?Mt:!0,validateFormats:(gt=$.validateFormats)!==null&&gt!==void 0?gt:!0,unicodeRegExp:(Ut=$.unicodeRegExp)!==null&&Ut!==void 0?Ut:!0,int32range:(_t=$.int32range)!==null&&_t!==void 0?_t:!0,uriResolver:M}}class b{constructor(j={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,j=this.opts={...j,...E(j)};const{es5:L,lines:H}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:w,es5:L,lines:H}),this.logger=W(j.logger);const N=j.validateFormats;j.validateFormats=!1,this.RULES=(0,a.getRules)(),h.call(this,R,j,"NOT SUPPORTED"),h.call(this,O,j,"DEPRECATED","warn"),this._metaOpts=z.call(this),j.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&k.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),A.call(this),j.validateFormats=N}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:L,schemaId:H}=this.opts;let N=d;H==="id"&&(N={...d},N.id=N.$id,delete N.$id),L&&j&&this.addMetaSchema(N,N[H],!1)}defaultMeta(){const{meta:j,schemaId:L}=this.opts;return this.opts.defaultMeta=typeof j=="object"?j[L]||j:void 0}validate(j,L){let H;if(typeof j=="string"){if(H=this.getSchema(j),!H)throw new Error(`no schema with key or ref "${j}"`)}else H=this.compile(j);const N=H(L);return"$async"in H||(this.errors=H.errors),N}compile(j,L){const H=this._addSchema(j,L);return H.validate||this._compileSchemaEnv(H)}compileAsync(j,L){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:H}=this.opts;return N.call(this,j,L);async function N(Ie,ie){await D.call(this,Ie.$schema);const le=this._addSchema(Ie,ie);return le.validate||Z.call(this,le)}async function D(Ie){Ie&&!this.getSchema(Ie)&&await N.call(this,{$ref:Ie},!0)}async function Z(Ie){try{return this._compileSchemaEnv(Ie)}catch(ie){if(!(ie instanceof i.default))throw ie;return Ee.call(this,ie),await _e.call(this,ie.missingSchema),Z.call(this,Ie)}}function Ee({missingSchema:Ie,missingRef:ie}){if(this.refs[Ie])throw new Error(`AnySchema ${Ie} is loaded but ${ie} cannot be resolved`)}async function _e(Ie){const ie=await Se.call(this,Ie);this.refs[Ie]||await D.call(this,ie.$schema),this.refs[Ie]||this.addSchema(ie,Ie,L)}async function Se(Ie){const ie=this._loading[Ie];if(ie)return ie;try{return await(this._loading[Ie]=H(Ie))}finally{delete this._loading[Ie]}}}addSchema(j,L,H,N=this.opts.validateSchema){if(Array.isArray(j)){for(const Z of j)this.addSchema(Z,void 0,H,N);return this}let D;if(typeof j=="object"){const{schemaId:Z}=this.opts;if(D=j[Z],D!==void 0&&typeof D!="string")throw new Error(`schema ${Z} must be string`)}return L=(0,u.normalizeId)(L||D),this._checkUnique(L),this.schemas[L]=this._addSchema(j,H,L,N,!0),this}addMetaSchema(j,L,H=this.opts.validateSchema){return this.addSchema(j,L,!0,H),this}validateSchema(j,L){if(typeof j=="boolean")return!0;let H;if(H=j.$schema,H!==void 0&&typeof H!="string")throw new Error("$schema must be a string");if(H=H||this.opts.defaultMeta||this.defaultMeta(),!H)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const N=this.validate(H,j);if(!N&&L){const D="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(D);else throw new Error(D)}return N}getSchema(j){let L;for(;typeof(L=S.call(this,j))=="string";)j=L;if(L===void 0){const{schemaId:H}=this.opts,N=new s.SchemaEnv({schema:{},schemaId:H});if(L=s.resolveSchema.call(this,N,j),!L)return;this.refs[j]=L}return L.validate||this._compileSchemaEnv(L)}removeSchema(j){if(j instanceof RegExp)return this._removeAllSchemas(this.schemas,j),this._removeAllSchemas(this.refs,j),this;switch(typeof j){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const L=S.call(this,j);return typeof L=="object"&&this._cache.delete(L.schema),delete this.schemas[j],delete this.refs[j],this}case"object":{const L=j;this._cache.delete(L);let H=j[this.opts.schemaId];return H&&(H=(0,u.normalizeId)(H),delete this.schemas[H],delete this.refs[H]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(j){for(const L of j)this.addKeyword(L);return this}addKeyword(j,L){let H;if(typeof j=="string")H=j,typeof L=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),L.keyword=H);else if(typeof j=="object"&&L===void 0){if(L=j,H=L.keyword,Array.isArray(H)&&!H.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(F.call(this,H,L),!L)return(0,c.eachItem)(H,D=>ce.call(this,D)),this;ne.call(this,L);const N={...L,type:(0,l.getJSONTypes)(L.type),schemaType:(0,l.getJSONTypes)(L.schemaType)};return(0,c.eachItem)(H,N.type.length===0?D=>ce.call(this,D,N):D=>N.type.forEach(Z=>ce.call(this,D,N,Z))),this}getKeyword(j){const L=this.RULES.all[j];return typeof L=="object"?L.definition:!!L}removeKeyword(j){const{RULES:L}=this;delete L.keywords[j],delete L.all[j];for(const H of L.rules){const N=H.rules.findIndex(D=>D.keyword===j);N>=0&&H.rules.splice(N,1)}return this}addFormat(j,L){return typeof L=="string"&&(L=new RegExp(L)),this.formats[j]=L,this}errorsText(j=this.errors,{separator:L=", ",dataVar:H="data"}={}){return!j||j.length===0?"No errors":j.map(N=>`${H}${N.instancePath} ${N.message}`).reduce((N,D)=>N+L+D)}$dataMetaSchema(j,L){const H=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const N of L){const D=N.split("/").slice(1);let Z=j;for(const Ee of D)Z=Z[Ee];for(const Ee in H){const _e=H[Ee];if(typeof _e!="object")continue;const{$data:Se}=_e.definition,Ie=Z[Ee];Se&&Ie&&(Z[Ee]=K(Ie))}}return j}_removeAllSchemas(j,L){for(const H in j){const N=j[H];(!L||L.test(H))&&(typeof N=="string"?delete j[H]:N&&!N.meta&&(this._cache.delete(N.schema),delete j[H]))}}_addSchema(j,L,H,N=this.opts.validateSchema,D=this.opts.addUsedSchema){let Z;const{schemaId:Ee}=this.opts;if(typeof j=="object")Z=j[Ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof j!="boolean")throw new Error("schema must be object or boolean")}let _e=this._cache.get(j);if(_e!==void 0)return _e;H=(0,u.normalizeId)(Z||H);const Se=u.getSchemaRefs.call(this,j,H);return _e=new s.SchemaEnv({schema:j,schemaId:Ee,meta:L,baseId:H,localRefs:Se}),this._cache.set(_e.schema,_e),D&&!H.startsWith("#")&&(H&&this._checkUnique(H),this.refs[H]=_e),N&&this.validateSchema(j,!0),_e}_checkUnique(j){if(this.schemas[j]||this.refs[j])throw new Error(`schema with key or id "${j}" already exists`)}_compileSchemaEnv(j){if(j.meta?this._compileMetaSchema(j):s.compileSchema.call(this,j),!j.validate)throw new Error("ajv implementation error");return j.validate}_compileMetaSchema(j){const L=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,j)}finally{this.opts=L}}}b.ValidationError=n.default,b.MissingRefError=i.default,e.default=b;function h($,j,L,H="error"){for(const N in $){const D=N;D in j&&this.logger[H](`${L}: option ${N}. ${$[D]}`)}}function S($){return $=(0,u.normalizeId)($),this.schemas[$]||this.refs[$]}function A(){const $=this.opts.schemas;if($)if(Array.isArray($))this.addSchema($);else for(const j in $)this.addSchema($[j],j)}function P(){for(const $ in this.opts.formats){const j=this.opts.formats[$];j&&this.addFormat($,j)}}function k($){if(Array.isArray($)){this.addVocabulary($);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in $){const L=$[j];L.keyword||(L.keyword=j),this.addKeyword(L)}}function z(){const $={...this.opts};for(const j of v)delete $[j];return $}const Y={log(){},warn(){},error(){}};function W($){if($===!1)return Y;if($===void 0)return console;if($.log&&$.warn&&$.error)return $;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function F($,j){const{RULES:L}=this;if((0,c.eachItem)($,H=>{if(L.keywords[H])throw new Error(`Keyword ${H} is already defined`);if(!U.test(H))throw new Error(`Keyword ${H} has invalid name`)}),!!j&&j.$data&&!("code"in j||"validate"in j))throw new Error('$data keyword must have "code" or "validate" function')}function ce($,j,L){var H;const N=j==null?void 0:j.post;if(L&&N)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:D}=this;let Z=N?D.post:D.rules.find(({type:_e})=>_e===L);if(Z||(Z={type:L,rules:[]},D.rules.push(Z)),D.keywords[$]=!0,!j)return;const Ee={keyword:$,definition:{...j,type:(0,l.getJSONTypes)(j.type),schemaType:(0,l.getJSONTypes)(j.schemaType)}};j.before?se.call(this,Z,Ee,j.before):Z.rules.push(Ee),D.all[$]=Ee,(H=j.implements)===null||H===void 0||H.forEach(_e=>this.addKeyword(_e))}function se($,j,L){const H=$.rules.findIndex(N=>N.keyword===L);H>=0?$.rules.splice(H,0,j):($.rules.push(j),this.logger.warn(`rule ${L} is not defined`))}function ne($){let{metaSchema:j}=$;j!==void 0&&($.$data&&this.opts.$data&&(j=K(j)),$.validateSchema=this.compile(j,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function K($){return{anyOf:[$,X]}}})(nd)),nd}var Bu={},Uu={},Fu={},wv;function gk(){if(wv)return Fu;wv=1,Object.defineProperty(Fu,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Fu.default=e,Fu}var Ln={},Av;function _k(){if(Av)return Ln;Av=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.callRef=Ln.getValidate=void 0;const e=El(),t=Fr(),r=Ke(),n=Pn(),i=Vg(),a=lt(),s={keyword:"$ref",schemaType:"string",code(l){const{gen:c,schema:d,it:m}=l,{baseId:p,schemaEnv:v,validateName:w,opts:R,self:O}=m,{root:f}=v;if((d==="#"||d==="#/")&&p===f.baseId)return b();const E=i.resolveRef.call(O,f,p,d);if(E===void 0)throw new e.default(m.opts.uriResolver,p,d);if(E instanceof i.SchemaEnv)return h(E);return S(E);function b(){if(v===f)return u(l,w,v,v.$async);const A=c.scopeValue("root",{ref:f});return u(l,(0,r._)`${A}.validate`,f,f.$async)}function h(A){const P=o(l,A);u(l,P,A,A.$async)}function S(A){const P=c.scopeValue("schema",R.code.source===!0?{ref:A,code:(0,r.stringify)(A)}:{ref:A}),k=c.name("valid"),z=l.subschema({schema:A,dataTypes:[],schemaPath:r.nil,topSchemaRef:P,errSchemaPath:d},k);l.mergeEvaluated(z),l.ok(k)}}};function o(l,c){const{gen:d}=l;return c.validate?d.scopeValue("validate",{ref:c.validate}):(0,r._)`${d.scopeValue("wrapper",{ref:c})}.validate`}Ln.getValidate=o;function u(l,c,d,m){const{gen:p,it:v}=l,{allErrors:w,schemaEnv:R,opts:O}=v,f=O.passContext?n.default.this:r.nil;m?E():b();function E(){if(!R.$async)throw new Error("async schema referenced by sync schema");const A=p.let("valid");p.try(()=>{p.code((0,r._)`await ${(0,t.callValidateCode)(l,c,f)}`),S(c),w||p.assign(A,!0)},P=>{p.if((0,r._)`!(${P} instanceof ${v.ValidationError})`,()=>p.throw(P)),h(P),w||p.assign(A,!1)}),l.ok(A)}function b(){l.result((0,t.callValidateCode)(l,c,f),()=>S(c),()=>h(c))}function h(A){const P=(0,r._)`${A}.errors`;p.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${P} : ${n.default.vErrors}.concat(${P})`),p.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function S(A){var P;if(!v.opts.unevaluated)return;const k=(P=d==null?void 0:d.validate)===null||P===void 0?void 0:P.evaluated;if(v.props!==!0)if(k&&!k.dynamicProps)k.props!==void 0&&(v.props=a.mergeEvaluated.props(p,k.props,v.props));else{const z=p.var("props",(0,r._)`${A}.evaluated.props`);v.props=a.mergeEvaluated.props(p,z,v.props,r.Name)}if(v.items!==!0)if(k&&!k.dynamicItems)k.items!==void 0&&(v.items=a.mergeEvaluated.items(p,k.items,v.items));else{const z=p.var("items",(0,r._)`${A}.evaluated.items`);v.items=a.mergeEvaluated.items(p,z,v.items,r.Name)}}}return Ln.callRef=u,Ln.default=s,Ln}var Ov;function Ek(){if(Ov)return Uu;Ov=1,Object.defineProperty(Uu,"__esModule",{value:!0});const e=gk(),t=_k(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Uu.default=r,Uu}var Vu={},Hu={},Nv;function vk(){if(Nv)return Hu;Nv=1,Object.defineProperty(Hu,"__esModule",{value:!0});const e=Ke(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:a,schemaCode:s})=>(0,e.str)`must be ${r[a].okStr} ${s}`,params:({keyword:a,schemaCode:s})=>(0,e._)`{comparison: ${r[a].okStr}, limit: ${s}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(a){const{keyword:s,data:o,schemaCode:u}=a;a.fail$data((0,e._)`${o} ${r[s].fail} ${u} || isNaN(${o})`)}};return Hu.default=i,Hu}var Gu={},Pv;function bk(){if(Pv)return Gu;Pv=1,Object.defineProperty(Gu,"__esModule",{value:!0});const e=Ke(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:a,schemaCode:s,it:o}=n,u=o.opts.multipleOfPrecision,l=i.let("res"),c=u?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${u}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${s} === 0 || (${l} = ${a}/${s}, ${c}))`)}};return Gu.default=r,Gu}var zu={},Wu={},Cv;function Tk(){if(Cv)return Wu;Cv=1,Object.defineProperty(Wu,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,i=0,a;for(;i<r;)n++,a=t.charCodeAt(i++),a>=55296&&a<=56319&&i<r&&(a=t.charCodeAt(i),(a&64512)===56320&&i++);return n}return Wu.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Wu}var Mv;function Sk(){if(Mv)return zu;Mv=1,Object.defineProperty(zu,"__esModule",{value:!0});const e=Ke(),t=lt(),r=Tk(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:s}){const o=a==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} characters`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},code(a){const{keyword:s,data:o,schemaCode:u,it:l}=a,c=s==="maxLength"?e.operators.GT:e.operators.LT,d=l.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,t.useFunc)(a.gen,r.default)}(${o})`;a.fail$data((0,e._)`${d} ${c} ${u}`)}};return zu.default=i,zu}var Yu={},jv;function Ik(){if(jv)return Yu;jv=1,Object.defineProperty(Yu,"__esModule",{value:!0});const e=Fr(),t=lt(),r=Ke(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>(0,r.str)`must match pattern "${a}"`,params:({schemaCode:a})=>(0,r._)`{pattern: ${a}}`},code(a){const{gen:s,data:o,$data:u,schema:l,schemaCode:c,it:d}=a,m=d.opts.unicodeRegExp?"u":"";if(u){const{regExp:p}=d.opts.code,v=p.code==="new RegExp"?(0,r._)`new RegExp`:(0,t.useFunc)(s,p),w=s.let("valid");s.try(()=>s.assign(w,(0,r._)`${v}(${c}, ${m}).test(${o})`),()=>s.assign(w,!1)),a.fail$data((0,r._)`!${w}`)}else{const p=(0,e.usePattern)(a,l);a.fail$data((0,r._)`!${p}.test(${o})`)}}};return Yu.default=i,Yu}var Ku={},Dv;function Rk(){if(Dv)return Ku;Dv=1,Object.defineProperty(Ku,"__esModule",{value:!0});const e=Ke(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const a=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:a,schemaCode:s}=n,o=i==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${a}).length ${o} ${s}`)}};return Ku.default=r,Ku}var Ju={},$v;function wk(){if($v)return Ju;$v=1,Object.defineProperty(Ju,"__esModule",{value:!0});const e=Fr(),t=Ke(),r=lt(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,t.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,t._)`{missingProperty: ${a}}`},code(a){const{gen:s,schema:o,schemaCode:u,data:l,$data:c,it:d}=a,{opts:m}=d;if(!c&&o.length===0)return;const p=o.length>=m.loopRequired;if(d.allErrors?v():w(),m.strictRequired){const f=a.parentSchema.properties,{definedProperties:E}=a.it;for(const b of o)if((f==null?void 0:f[b])===void 0&&!E.has(b)){const h=d.schemaEnv.baseId+d.errSchemaPath,S=`required property "${b}" is not defined at "${h}" (strictRequired)`;(0,r.checkStrictMode)(d,S,d.opts.strictRequired)}}function v(){if(p||c)a.block$data(t.nil,R);else for(const f of o)(0,e.checkReportMissingProp)(a,f)}function w(){const f=s.let("missing");if(p||c){const E=s.let("valid",!0);a.block$data(E,()=>O(f,E)),a.ok(E)}else s.if((0,e.checkMissingProp)(a,o,f)),(0,e.reportMissingProp)(a,f),s.else()}function R(){s.forOf("prop",u,f=>{a.setParams({missingProperty:f}),s.if((0,e.noPropertyInData)(s,l,f,m.ownProperties),()=>a.error())})}function O(f,E){a.setParams({missingProperty:f}),s.forOf(f,u,()=>{s.assign(E,(0,e.propertyInData)(s,l,f,m.ownProperties)),s.if((0,t.not)(E),()=>{a.error(),s.break()})},t.nil)}}};return Ju.default=i,Ju}var Xu={},Lv;function Ak(){if(Lv)return Xu;Lv=1,Object.defineProperty(Xu,"__esModule",{value:!0});const e=Ke(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const a=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:a,schemaCode:s}=n,o=i==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${a}.length ${o} ${s}`)}};return Xu.default=r,Xu}var Qu={},Zu={},qv;function Hg(){if(qv)return Zu;qv=1,Object.defineProperty(Zu,"__esModule",{value:!0});const e=Ug();return e.code='require("ajv/dist/runtime/equal").default',Zu.default=e,Zu}var kv;function Ok(){if(kv)return Qu;kv=1,Object.defineProperty(Qu,"__esModule",{value:!0});const e=il(),t=Ke(),r=lt(),n=Hg(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:o}})=>(0,t.str)`must NOT have duplicate items (items ## ${o} and ${s} are identical)`,params:({params:{i:s,j:o}})=>(0,t._)`{i: ${s}, j: ${o}}`},code(s){const{gen:o,data:u,$data:l,schema:c,parentSchema:d,schemaCode:m,it:p}=s;if(!l&&!c)return;const v=o.let("valid"),w=d.items?(0,e.getSchemaTypes)(d.items):[];s.block$data(v,R,(0,t._)`${m} === false`),s.ok(v);function R(){const b=o.let("i",(0,t._)`${u}.length`),h=o.let("j");s.setParams({i:b,j:h}),o.assign(v,!0),o.if((0,t._)`${b} > 1`,()=>(O()?f:E)(b,h))}function O(){return w.length>0&&!w.some(b=>b==="object"||b==="array")}function f(b,h){const S=o.name("item"),A=(0,e.checkDataTypes)(w,S,p.opts.strictNumbers,e.DataType.Wrong),P=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${b}--;`,()=>{o.let(S,(0,t._)`${u}[${b}]`),o.if(A,(0,t._)`continue`),w.length>1&&o.if((0,t._)`typeof ${S} == "string"`,(0,t._)`${S} += "_"`),o.if((0,t._)`typeof ${P}[${S}] == "number"`,()=>{o.assign(h,(0,t._)`${P}[${S}]`),s.error(),o.assign(v,!1).break()}).code((0,t._)`${P}[${S}] = ${b}`)})}function E(b,h){const S=(0,r.useFunc)(o,n.default),A=o.name("outer");o.label(A).for((0,t._)`;${b}--;`,()=>o.for((0,t._)`${h} = ${b}; ${h}--;`,()=>o.if((0,t._)`${S}(${u}[${b}], ${u}[${h}])`,()=>{s.error(),o.assign(v,!1).break(A)})))}}};return Qu.default=a,Qu}var xu={},Bv;function Nk(){if(Bv)return xu;Bv=1,Object.defineProperty(xu,"__esModule",{value:!0});const e=Ke(),t=lt(),r=Hg(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:a})=>(0,e._)`{allowedValue: ${a}}`},code(a){const{gen:s,data:o,$data:u,schemaCode:l,schema:c}=a;u||c&&typeof c=="object"?a.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${o}, ${l})`):a.fail((0,e._)`${c} !== ${o}`)}};return xu.default=i,xu}var ec={},Uv;function Pk(){if(Uv)return ec;Uv=1,Object.defineProperty(ec,"__esModule",{value:!0});const e=Ke(),t=lt(),r=Hg(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,e._)`{allowedValues: ${a}}`},code(a){const{gen:s,data:o,$data:u,schema:l,schemaCode:c,it:d}=a;if(!u&&l.length===0)throw new Error("enum must have non-empty array");const m=l.length>=d.opts.loopEnum;let p;const v=()=>p??(p=(0,t.useFunc)(s,r.default));let w;if(m||u)w=s.let("valid"),a.block$data(w,R);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const f=s.const("vSchema",c);w=(0,e.or)(...l.map((E,b)=>O(f,b)))}a.pass(w);function R(){s.assign(w,!1),s.forOf("v",c,f=>s.if((0,e._)`${v()}(${o}, ${f})`,()=>s.assign(w,!0).break()))}function O(f,E){const b=l[E];return typeof b=="object"&&b!==null?(0,e._)`${v()}(${o}, ${f}[${E}])`:(0,e._)`${o} === ${b}`}}};return ec.default=i,ec}var Fv;function Ck(){if(Fv)return Vu;Fv=1,Object.defineProperty(Vu,"__esModule",{value:!0});const e=vk(),t=bk(),r=Sk(),n=Ik(),i=Rk(),a=wk(),s=Ak(),o=Ok(),u=Nk(),l=Pk(),c=[e.default,t.default,r.default,n.default,i.default,a.default,s.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];return Vu.default=c,Vu}var tc={},ya={},Vv;function EN(){if(Vv)return ya;Vv=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.validateAdditionalItems=void 0;const e=Ke(),t=lt(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{parentSchema:s,it:o}=a,{items:u}=s;if(!Array.isArray(u)){(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(a,u)}};function i(a,s){const{gen:o,schema:u,data:l,keyword:c,it:d}=a;d.items=!0;const m=o.const("len",(0,e._)`${l}.length`);if(u===!1)a.setParams({len:s.length}),a.pass((0,e._)`${m} <= ${s.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(d,u)){const v=o.var("valid",(0,e._)`${m} <= ${s.length}`);o.if((0,e.not)(v),()=>p(v)),a.ok(v)}function p(v){o.forRange("i",s.length,m,w=>{a.subschema({keyword:c,dataProp:w,dataPropType:t.Type.Num},v),d.allErrors||o.if((0,e.not)(v),()=>o.break())})}}return ya.validateAdditionalItems=i,ya.default=n,ya}var rc={},ga={},Hv;function vN(){if(Hv)return ga;Hv=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.validateTuple=void 0;const e=Ke(),t=lt(),r=Fr(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:s,it:o}=a;if(Array.isArray(s))return i(a,"additionalItems",s);o.items=!0,!(0,t.alwaysValidSchema)(o,s)&&a.ok((0,r.validateArray)(a))}};function i(a,s,o=a.schema){const{gen:u,parentSchema:l,data:c,keyword:d,it:m}=a;w(l),m.opts.unevaluated&&o.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(u,o.length,m.items));const p=u.name("valid"),v=u.const("len",(0,e._)`${c}.length`);o.forEach((R,O)=>{(0,t.alwaysValidSchema)(m,R)||(u.if((0,e._)`${v} > ${O}`,()=>a.subschema({keyword:d,schemaProp:O,dataProp:O},p)),a.ok(p))});function w(R){const{opts:O,errSchemaPath:f}=m,E=o.length,b=E===R.minItems&&(E===R.maxItems||R[s]===!1);if(O.strictTuples&&!b){const h=`"${d}" is ${E}-tuple, but minItems or maxItems/${s} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(m,h,O.strictTuples)}}}return ga.validateTuple=i,ga.default=n,ga}var Gv;function Mk(){if(Gv)return rc;Gv=1,Object.defineProperty(rc,"__esModule",{value:!0});const e=vN(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return rc.default=t,rc}var nc={},zv;function jk(){if(zv)return nc;zv=1,Object.defineProperty(nc,"__esModule",{value:!0});const e=Ke(),t=lt(),r=Fr(),n=EN(),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{schema:o,parentSchema:u,it:l}=s,{prefixItems:c}=u;l.items=!0,!(0,t.alwaysValidSchema)(l,o)&&(c?(0,n.validateAdditionalItems)(s,c):s.ok((0,r.validateArray)(s)))}};return nc.default=a,nc}var ic={},Wv;function Dk(){if(Wv)return ic;Wv=1,Object.defineProperty(ic,"__esModule",{value:!0});const e=Ke(),t=lt(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:a}})=>a===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${a} valid item(s)`,params:({params:{min:i,max:a}})=>a===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${a}}`},code(i){const{gen:a,schema:s,parentSchema:o,data:u,it:l}=i;let c,d;const{minContains:m,maxContains:p}=o;l.opts.next?(c=m===void 0?1:m,d=p):c=1;const v=a.const("len",(0,e._)`${u}.length`);if(i.setParams({min:c,max:d}),d===void 0&&c===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&c>d){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(l,s)){let E=(0,e._)`${v} >= ${c}`;d!==void 0&&(E=(0,e._)`${E} && ${v} <= ${d}`),i.pass(E);return}l.items=!0;const w=a.name("valid");d===void 0&&c===1?O(w,()=>a.if(w,()=>a.break())):c===0?(a.let(w,!0),d!==void 0&&a.if((0,e._)`${u}.length > 0`,R)):(a.let(w,!1),R()),i.result(w,()=>i.reset());function R(){const E=a.name("_valid"),b=a.let("count",0);O(E,()=>a.if(E,()=>f(b)))}function O(E,b){a.forRange("i",0,v,h=>{i.subschema({keyword:"contains",dataProp:h,dataPropType:t.Type.Num,compositeRule:!0},E),b()})}function f(E){a.code((0,e._)`${E}++`),d===void 0?a.if((0,e._)`${E} >= ${c}`,()=>a.assign(w,!0).break()):(a.if((0,e._)`${E} > ${d}`,()=>a.assign(w,!1).break()),c===1?a.assign(w,!0):a.if((0,e._)`${E} >= ${c}`,()=>a.assign(w,!0)))}}};return ic.default=n,ic}var fd={},Yv;function $k(){return Yv||(Yv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Ke(),r=lt(),n=Fr();e.error={message:({params:{property:u,depsCount:l,deps:c}})=>{const d=l===1?"property":"properties";return(0,t.str)`must have ${d} ${c} when property ${u} is present`},params:({params:{property:u,depsCount:l,deps:c,missingProperty:d}})=>(0,t._)`{property: ${u},
55
- missingProperty: ${d},
56
- depsCount: ${l},
57
- deps: ${c}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[l,c]=a(u);s(u,l),o(u,c)}};function a({schema:u}){const l={},c={};for(const d in u){if(d==="__proto__")continue;const m=Array.isArray(u[d])?l:c;m[d]=u[d]}return[l,c]}function s(u,l=u.schema){const{gen:c,data:d,it:m}=u;if(Object.keys(l).length===0)return;const p=c.let("missing");for(const v in l){const w=l[v];if(w.length===0)continue;const R=(0,n.propertyInData)(c,d,v,m.opts.ownProperties);u.setParams({property:v,depsCount:w.length,deps:w.join(", ")}),m.allErrors?c.if(R,()=>{for(const O of w)(0,n.checkReportMissingProp)(u,O)}):(c.if((0,t._)`${R} && (${(0,n.checkMissingProp)(u,w,p)})`),(0,n.reportMissingProp)(u,p),c.else())}}e.validatePropertyDeps=s;function o(u,l=u.schema){const{gen:c,data:d,keyword:m,it:p}=u,v=c.name("valid");for(const w in l)(0,r.alwaysValidSchema)(p,l[w])||(c.if((0,n.propertyInData)(c,d,w,p.opts.ownProperties),()=>{const R=u.subschema({keyword:m,schemaProp:w},v);u.mergeValidEvaluated(R,v)},()=>c.var(v,!0)),u.ok(v))}e.validateSchemaDeps=o,e.default=i})(fd)),fd}var ac={},Kv;function Lk(){if(Kv)return ac;Kv=1,Object.defineProperty(ac,"__esModule",{value:!0});const e=Ke(),t=lt(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:a,schema:s,data:o,it:u}=i;if((0,t.alwaysValidSchema)(u,s))return;const l=a.name("valid");a.forIn("key",o,c=>{i.setParams({propertyName:c}),i.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},l),a.if((0,e.not)(l),()=>{i.error(!0),u.allErrors||a.break()})}),i.ok(l)}};return ac.default=n,ac}var sc={},Jv;function bN(){if(Jv)return sc;Jv=1,Object.defineProperty(sc,"__esModule",{value:!0});const e=Fr(),t=Ke(),r=Pn(),n=lt(),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,t._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:o,schema:u,parentSchema:l,data:c,errsCount:d,it:m}=s;if(!d)throw new Error("ajv implementation error");const{allErrors:p,opts:v}=m;if(m.props=!0,v.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(m,u))return;const w=(0,e.allSchemaProperties)(l.properties),R=(0,e.allSchemaProperties)(l.patternProperties);O(),s.ok((0,t._)`${d} === ${r.default.errors}`);function O(){o.forIn("key",c,S=>{!w.length&&!R.length?b(S):o.if(f(S),()=>b(S))})}function f(S){let A;if(w.length>8){const P=(0,n.schemaRefOrVal)(m,l.properties,"properties");A=(0,e.isOwnProperty)(o,P,S)}else w.length?A=(0,t.or)(...w.map(P=>(0,t._)`${S} === ${P}`)):A=t.nil;return R.length&&(A=(0,t.or)(A,...R.map(P=>(0,t._)`${(0,e.usePattern)(s,P)}.test(${S})`))),(0,t.not)(A)}function E(S){o.code((0,t._)`delete ${c}[${S}]`)}function b(S){if(v.removeAdditional==="all"||v.removeAdditional&&u===!1){E(S);return}if(u===!1){s.setParams({additionalProperty:S}),s.error(),p||o.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(m,u)){const A=o.name("valid");v.removeAdditional==="failing"?(h(S,A,!1),o.if((0,t.not)(A),()=>{s.reset(),E(S)})):(h(S,A),p||o.if((0,t.not)(A),()=>o.break()))}}function h(S,A,P){const k={keyword:"additionalProperties",dataProp:S,dataPropType:n.Type.Str};P===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(k,A)}}};return sc.default=a,sc}var oc={},Xv;function qk(){if(Xv)return oc;Xv=1,Object.defineProperty(oc,"__esModule",{value:!0});const e=Co(),t=Fr(),r=lt(),n=bN(),i={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:s,schema:o,parentSchema:u,data:l,it:c}=a;c.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(c,n.default,"additionalProperties"));const d=(0,t.allSchemaProperties)(o);for(const R of d)c.definedProperties.add(R);c.opts.unevaluated&&d.length&&c.props!==!0&&(c.props=r.mergeEvaluated.props(s,(0,r.toHash)(d),c.props));const m=d.filter(R=>!(0,r.alwaysValidSchema)(c,o[R]));if(m.length===0)return;const p=s.name("valid");for(const R of m)v(R)?w(R):(s.if((0,t.propertyInData)(s,l,R,c.opts.ownProperties)),w(R),c.allErrors||s.else().var(p,!0),s.endIf()),a.it.definedProperties.add(R),a.ok(p);function v(R){return c.opts.useDefaults&&!c.compositeRule&&o[R].default!==void 0}function w(R){a.subschema({keyword:"properties",schemaProp:R,dataProp:R},p)}}};return oc.default=i,oc}var uc={},Qv;function kk(){if(Qv)return uc;Qv=1,Object.defineProperty(uc,"__esModule",{value:!0});const e=Fr(),t=Ke(),r=lt(),n=lt(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:s,schema:o,data:u,parentSchema:l,it:c}=a,{opts:d}=c,m=(0,e.allSchemaProperties)(o),p=m.filter(b=>(0,r.alwaysValidSchema)(c,o[b]));if(m.length===0||p.length===m.length&&(!c.opts.unevaluated||c.props===!0))return;const v=d.strictSchema&&!d.allowMatchingProperties&&l.properties,w=s.name("valid");c.props!==!0&&!(c.props instanceof t.Name)&&(c.props=(0,n.evaluatedPropsToName)(s,c.props));const{props:R}=c;O();function O(){for(const b of m)v&&f(b),c.allErrors?E(b):(s.var(w,!0),E(b),s.if(w))}function f(b){for(const h in v)new RegExp(b).test(h)&&(0,r.checkStrictMode)(c,`property ${h} matches pattern ${b} (use allowMatchingProperties)`)}function E(b){s.forIn("key",u,h=>{s.if((0,t._)`${(0,e.usePattern)(a,b)}.test(${h})`,()=>{const S=p.includes(b);S||a.subschema({keyword:"patternProperties",schemaProp:b,dataProp:h,dataPropType:n.Type.Str},w),c.opts.unevaluated&&R!==!0?s.assign((0,t._)`${R}[${h}]`,!0):!S&&!c.allErrors&&s.if((0,t.not)(w),()=>s.break())})})}}};return uc.default=i,uc}var cc={},Zv;function Bk(){if(Zv)return cc;Zv=1,Object.defineProperty(cc,"__esModule",{value:!0});const e=lt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:a}=r;if((0,e.alwaysValidSchema)(a,i)){r.fail();return}const s=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return cc.default=t,cc}var lc={},xv;function Uk(){if(xv)return lc;xv=1,Object.defineProperty(lc,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Fr().validateUnion,error:{message:"must match a schema in anyOf"}};return lc.default=t,lc}var dc={},eb;function Fk(){if(eb)return dc;eb=1,Object.defineProperty(dc,"__esModule",{value:!0});const e=Ke(),t=lt(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:a,schema:s,parentSchema:o,it:u}=i;if(!Array.isArray(s))throw new Error("ajv implementation error");if(u.opts.discriminator&&o.discriminator)return;const l=s,c=a.let("valid",!1),d=a.let("passing",null),m=a.name("_valid");i.setParams({passing:d}),a.block(p),i.result(c,()=>i.reset(),()=>i.error(!0));function p(){l.forEach((v,w)=>{let R;(0,t.alwaysValidSchema)(u,v)?a.var(m,!0):R=i.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},m),w>0&&a.if((0,e._)`${m} && ${c}`).assign(c,!1).assign(d,(0,e._)`[${d}, ${w}]`).else(),a.if(m,()=>{a.assign(c,!0),a.assign(d,w),R&&i.mergeEvaluated(R,e.Name)})})}}};return dc.default=n,dc}var fc={},tb;function Vk(){if(tb)return fc;tb=1,Object.defineProperty(fc,"__esModule",{value:!0});const e=lt(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:a}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const s=n.name("valid");i.forEach((o,u)=>{if((0,e.alwaysValidSchema)(a,o))return;const l=r.subschema({keyword:"allOf",schemaProp:u},s);r.ok(s),r.mergeEvaluated(l)})}};return fc.default=t,fc}var pc={},rb;function Hk(){if(rb)return pc;rb=1,Object.defineProperty(pc,"__esModule",{value:!0});const e=Ke(),t=lt(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:a})=>(0,e.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,e._)`{failingKeyword: ${a.ifClause}}`},code(a){const{gen:s,parentSchema:o,it:u}=a;o.then===void 0&&o.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const l=i(u,"then"),c=i(u,"else");if(!l&&!c)return;const d=s.let("valid",!0),m=s.name("_valid");if(p(),a.reset(),l&&c){const w=s.let("ifClause");a.setParams({ifClause:w}),s.if(m,v("then",w),v("else",w))}else l?s.if(m,v("then")):s.if((0,e.not)(m),v("else"));a.pass(d,()=>a.error(!0));function p(){const w=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);a.mergeEvaluated(w)}function v(w,R){return()=>{const O=a.subschema({keyword:w},m);s.assign(d,m),a.mergeValidEvaluated(O,d),R?s.assign(R,(0,e._)`${w}`):a.setParams({ifClause:w})}}}};function i(a,s){const o=a.schema[s];return o!==void 0&&!(0,t.alwaysValidSchema)(a,o)}return pc.default=n,pc}var mc={},nb;function Gk(){if(nb)return mc;nb=1,Object.defineProperty(mc,"__esModule",{value:!0});const e=lt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return mc.default=t,mc}var ib;function zk(){if(ib)return tc;ib=1,Object.defineProperty(tc,"__esModule",{value:!0});const e=EN(),t=Mk(),r=vN(),n=jk(),i=Dk(),a=$k(),s=Lk(),o=bN(),u=qk(),l=kk(),c=Bk(),d=Uk(),m=Fk(),p=Vk(),v=Hk(),w=Gk();function R(O=!1){const f=[c.default,d.default,m.default,p.default,v.default,w.default,s.default,o.default,a.default,u.default,l.default];return O?f.push(t.default,n.default):f.push(e.default,r.default),f.push(i.default),f}return tc.default=R,tc}var hc={},yc={},ab;function Wk(){if(ab)return yc;ab=1,Object.defineProperty(yc,"__esModule",{value:!0});const e=Ke(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:a,data:s,$data:o,schema:u,schemaCode:l,it:c}=n,{opts:d,errSchemaPath:m,schemaEnv:p,self:v}=c;if(!d.validateFormats)return;o?w():R();function w(){const O=a.scopeValue("formats",{ref:v.formats,code:d.code.formats}),f=a.const("fDef",(0,e._)`${O}[${l}]`),E=a.let("fType"),b=a.let("format");a.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>a.assign(E,(0,e._)`${f}.type || "string"`).assign(b,(0,e._)`${f}.validate`),()=>a.assign(E,(0,e._)`"string"`).assign(b,f)),n.fail$data((0,e.or)(h(),S()));function h(){return d.strictSchema===!1?e.nil:(0,e._)`${l} && !${b}`}function S(){const A=p.$async?(0,e._)`(${f}.async ? await ${b}(${s}) : ${b}(${s}))`:(0,e._)`${b}(${s})`,P=(0,e._)`(typeof ${b} == "function" ? ${A} : ${b}.test(${s}))`;return(0,e._)`${b} && ${b} !== true && ${E} === ${i} && !${P}`}}function R(){const O=v.formats[u];if(!O){h();return}if(O===!0)return;const[f,E,b]=S(O);f===i&&n.pass(A());function h(){if(d.strictSchema===!1){v.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${u}" ignored in schema at path "${m}"`}}function S(P){const k=P instanceof RegExp?(0,e.regexpCode)(P):d.code.formats?(0,e._)`${d.code.formats}${(0,e.getProperty)(u)}`:void 0,z=a.scopeValue("formats",{key:u,ref:P,code:k});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${z}.validate`]:["string",P,z]}function A(){if(typeof O=="object"&&!(O instanceof RegExp)&&O.async){if(!p.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${s})`}return typeof E=="function"?(0,e._)`${b}(${s})`:(0,e._)`${b}.test(${s})`}}}};return yc.default=r,yc}var sb;function Yk(){if(sb)return hc;sb=1,Object.defineProperty(hc,"__esModule",{value:!0});const t=[Wk().default];return hc.default=t,hc}var ri={},ob;function Kk(){return ob||(ob=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.contentVocabulary=ri.metadataVocabulary=void 0,ri.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ri.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ri}var ub;function Jk(){if(ub)return Bu;ub=1,Object.defineProperty(Bu,"__esModule",{value:!0});const e=Ek(),t=Ck(),r=zk(),n=Yk(),i=Kk(),a=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return Bu.default=a,Bu}var gc={},ms={},cb;function Xk(){if(cb)return ms;cb=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(ms.DiscrError=e={})),ms}var lb;function Qk(){if(lb)return gc;lb=1,Object.defineProperty(gc,"__esModule",{value:!0});const e=Ke(),t=Xk(),r=Vg(),n=El(),i=lt(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:o,tagName:u}})=>o===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:o,tag:u,tagName:l}})=>(0,e._)`{error: ${o}, tag: ${l}, tagValue: ${u}}`},code(o){const{gen:u,data:l,schema:c,parentSchema:d,it:m}=o,{oneOf:p}=d;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const v=c.propertyName;if(typeof v!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!p)throw new Error("discriminator: requires oneOf keyword");const w=u.let("valid",!1),R=u.const("tag",(0,e._)`${l}${(0,e.getProperty)(v)}`);u.if((0,e._)`typeof ${R} == "string"`,()=>O(),()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:R,tagName:v})),o.ok(w);function O(){const b=E();u.if(!1);for(const h in b)u.elseIf((0,e._)`${R} === ${h}`),u.assign(w,f(b[h]));u.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:R,tagName:v}),u.endIf()}function f(b){const h=u.name("valid"),S=o.subschema({keyword:"oneOf",schemaProp:b},h);return o.mergeEvaluated(S,e.Name),h}function E(){var b;const h={},S=P(d);let A=!0;for(let Y=0;Y<p.length;Y++){let W=p[Y];if(W!=null&&W.$ref&&!(0,i.schemaHasRulesButRef)(W,m.self.RULES)){const F=W.$ref;if(W=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,F),W instanceof r.SchemaEnv&&(W=W.schema),W===void 0)throw new n.default(m.opts.uriResolver,m.baseId,F)}const U=(b=W==null?void 0:W.properties)===null||b===void 0?void 0:b[v];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);A=A&&(S||P(W)),k(U,Y)}if(!A)throw new Error(`discriminator: "${v}" must be required`);return h;function P({required:Y}){return Array.isArray(Y)&&Y.includes(v)}function k(Y,W){if(Y.const)z(Y.const,W);else if(Y.enum)for(const U of Y.enum)z(U,W);else throw new Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function z(Y,W){if(typeof Y!="string"||Y in h)throw new Error(`discriminator: "${v}" values must be unique strings`);h[Y]=W}}}};return gc.default=s,gc}const Zk="http://json-schema.org/draft-07/schema#",xk="http://json-schema.org/draft-07/schema#",eB="Core schema meta-schema",tB={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},rB=["object","boolean"],nB={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},iB={$schema:Zk,$id:xk,title:eB,definitions:tB,type:rB,properties:nB,default:!0};var db;function Gg(){return db||(db=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=yk(),n=Jk(),i=Qk(),a=iB,s=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const v=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(v,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var l=Co();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=Ke();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=Fg();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=El();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Du,Du.exports)),Du.exports}var Ms={exports:{}},js={exports:{}},Ds={exports:{}},_c={exports:{}},fb;function aB(){return fb||(fb=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=["undefined","string","number","object","function","boolean","symbol"];function i(){return{keyword:"typeof",schemaType:["string","array"],code(a){const{data:s,schema:o,schemaValue:u}=a;a.fail(typeof o=="string"?(0,r._)`typeof ${s} != ${o}`:(0,r._)`${u}.indexOf(typeof ${s}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}t.default=i,e.exports=i})(_c,_c.exports)),_c.exports}var pb=Ds.exports,mb;function sB(){return mb||(mb=1,(function(e,t){var r=pb&&pb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(aB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Ds,Ds.exports)),Ds.exports}var $s={exports:{}},TN={},vl={};vl.byteLength=cB;vl.toByteArray=dB;vl.fromByteArray=mB;var on=[],Ir=[],oB=typeof Uint8Array<"u"?Uint8Array:Array,pd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var _a=0,uB=pd.length;_a<uB;++_a)on[_a]=pd[_a],Ir[pd.charCodeAt(_a)]=_a;Ir[45]=62;Ir[95]=63;function SN(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function cB(e){var t=SN(e),r=t[0],n=t[1];return(r+n)*3/4-n}function lB(e,t,r){return(t+r)*3/4-r}function dB(e){var t,r=SN(e),n=r[0],i=r[1],a=new oB(lB(e,n,i)),s=0,o=i>0?n-4:n,u;for(u=0;u<o;u+=4)t=Ir[e.charCodeAt(u)]<<18|Ir[e.charCodeAt(u+1)]<<12|Ir[e.charCodeAt(u+2)]<<6|Ir[e.charCodeAt(u+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=t&255;return i===2&&(t=Ir[e.charCodeAt(u)]<<2|Ir[e.charCodeAt(u+1)]>>4,a[s++]=t&255),i===1&&(t=Ir[e.charCodeAt(u)]<<10|Ir[e.charCodeAt(u+1)]<<4|Ir[e.charCodeAt(u+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function fB(e){return on[e>>18&63]+on[e>>12&63]+on[e>>6&63]+on[e&63]}function pB(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(fB(n));return i.join("")}function mB(e){for(var t,r=e.length,n=r%3,i=[],a=16383,s=0,o=r-n;s<o;s+=a)i.push(pB(e,s,s+a>o?o:s+a));return n===1?(t=e[r-1],i.push(on[t>>2]+on[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(on[t>>10]+on[t>>4&63]+on[t<<2&63]+"=")),i.join("")}var zg={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */zg.read=function(e,t,r,n,i){var a,s,o=i*8-n-1,u=(1<<o)-1,l=u>>1,c=-7,d=r?i-1:0,m=r?-1:1,p=e[t+d];for(d+=m,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=a*256+e[t+d],d+=m,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=n;c>0;s=s*256+e[t+d],d+=m,c-=8);if(a===0)a=1-l;else{if(a===u)return s?NaN:(p?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-l}return(p?-1:1)*s*Math.pow(2,a-n)};zg.write=function(e,t,r,n,i,a){var s,o,u,l=a*8-i-1,c=(1<<l)-1,d=c>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,v=n?1:-1,w=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+d>=1?t+=m/u:t+=m*Math.pow(2,1-d),t*u>=2&&(s++,u/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*u-1)*Math.pow(2,i),s=s+d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=o&255,p+=v,o/=256,i-=8);for(s=s<<i|o,l+=i;l>0;e[r+p]=s&255,p+=v,s/=256,l-=8);e[r+p-v]|=w*128};/*!
58
- * The buffer module from node.js, for the browser.
59
- *
60
- * @author Feross Aboukhadijeh <https://feross.org>
61
- * @license MIT
62
- */(function(e){const t=vl,r=zg,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=h,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i;const{Uint8Array:a,ArrayBuffer:s,SharedArrayBuffer:o}=globalThis;c.TYPED_ARRAY_SUPPORT=u(),!c.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 u(){try{const M=new a(1),_={foo:function(){return 42}};return Object.setPrototypeOf(_,a.prototype),Object.setPrototypeOf(M,_),M.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function l(M){if(M>i)throw new RangeError('The value "'+M+'" is invalid for option "size"');const _=new a(M);return Object.setPrototypeOf(_,c.prototype),_}function c(M,_,I){if(typeof M=="number"){if(typeof _=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(M)}return d(M,_,I)}c.poolSize=8192;function d(M,_,I){if(typeof M=="string")return w(M,_);if(s.isView(M))return O(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(_t(M,s)||M&&_t(M.buffer,s)||typeof o<"u"&&(_t(M,o)||M&&_t(M.buffer,o)))return f(M,_,I);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=M.valueOf&&M.valueOf();if(G!=null&&G!==M)return c.from(G,_,I);const de=E(M);if(de)return de;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return c.from(M[Symbol.toPrimitive]("string"),_,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}c.from=function(M,_,I){return d(M,_,I)},Object.setPrototypeOf(c.prototype,a.prototype),Object.setPrototypeOf(c,a);function m(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function p(M,_,I){return m(M),M<=0?l(M):_!==void 0?typeof I=="string"?l(M).fill(_,I):l(M).fill(_):l(M)}c.alloc=function(M,_,I){return p(M,_,I)};function v(M){return m(M),l(M<0?0:b(M)|0)}c.allocUnsafe=function(M){return v(M)},c.allocUnsafeSlow=function(M){return v(M)};function w(M,_){if((typeof _!="string"||_==="")&&(_="utf8"),!c.isEncoding(_))throw new TypeError("Unknown encoding: "+_);const I=S(M,_)|0;let G=l(I);const de=G.write(M,_);return de!==I&&(G=G.slice(0,de)),G}function R(M){const _=M.length<0?0:b(M.length)|0,I=l(_);for(let G=0;G<_;G+=1)I[G]=M[G]&255;return I}function O(M){if(_t(M,a)){const _=new a(M);return f(_.buffer,_.byteOffset,_.byteLength)}return R(M)}function f(M,_,I){if(_<0||M.byteLength<_)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<_+(I||0))throw new RangeError('"length" is outside of buffer bounds');let G;return _===void 0&&I===void 0?G=new a(M):I===void 0?G=new a(M,_):G=new a(M,_,I),Object.setPrototypeOf(G,c.prototype),G}function E(M){if(c.isBuffer(M)){const _=b(M.length)|0,I=l(_);return I.length===0||M.copy(I,0,0,_),I}if(M.length!==void 0)return typeof M.length!="number"||Qt(M.length)?l(0):R(M);if(M.type==="Buffer"&&Array.isArray(M.data))return R(M.data)}function b(M){if(M>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return M|0}function h(M){return+M!=M&&(M=0),c.alloc(+M)}c.isBuffer=function(_){return _!=null&&_._isBuffer===!0&&_!==c.prototype},c.compare=function(_,I){if(_t(_,a)&&(_=c.from(_,_.offset,_.byteLength)),_t(I,a)&&(I=c.from(I,I.offset,I.byteLength)),!c.isBuffer(_)||!c.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_===I)return 0;let G=_.length,de=I.length;for(let ge=0,be=Math.min(G,de);ge<be;++ge)if(_[ge]!==I[ge]){G=_[ge],de=I[ge];break}return G<de?-1:de<G?1:0},c.isEncoding=function(_){switch(String(_).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}},c.concat=function(_,I){if(!Array.isArray(_))throw new TypeError('"list" argument must be an Array of Buffers');if(_.length===0)return c.alloc(0);let G;if(I===void 0)for(I=0,G=0;G<_.length;++G)I+=_[G].length;const de=c.allocUnsafe(I);let ge=0;for(G=0;G<_.length;++G){let be=_[G];if(_t(be,a))ge+be.length>de.length?(c.isBuffer(be)||(be=c.from(be)),be.copy(de,ge)):a.prototype.set.call(de,be,ge);else if(c.isBuffer(be))be.copy(de,ge);else throw new TypeError('"list" argument must be an Array of Buffers');ge+=be.length}return de};function S(M,_){if(c.isBuffer(M))return M.length;if(s.isView(M)||_t(M,s))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const I=M.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&I===0)return 0;let de=!1;for(;;)switch(_){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return Je(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return gt(M).length;default:if(de)return G?-1:Je(M).length;_=(""+_).toLowerCase(),de=!0}}c.byteLength=S;function A(M,_,I){let G=!1;if((_===void 0||_<0)&&(_=0),_>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,_>>>=0,I<=_))return"";for(M||(M="utf8");;)switch(M){case"hex":return L(this,_,I);case"utf8":case"utf-8":return ne(this,_,I);case"ascii":return $(this,_,I);case"latin1":case"binary":return j(this,_,I);case"base64":return se(this,_,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,_,I);default:if(G)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),G=!0}}c.prototype._isBuffer=!0;function P(M,_,I){const G=M[_];M[_]=M[I],M[I]=G}c.prototype.swap16=function(){const _=this.length;if(_%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let I=0;I<_;I+=2)P(this,I,I+1);return this},c.prototype.swap32=function(){const _=this.length;if(_%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let I=0;I<_;I+=4)P(this,I,I+3),P(this,I+1,I+2);return this},c.prototype.swap64=function(){const _=this.length;if(_%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let I=0;I<_;I+=8)P(this,I,I+7),P(this,I+1,I+6),P(this,I+2,I+5),P(this,I+3,I+4);return this},c.prototype.toString=function(){const _=this.length;return _===0?"":arguments.length===0?ne(this,0,_):A.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(_){if(!c.isBuffer(_))throw new TypeError("Argument must be a Buffer");return this===_?!0:c.compare(this,_)===0},c.prototype.inspect=function(){let _="";const I=e.INSPECT_MAX_BYTES;return _=this.toString("hex",0,I).replace(/(.{2})/g,"$1 ").trim(),this.length>I&&(_+=" ... "),"<Buffer "+_+">"},n&&(c.prototype[n]=c.prototype.inspect),c.prototype.compare=function(_,I,G,de,ge){if(_t(_,a)&&(_=c.from(_,_.offset,_.byteLength)),!c.isBuffer(_))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _);if(I===void 0&&(I=0),G===void 0&&(G=_?_.length:0),de===void 0&&(de=0),ge===void 0&&(ge=this.length),I<0||G>_.length||de<0||ge>this.length)throw new RangeError("out of range index");if(de>=ge&&I>=G)return 0;if(de>=ge)return-1;if(I>=G)return 1;if(I>>>=0,G>>>=0,de>>>=0,ge>>>=0,this===_)return 0;let be=ge-de,Qe=G-I;const wt=Math.min(be,Qe),Et=this.slice(de,ge),At=_.slice(I,G);for(let rt=0;rt<wt;++rt)if(Et[rt]!==At[rt]){be=Et[rt],Qe=At[rt];break}return be<Qe?-1:Qe<be?1:0};function k(M,_,I,G,de){if(M.length===0)return-1;if(typeof I=="string"?(G=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,Qt(I)&&(I=de?0:M.length-1),I<0&&(I=M.length+I),I>=M.length){if(de)return-1;I=M.length-1}else if(I<0)if(de)I=0;else return-1;if(typeof _=="string"&&(_=c.from(_,G)),c.isBuffer(_))return _.length===0?-1:z(M,_,I,G,de);if(typeof _=="number")return _=_&255,typeof a.prototype.indexOf=="function"?de?a.prototype.indexOf.call(M,_,I):a.prototype.lastIndexOf.call(M,_,I):z(M,[_],I,G,de);throw new TypeError("val must be string, number or Buffer")}function z(M,_,I,G,de){let ge=1,be=M.length,Qe=_.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(M.length<2||_.length<2)return-1;ge=2,be/=2,Qe/=2,I/=2}function wt(At,rt){return ge===1?At[rt]:At.readUInt16BE(rt*ge)}let Et;if(de){let At=-1;for(Et=I;Et<be;Et++)if(wt(M,Et)===wt(_,At===-1?0:Et-At)){if(At===-1&&(At=Et),Et-At+1===Qe)return At*ge}else At!==-1&&(Et-=Et-At),At=-1}else for(I+Qe>be&&(I=be-Qe),Et=I;Et>=0;Et--){let At=!0;for(let rt=0;rt<Qe;rt++)if(wt(M,Et+rt)!==wt(_,rt)){At=!1;break}if(At)return Et}return-1}c.prototype.includes=function(_,I,G){return this.indexOf(_,I,G)!==-1},c.prototype.indexOf=function(_,I,G){return k(this,_,I,G,!0)},c.prototype.lastIndexOf=function(_,I,G){return k(this,_,I,G,!1)};function Y(M,_,I,G){I=Number(I)||0;const de=M.length-I;G?(G=Number(G),G>de&&(G=de)):G=de;const ge=_.length;G>ge/2&&(G=ge/2);let be;for(be=0;be<G;++be){const Qe=parseInt(_.substr(be*2,2),16);if(Qt(Qe))return be;M[I+be]=Qe}return be}function W(M,_,I,G){return Ut(Je(_,M.length-I),M,I,G)}function U(M,_,I,G){return Ut(st(_),M,I,G)}function F(M,_,I,G){return Ut(gt(_),M,I,G)}function ce(M,_,I,G){return Ut(Mt(_,M.length-I),M,I,G)}c.prototype.write=function(_,I,G,de){if(I===void 0)de="utf8",G=this.length,I=0;else if(G===void 0&&typeof I=="string")de=I,G=this.length,I=0;else if(isFinite(I))I=I>>>0,isFinite(G)?(G=G>>>0,de===void 0&&(de="utf8")):(de=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ge=this.length-I;if((G===void 0||G>ge)&&(G=ge),_.length>0&&(G<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");let be=!1;for(;;)switch(de){case"hex":return Y(this,_,I,G);case"utf8":case"utf-8":return W(this,_,I,G);case"ascii":case"latin1":case"binary":return U(this,_,I,G);case"base64":return F(this,_,I,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,_,I,G);default:if(be)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),be=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(M,_,I){return _===0&&I===M.length?t.fromByteArray(M):t.fromByteArray(M.slice(_,I))}function ne(M,_,I){I=Math.min(M.length,I);const G=[];let de=_;for(;de<I;){const ge=M[de];let be=null,Qe=ge>239?4:ge>223?3:ge>191?2:1;if(de+Qe<=I){let wt,Et,At,rt;switch(Qe){case 1:ge<128&&(be=ge);break;case 2:wt=M[de+1],(wt&192)===128&&(rt=(ge&31)<<6|wt&63,rt>127&&(be=rt));break;case 3:wt=M[de+1],Et=M[de+2],(wt&192)===128&&(Et&192)===128&&(rt=(ge&15)<<12|(wt&63)<<6|Et&63,rt>2047&&(rt<55296||rt>57343)&&(be=rt));break;case 4:wt=M[de+1],Et=M[de+2],At=M[de+3],(wt&192)===128&&(Et&192)===128&&(At&192)===128&&(rt=(ge&15)<<18|(wt&63)<<12|(Et&63)<<6|At&63,rt>65535&&rt<1114112&&(be=rt))}}be===null?(be=65533,Qe=1):be>65535&&(be-=65536,G.push(be>>>10&1023|55296),be=56320|be&1023),G.push(be),de+=Qe}return K(G)}const X=4096;function K(M){const _=M.length;if(_<=X)return String.fromCharCode.apply(String,M);let I="",G=0;for(;G<_;)I+=String.fromCharCode.apply(String,M.slice(G,G+=X));return I}function $(M,_,I){let G="";I=Math.min(M.length,I);for(let de=_;de<I;++de)G+=String.fromCharCode(M[de]&127);return G}function j(M,_,I){let G="";I=Math.min(M.length,I);for(let de=_;de<I;++de)G+=String.fromCharCode(M[de]);return G}function L(M,_,I){const G=M.length;(!_||_<0)&&(_=0),(!I||I<0||I>G)&&(I=G);let de="";for(let ge=_;ge<I;++ge)de+=Zt[M[ge]];return de}function H(M,_,I){const G=M.slice(_,I);let de="";for(let ge=0;ge<G.length-1;ge+=2)de+=String.fromCharCode(G[ge]+G[ge+1]*256);return de}c.prototype.slice=function(_,I){const G=this.length;_=~~_,I=I===void 0?G:~~I,_<0?(_+=G,_<0&&(_=0)):_>G&&(_=G),I<0?(I+=G,I<0&&(I=0)):I>G&&(I=G),I<_&&(I=_);const de=this.subarray(_,I);return Object.setPrototypeOf(de,c.prototype),de};function N(M,_,I){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+_>I)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(_,I,G){_=_>>>0,I=I>>>0,G||N(_,I,this.length);let de=this[_],ge=1,be=0;for(;++be<I&&(ge*=256);)de+=this[_+be]*ge;return de},c.prototype.readUintBE=c.prototype.readUIntBE=function(_,I,G){_=_>>>0,I=I>>>0,G||N(_,I,this.length);let de=this[_+--I],ge=1;for(;I>0&&(ge*=256);)de+=this[_+--I]*ge;return de},c.prototype.readUint8=c.prototype.readUInt8=function(_,I){return _=_>>>0,I||N(_,1,this.length),this[_]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(_,I){return _=_>>>0,I||N(_,2,this.length),this[_]|this[_+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(_,I){return _=_>>>0,I||N(_,2,this.length),this[_]<<8|this[_+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(_,I){return _=_>>>0,I||N(_,4,this.length),(this[_]|this[_+1]<<8|this[_+2]<<16)+this[_+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(_,I){return _=_>>>0,I||N(_,4,this.length),this[_]*16777216+(this[_+1]<<16|this[_+2]<<8|this[_+3])},c.prototype.readBigUInt64LE=ft(function(_){_=_>>>0,we(_,"offset");const I=this[_],G=this[_+7];(I===void 0||G===void 0)&&Ue(_,this.length-8);const de=I+this[++_]*2**8+this[++_]*2**16+this[++_]*2**24,ge=this[++_]+this[++_]*2**8+this[++_]*2**16+G*2**24;return BigInt(de)+(BigInt(ge)<<BigInt(32))}),c.prototype.readBigUInt64BE=ft(function(_){_=_>>>0,we(_,"offset");const I=this[_],G=this[_+7];(I===void 0||G===void 0)&&Ue(_,this.length-8);const de=I*2**24+this[++_]*2**16+this[++_]*2**8+this[++_],ge=this[++_]*2**24+this[++_]*2**16+this[++_]*2**8+G;return(BigInt(de)<<BigInt(32))+BigInt(ge)}),c.prototype.readIntLE=function(_,I,G){_=_>>>0,I=I>>>0,G||N(_,I,this.length);let de=this[_],ge=1,be=0;for(;++be<I&&(ge*=256);)de+=this[_+be]*ge;return ge*=128,de>=ge&&(de-=Math.pow(2,8*I)),de},c.prototype.readIntBE=function(_,I,G){_=_>>>0,I=I>>>0,G||N(_,I,this.length);let de=I,ge=1,be=this[_+--de];for(;de>0&&(ge*=256);)be+=this[_+--de]*ge;return ge*=128,be>=ge&&(be-=Math.pow(2,8*I)),be},c.prototype.readInt8=function(_,I){return _=_>>>0,I||N(_,1,this.length),this[_]&128?(255-this[_]+1)*-1:this[_]},c.prototype.readInt16LE=function(_,I){_=_>>>0,I||N(_,2,this.length);const G=this[_]|this[_+1]<<8;return G&32768?G|4294901760:G},c.prototype.readInt16BE=function(_,I){_=_>>>0,I||N(_,2,this.length);const G=this[_+1]|this[_]<<8;return G&32768?G|4294901760:G},c.prototype.readInt32LE=function(_,I){return _=_>>>0,I||N(_,4,this.length),this[_]|this[_+1]<<8|this[_+2]<<16|this[_+3]<<24},c.prototype.readInt32BE=function(_,I){return _=_>>>0,I||N(_,4,this.length),this[_]<<24|this[_+1]<<16|this[_+2]<<8|this[_+3]},c.prototype.readBigInt64LE=ft(function(_){_=_>>>0,we(_,"offset");const I=this[_],G=this[_+7];(I===void 0||G===void 0)&&Ue(_,this.length-8);const de=this[_+4]+this[_+5]*2**8+this[_+6]*2**16+(G<<24);return(BigInt(de)<<BigInt(32))+BigInt(I+this[++_]*2**8+this[++_]*2**16+this[++_]*2**24)}),c.prototype.readBigInt64BE=ft(function(_){_=_>>>0,we(_,"offset");const I=this[_],G=this[_+7];(I===void 0||G===void 0)&&Ue(_,this.length-8);const de=(I<<24)+this[++_]*2**16+this[++_]*2**8+this[++_];return(BigInt(de)<<BigInt(32))+BigInt(this[++_]*2**24+this[++_]*2**16+this[++_]*2**8+G)}),c.prototype.readFloatLE=function(_,I){return _=_>>>0,I||N(_,4,this.length),r.read(this,_,!0,23,4)},c.prototype.readFloatBE=function(_,I){return _=_>>>0,I||N(_,4,this.length),r.read(this,_,!1,23,4)},c.prototype.readDoubleLE=function(_,I){return _=_>>>0,I||N(_,8,this.length),r.read(this,_,!0,52,8)},c.prototype.readDoubleBE=function(_,I){return _=_>>>0,I||N(_,8,this.length),r.read(this,_,!1,52,8)};function D(M,_,I,G,de,ge){if(!c.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(_>de||_<ge)throw new RangeError('"value" argument is out of bounds');if(I+G>M.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(_,I,G,de){if(_=+_,I=I>>>0,G=G>>>0,!de){const Qe=Math.pow(2,8*G)-1;D(this,_,I,G,Qe,0)}let ge=1,be=0;for(this[I]=_&255;++be<G&&(ge*=256);)this[I+be]=_/ge&255;return I+G},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(_,I,G,de){if(_=+_,I=I>>>0,G=G>>>0,!de){const Qe=Math.pow(2,8*G)-1;D(this,_,I,G,Qe,0)}let ge=G-1,be=1;for(this[I+ge]=_&255;--ge>=0&&(be*=256);)this[I+ge]=_/be&255;return I+G},c.prototype.writeUint8=c.prototype.writeUInt8=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,1,255,0),this[I]=_&255,I+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,2,65535,0),this[I]=_&255,this[I+1]=_>>>8,I+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,2,65535,0),this[I]=_>>>8,this[I+1]=_&255,I+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,4,4294967295,0),this[I+3]=_>>>24,this[I+2]=_>>>16,this[I+1]=_>>>8,this[I]=_&255,I+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,4,4294967295,0),this[I]=_>>>24,this[I+1]=_>>>16,this[I+2]=_>>>8,this[I+3]=_&255,I+4};function Z(M,_,I,G,de){Te(_,G,de,M,I,7);let ge=Number(_&BigInt(4294967295));M[I++]=ge,ge=ge>>8,M[I++]=ge,ge=ge>>8,M[I++]=ge,ge=ge>>8,M[I++]=ge;let be=Number(_>>BigInt(32)&BigInt(4294967295));return M[I++]=be,be=be>>8,M[I++]=be,be=be>>8,M[I++]=be,be=be>>8,M[I++]=be,I}function Ee(M,_,I,G,de){Te(_,G,de,M,I,7);let ge=Number(_&BigInt(4294967295));M[I+7]=ge,ge=ge>>8,M[I+6]=ge,ge=ge>>8,M[I+5]=ge,ge=ge>>8,M[I+4]=ge;let be=Number(_>>BigInt(32)&BigInt(4294967295));return M[I+3]=be,be=be>>8,M[I+2]=be,be=be>>8,M[I+1]=be,be=be>>8,M[I]=be,I+8}c.prototype.writeBigUInt64LE=ft(function(_,I=0){return Z(this,_,I,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ft(function(_,I=0){return Ee(this,_,I,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(_,I,G,de){if(_=+_,I=I>>>0,!de){const wt=Math.pow(2,8*G-1);D(this,_,I,G,wt-1,-wt)}let ge=0,be=1,Qe=0;for(this[I]=_&255;++ge<G&&(be*=256);)_<0&&Qe===0&&this[I+ge-1]!==0&&(Qe=1),this[I+ge]=(_/be>>0)-Qe&255;return I+G},c.prototype.writeIntBE=function(_,I,G,de){if(_=+_,I=I>>>0,!de){const wt=Math.pow(2,8*G-1);D(this,_,I,G,wt-1,-wt)}let ge=G-1,be=1,Qe=0;for(this[I+ge]=_&255;--ge>=0&&(be*=256);)_<0&&Qe===0&&this[I+ge+1]!==0&&(Qe=1),this[I+ge]=(_/be>>0)-Qe&255;return I+G},c.prototype.writeInt8=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,1,127,-128),_<0&&(_=255+_+1),this[I]=_&255,I+1},c.prototype.writeInt16LE=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,2,32767,-32768),this[I]=_&255,this[I+1]=_>>>8,I+2},c.prototype.writeInt16BE=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,2,32767,-32768),this[I]=_>>>8,this[I+1]=_&255,I+2},c.prototype.writeInt32LE=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,4,2147483647,-2147483648),this[I]=_&255,this[I+1]=_>>>8,this[I+2]=_>>>16,this[I+3]=_>>>24,I+4},c.prototype.writeInt32BE=function(_,I,G){return _=+_,I=I>>>0,G||D(this,_,I,4,2147483647,-2147483648),_<0&&(_=4294967295+_+1),this[I]=_>>>24,this[I+1]=_>>>16,this[I+2]=_>>>8,this[I+3]=_&255,I+4},c.prototype.writeBigInt64LE=ft(function(_,I=0){return Z(this,_,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ft(function(_,I=0){return Ee(this,_,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _e(M,_,I,G,de,ge){if(I+G>M.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function Se(M,_,I,G,de){return _=+_,I=I>>>0,de||_e(M,_,I,4),r.write(M,_,I,G,23,4),I+4}c.prototype.writeFloatLE=function(_,I,G){return Se(this,_,I,!0,G)},c.prototype.writeFloatBE=function(_,I,G){return Se(this,_,I,!1,G)};function Ie(M,_,I,G,de){return _=+_,I=I>>>0,de||_e(M,_,I,8),r.write(M,_,I,G,52,8),I+8}c.prototype.writeDoubleLE=function(_,I,G){return Ie(this,_,I,!0,G)},c.prototype.writeDoubleBE=function(_,I,G){return Ie(this,_,I,!1,G)},c.prototype.copy=function(_,I,G,de){if(!c.isBuffer(_))throw new TypeError("argument should be a Buffer");if(G||(G=0),!de&&de!==0&&(de=this.length),I>=_.length&&(I=_.length),I||(I=0),de>0&&de<G&&(de=G),de===G||_.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("Index out of range");if(de<0)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),_.length-I<de-G&&(de=_.length-I+G);const ge=de-G;return this===_&&typeof a.prototype.copyWithin=="function"?this.copyWithin(I,G,de):a.prototype.set.call(_,this.subarray(G,de),I),ge},c.prototype.fill=function(_,I,G,de){if(typeof _=="string"){if(typeof I=="string"?(de=I,I=0,G=this.length):typeof G=="string"&&(de=G,G=this.length),de!==void 0&&typeof de!="string")throw new TypeError("encoding must be a string");if(typeof de=="string"&&!c.isEncoding(de))throw new TypeError("Unknown encoding: "+de);if(_.length===1){const be=_.charCodeAt(0);(de==="utf8"&&be<128||de==="latin1")&&(_=be)}}else typeof _=="number"?_=_&255:typeof _=="boolean"&&(_=Number(_));if(I<0||this.length<I||this.length<G)throw new RangeError("Out of range index");if(G<=I)return this;I=I>>>0,G=G===void 0?this.length:G>>>0,_||(_=0);let ge;if(typeof _=="number")for(ge=I;ge<G;++ge)this[ge]=_;else{const be=c.isBuffer(_)?_:c.from(_,de),Qe=be.length;if(Qe===0)throw new TypeError('The value "'+_+'" is invalid for argument "value"');for(ge=0;ge<G-I;++ge)this[ge+I]=be[ge%Qe]}return this};const ie={};function le(M,_,I){ie[M]=class extends I{constructor(){super(),Object.defineProperty(this,"message",{value:_.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,this.stack,delete this.name}get code(){return M}set code(de){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:de,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}le("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),le("ERR_INVALID_ARG_TYPE",function(M,_){return`The "${M}" argument must be of type number. Received type ${typeof _}`},TypeError),le("ERR_OUT_OF_RANGE",function(M,_,I){let G=`The value of "${M}" is out of range.`,de=I;return Number.isInteger(I)&&Math.abs(I)>2**32?de=fe(String(I)):typeof I=="bigint"&&(de=String(I),(I>BigInt(2)**BigInt(32)||I<-(BigInt(2)**BigInt(32)))&&(de=fe(de)),de+="n"),G+=` It must be ${_}. Received ${de}`,G},RangeError);function fe(M){let _="",I=M.length;const G=M[0]==="-"?1:0;for(;I>=G+4;I-=3)_=`_${M.slice(I-3,I)}${_}`;return`${M.slice(0,I)}${_}`}function me(M,_,I){we(_,"offset"),(M[_]===void 0||M[_+I]===void 0)&&Ue(_,M.length-(I+1))}function Te(M,_,I,G,de,ge){if(M>I||M<_){const be=typeof _=="bigint"?"n":"";let Qe;throw _===0||_===BigInt(0)?Qe=`>= 0${be} and < 2${be} ** ${(ge+1)*8}${be}`:Qe=`>= -(2${be} ** ${(ge+1)*8-1}${be}) and < 2 ** ${(ge+1)*8-1}${be}`,new ie.ERR_OUT_OF_RANGE("value",Qe,M)}me(G,de,ge)}function we(M,_){if(typeof M!="number")throw new ie.ERR_INVALID_ARG_TYPE(_,"number",M)}function Ue(M,_,I){throw Math.floor(M)!==M?(we(M,I),new ie.ERR_OUT_OF_RANGE("offset","an integer",M)):_<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${_}`,M)}const Ye=/[^+/0-9A-Za-z-_]/g;function et(M){if(M=M.split("=")[0],M=M.trim().replace(Ye,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function Je(M,_){_=_||1/0;let I;const G=M.length;let de=null;const ge=[];for(let be=0;be<G;++be){if(I=M.charCodeAt(be),I>55295&&I<57344){if(!de){if(I>56319){(_-=3)>-1&&ge.push(239,191,189);continue}else if(be+1===G){(_-=3)>-1&&ge.push(239,191,189);continue}de=I;continue}if(I<56320){(_-=3)>-1&&ge.push(239,191,189),de=I;continue}I=(de-55296<<10|I-56320)+65536}else de&&(_-=3)>-1&&ge.push(239,191,189);if(de=null,I<128){if((_-=1)<0)break;ge.push(I)}else if(I<2048){if((_-=2)<0)break;ge.push(I>>6|192,I&63|128)}else if(I<65536){if((_-=3)<0)break;ge.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((_-=4)<0)break;ge.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return ge}function st(M){const _=[];for(let I=0;I<M.length;++I)_.push(M.charCodeAt(I)&255);return _}function Mt(M,_){let I,G,de;const ge=[];for(let be=0;be<M.length&&!((_-=2)<0);++be)I=M.charCodeAt(be),G=I>>8,de=I%256,ge.push(de),ge.push(G);return ge}function gt(M){return t.toByteArray(et(M))}function Ut(M,_,I,G){let de;for(de=0;de<G&&!(de+I>=_.length||de>=M.length);++de)_[de+I]=M[de];return de}function _t(M,_){return M instanceof _||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===_.name}function Qt(M){return M!==M}const Zt=(function(){const M="0123456789abcdef",_=new Array(256);for(let I=0;I<16;++I){const G=I*16;for(let de=0;de<16;++de)_[G+de]=M[I]+M[de]}return _})();function ft(M){return typeof BigInt>"u"?_r:M}function _r(){throw new Error("BigInt not supported")}})(TN);const hb=TN.Buffer;var Ec={exports:{}},yb;function hB(){return yb||(yb=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={Object,Array,Function,Number,String,Date,RegExp};typeof hb<"u"&&(r.Buffer=hb),typeof Promise<"u"&&(r.Promise=Promise);const n=Object.assign(i,{CONSTRUCTORS:r});function i(){return{keyword:"instanceof",schemaType:["string","array"],compile(s){if(typeof s=="string"){const o=a(s);return u=>u instanceof o}if(Array.isArray(s)){const o=s.map(a);return u=>{for(const l of o)if(u instanceof l)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function a(s){const o=r[s];if(o)return o;throw new Error(`invalid "instanceof" keyword value ${s}`)}t.default=n,e.exports=n})(Ec,Ec.exports)),Ec.exports}var gb=$s.exports,_b;function yB(){return _b||(_b=1,(function(e,t){var r=gb&&gb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(hB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})($s,$s.exports)),$s.exports}var Ls={exports:{}},qs={exports:{}},vc={},Eb;function IN(){if(Eb)return vc;Eb=1,Object.defineProperty(vc,"__esModule",{value:!0});function e(t){return()=>({keyword:t,type:"number",schemaType:"array",macro:function([n,i]){return r(n,i),t==="range"?{minimum:n,maximum:i}:{exclusiveMinimum:n,exclusiveMaximum:i}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function r(n,i){if(n>i||t==="exclusiveRange"&&n===i)throw new Error("There are no numbers in range")}}return vc.default=e,vc}var vb=qs.exports,bb;function gB(){return bb||(bb=1,(function(e,t){var r=vb&&vb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(IN()).default)("range");t.default=i,e.exports=i})(qs,qs.exports)),qs.exports}var Tb=Ls.exports,Sb;function _B(){return Sb||(Sb=1,(function(e,t){var r=Tb&&Tb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(gB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Ls,Ls.exports)),Ls.exports}var ks={exports:{}},Bs={exports:{}},Ib=Bs.exports,Rb;function EB(){return Rb||(Rb=1,(function(e,t){var r=Ib&&Ib.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(IN()).default)("exclusiveRange");t.default=i,e.exports=i})(Bs,Bs.exports)),Bs.exports}var wb=ks.exports,Ab;function vB(){return Ab||(Ab=1,(function(e,t){var r=wb&&wb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(EB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(ks,ks.exports)),ks.exports}var Us={exports:{}},bc={exports:{}},ni={},Ob;function bl(){if(Ob)return ni;Ob=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.usePattern=ni.metaSchemaRef=void 0;const e=Ke(),t="http://json-schema.org/schema";function r({defaultMeta:i}={}){return i===!1?{}:{$ref:i||t}}ni.metaSchemaRef=r;function n({gen:i,it:{opts:a}},s,o=a.unicodeRegExp?"u":""){const u=new RegExp(s,o);return i.scopeValue("pattern",{key:u.toString(),ref:u,code:(0,e._)`new RegExp(${s}, ${o})`})}return ni.usePattern=n,ni}var Nb;function bB(){return Nb||(Nb=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=bl(),i={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},a=/^\/(.*)\/([gimuy]*)$/;function s(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(o){const{data:u,schema:l}=o,c=d(l);o.pass((0,r._)`${c}.test(${u})`);function d(m){if(typeof m=="object")return(0,n.usePattern)(o,m.pattern,m.flags);const p=a.exec(m);if(p)return(0,n.usePattern)(o,p[1],p[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},i]}}}t.default=s,e.exports=s})(bc,bc.exports)),bc.exports}var Pb=Us.exports,Cb;function TB(){return Cb||(Cb=1,(function(e,t){var r=Pb&&Pb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(bB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Us,Us.exports)),Us.exports}var Fs={exports:{}},Tc={exports:{}},Mb;function SB(){return Mb||(Mb=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n={trimStart:u=>u.trimStart(),trimEnd:u=>u.trimEnd(),trimLeft:u=>u.trimStart(),trimRight:u=>u.trimEnd(),trim:u=>u.trim(),toLowerCase:u=>u.toLowerCase(),toUpperCase:u=>u.toUpperCase(),toEnumCase:(u,l)=>(l==null?void 0:l.hash[o(u)])||u},i=Object.assign(a,{transform:n});function a(){return{keyword:"transform",schemaType:"array",before:"enum",code(u){const{gen:l,data:c,schema:d,parentSchema:m,it:p}=u,{parentData:v,parentDataProperty:w}=p,R=d;if(!R.length)return;let O;if(R.includes("toEnumCase")){const E=s(m);O=l.scopeValue("obj",{ref:E,code:(0,r.stringify)(E)})}l.if((0,r._)`typeof ${c} == "string" && ${v} !== undefined`,()=>{l.assign(c,f(R.slice())),l.assign((0,r._)`${v}[${w}]`,c)});function f(E){if(!E.length)return c;const b=E.pop();if(!(b in n))throw new Error(`transform: unknown transformation ${b}`);const h=l.scopeValue("func",{ref:n[b],code:(0,r._)`require("ajv-keywords/dist/definitions/transform").transform${(0,r.getProperty)(b)}`}),S=f(E);return O&&b==="toEnumCase"?(0,r._)`${h}(${S}, ${O})`:(0,r._)`${h}(${S})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}function s(u){const l={hash:{}};if(!u.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const c of u.enum){if(typeof c!="string")continue;const d=o(c);if(l.hash[d])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');l.hash[d]=c}return l}function o(u){return u.toLowerCase()}t.default=i,e.exports=i})(Tc,Tc.exports)),Tc.exports}var jb=Fs.exports,Db;function IB(){return Db||(Db=1,(function(e,t){var r=jb&&jb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(SB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Fs,Fs.exports)),Fs.exports}var Vs={exports:{}},Sc={exports:{}},$b;function RB(){return $b||($b=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ug(),n=["number","integer","string","boolean","null"];function i(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(s,o){const u=a(s,o);return l=>{if(l.length<=1)return!0;for(let c=0;c<s.length;c++){const d=s[c];if(u[c]){const m={};for(const p of l){if(!p||typeof p!="object")continue;let v=p[d];if(!(v&&typeof v=="object")){if(typeof v=="string"&&(v='"'+v),m[v])return!1;m[v]=!0}}}else for(let m=l.length;m--;){const p=l[m];if(!(!p||typeof p!="object"))for(let v=m;v--;){const w=l[v];if(w&&typeof w=="object"&&r(p[d],w[d]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}t.default=i;function a(s,o){return s.map(u=>{var l,c,d;const m=(d=(c=(l=o.items)===null||l===void 0?void 0:l.properties)===null||c===void 0?void 0:c[u])===null||d===void 0?void 0:d.type;return Array.isArray(m)?!m.includes("object")&&!m.includes("array"):n.includes(m)})}e.exports=i})(Sc,Sc.exports)),Sc.exports}var Lb=Vs.exports,qb;function wB(){return qb||(qb=1,(function(e,t){var r=Lb&&Lb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(RB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Vs,Vs.exports)),Vs.exports}var Hs={exports:{}},Ic={exports:{}},kb;function AB(){return kb||(kb=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(n,i){if(!n)return!0;const a=Object.keys(i.properties);return a.length===0?!0:{required:a}},dependencies:["properties"]}}t.default=r,e.exports=r})(Ic,Ic.exports)),Ic.exports}var Bb=Hs.exports,Ub;function OB(){return Ub||(Ub=1,(function(e,t){var r=Bb&&Bb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(AB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Hs,Hs.exports)),Hs.exports}var Gs={exports:{}},zs={exports:{}},Rc={},Fb;function RN(){if(Fb)return Rc;Fb=1,Object.defineProperty(Rc,"__esModule",{value:!0});function e(t){return()=>({keyword:t,type:"object",schemaType:"array",macro(r){return r.length===0?!0:r.length===1?{required:r}:{[t==="anyRequired"?"anyOf":"oneOf"]:r.map(i=>({required:[i]}))}},metaSchema:{type:"array",items:{type:"string"}}})}return Rc.default=e,Rc}var Vb=zs.exports,Hb;function NB(){return Hb||(Hb=1,(function(e,t){var r=Vb&&Vb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(RN()).default)("anyRequired");t.default=i,e.exports=i})(zs,zs.exports)),zs.exports}var Gb=Gs.exports,zb;function PB(){return zb||(zb=1,(function(e,t){var r=Gb&&Gb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(NB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Gs,Gs.exports)),Gs.exports}var Ws={exports:{}},Ys={exports:{}},Wb=Ys.exports,Yb;function CB(){return Yb||(Yb=1,(function(e,t){var r=Wb&&Wb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const i=(0,r(RN()).default)("oneRequired");t.default=i,e.exports=i})(Ys,Ys.exports)),Ys.exports}var Kb=Ws.exports,Jb;function MB(){return Jb||(Jb=1,(function(e,t){var r=Kb&&Kb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(CB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Ws,Ws.exports)),Ws.exports}var Ks={exports:{}},wc={exports:{}},Xb;function jB(){return Xb||(Xb=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=bl(),i={message:({params:{missingPattern:s}})=>(0,r.str)`should have property matching pattern '${s}'`,params:({params:{missingPattern:s}})=>(0,r._)`{missingPattern: ${s}}`};function a(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:i,code(s){const{gen:o,schema:u,data:l}=s;if(u.length===0)return;const c=o.let("valid",!0);for(const m of u)d(m);function d(m){const p=o.let("matched",!1);o.forIn("key",l,v=>{o.assign(p,(0,r._)`${(0,n.usePattern)(s,m)}.test(${v})`),o.if(p,()=>o.break())}),s.setParams({missingPattern:m}),o.assign(c,(0,r.and)(c,p)),s.pass(c)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}t.default=a,e.exports=a})(wc,wc.exports)),wc.exports}var Qb=Ks.exports,Zb;function DB(){return Zb||(Zb=1,(function(e,t){var r=Qb&&Qb.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(jB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Ks,Ks.exports)),Ks.exports}var Js={exports:{}},Ac={exports:{}},xb;function $B(){return xb||(xb=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(n){return n.length===0?!0:n.length===1?{not:{required:n}}:{not:{anyOf:n.map(i=>({required:[i]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}t.default=r,e.exports=r})(Ac,Ac.exports)),Ac.exports}var e0=Js.exports,t0;function LB(){return t0||(t0=1,(function(e,t){var r=e0&&e0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r($B()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Js,Js.exports)),Js.exports}var Xs={exports:{}},Oc={exports:{}},r0;function qB(){return r0||(r0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=bl();function n(s){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(o){const u=[];for(const l in o)u.push(i(l,o[l]));return{allOf:u}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,r.metaSchemaRef)(s)}}}t.default=n;function i(s,o){const u=s.split("/"),l={};let c=l;for(let d=1;d<u.length;d++){let m=u[d];const p=d===u.length-1;m=a(m);const v=c.properties={};let w;if(/[0-9]+/.test(m)){let R=+m;for(w=c.items=[],c.type=["object","array"];R--;)w.push({})}else c.type="object";c=p?o:{},v[m]=c,w&&w.push(c)}return l}function a(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Oc,Oc.exports)),Oc.exports}var n0=Xs.exports,i0;function kB(){return i0||(i0=1,(function(e,t){var r=n0&&n0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(qB()),i=(a,s)=>a.addKeyword((0,n.default)(s));t.default=i,e.exports=i})(Xs,Xs.exports)),Xs.exports}var Qs={exports:{}},Nc={exports:{}},a0;function BB(){return a0||(a0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke();function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(a){const{schema:s,data:o}=a,u=s.map(c=>(0,r._)`(${l(c)}) === undefined`);a.fail((0,r.or)(...u));function l(c){if(c==="")throw new Error("empty JSON pointer not allowed");const d=c.split("/");let m=o;const p=d.map((v,w)=>w?m=(0,r._)`${m}${(0,r.getProperty)(i(v))}`:m);return(0,r.and)(...p)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}t.default=n;function i(a){return a.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Nc,Nc.exports)),Nc.exports}var s0=Qs.exports,o0;function UB(){return o0||(o0=1,(function(e,t){var r=s0&&s0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(BB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Qs,Qs.exports)),Qs.exports}var Zs={exports:{}},Pc={exports:{}},u0;function FB(){return u0||(u0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={},n={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:c=>{var d;const m=(d=c==null?void 0:c.max)!==null&&d!==void 0?d:2;return()=>Math.floor(Math.random()*m)},seq:c=>{var d;const m=(d=c==null?void 0:c.name)!==null&&d!==void 0?d:"";return r[m]||(r[m]=0),()=>r[m]++}},i=Object.assign(a,{DEFAULTS:n});function a(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(c,d,m){if(!m.opts.useDefaults||m.compositeRule)return()=>!0;const p={};for(const w in c)p[w]=s(c[w]);const v=m.opts.useDefaults==="empty";return w=>{for(const R in c)(w[R]===void 0||v&&(w[R]===null||w[R]===""))&&(w[R]=p[R]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function s(c){return typeof c=="object"?o(c):u(c)}function o({func:c,args:d}){const m=n[c];return l(c,m),m(d)}function u(c=""){const d=n[c];return l(c,d),d()}function l(c,d){if(!d)throw new Error(`invalid "dynamicDefaults" keyword property value: ${c}`)}t.default=i,e.exports=i})(Pc,Pc.exports)),Pc.exports}var c0=Zs.exports,l0;function VB(){return l0||(l0=1,(function(e,t){var r=c0&&c0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(FB()),i=a=>a.addKeyword((0,n.default)());t.default=i,e.exports=i})(Zs,Zs.exports)),Zs.exports}var xs={exports:{}},Cc={exports:{}},d0;function HB(){return d0||(d0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ke(),n=bl(),i={message:({params:{schemaProp:s}})=>s?(0,r.str)`should match case "${s}" schema`:(0,r.str)`should match default case schema`,params:({params:{schemaProp:s}})=>s?(0,r._)`{failingCase: ${s}}`:(0,r._)`{failingDefault: true}`};function a(s){const o=(0,n.metaSchemaRef)(s);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:i,dependencies:["selectCases"],code(u){const{gen:l,schemaCode:c,parentSchema:d}=u;u.block$data(r.nil,()=>{const m=l.let("valid",!0),p=l.name("_valid"),v=l.const("value",(0,r._)`${c} === null ? "null" : ${c}`);l.if(!1);for(const w in d.selectCases){u.setParams({schemaProp:w}),l.elseIf((0,r._)`"" + ${v} == ${w}`);const R=u.subschema({keyword:"selectCases",schemaProp:w},p);u.mergeEvaluated(R,r.Name),l.assign(m,p)}if(l.else(),d.selectDefault!==void 0){u.setParams({schemaProp:void 0});const w=u.subschema({keyword:"selectDefault"},p);u.mergeEvaluated(w,r.Name),l.assign(m,p)}l.endIf(),u.pass(m)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:o}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:o}]}t.default=a,e.exports=a})(Cc,Cc.exports)),Cc.exports}var f0=xs.exports,p0;function GB(){return p0||(p0=1,(function(e,t){var r=f0&&f0.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(HB()),i=(a,s)=>((0,n.default)(s).forEach(o=>a.addKeyword(o)),a);t.default=i,e.exports=i})(xs,xs.exports)),xs.exports}var m0=js.exports,h0;function zB(){return h0||(h0=1,(function(e,t){var r=m0&&m0.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(sB()),i=r(yB()),a=r(_B()),s=r(vB()),o=r(TB()),u=r(IB()),l=r(wB()),c=r(OB()),d=r(PB()),m=r(MB()),p=r(DB()),v=r(LB()),w=r(kB()),R=r(UB()),O=r(VB()),f=r(GB()),E={typeof:n.default,instanceof:i.default,range:a.default,exclusiveRange:s.default,regexp:o.default,transform:u.default,uniqueItemProperties:l.default,allRequired:c.default,anyRequired:d.default,oneRequired:m.default,patternRequired:p.default,prohibited:v.default,deepProperties:w.default,deepRequired:R.default,dynamicDefaults:O.default,select:f.default};t.default=E,e.exports=E})(js,js.exports)),js.exports}var y0=Ms.exports,g0;function wN(){return g0||(g0=1,(function(e,t){var r=y0&&y0.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(zB()),i=(s,o)=>{if(Array.isArray(o)){for(const u of o)a(u)(s);return s}if(o)return a(o)(s),s;for(o in n.default)a(o)(s);return s};i.get=a;function a(s){const o=n.default[s];if(!o)throw new Error("Unknown keyword "+s);return o}t.default=i,e.exports=i,e.exports.default=i})(Ms,Ms.exports)),Ms.exports}var Mc={exports:{}},_0;function AN(){return _0||(_0=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Gg(),n=Ke(),i=fo(),a=Co(),s=Po(),o=Pn(),u="errorMessage",l=new r.Name("emUsed"),c={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,m=/\$\{([^}]+)\}/g,p=/^""\s*\+\s*|\s*\+\s*""$/g;function v(R){return{keyword:u,schemaType:["string","object"],post:!0,code(O){const{gen:f,data:E,schema:b,schemaValue:h,it:S}=O;if(S.createErrors===!1)return;const A=b,P=n.strConcat(o.default.instancePath,S.errorPath);f.if(r._`${o.default.errors} > 0`,()=>{if(typeof A=="object"){const[H,N]=z(A);N&&Y(N),H&&W(H),U(k(A))}const L=typeof A=="string"?A:A._;L&&F(L),R.keepErrors||ce()});function k({properties:L,items:H}){const N={};if(L){N.props={};for(const D in L)N.props[D]=[]}if(H){N.items={};for(let D=0;D<H.length;D++)N.items[D]=[]}return N}function z(L){let H,N;for(const D in L){if(D==="properties"||D==="items")continue;const Z=L[D];if(typeof Z=="object"){H||(H={});const Ee=H[D]={};for(const _e in Z)Ee[_e]=[]}else N||(N={}),N[D]=[]}return[H,N]}function Y(L){const H=f.const("emErrors",r.stringify(L)),N=f.const("templates",K(L,b));f.forOf("err",o.default.vErrors,_e=>f.if(se(_e,H),()=>f.code(r._`${H}[${_e}.keyword].push(${_e})`).assign(r._`${_e}.${l}`,!0)));const{singleError:D}=R;if(D){const _e=f.let("message",r._`""`),Se=f.let("paramsErrors",r._`[]`);Z(Ie=>{f.if(_e,()=>f.code(r._`${_e} += ${typeof D=="string"?D:";"}`)),f.code(r._`${_e} += ${Ee(Ie)}`),f.assign(Se,r._`${Se}.concat(${H}[${Ie}])`)}),s.reportError(O,{message:_e,params:r._`{errors: ${Se}}`})}else Z(_e=>s.reportError(O,{message:Ee(_e),params:r._`{errors: ${H}[${_e}]}`}));function Z(_e){f.forIn("key",H,Se=>f.if(r._`${H}[${Se}].length`,()=>_e(Se)))}function Ee(_e){return r._`${_e} in ${N} ? ${N}[${_e}]() : ${h}[${_e}]`}}function W(L){const H=f.const("emErrors",r.stringify(L)),N=[];for(const Se in L)N.push([Se,K(L[Se],b[Se])]);const D=f.const("templates",f.object(...N)),Z=f.scopeValue("obj",{ref:c,code:r.stringify(c)}),Ee=f.let("emPropParams"),_e=f.let("emParamsErrors");f.forOf("err",o.default.vErrors,Se=>f.if(se(Se,H),()=>{f.assign(Ee,r._`${Z}[${Se}.keyword]`),f.assign(_e,r._`${H}[${Se}.keyword][${Se}.params[${Ee}]]`),f.if(_e,()=>f.code(r._`${_e}.push(${Se})`).assign(r._`${Se}.${l}`,!0))})),f.forIn("key",H,Se=>f.forIn("keyProp",r._`${H}[${Se}]`,Ie=>{f.assign(_e,r._`${H}[${Se}][${Ie}]`),f.if(r._`${_e}.length`,()=>{const ie=f.const("tmpl",r._`${D}[${Se}] && ${D}[${Se}][${Ie}]`);s.reportError(O,{message:r._`${ie} ? ${ie}() : ${h}[${Se}][${Ie}]`,params:r._`{errors: ${_e}}`})})}))}function U(L){const{props:H,items:N}=L;if(!H&&!N)return;const D=r._`typeof ${E} == "object"`,Z=r._`Array.isArray(${E})`,Ee=f.let("emErrors");let _e,Se;const Ie=f.let("templates");H&&N?(_e=f.let("emChildKwd"),f.if(D),f.if(Z,()=>{ie(N,b.items),f.assign(_e,r.str`items`)},()=>{ie(H,b.properties),f.assign(_e,r.str`properties`)}),Se=r._`[${_e}]`):N?(f.if(Z),ie(N,b.items),Se=r._`.items`):H&&(f.if(n.and(D,n.not(Z))),ie(H,b.properties),Se=r._`.properties`),f.forOf("err",o.default.vErrors,le=>ne(le,Ee,fe=>f.code(r._`${Ee}[${fe}].push(${le})`).assign(r._`${le}.${l}`,!0))),f.forIn("key",Ee,le=>f.if(r._`${Ee}[${le}].length`,()=>{s.reportError(O,{message:r._`${le} in ${Ie} ? ${Ie}[${le}]() : ${h}${Se}[${le}]`,params:r._`{errors: ${Ee}[${le}]}`}),f.assign(r._`${o.default.vErrors}[${o.default.errors}-1].instancePath`,r._`${P} + "/" + ${le}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),f.endIf();function ie(le,fe){f.assign(Ee,r.stringify(le)),f.assign(Ie,K(le,fe))}}function F(L){const H=f.const("emErrs",r._`[]`);f.forOf("err",o.default.vErrors,N=>f.if(X(N),()=>f.code(r._`${H}.push(${N})`).assign(r._`${N}.${l}`,!0))),f.if(r._`${H}.length`,()=>s.reportError(O,{message:$(L),params:r._`{errors: ${H}}`}))}function ce(){const L=f.const("emErrs",r._`[]`);f.forOf("err",o.default.vErrors,H=>f.if(r._`!${H}.${l}`,()=>f.code(r._`${L}.push(${H})`))),f.assign(o.default.vErrors,L).assign(o.default.errors,r._`${L}.length`)}function se(L,H){return n.and(r._`${L}.keyword !== ${u}`,r._`!${L}.${l}`,r._`${L}.instancePath === ${P}`,r._`${L}.keyword in ${H}`,r._`${L}.schemaPath.indexOf(${S.errSchemaPath}) === 0`,r._`/^\\/[^\\/]*$/.test(${L}.schemaPath.slice(${S.errSchemaPath.length}))`)}function ne(L,H,N){f.if(n.and(r._`${L}.keyword !== ${u}`,r._`!${L}.${l}`,r._`${L}.instancePath.indexOf(${P}) === 0`),()=>{const D=f.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:r._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),Z=f.const("emMatches",r._`${D}.exec(${L}.instancePath.slice(${P}.length))`),Ee=f.const("emChild",r._`${Z} && ${Z}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);f.if(r._`${Ee} !== undefined && ${Ee} in ${H}`,()=>N(Ee))})}function X(L){return n.and(r._`${L}.keyword !== ${u}`,r._`!${L}.${l}`,n.or(r._`${L}.instancePath === ${P}`,n.and(r._`${L}.instancePath.indexOf(${P}) === 0`,r._`${L}.instancePath[${P}.length] === "/"`)),r._`${L}.schemaPath.indexOf(${S.errSchemaPath}) === 0`,r._`${L}.schemaPath[${S.errSchemaPath}.length] === "/"`)}function K(L,H){const N=[];for(const D in L){const Z=H[D];d.test(Z)&&N.push([D,j(Z)])}return f.object(...N)}function $(L){return d.test(L)?new i._Code(i.safeStringify(L).replace(m,(H,N)=>`" + JSON.stringify(${a.getData(N,S)}) + "`).replace(p,"")):r.stringify(L)}function j(L){return r._`function(){return ${$(L)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const w=(R,O={})=>{if(!R.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(R.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return R.addKeyword(v(O))};t.default=w,e.exports=w,e.exports.default=w})(Mc,Mc.exports)),Mc.exports}var E0;function Oe(){if(E0)return Nr;E0=1;var e=Nr&&Nr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.validateType=Nr.generateLazyValidator=Nr.Ajv=void 0;const t=e(Gg());Nr.Ajv=t.default;const r=e(wN()),n=e(AN());function i(s,o){let u=null;const l=(c,d)=>{if(!u){const m=new t.default({$data:!0,allErrors:!0});(0,r.default)(m),(0,n.default)(m,{singleError:!0}),o==null||o.forEach(p=>m.addKeyword(p)),u=m.compile(s),Object.defineProperty(l,"errors",{get(){return u==null?void 0:u.errors}})}return u(c,d)};return l}Nr.generateLazyValidator=i;function a(s,o){return s.validate(o)}return Nr.validateType=a,Nr}var v0;function WB(){return v0||(v0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const t=Oe();e.SCENE_UPDATE="SCENE_UPDATE",(function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(rd)),rd}var md={},b0;function YB(){return b0||(b0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const t=Oe();e.UPDATE="update",(function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Update||(e.Update={}))})(md)),md}var T0;function KB(){return T0||(T0=1,(function(e){var t=xn&&xn.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=xn&&xn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(WB(),e),r(YB(),e)})(xn)),xn}var ii={},hd={},S0;function JB(){return S0||(S0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const t=Oe();(function(r){r.SCENE="scene",r.SMART_ITEM="smart-item",r.PORTABLE_EXPERIENCE="portable-experience",r.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ProjectType||(e.ProjectType={}))})(hd)),hd}var yd={},gd={},I0;function Tl(){return I0||(I0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const t=Oe();(function(r){r.UNIQUE="unique",r.MYTHIC="mythic",r.EXOTIC="exotic",r.LEGENDARY="legendary",r.EPIC="epic",r.RARE="rare",r.UNCOMMON="uncommon",r.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema);const n={[r.UNIQUE]:1,[r.MYTHIC]:10,[r.EXOTIC]:50,[r.LEGENDARY]:100,[r.EPIC]:1e3,[r.RARE]:5e3,[r.UNCOMMON]:1e4,[r.COMMON]:1e5},i={[r.UNIQUE]:"#FFE617",[r.MYTHIC]:"#FB7DE3",[r.EXOTIC]:"#E4FFB8",[r.LEGENDARY]:"#A657ED",[r.EPIC]:"#6397F2",[r.RARE]:"#3AD682",[r.UNCOMMON]:"#FF8563",[r.COMMON]:"#D4E0E0"},a={[r.UNIQUE]:"#FFB626",[r.MYTHIC]:"#FF63E1",[r.EXOTIC]:"#CAFF73",[r.LEGENDARY]:"#842DDA",[r.EPIC]:"#3D85E6",[r.RARE]:"#36CF75",[r.UNCOMMON]:"#ED6D4F",[r.COMMON]:"#ABC1C1"};function s(c){return n[c]}r.getMaxSupply=s;function o(c){return a[c]}r.getColor=o;function u(){return[r.UNIQUE,r.MYTHIC,r.EXOTIC,r.LEGENDARY,r.EPIC,r.RARE,r.UNCOMMON,r.COMMON]}r.getRarities=u;function l(c){return[i[c],a[c]]}r.getGradient=l})(e.Rarity||(e.Rarity={}))})(gd)),gd}var _d={},R0;function sa(){return R0||(R0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const t=Oe();(function(r){r.EYEBROWS="eyebrows",r.EYES="eyes",r.FACIAL_HAIR="facial_hair",r.HAIR="hair",r.BODY_SHAPE="body_shape",r.MOUTH="mouth",r.UPPER_BODY="upper_body",r.LOWER_BODY="lower_body",r.FEET="feet",r.EARRING="earring",r.EYEWEAR="eyewear",r.HAT="hat",r.HELMET="helmet",r.MASK="mask",r.TIARA="tiara",r.TOP_HEAD="top_head",r.SKIN="skin",r.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WearableCategory||(e.WearableCategory={}))})(_d)),_d}var Ed={},w0;function Sl(){return w0||(w0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBonesData=e.SpringBoneParams=void 0;const t=Oe();var r;(function(n){n.schema={type:"object",properties:{stiffness:{type:"number",minimum:0,maximum:4},gravityPower:{type:"number",minimum:0,maximum:2},gravityDir:{type:"array",items:[{type:"number",minimum:-10,maximum:10},{type:"number",minimum:-10,maximum:10},{type:"number",minimum:-10,maximum:10}],minItems:3,maxItems:3},drag:{type:"number",minimum:0,maximum:1},center:{type:"string",nullable:!0},isRoot:{type:"boolean",nullable:!0}},required:["stiffness","gravityPower","gravityDir","drag"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(r=e.SpringBoneParams||(e.SpringBoneParams={})),(function(n){n.schema={type:"object",properties:{version:{type:"integer",enum:[1]},models:{type:"object",additionalProperties:{type:"object",additionalProperties:r.schema,required:[]},required:[]}},required:["version","models"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.SpringBonesData||(e.SpringBonesData={}))})(Ed)),Ed}var vd={},bd={},A0;function Wg(){return A0||(A0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const t=Oe();(function(r){r.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",r.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BodyShape||(e.BodyShape={}))})(bd)),bd}var Td={},Sd={},O0;function ON(){return O0||(O0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const t=Oe();(function(r){r.HEAD="head",r.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(Sd)),Sd}var N0;function Yg(){return N0||(N0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=sa(),r=Oe(),n=ON();(function(i){i.schema={oneOf:[Object.assign({},t.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Td)),Td}var P0;function Kg(){return P0||(P0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Oe(),r=Wg(),n=Yg();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(vd)),vd}var ai={},si={},Id={},Rd={},C0;function oa(){return C0||(C0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const t=Oe();(function(r){r.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,t.generateLazyValidator)(r.schema);r.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(r){r.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(r){r.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(r){r.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(Rd)),Rd}var M0;function NN(){return M0||(M0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=sa(),r=oa(),n=Oe();var i;(function(u){u.schema={type:"object",required:["face256","body"],properties:{face256:r.IPFSv2.schema,body:r.IPFSv2.schema}},u.validate=(0,n.generateLazyValidator)(u.schema)})(i=e.Snapshots||(e.Snapshots={}));var a;(function(u){u.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:Object.assign(Object.assign({},i.schema),{nullable:!0})},additionalProperties:!0},u.validate=(0,n.generateLazyValidator)(u.schema)})(a=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(u){u.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const l=new RegExp(u.schema.pattern,"i");u.validate=c=>l.test(c)})(s=e.LinkUrl||(e.LinkUrl={}));var o;(function(u){u.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(o=e.Link||(e.Link={})),(function(u){u.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},nameColor:Object.assign(Object.assign({},r.Color3.schema),{nullable:!0}),description:{type:"string"},links:{type:"array",maxItems:5,items:o.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:r.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:a.schema},additionalProperties:!0},u.validate=(0,n.generateLazyValidator)(u.schema)})(e.Avatar||(e.Avatar={}))})(Id)),Id}var wd={},j0;function XB(){return j0||(j0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Oe(),r=NN();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:r.Avatar.schema}},additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(wd)),wd}var D0;function QB(){return D0||(D0=1,(function(e){var t=si&&si.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=si&&si.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(NN(),e),r(XB(),e)})(si)),si}var Ad={},Od={},$0;function PN(){return $0||($0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const t=Oe();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(r){r.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`},nearbyVoiceChat:{type:"string",enum:e.toggles,nullable:!0,errorMessage:`valid options are ${e.toggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(Od)),Od}var Nd={},L0;function CN(){return L0||(L0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const t=Oe();(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Nd)),Nd}var Pd={},q0;function MN(){return q0||(q0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const t=Oe();(function(r){r.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},r.schemaValidator=(0,t.generateLazyValidator)(r.schema),r.validate=n=>r.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(Pd)),Pd}var Cd={},hs={},k0;function Jg(){return k0||(k0=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.displayableProperties=void 0,hs.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),hs}var Md={},B0;function jN(){return B0||(B0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const t=Oe();(function(r){r.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Source||(e.Source={}))})(Md)),Md}var jd={},U0;function DN(){return U0||(U0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const t=Oe();(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(jd)),jd}var F0;function ZB(){return F0||(F0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Oe(),r=Jg(),n=PN(),i=MN(),a=jN(),s=DN(),o=CN();var u;(function(l){l.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",l.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",l.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",l.USE_WEB3_API="USE_WEB3_API",l.USE_FETCH="USE_FETCH",l.USE_WEBSOCKET="USE_WEBSOCKET",l.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(u=e.RequiredPermission||(e.RequiredPermission={})),(function(l){l.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},r.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},creator:{type:"string",nullable:!0,description:"Wallet address of the creator of the scene",pattern:"^(0x[a-fA-F0-9]{40})?$",errorMessage:"Creator must be a valid wallet address"},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},a.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:s.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(u)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},o.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:u.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},l.validate=(0,t.generateLazyValidator)(l.schema)})(e.Scene||(e.Scene={}))})(Cd)),Cd}var V0;function xB(){return V0||(V0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var t=PN();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var r=CN();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=MN();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=ZB();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=jN();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=DN();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(Ad)),Ad}var oi={},Dd={},$d={},H0;function $N(){return H0||(H0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const t=Oe();(function(r){r.EN="en",r.ES="es"})(e.Locale||(e.Locale={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Locale||(e.Locale={}))})($d)),$d}var G0;function LN(){return G0||(G0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Oe(),r=$N();(function(n){n.schema={type:"object",properties:{code:r.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(Dd)),Dd}var Ld={},z0;function qN(){return z0||(z0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const t=Oe();(function(r){r.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Metrics||(e.Metrics={}))})(Ld)),Ld}var qd={},W0;function Xg(){return W0||(W0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=Tl(),r=Oe();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:t.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,r.generateLazyValidator)(n);function a(s){return i(s)}e.isStandard=a})(qd)),qd}var kd={},ui={},Bd={},Y0;function eU(){return Y0||(Y0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const t=Oe();(function(r){r.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Bd)),Bd}var K0;function kN(){return K0||(K0=1,(function(e){var t=ui&&ui.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ui&&ui.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(eU(),e)})(ui)),ui}var Ud={},J0;function Qg(){return J0||(J0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const t=Oe();var r;(function(d){d.SINGLE="single",d.ANY="any",d.MULTIPLE="multiple",d.RANGE="range"})(r=e.MappingType||(e.MappingType={}));var n;(function(d){d.MAINNET="mainnet",d.BASE_MAINNET="base_mainnet",d.BASE_SEPOLIA="base_sepolia",d.MONAD_MAINNET="monad_mainnet",d.MONAD_TESTNET="monad_testnet",d.APE_MAINNET="ape_mainnet",d.APE_CALDERA="ape_caldera",d.MATIC="matic",d.SEPOLIA="sepolia",d.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.ANY}},required:["type"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var s;(function(d){d._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(p,v){if(!v||!v.from||!v.to)return!1;let{to:w,from:R}=v;return(typeof R!="bigint"||typeof w!="bigint")&&(R=BigInt(R),w=BigInt(w)),R<=w},errors:!1},d.schema={type:"object",properties:{type:{type:"string",const:r.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[d._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var u;(function(d){d.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo])})(u=e.Mapping||(e.Mapping={})),(function(d){d._isMappingsValid={keyword:"_isMappingsValid",validate:function(p,v){try{c(v)}catch{return!1}return!0},errors:!1},d.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:u.schema}},minProperties:1,required:[],additionalProperties:!1};const m=Object.values(n).reduce((p,v)=>(p[v]=d.innerSchema,p),{});d.schema={type:"object",properties:m,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo,d._isMappingsValid])})(e.Mappings||(e.Mappings={}));class l extends Error{constructor(m,p,v){super(m),this.existingMapping=p,this.conflictingMapping=v}}e.AddMappingError=l;function c(d={}){const m={};for(const[h,S]of Object.entries(d)){m[h]={};for(const[A,P]of Object.entries(S))for(const k of P)E(h,A,k)}function p(){return JSON.parse(JSON.stringify(m))}function v(h,S,A){const P=BigInt(h);return P>=BigInt(S)&&P<=BigInt(A)}function w(h,S){switch(S.type){case r.SINGLE:return h.id===S.id;case r.MULTIPLE:return S.ids.includes(h.id);case r.RANGE:return v(h.id,S.from,S.to);default:return!1}}function R(h,S){switch(S.type){case r.SINGLE:return h.ids.includes(S.id);case r.MULTIPLE:return h.ids.some(A=>S.ids.includes(A));case r.RANGE:return h.ids.some(A=>v(A,S.from,S.to));default:return!1}}function O(h,S){switch(S.type){case r.SINGLE:return v(S.id,h.from,h.to);case r.MULTIPLE:return S.ids.some(A=>v(A,h.from,h.to));case r.RANGE:return BigInt(h.from)<=BigInt(S.to)&&BigInt(h.to)>=BigInt(S.from)}}function f(h,S){if(h.type===r.ANY||S.type===r.ANY)return!0;switch(h.type){case r.SINGLE:return w(h,S);case r.MULTIPLE:return R(h,S);case r.RANGE:return O(h,S)}}function E(h,S,A){var P,k;const z=S.toLowerCase();m[h]=(P=m[h])!==null&&P!==void 0?P:{},m[h][z]=(k=m[h][z])!==null&&k!==void 0?k:[];for(const Y of m[h][z])if(f(Y,A))throw new l(`Cannot add mapping to contract ${z} on network ${h} because it overlaps with existing mapping`,Y,A);m[h][z].push(A)}function b(h,S,A){var P;return!((P=m[h])===null||P===void 0)&&P[S]?m[h][S].some(k=>{switch(k.type){case r.SINGLE:return k.id===A;case r.ANY:return!0;case r.MULTIPLE:return k.ids.includes(A);case r.RANGE:return BigInt(A)>=BigInt(k.from)&&BigInt(A)<=BigInt(k.to)}}):!1}return{addMapping:E,getMappings:p,includesNft:b}}e.createMappingsHelper=c})(Ud)),Ud}var X0;function Zg(){return X0||(X0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=Oe(),r=kN(),n=Qg();e.schema={type:"object",properties:{merkleProof:r.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const i={keyword:"_containsHashingKeys",validate:function(o,u){var l;const c=u;return!((l=c==null?void 0:c.merkleProof)===null||l===void 0)&&l.hashingKeys?c.merkleProof.hashingKeys.every(d=>c.hasOwnProperty(d)):!1},errors:!1},a=(0,t.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function s(o){return a(o)}e.isThirdParty=s})(kd)),kd}var Fd={},Vd={},Cr={},Q0;function BN(){if(Q0)return Cr;Q0=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.isBaseEmote=Cr.isBaseAvatar=Cr.requiredBaseItemProps=Cr.baseItemProperties=void 0;const e=LN(),t=qN(),r=Jg();Cr.baseItemProperties=Object.assign(Object.assign({},r.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},t.Metrics.schema),{nullable:!0})}),Cr.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(a){if(!a||!a.id)return!1;const s=a.id.split(":"),o=s[1]==="decentraland",u=s[3]==="base-avatars";return s.length===5&&o&&u}Cr.isBaseAvatar=n;function i(a){if(!a||!a.id)return!1;const s=a.id.split(":");return s.length===5&&s[1]==="decentraland"&&s[3]==="base-emotes"}return Cr.isBaseEmote=i,Cr}var Z0;function tU(){return Z0||(Z0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Oe(),r=sa(),n=Kg(),i=BN(),a=Xg(),s=Zg(),o=Yg(),u=Qg(),l=Sl();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),s.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:o.HideableWearableCategory.schema},hides:{type:"array",items:o.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0},springBones:Object.assign(Object.assign({},l.SpringBonesData.schema),{nullable:!0})},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const d={keyword:"_isThirdParty",validate:(p,v)=>!p||(0,s.isThirdParty)(v),errors:!1},m={keyword:"_isBaseAvatar",validate:(p,v)=>!p||(0,i.isBaseAvatar)(v),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[d,m,u.RangeMapping._fromLessThanOrEqualTo,u.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Vd)),Vd}var x0;function rU(){return x0||(x0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBonesData=e.SpringBoneParams=e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=Kg();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var r=tU();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=sa();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=ON();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=Yg();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}});var s=Sl();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return s.SpringBoneParams}}),Object.defineProperty(e,"SpringBonesData",{enumerable:!0,get:function(){return s.SpringBonesData}})})(Fd)),Fd}var Hd={},Gd={},zd={},Wd={},eT;function UN(){return eT||(eT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const t=Oe();(function(r){r.DANCE="dance",r.STUNT="stunt",r.GREETINGS="greetings",r.FUN="fun",r.POSES="poses",r.REACTIONS="reactions",r.HORROR="horror",r.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Wd)),Wd}var Yd={},tT;function FN(){return tT||(tT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Oe(),r=Wg();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(Yd)),Yd}var Kd={},rT;function VN(){return rT||(rT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const t=Oe();var r;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(r=e.ArmatureId||(e.ArmatureId={})),(function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.ArmatureId||(e.ArmatureId={}));var n;(function(i){i.schema={type:"object",properties:{animation:{type:"string",minLength:1,errorMessage:"animation must be a non-empty string (GLB clip name)"}},required:["animation"],additionalProperties:!1,errorMessage:{required:{animation:"animation is required (GLB clip name)"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(n=e.EmoteClip||(e.EmoteClip={})),(function(i){i.schema={type:"object",properties:{loop:{type:"boolean",errorMessage:"startAnimation.loop must be a boolean"},[r.Armature]:Object.assign(Object.assign({},n.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[r.Armature_Prop]:Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:"startAnimation.Armature_Prop must contain valid animation data when provided"}),audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["loop",r.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[r.Armature]:"startAnimation.Armature is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.StartAnimation||(e.StartAnimation={})),(function(i){i.schema={type:"object",properties:{title:{type:"string",minLength:1,errorMessage:"outcome.title must be a non-empty string"},loop:{type:"boolean",errorMessage:"outcome.loop must be a boolean"},clips:{type:"object",properties:Object.values(r).reduce((a,s)=>(a[s]=Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:`outcome.clips.${s} must contain valid animation data when provided`}),a),{}),additionalProperties:!0,minProperties:1,errorMessage:"outcome.clips must contain at least one armature animation"},audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["title","loop","clips"],additionalProperties:!1,errorMessage:{required:{title:"outcome.title is required",loop:"outcome.loop is required",clips:"outcome.clips is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(Kd)),Kd}var nT;function HN(){return nT||(nT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=UN(),r=Oe(),n=FN(),i=VN();(function(a){a.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:t.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},i.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:i.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:["category","tags","representations","loop"],dependencies:{startAnimation:["randomizeOutcomes","outcomes"],randomizeOutcomes:["startAnimation","outcomes"],outcomes:["startAnimation","randomizeOutcomes"]},additionalProperties:!0},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(zd)),zd}var iT;function nU(){return iT||(iT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=GN(),r=Oe(),n=BN(),i=Xg(),a=Zg(),s=HN();(function(o){o.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),a.schema.properties),{emoteDataADR74:s.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const u={keyword:"_isThirdParty",validate:(c,d)=>!c||(0,t.isThirdParty)(d),errors:!1},l={keyword:"_isBaseEmote",validate:(c,d)=>!c||(0,n.isBaseEmote)(d),errors:!1};o.validate=(0,r.generateLazyValidator)(o.schema,[u,l,t.RangeMapping._fromLessThanOrEqualTo,t.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Gd)),Gd}var Jd={},aT;function iU(){return aT||(aT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const t=Oe();(function(r){r.SIMPLE="simple",r.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Jd)),Jd}var Xd={},sT;function aU(){return sT||(sT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const t=Oe();(function(r){r.SIMPLE_OUTCOME="so",r.MULTIPLE_OUTCOME="mo",r.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(Xd)),Xd}var oT;function sU(){return oT||(oT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var t=nU();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var r=FN();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=HN();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=VN();Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return i.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return i.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return i.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return i.StartAnimation}});var a=UN();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=iU();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=aU();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(Hd)),Hd}var uT;function GN(){return uT||(uT=1,(function(e){var t=oi&&oi.__createBinding||(Object.create?(function(l,c,d,m){m===void 0&&(m=d);var p=Object.getOwnPropertyDescriptor(c,d);(!p||("get"in p?!c.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(l,m,p)}):(function(l,c,d,m){m===void 0&&(m=d),l[m]=c[d]})),r=oi&&oi.__exportStar||function(l,c){for(var d in l)d!=="default"&&!Object.prototype.hasOwnProperty.call(c,d)&&t(c,l,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=LN();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=$N();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=qN();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=Wg();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=Xg();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var u=Zg();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return u.isThirdParty}}),r(Qg(),e),r(rU(),e),r(sU(),e)})(oi)),oi}var Qd={},Zd={},cT;function Mo(){return cT||(cT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const t=Oe();var r;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(r=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:r.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,t.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(Zd)),Zd}var lT;function oU(){return lT||(lT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=oa(),r=Mo(),n=Oe();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Qd)),Qd}var xd={},ef={},dT;function zN(){return dT||(dT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=oa(),r=Oe();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(ef)),ef}var fT;function WN(){return fT||(fT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=oa(),r=zN(),n=Oe();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:r.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(xd)),xd}var tf={},pT;function uU(){return pT||(pT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=Mo(),r=Oe();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:t.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(tf)),tf}var ci={},rf={},mT;function cU(){return mT||(mT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=sa(),r=oa(),n=Oe();var i;(function(a){a.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(i=e.Outfit||(e.Outfit={})),(function(a){a.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(e.Outfits||(e.Outfits={}))})(rf)),rf}var hT;function lU(){return hT||(hT=1,(function(e){var t=ci&&ci.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ci&&ci.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(cU(),e)})(ci)),ci}var li={},nf={},yT;function YN(){return yT||(yT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(t){t.BADGE_GRANTED="badge_granted",t.BID_ACCEPTED="bid_accepted",t.BID_RECEIVED="bid_received",t.EVENTS_STARTED="events_started",t.EVENTS_STARTS_SOON="events_starts_soon",t.EVENT_CREATED="event_created",t.EVENT_APPROVED="event_approved",t.EVENT_REJECTED="event_rejected",t.EVENT_DELETED="event_deleted",t.GOVERNANCE_ANNOUNCEMENT="governance_announcement",t.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",t.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",t.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",t.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",t.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",t.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",t.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",t.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",t.GOVERNANCE_TENDER_PASSED="governance_tender_passed",t.GOVERNANCE_WHALE_VOTE="governance_whale_vote",t.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",t.ITEM_SOLD="item_sold",t.ITEM_PUBLISHED="item_published",t.LAND_RENTAL_ENDED="rental_ended",t.LAND_RENTED="rental_started",t.REWARD_ASSIGNED="reward_assignment",t.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",t.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",t.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",t.REWARD_DELAYED="reward_delayed",t.REWARD_IN_PROGRESS="reward_in_progress",t.ROYALTIES_EARNED="royalties_earned",t.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",t.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",t.WORLDS_ACCESS_RESTORED="worlds_access_restored",t.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",t.WORLDS_MISSING_RESOURCES="worlds_missing_resources",t.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",t.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",t.CREDITS_GOAL_COMPLETED="credits_goal_completed",t.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",t.STREAMING_KEY_RESET="streaming_key_reset",t.STREAMING_KEY_REVOKE="streaming_key_revoke",t.STREAMING_KEY_EXPIRED="streaming_key_expired",t.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",t.STREAMING_PLACE_UPDATED="streaming_place_updated",t.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",t.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",t.CREDITS_REMINDER_USAGE="credits_reminder_usage",t.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",t.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",t.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",t.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",t.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",t.COMMUNITY_DELETED="community_deleted",t.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",t.COMMUNITY_RENAMED="community_renamed",t.COMMUNITY_MEMBER_BANNED="community_member_banned",t.COMMUNITY_MEMBER_REMOVED="community_member_removed",t.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",t.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",t.COMMUNITY_INVITE_RECEIVED="community_invite_received",t.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",t.COMMUNITY_POST_ADDED="community_post_added",t.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",t.USER_BANNED_FROM_SCENE="user_banned_from_scene",t.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",t.TRANSFER_RECEIVED="transfer_received",t.TIP_RECEIVED="tip_received",t.BANNED="banned",t.BAN_WARNING="ban_warning",t.BAN_LIFTED="ban_lifted"})(e.NotificationType||(e.NotificationType={})),(function(t){t.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(nf)),nf}var af={},sf={},gT;function KN(){return gT||(gT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=Oe(),r=YN(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(r.NotificationType).reduce((a,s)=>(a[s]=n,a),{});(function(a){a.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(r.NotificationType),additionalProperties:!1,properties:i}}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(sf)),sf}var of={},_T;function JN(){return _T||(_T=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(t){t.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const r=new RegExp(t.schema.pattern);t.validate=n=>r.test(n)})(e.Email||(e.Email={}))})(of)),of}var ET;function dU(){return ET||(ET=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=Oe(),r=KN(),n=oa(),i=JN();(function(a){a.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:r.SubscriptionDetails.schema}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Subscription||(e.Subscription={}))})(af)),af}var vT;function fU(){return vT||(vT=1,(function(e){var t=li&&li.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=li&&li.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(YN(),e),r(dU(),e),r(KN(),e)})(li)),li}var di={},uf={},bT;function lr(){return bT||(bT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(t){(function(r){r.BLOCKCHAIN="blockchain",r.CATALYST_DEPLOYMENT="catalyst-deployment",r.WORLD="world",r.CLIENT="client",r.WEB="web",r.MARKETPLACE="marketplace",r.REWARDS="rewards",r.BADGE="badge",r.ASSET_BUNDLE="asset-bundle",r.SOCIAL_SERVICE="social-service",r.CREDITS_SERVICE="credits-service",r.STREAMING="streaming",r.COMMS="comms",r.REFERRAL="referral",r.COMMUNITY="community",r.CAMERA="camera",r.EVENT="event",r.GOVERNANCE="governance",r.MODERATION="moderation"})(t.Type||(t.Type={})),(function(r){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published",n.TRANSFER_RECEIVED="transfer-received",n.TIP_RECEIVED="tip-received"})(r.Blockchain||(r.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(r.Marketplace||(r.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(r.CatalystDeployment||(r.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment",n.WORLD_SETTINGS_CHANGED="world_settings_changed",n.WORLD_SCENES_UNDEPLOYMENT="world_scenes_undeployment",n.WORLD_UNDEPLOYMENT="world_undeployment",n.WORLD_SPAWN_COORDINATE_SET="world_spawn_coordinate_set",n.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",n.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",n.WORLDS_ACCESS_RESTORED="worlds_access_restored",n.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",n.WORLDS_MISSING_RESOURCES="worlds_missing_resources"})(r.Worlds||(r.Worlds={})),(function(n){n.LOGGED_IN="logged-in",n.LOGGED_IN_CACHED="logged-in-cached",n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(r.Client||(r.Client={})),(function(n){n.AUTH_IDENTIFY="auth-identify"})(r.Web||(r.Web={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(r.Rewards||(r.Rewards={})),(function(n){n.GRANTED="badge-granted"})(r.Badge||(r.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(r.AssetBundle||(r.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(r.SocialService||(r.SocialService={})),(function(n){n.CREDITS_GOAL_COMPLETED="credits-goal-completed",n.COMPLETE_GOALS_REMINDER="complete-goals-reminder",n.CLAIM_CREDITS_REMINDER="claim-credits-reminder",n.DO_NOT_MISS_OUT_REMINDER="do-not-miss-out-reminder",n.USAGE_REMINDER="usage-reminder",n.USAGE_24_HOURS_REMINDER="usage-24-hours-reminder",n.ON_DEMAND_CREDITS_GRANTED="on-demand-credits-granted",n.NEW_SEASON_REMINDER="new-season-reminder"})(r.CreditsService||(r.CreditsService={})),(function(n){n.STREAMING_KEY_RESET="streaming-key-reset",n.STREAMING_KEY_REVOKE="streaming-key-revoke",n.STREAMING_KEY_EXPIRED="streaming-key-expired",n.STREAMING_TIME_EXCEEDED="streaming-time-exceeded",n.STREAMING_PLACE_UPDATED="streaming-place-updated",n.COMMUNITY_STREAMING_ENDED="community-streaming-ended"})(r.Streaming||(r.Streaming={})),(function(n){n.USER_JOINED_ROOM="user-joined-room",n.USER_LEFT_ROOM="user-left-room",n.USER_BANNED_FROM_SCENE="user-banned-from-scene",n.USER_UNBANNED_FROM_SCENE="user-unbanned-from-scene"})(r.Comms||(r.Comms={})),(function(n){n.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",n.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"})(r.Referral||(r.Referral={})),(function(n){n.DELETED="community-deleted",n.DELETED_CONTENT_VIOLATION="community-deleted-content-violation",n.RENAMED="community-renamed",n.MEMBER_BANNED="community-member-banned",n.MEMBER_LEFT="community-member-left",n.MEMBER_REMOVED="community-member-removed",n.REQUEST_TO_JOIN_RECEIVED="community-request-to-join-received",n.REQUEST_TO_JOIN_ACCEPTED="community-request-to-join-accepted",n.INVITE_RECEIVED="community-invite-received",n.OWNERSHIP_TRANSFERRED="community-ownership-transferred",n.POST_ADDED="community-post-added",n.VOICE_CHAT_STARTED="community-voice-chat-started"})(r.Community||(r.Community={})),(function(n){n.PHOTO_TAKEN="photo-taken",n.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"})(r.Camera||(r.Camera={})),(function(n){n.EVENT_CREATED="event-created",n.EVENT_STARTS_SOON="event-starts-soon",n.EVENT_STARTED="event-started",n.EVENT_ENDED="event-ended",n.EVENT_APPROVED="event-approved",n.EVENT_REJECTED="event-rejected",n.EVENT_DELETED="event-deleted"})(r.Event||(r.Event={})),(function(n){n.PROPOSAL_ENACTED="governance_proposal_enacted",n.COAUTHOR_REQUESTED="governance_coauthor_requested",n.PITCH_PASSED="governance_pitch_passed",n.TENDER_PASSED="governance_tender_passed",n.AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",n.VOTING_ENDED_VOTER="governance_voting_ended_voter",n.NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",n.NEW_COMMENT_ON_PROJECT_UPDATED="governance_new_comment_on_project_update",n.WHALE_VOTE="governance_whale_vote",n.VOTED_ON_BEHALF="governance_voted_on_behalf",n.CLIFF_ENDED="governance_cliff_ended"})(r.Governance||(r.Governance={})),(function(n){n.USER_BAN_CREATED="user-ban-created",n.USER_BAN_LIFTED="user-ban-lifted",n.USER_WARNING_CREATED="user-warning-created"})(r.Moderation||(r.Moderation={}))})(t.SubType||(t.SubType={}))})(e.Events||(e.Events={}))})(uf)),uf}var cf={},TT;function pU(){return TT||(TT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TipReceivedEvent=e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const t=Oe(),r=lr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},tokenUri:{type:"string",nullable:!0}},required:["senderAddress","receiverAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.TIP_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},amount:{type:"string"}},required:["senderAddress","receiverAddress","amount"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.TipReceivedEvent||(e.TipReceivedEvent={}))})(cf)),cf}var lf={},ST;function mU(){return ST||(ST=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=Mo(),r=Oe(),n=WN(),i=lr();(function(a){a.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:t.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(lf)),lf}var df={},IT;function hU(){return IT||(IT=1,Object.defineProperty(df,"__esModule",{value:!0})),df}var ff={},RT;function yU(){return RT||(RT=1,Object.defineProperty(ff,"__esModule",{value:!0})),ff}var pf={},wT;function gU(){return wT||(wT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const t=Oe(),r=lr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MARKETPLACE},subType:{type:"string",const:r.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(pf)),pf}var mf={},ys={},AT;function Il(){if(AT)return ys;AT=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.createEventSchema=void 0;function e(t,r,n){return{type:"object",properties:{type:{type:"string",const:t},subType:{type:"string",const:r},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return ys.createEventSchema=e,ys}var OT;function _U(){return OT||(OT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const t=Oe(),r=lr(),n=Il(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},a={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_ASSIGNED,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_DELAYED,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(mf)),mf}var hf={},NT;function EU(){return NT||(NT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const t=Oe(),r=lr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BADGE},subType:{type:"string",const:r.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:r.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","statusCode","isLods","isWorld","version"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:r.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:r.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},message:{type:"string",nullable:!0}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:r.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creditsGranted:{type:"number",minimum:1},address:{type:"string"},granterAddress:{type:"string"}},required:["creditsGranted","address","granterAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{goalId:{type:"string"},creditsObtained:{type:"number",minimum:0},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},address:{type:"string"}},required:["goalId","creditsObtained","seasonId","weekNumber","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},pendingGoalIds:{type:"array",items:{type:"string"},minItems:1}},required:["address","seasonId","weekNumber","pendingGoalIds"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"},expirationDay:{type:"string"}},required:["address","creditsAmount","expirationDate","expirationDay"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{addresses:{type:"array",items:{type:"string"}},seasonName:{type:"string"},startDate:{type:"string"},endDate:{type:"string"}},required:["addresses","seasonName","startDate","endDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"}},required:["address","creditsAmount","expirationDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1}},required:["address","seasonId","weekNumber"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(hf)),hf}var yf={},PT;function vU(){return PT||(PT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const t=Oe(),r=lr(),n=Il(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},position:{type:"string"},worldName:{type:"string",nullable:!0},isWorld:{type:"boolean"},url:{type:"string"},address:{type:"string"},image:{type:"string"}},required:["position","isWorld","url","title","description","address","image"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_RESET,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(yf)),yf}var gf={},CT;function bU(){return CT||(CT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const t=Oe(),r=lr();var n;(function(i){i.PRIVATE_MESSAGE="private-message",i.VOICE_CHAT="voice-chat",i.COMMUNITY_VOICE_CHAT="community-voice-chat",i.ISLAND="island",i.SCENE="scene",i.WORLD="world",i.UNKNOWN="unknown"})(n=e.RoomType||(e.RoomType={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{parcel:{type:"string"},sceneId:{type:"string"},userAddress:{type:"string"},realmName:{type:"string"},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)}},required:["parcel","sceneId","userAddress","realmName","isWorld","roomType"]}},required:["type","subType","key","timestamp","metadata"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},realmName:{type:"string"},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)},sceneId:{type:"string",nullable:!0},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0}},required:["isWorld","userAddress","realmName","roomType"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(gf)),gf}var _f={},MT;function TU(){return MT||(MT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=Oe(),r=lr(),n=Il(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},address:{type:"string"},tier:{type:"number",minimum:1},url:{type:"string"},image:{type:"string"},invitedUserAddress:{type:"string"},invitedUsers:{type:"number",minimum:1},rarity:{type:"string",nullable:!0}},required:["address","tier","url","title","description","image","invitedUserAddress"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.REFERRAL,r.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.REFERRAL,r.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(_f)),_f}var Ef={},jT;function SU(){return jT||(jT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberLeftEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;const t=Oe(),r=lr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.DELETED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","name","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},ownerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","ownerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.RENAMED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},oldName:{type:"string"},newName:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","oldName","newName","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_BANNED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_LEFT},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},memberAddress:{type:"string"}},required:["id","memberAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberLeftEvent||(e.CommunityMemberLeftEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_REMOVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},memberName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","memberAddress","memberName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.INVITE_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.POST_ADDED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},postId:{type:"string"},authorAddress:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["addressesToNotify","communityId","communityName","thumbnailUrl","postId","authorAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},oldOwnerAddress:{type:"string"},newOwnerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","oldOwnerAddress","newOwnerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.VOICE_CHAT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(Ef)),Ef}var vf={},DT;function IU(){return DT||(DT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const t=Oe(),r=lr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CAMERA},subType:{type:"string",const:r.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"}},required:["userAddress","photoId","isPublic"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CAMERA},subType:{type:"string",const:r.Events.SubType.Camera.PHOTO_TAKEN},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sceneId:{type:"string"},userAddress:{type:"string"},realm:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"},users:{type:"array",items:{type:"object",properties:{address:{type:"string"},isEmoting:{type:"boolean"}},required:["address","isEmoting"],additionalProperties:!1}},placeId:{type:"string",nullable:!0}},required:["userAddress","realm","photoId","isPublic","users"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(vf)),vf}var bf={},$T;function RU(){return $T||($T=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventDeletedEvent=e.EventRejectedEvent=e.EventApprovedEvent=e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const t=Oe(),r=lr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},communityId:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_STARTS_SOON},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},startsAt:{type:"string"},endsAt:{type:"string"},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link","startsAt","endsAt"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},communityId:{type:"string"},communityName:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{communityId:{type:"string",nullable:!0},totalAttendees:{type:"number"}},required:["totalAttendees"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_APPROVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{host:{type:"string"},title:{type:"string"},description:{type:"string"},image:{type:"string"},link:{type:"string"}},required:["host","title","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventApprovedEvent||(e.EventApprovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_REJECTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{host:{type:"string"},title:{type:"string"},description:{type:"string"},image:{type:"string"},reason:{type:"string"}},required:["host","title","image","reason"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventRejectedEvent||(e.EventRejectedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_DELETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{host:{type:"string"},title:{type:"string"},description:{type:"string"},image:{type:"string"},reason:{type:"string",nullable:!0}},required:["host","title","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventDeletedEvent||(e.EventDeletedEvent={}))})(bf)),bf}var Tf={},LT;function wU(){return LT||(LT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;const t=Oe(),r=lr(),n=Il(),i={type:"object",properties:{proposalId:{type:"string"},proposalTitle:{type:"string"},title:{type:"string"},description:{type:"string"},link:{type:"string"},address:{type:"string"}},required:["proposalId","proposalTitle","title","description","link","address"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.PROPOSAL_ENACTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.COAUTHOR_REQUESTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.PITCH_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.TENDER_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.VOTING_ENDED_VOTER,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.WHALE_VOTE,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.VOTED_ON_BEHALF,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.CLIFF_ENDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(Tf)),Tf}var Sf={},qT;function AU(){return qT||(qT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=e.WorldUndeploymentEvent=e.WorldScenesUndeploymentEvent=e.WorldSpawnCoordinateSetEvent=e.WorldSettingsChangedEvent=void 0;const t=Mo(),r=Oe(),n=lr();(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SETTINGS_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},title:{type:"string",nullable:!0},description:{type:"string",nullable:!0},contentRating:{type:"string",nullable:!0},skyboxTime:{type:"number",nullable:!0},categories:{type:"array",items:{type:"string"},nullable:!0},singlePlayer:{type:"boolean",nullable:!0},showInPlaces:{type:"boolean",nullable:!0},thumbnailUrl:{type:"string",nullable:!0},accessType:{type:"string",nullable:!0}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}})(e.WorldSettingsChangedEvent||(e.WorldSettingsChangedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SPAWN_COORDINATE_SET},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string",pattern:"^[a-zA-Z0-9_-]+\\.dcl\\.eth|[a-zA-Z0-9_-]+\\.eth$"},oldCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1,nullable:!0},newCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1}},required:["name","oldCoordinate","newCoordinate"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldSpawnCoordinateSetEvent||(e.WorldSpawnCoordinateSetEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SCENES_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},scenes:{type:"array",items:{type:"object",properties:{entityId:{type:"string"},baseParcel:{type:"string"}},required:["entityId","baseParcel"],additionalProperties:!1},minItems:1}},required:["worldName","scenes"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldScenesUndeploymentEvent||(e.WorldScenesUndeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldUndeploymentEvent||(e.WorldUndeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.DEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},entity:{type:"object",properties:{entityId:{type:"string"},authChain:t.AuthChain.schema},additionalProperties:!0,required:["entityId","authChain"]},contentServerUrls:{type:"array",items:{type:"string"},nullable:!0},force:{type:"boolean",nullable:!0},animation:{type:"string",nullable:!0},lods:{type:"array",items:{type:"string"},nullable:!0}},required:["type","subType","key","timestamp","entity"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},attendee:{type:"string"}},required:["title","description","url","attendee"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","url","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(Sf)),Sf}var If={},kT;function OU(){return kT||(kT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const t=Oe(),r=lr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_BAN_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},bannedBy:{type:"string"},reason:{type:"string"},bannedAt:{type:"number",minimum:0},expiresAt:{type:"number",nullable:!0,minimum:0},customMessage:{type:"string",nullable:!0}},required:["id","bannedAddress","bannedBy","reason","bannedAt","expiresAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserBanCreatedEvent||(e.UserBanCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_BAN_LIFTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},liftedBy:{type:"string"},liftedAt:{type:"number",minimum:0}},required:["id","bannedAddress","liftedBy","liftedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserBanLiftedEvent||(e.UserBanLiftedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_WARNING_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},warnedAddress:{type:"string"},warnedBy:{type:"string"},reason:{type:"string"},warnedAt:{type:"number",minimum:0}},required:["id","warnedAddress","warnedBy","reason","warnedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserWarningCreatedEvent||(e.UserWarningCreatedEvent={}))})(If)),If}var BT;function NU(){return BT||(BT=1,(function(e){var t=di&&di.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=di&&di.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(lr(),e),r(pU(),e),r(mU(),e),r(hU(),e),r(yU(),e),r(gU(),e),r(_U(),e),r(EU(),e),r(vU(),e),r(bU(),e),r(TU(),e),r(SU(),e),r(IU(),e),r(RU(),e),r(wU(),e),r(AU(),e),r(OU(),e)})(di)),di}var UT;function xg(){return UT||(UT=1,(function(e){var t=ai&&ai.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ai&&ai.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(QB(),e),r(xB(),e),r(GN(),e),r(Jg(),e),r(kN(),e),r(oU(),e),r(WN(),e),r(uU(),e),r(lU(),e),r(fU(),e),r(NU(),e)})(ai)),ai}var FT;function PU(){return FT||(FT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=Tl(),r=sa(),n=Sl(),i=Kg(),a=Oe(),s=xg();(function(o){o.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},t.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:r.WearableCategory.schema},hides:{type:"array",items:r.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:i.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0},springBones:Object.assign(Object.assign({},n.SpringBonesData.schema),{nullable:!0})},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},o.validate=(0,a.generateLazyValidator)(o.schema)})(e.WearableJson||(e.WearableJson={}))})(yd)),yd}var VT;function CU(){return VT||(VT=1,(function(e){var t=ii&&ii.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=ii&&ii.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(JB(),e),r(PU(),e)})(ii)),ii}var HT;function MU(){return HT||(HT=1,(function(e){var t=Zn&&Zn.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Zn&&Zn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(KB(),e),r(CU(),e)})(Zn)),Zn}var fi={},Rf={},GT;function jU(){return GT||(GT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const t=Oe();(function(r){r.MOST_SALES="most_sales",r.MOST_PURCHASES="most_purchases",r.MOST_SPENT="most_spent",r.MOST_EARNED="most_earned",r.MOST_ROYALTIES="most_royalties",r.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(r){r.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Account||(e.Account={}))})(Rf)),Rf}var wf={},Af={},zT;function XN(){return zT||(zT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Oe(),r=Hr();var n;(function(a){a.ETHEREUM_MAINNET="Ethereum Mainnet",a.ETHEREUM_ROPSTEN="Ropsten",a.ETHEREUM_RINKEBY="Rinkeby",a.ETHEREUM_GOERLI="Goerli",a.ETHEREUM_KOVAN="Kovan",a.ETHEREUM_SEPOLIA="Sepolia",a.MATIC_MAINNET="Polygon",a.MATIC_MUMBAI="Mumbai",a.MATIC_AMOY="Amoy",a.AVALANCHE_MAINNET="Avalanche",a.BINANCE_MAINNET="Binance Smart Chain",a.ARBITRUM_MAINNET="Arbitrum",a.OPTIMISM_MAINNET="Optimism",a.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function i(a){switch(a){case n.ETHEREUM_MAINNET:return r.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return r.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return r.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return r.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return r.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return r.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return r.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return r.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return r.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return r.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return r.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return r.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return r.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return r.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,t.generateLazyValidator)(a.schema)})(n=e.ChainName||(e.ChainName={}))})(Af)),Af}var Of={},WT;function Vr(){return WT||(WT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const t=Oe();(function(r){r.ETHEREUM="ETHEREUM",r.MATIC="MATIC",r.AVALANCHE="AVALANCHE",r.BSC="BINANCE SMART CHAIN",r.OPTIMISM="OPTIMISM",r.ARBITRUM="ARBITRUM",r.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Network||(e.Network={}))})(Of)),Of}var YT;function Hr(){return YT||(YT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const t=Oe(),r=XN(),n=Vr();var i;(function(l){l[l.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",l[l.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",l[l.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",l[l.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",l[l.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",l[l.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",l[l.MATIC_MAINNET=137]="MATIC_MAINNET",l[l.MATIC_MUMBAI=80001]="MATIC_MUMBAI",l[l.MATIC_AMOY=80002]="MATIC_AMOY",l[l.BSC_MAINNET=56]="BSC_MAINNET",l[l.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",l[l.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",l[l.FANTOM_MAINNET=250]="FANTOM_MAINNET",l[l.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(i=e.ChainId||(e.ChainId={}));function a(l){switch(l){case i.ETHEREUM_MAINNET:return r.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return r.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return r.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return r.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return r.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return r.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return r.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return r.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return r.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return r.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return r.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return r.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return r.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return r.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=a;function s(l){switch(l){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=s;function o(l){const c={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(l){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},c);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},c);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c)}}e.getNetworkMapping=o;function u(l){switch(l){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=u,(function(l){l.schema={type:"number",enum:Object.values(l)},l.validate=(0,t.generateLazyValidator)(l.schema)})(i=e.ChainId||(e.ChainId={}))})(wf)),wf}var Nf={},KT;function DU(){return KT||(KT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Oe(),r=Hr(),n=Vr();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(Nf)),Nf}var Pf={},Cf={},JT;function Rl(){return JT||(JT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const t=Oe();(function(r){r.PARCEL="parcel",r.ESTATE="estate",r.WEARABLE="wearable",r.ENS="ens",r.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Cf)),Cf}var XT;function $U(){return XT||(XT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Oe(),r=Hr(),n=Vr(),i=Rl();(function(a){a.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(a){a.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:r.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Contract||(e.Contract={}))})(Pf)),Pf}var Mf={},jf={},QT;function QN(){return QT||(QT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Oe(),r=Hr(),n=xg(),i=Vr(),a=Rl(),s=Tl(),o=sa();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_LISTED="recently_listed",u.RECENTLY_SOLD="recently_sold",u.CHEAPEST="cheapest",u.RENTAL_LISTING_DATE="rental_listing_date",u.RENTAL_DATE="rented_date",u.MAX_RENTAL_PRICE="max_rental_price",u.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(u){u.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:o.WearableCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"},outcomeType:{type:"string",nullable:!0}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:a.NFTCategory.schema,network:i.Network.schema,chainId:r.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},u.validate=(0,t.generateLazyValidator)(u.schema)})(e.NFT||(e.NFT={}))})(jf)),jf}var ZT;function LU(){return ZT||(ZT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Oe(),r=Hr(),n=Vr(),i=QN(),a=Rl();(function(s){s.NAME="name",s.NEWEST="newest",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_SOLD="recently_sold",s.RECENTLY_LISTED="recently_listed",s.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:a.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},tradeContractAddress:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:r.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.Item||(e.Item={}))})(Mf)),Mf}var Df={},xT;function e_(){return xT||(xT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const t=Oe();(function(r){r.OPEN="open",r.SOLD="sold",r.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Df)),Df}var $f={},eS;function qU(){return eS||(eS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const t=Oe();(function(r){r.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})($f)),$f}var Lf={},tS;function kU(){return tS||(tS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Oe(),r=Hr(),n=Vr();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(Lf)),Lf}var qf={},rS;function BU(){return rS||(rS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(t){t.NEWEST="newest",t.RECENTLY_SOLD="recently_sold",t.CHEAPEST="cheapest",t.MOST_EXPENSIVE="most_expensive",t.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(t){t.ASC="asc",t.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(qf)),qf}var kf={},nS;function UU(){return nS||(nS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Oe(),r=Hr(),n=e_(),i=Vr();(function(a){a.RECENTLY_LISTED="recently_listed",a.RECENTLY_UPDATED="recently_updated",a.CHEAPEST="cheapest",a.ISSUED_ID_ASC="issued_id_asc",a.ISSUED_ID_DESC="issued_id_desc",a.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(a){a.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Order||(e.Order={}))})(kf)),kf}var Bf={},iS;function FU(){return iS||(iS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const t=Oe();(function(r){r.INJECTED="injected",r.MAGIC="magic",r.MAGIC_TEST="magic_test",r.FORTMATIC="formatic",r.NETWORK="network",r.WALLET_CONNECT="wallet_connect",r.WALLET_CONNECT_V2="wallet_connect_v2",r.WALLET_LINK="wallet_link",r.METAMASK_MOBILE="metamask_mobile",r.AUTH_SERVER="auth_server",r.THIRDWEB="thirdweb"})(e.ProviderType||(e.ProviderType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ProviderType||(e.ProviderType={}))})(Bf)),Bf}var Uf={},aS;function ZN(){return aS||(aS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const t=Oe();(function(r){r.ORDER="order",r.BID="bid",r.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SaleType||(e.SaleType={}))})(Uf)),Uf}var Ff={},sS;function VU(){return sS||(sS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Oe(),r=Hr(),n=ZN(),i=Vr();(function(a){a.RECENTLY_SOLD="recently_sold",a.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(a){a.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:r.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Sale||(e.Sale={}))})(Ff)),Ff}var Vf={},oS;function HU(){return oS||(oS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const t=Oe(),r=Hr(),n=Vr();(function(a){a.OPEN="open",a.CANCELLED="cancelled",a.EXECUTED="executed",a.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(a){a.PARCEL="parcel",a.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(a){a.LAND_CREATION_DATE="land_creation_date",a.RENTAL_LISTING_DATE="rental_listing_date",a.RENTAL_DATE="rented_date",a.NAME="name",a.MAX_RENTAL_PRICE="max_rental_price",a.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(a){a.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(a){a.schema={type:"object",properties:{network:n.Network.schema,chainId:r.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Vf)),Vf}var Hf={},uS;function GU(){return uS||(uS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(t){t.DATE="date",t.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Hf)),Hf}var Gf={},cS;function zU(){return cS||(cS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const t=Oe();(function(r){r.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Store||(e.Store={}))})(Gf)),Gf}var zf={},lS;function WU(){return lS||(lS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const t=Oe();(function(r){r.MALE="male",r.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(r){r.MALE="male",r.FEMALE="female",r.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WearableGender||(e.WearableGender={}))})(zf)),zf}var Wf={},dS;function YU(){return dS||(dS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const t=Oe();function r(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=r;function n(i,a){const s=r().validWorldRanges;for(const o of s)if(i>=o.xMin&&i<=o.xMax&&a>=o.yMin&&a<=o.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Wf)),Wf}var Yf={},fS;function KU(){return fS||(fS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Oe(),r=Hr(),n=e_(),i=Vr();(function(a){a.RECENTLY_OFFERED="recently_offered",a.RECENTLY_UPDATED="recently_updated",a.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(a){const s={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};a.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...s.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Bid||(e.Bid={}))})(Yf)),Yf}var Kf={},pS;function JU(){return pS||(pS=1,Object.defineProperty(Kf,"__esModule",{value:!0})),Kf}var Jf={},mS;function XU(){return mS||(mS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(t){t.BID="bid",t.PUBLIC_NFT_ORDER="public_nft_order",t.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(t){t[t.ERC20=1]="ERC20",t[t.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",t[t.ERC721=3]="ERC721",t[t.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(t){t.SENT="sent",t.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Jf)),Jf}var pi={},Xf={},hS;function QU(){return hS||(hS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const t=Oe();(function(r){r.STATIC="static",r.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Xf)),Xf}var Qf={},yS;function ZU(){return yS||(yS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(t){t.AUTH="authentication",t.BUILDER="builder",t.MARKETPLACE="marketplace",t.PROFILE="profile",t.CONFIG="configurator",t.JESUS="jesus"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(Qf)),Qf}var Zf={},gS;function xU(){return gS||(gS=1,Object.defineProperty(Zf,"__esModule",{value:!0})),Zf}var xf={},_S;function eF(){return _S||(_S=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const t=Oe();(function(r){r.ANIMATION_PLAY="animation_play",r.ANIMATION_PAUSE="animation_pause",r.ANIMATION_LOOP="animation_loop",r.ANIMATION_END="animation_end",r.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(xf)),xf}var ep={},ES;function tF(){return ES||(ES=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const t=Oe();(function(r){r.IDLE="idle",r.WALK="walk",r.RUN="run",r.JUMP="jump",r.CLAP="clap",r.DAB="dab",r.DANCE="dance",r.FASHION="fashion",r.FASHION_2="fashion-2",r.FASHION_3="fashion-3",r.FASHION_4="fashion-4",r.LOVE="love",r.MONEY="money",r.FIST_PUMP="fist-pump",r.HEAD_EXPLODE="head-explode",r.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(ep)),ep}var tp={},vS;function rF(){return vS||(vS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const t=Oe();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.BABYLON="babylon",n.UNITY="unity"})(e.PreviewRenderer||(e.PreviewRenderer={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const r=(n,i,a,s="*")=>{const o={type:i,payload:a};n.postMessage(o,s)};e.sendMessage=r})(tp)),tp}var rp={},bS;function nF(){return bS||(bS=1,Object.defineProperty(rp,"__esModule",{value:!0})),rp}var np={},TS;function iF(){return TS||(TS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const t=Oe();(function(r){r.ORTHOGRAPHIC="orthographic",r.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(np)),np}var ip={},SS;function aF(){return SS||(SS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const t=Oe();(function(r){r.TEXTURE="texture",r.WEARABLE="wearable",r.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewType||(e.PreviewType={}))})(ip)),ip}var ap={},IS;function sF(){return IS||(IS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;var t=Sl();Object.defineProperty(e,"SpringBoneParams",{enumerable:!0,get:function(){return t.SpringBoneParams}})})(ap)),ap}var sp={},RS;function oF(){return RS||(RS=1,Object.defineProperty(sp,"__esModule",{value:!0})),sp}var op={},wS;function uF(){return wS||(wS=1,Object.defineProperty(op,"__esModule",{value:!0})),op}var up={},AS;function cF(){return AS||(AS=1,Object.defineProperty(up,"__esModule",{value:!0})),up}var cp={},OS;function lF(){return OS||(OS=1,Object.defineProperty(cp,"__esModule",{value:!0})),cp}var lp={},NS;function dF(){return NS||(NS=1,Object.defineProperty(lp,"__esModule",{value:!0})),lp}var dp={},PS;function fF(){return PS||(PS=1,Object.defineProperty(dp,"__esModule",{value:!0})),dp}var fp={},CS;function pF(){return CS||(CS=1,Object.defineProperty(fp,"__esModule",{value:!0})),fp}var pp={},MS;function mF(){return MS||(MS=1,Object.defineProperty(pp,"__esModule",{value:!0})),pp}var jS;function hF(){return jS||(jS=1,(function(e){var t=pi&&pi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=pi&&pi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(QU(),e),r(ZU(),e),r(xU(),e),r(eF(),e),r(tF(),e),r(rF(),e),r(nF(),e),r(iF(),e),r(aF(),e),r(sF(),e),r(oF(),e),r(uF(),e),r(cF(),e),r(lF(),e),r(dF(),e),r(fF(),e),r(pF(),e),r(mF(),e)})(pi)),pi}var mi={},gs={},DS;function yF(){if(DS)return gs;DS=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.isSysLink=void 0;const e=t=>t!==null&&typeof t=="object"&&"sys"in t&&"id"in t.sys;return gs.isSysLink=e,gs}var _s={},$S;function gF(){if($S)return _s;$S=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.ContentfulLocale=void 0;var e;return(function(t){t.enUS="en-US",t.es="es",t.zh="zh"})(e||(e={})),_s.ContentfulLocale=e,_s}var mp={},LS;function _F(){return LS||(LS=1,Object.defineProperty(mp,"__esModule",{value:!0})),mp}var qS;function EF(){return qS||(qS=1,(function(e){var t=mi&&mi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=mi&&mi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(yF(),e),r(gF(),e),r(_F(),e)})(mi)),mi}var kS;function vF(){return kS||(kS=1,(function(e){var t=fi&&fi.__createBinding||(Object.create?(function(z,Y,W,U){U===void 0&&(U=W);var F=Object.getOwnPropertyDescriptor(Y,W);(!F||("get"in F?!Y.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return Y[W]}}),Object.defineProperty(z,U,F)}):(function(z,Y,W,U){U===void 0&&(U=W),z[U]=Y[W]})),r=fi&&fi.__exportStar||function(z,Y){for(var W in z)W!=="default"&&!Object.prototype.hasOwnProperty.call(Y,W)&&t(Y,z,W)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var n=jU();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=Hr();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var a=XN();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=DU();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=$U();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var u=LU();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return u.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return u.ItemSortBy}});var l=e_();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var c=qU();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return c.MetaTransaction}});var d=kU();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return d.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return d.MintSortBy}});var m=Vr();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return m.Network}});var p=Rl();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return p.NFTCategory}});var v=QN();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return v.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return v.NFTSortBy}});var w=BU();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return w.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return w.CatalogSortDirection}});var R=UU();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return R.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return R.OrderSortBy}});var O=FU();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return O.ProviderType}});var f=Tl();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return f.Rarity}});var E=ZN();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return E.SaleType}});var b=VU();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return b.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return b.SaleSortBy}});var h=HU();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return h.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return h.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return h.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return h.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return h.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return h.PeriodCreation}});var S=GU();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var A=zU();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return A.Store}});var P=WU();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return P.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return P.GenderFilterOption}});var k=YU();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return k.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return k.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return k.isInsideWorldLimits}}),r(KU(),e),r(JU(),e),r(XU(),e),r(hF(),e),r(EF(),e)})(fi)),fi}var hp={},BS;function bF(){return BS||(BS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const t=Oe();(function(r){r.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(hp)),hp}var hi={},yp={},Es={},US;function xN(){if(US)return Es;US=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.isInExceptionBlock=void 0;function e(i,a){return i>=62&&i<=150&&a>=151&&a<=158}function t(i,a){return i>=151&&i<=162&&a>=144&&a<=158}function r(i,a){return i>=151&&i<=163&&a>=59&&a<=143}function n(i,a){return e(i,a)||t(i,a)||r(i,a)}return Es.isInExceptionBlock=n,Es}var FS;function TF(){return FS||(FS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=Oe(),r=xN();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(p,v){return!v||typeof v.x!="number"||typeof v.y!="number"?!1:o(v)||(0,r.isInExceptionBlock)(v.x,v.y)},errors:!1},n.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema,[n._isInLimits]);function i({x:m,y:p}){return`${m},${p}`}n.parcelToString=i;function a(m){const p=m.match(/^(-?\d+),(-?\d+)$/);if(!p)return null;const[,v,w]=p,R=parseInt(v,10),O=parseInt(w,10);return{x:R,y:O}}n.stringToParcel=a;function s(m){const p=a(m);return p?n.validate(p):!1}n.isParcelStringValid=s;function o(m){const{x:p,y:v}=m;return p>=e.PARCEL_LIMITS.minX&&p<=e.PARCEL_LIMITS.maxX&&v>=e.PARCEL_LIMITS.minY&&v<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function u(m){return(0,r.isInExceptionBlock)(m.x,m.y)}n.isExceptionParcel=u;function l(m){return o(m)||u(m)}n.isInBounds=l;function c(m){return n.validate(m)}n.isValid=c;function d(m){const p=a(m);return p?n.validate(p):!1}n.isValidString=d})(e.Parcel||(e.Parcel={}))})(yp)),yp}var yi={},VS;function SF(){if(VS)return yi;VS=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.validateUrlInstance=yi.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function t(p,v=2){let w=p;for(let R=0;R<v;R++)try{w=decodeURIComponent(w)}catch{break}return w.normalize("NFKC")}function r(p){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(p)}function n(p){return!!(p.username||p.password)}function i(p){return/\\/.test(p)}const a=["80","443"];function s(p,v){return!!p.port&&!v.includes(p.port)}function o(p){const v=p.toLowerCase();return!!(v==="localhost"||v.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(v)||v==="::1"||v==="[::1]"||v.startsWith("fe80:")||v.startsWith("fc00:"))}function u(p){if(p.startsWith("//"))return null;try{return{url:new URL(p),wasRelative:!1}}catch{try{return{url:new URL(p,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(p){const v=t(String(p).toLowerCase());return!(r(v)||i(v))}function c(p){return!(!p||p.includes("..")||p.includes("//")||r(p)||i(p))}function d(p,v={}){const w=Object.assign(Object.assign({},e),v),R=[...a,...w.allowedPorts];if(!p||p.length===0||p.length>4096||r(p)||i(p))return!1;const O=t(p);if(r(O)||i(O)||p.startsWith("//"))return!1;const f=u(p);if(!f)return!1;const{url:E,wasRelative:b}=f;if(E.protocol!=="http:"&&E.protocol!=="https:"&&E.protocol!==""||n(E)||i(p)||i(E.href)||!b&&(s(E,R)||!w.allowLocalhost&&E.hostname&&o(E.hostname))||!c(E.pathname)||E.pathname.length>2048)return!1;const h=Array.from(E.searchParams.entries());if(h.length>50||(E.search?E.search.startsWith("?")?E.search.length-1:E.search.length:0)>2048)return!1;for(const[A,P]of h)if(A.length===0||!l(A)||!l(P)||A.length>128||P.length>1024)return!1;return!(E.hash&&r(E.hash))}yi.validateUrl=d;function m(p,v={}){return d(p.toString(),v)}return yi.validateUrlInstance=m,yi}var HS;function IF(){return HS||(HS=1,(function(e){var t=hi&&hi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=hi&&hi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(TF(),e),r(xN(),e),r(SF(),e)})(hi)),hi}var GS;function RF(){return GS||(GS=1,(function(e){var t=Or&&Or.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u);var c=Object.getOwnPropertyDescriptor(o,u);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[u]}}),Object.defineProperty(s,l,c)}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=Or&&Or.__setModuleDefault||(Object.create?(function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}):function(s,o){s.default=o}),n=Or&&Or.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&t(o,s,u);return r(o,s),o},i=Or&&Or.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const a=n(MU());e.sdk=a,i(Oe(),e),i(vF(),e),i(xg(),e),i(oa(),e),i(bF(),e),i(Mo(),e),i(zN(),e),i(JN(),e),i(IF(),e)})(Or)),Or}var xi=RF(),gi={},Mr={},eo={exports:{}},wF=eo.exports,zS;function wl(){return zS||(zS=1,(function(e,t){(function(r,n){n(t)})(wF,(function(r){function n(y){if(y.jsonrpc="2.0",!y.id||typeof y.id!="number"||Math.floor(y.id)!==y.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(y)}`);if(!y.method||typeof y.method!="string"||y.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(y)}`);if(!y.params||typeof y.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(y)}`);return y}var i={};function a(){let y,T;const C=new Promise(((J,x)=>{y=oe=>{J(oe),C.isPending=!1},T=oe=>{x(oe),C.isPending=!1}})).catch((J=>Promise.reject(J)));return C.resolve=y,C.reject=T,"finally"in C||(C.finally=J=>{C.then(J),C.catch(J)}),C.isPending=!0,C}Object.defineProperty(i,"__esModule",{value:!0});var s=i.future=a;i.default=a;var o={exports:{}};/**
63
- * [js-sha3]{@link https://github.com/emn178/js-sha3}
64
- *
65
- * @version 0.8.0
66
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
67
- * @copyright Chen, Yi-Cyuan 2015-2018
68
- * @license MIT
69
- */(function(y){(function(){var T="input is invalid type",C=typeof window=="object",J=C?window:{};J.JS_SHA3_NO_WINDOW&&(C=!1);var x=!C&&typeof self=="object";!J.JS_SHA3_NO_NODE_JS&&typeof zc=="object"&&zc.versions&&zc.versions.node?J=Iy:x&&(J=self);var oe=!J.JS_SHA3_NO_COMMON_JS&&y.exports,ve=!J.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Pe="0123456789abcdef".split(""),Fe=[4,1024,262144,67108864],He=[0,8,16,24],ir=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],jt=[224,256,384,512],Me=[128,256],Gt=["hex","buffer","arrayBuffer","array","digest"],bt={128:168,256:136};!J.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),!ve||!J.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});for(var Tt=function(g,q,Q){return function(V){return new ot(g,q,g).update(V)[Q]()}},xt=function(g,q,Q){return function(V,te){return new ot(g,q,te).update(V)[Q]()}},dn=function(g,q,Q){return function(V,te,re,ae){return zt["cshake"+g].update(V,te,re,ae)[Q]()}},Kr=function(g,q,Q){return function(V,te,re,ae){return zt["kmac"+g].update(V,te,re,ae)[Q]()}},er=function(g,q,Q,V){for(var te=0;te<Gt.length;++te){var re=Gt[te];g[re]=q(Q,V,re)}return g},Jr=function(g,q){var Q=Tt(g,q,"hex");return Q.create=function(){return new ot(g,q,g)},Q.update=function(V){return Q.create().update(V)},er(Q,Tt,g,q)},Cn=[{name:"keccak",padding:[1,256,65536,16777216],bits:jt,createMethod:Jr},{name:"sha3",padding:[6,1536,393216,100663296],bits:jt,createMethod:Jr},{name:"shake",padding:[31,7936,2031616,520093696],bits:Me,createMethod:function(g,q){var Q=xt(g,q,"hex");return Q.create=function(V){return new ot(g,q,V)},Q.update=function(V,te){return Q.create(te).update(V)},er(Q,xt,g,q)}},{name:"cshake",padding:Fe,bits:Me,createMethod:function(g,q){var Q=bt[g],V=dn(g,0,"hex");return V.create=function(te,re,ae){return re||ae?new ot(g,q,te).bytepad([re,ae],Q):zt["shake"+g].create(te)},V.update=function(te,re,ae,pe){return V.create(re,ae,pe).update(te)},er(V,dn,g,q)}},{name:"kmac",padding:Fe,bits:Me,createMethod:function(g,q){var Q=bt[g],V=Kr(g,0,"hex");return V.create=function(te,re,ae){return new Er(g,q,re).bytepad(["KMAC",ae],Q).bytepad([te],Q)},V.update=function(te,re,ae,pe){return V.create(te,ae,pe).update(re)},er(V,Kr,g,q)}}],zt={},fn=[],tr=0;tr<Cn.length;++tr)for(var Xr=Cn[tr],Ae=Xr.bits,pn=0;pn<Ae.length;++pn){var pa=Xr.name+"_"+Ae[pn];if(fn.push(pa),zt[pa]=Xr.createMethod(Ae[pn],Xr.padding),Xr.name!=="sha3"){var ma=Xr.name+Ae[pn];fn.push(ma),zt[ma]=zt[pa]}}function ot(g,q,Q){this.blocks=[],this.s=[],this.padding=q,this.outputBits=Q,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(g<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Q>>5,this.extraBytes=(31&Q)>>3;for(var V=0;V<50;++V)this.s[V]=0}function Er(g,q,Q){ot.call(this,g,q,Q)}ot.prototype.update=function(g){if(this.finalized)throw new Error("finalize already called");var q,Q=typeof g;if(Q!=="string"){if(Q!=="object")throw new Error(T);if(g===null)throw new Error(T);if(ve&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!(Array.isArray(g)||ve&&ArrayBuffer.isView(g)))throw new Error(T);q=!0}for(var V,te,re=this.blocks,ae=this.byteCount,pe=g.length,ye=this.blockCount,he=0,Ce=this.s;he<pe;){if(this.reset)for(this.reset=!1,re[0]=this.block,V=1;V<ye+1;++V)re[V]=0;if(q)for(V=this.start;he<pe&&V<ae;++he)re[V>>2]|=g[he]<<He[3&V++];else for(V=this.start;he<pe&&V<ae;++he)(te=g.charCodeAt(he))<128?re[V>>2]|=te<<He[3&V++]:te<2048?(re[V>>2]|=(192|te>>6)<<He[3&V++],re[V>>2]|=(128|63&te)<<He[3&V++]):te<55296||te>=57344?(re[V>>2]|=(224|te>>12)<<He[3&V++],re[V>>2]|=(128|te>>6&63)<<He[3&V++],re[V>>2]|=(128|63&te)<<He[3&V++]):(te=65536+((1023&te)<<10|1023&g.charCodeAt(++he)),re[V>>2]|=(240|te>>18)<<He[3&V++],re[V>>2]|=(128|te>>12&63)<<He[3&V++],re[V>>2]|=(128|te>>6&63)<<He[3&V++],re[V>>2]|=(128|63&te)<<He[3&V++]);if(this.lastByteIndex=V,V>=ae){for(this.start=V-ae,this.block=re[ye],V=0;V<ye;++V)Ce[V]^=re[V];B(Ce),this.reset=!0}else this.start=V}return this},ot.prototype.encode=function(g,q){var Q=255&g,V=1,te=[Q];for(Q=255&(g>>=8);Q>0;)te.unshift(Q),Q=255&(g>>=8),++V;return q?te.push(V):te.unshift(V),this.update(te),te.length},ot.prototype.encodeString=function(g){var q,Q=typeof g;if(Q!=="string"){if(Q!=="object")throw new Error(T);if(g===null)throw new Error(T);if(ve&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!(Array.isArray(g)||ve&&ArrayBuffer.isView(g)))throw new Error(T);q=!0}var V=0,te=g.length;if(q)V=te;else for(var re=0;re<g.length;++re){var ae=g.charCodeAt(re);ae<128?V+=1:ae<2048?V+=2:ae<55296||ae>=57344?V+=3:(ae=65536+((1023&ae)<<10|1023&g.charCodeAt(++re)),V+=4)}return V+=this.encode(8*V),this.update(g),V},ot.prototype.bytepad=function(g,q){for(var Q=this.encode(q),V=0;V<g.length;++V)Q+=this.encodeString(g[V]);var te=q-Q%q,re=[];return re.length=te,this.update(re),this},ot.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,q=this.lastByteIndex,Q=this.blockCount,V=this.s;if(g[q>>2]|=this.padding[3&q],this.lastByteIndex===this.byteCount)for(g[0]=g[Q],q=1;q<Q+1;++q)g[q]=0;for(g[Q-1]|=2147483648,q=0;q<Q;++q)V[q]^=g[q];B(V)}},ot.prototype.toString=ot.prototype.hex=function(){this.finalize();for(var g,q=this.blockCount,Q=this.s,V=this.outputBlocks,te=this.extraBytes,re=0,ae=0,pe="";ae<V;){for(re=0;re<q&&ae<V;++re,++ae)g=Q[re],pe+=Pe[g>>4&15]+Pe[15&g]+Pe[g>>12&15]+Pe[g>>8&15]+Pe[g>>20&15]+Pe[g>>16&15]+Pe[g>>28&15]+Pe[g>>24&15];ae%q==0&&(B(Q),re=0)}return te&&(g=Q[re],pe+=Pe[g>>4&15]+Pe[15&g],te>1&&(pe+=Pe[g>>12&15]+Pe[g>>8&15]),te>2&&(pe+=Pe[g>>20&15]+Pe[g>>16&15])),pe},ot.prototype.arrayBuffer=function(){this.finalize();var g,q=this.blockCount,Q=this.s,V=this.outputBlocks,te=this.extraBytes,re=0,ae=0,pe=this.outputBits>>3;g=te?new ArrayBuffer(V+1<<2):new ArrayBuffer(pe);for(var ye=new Uint32Array(g);ae<V;){for(re=0;re<q&&ae<V;++re,++ae)ye[ae]=Q[re];ae%q==0&&B(Q)}return te&&(ye[re]=Q[re],g=g.slice(0,pe)),g},ot.prototype.buffer=ot.prototype.arrayBuffer,ot.prototype.digest=ot.prototype.array=function(){this.finalize();for(var g,q,Q=this.blockCount,V=this.s,te=this.outputBlocks,re=this.extraBytes,ae=0,pe=0,ye=[];pe<te;){for(ae=0;ae<Q&&pe<te;++ae,++pe)g=pe<<2,q=V[ae],ye[g]=255&q,ye[g+1]=q>>8&255,ye[g+2]=q>>16&255,ye[g+3]=q>>24&255;pe%Q==0&&B(V)}return re&&(g=pe<<2,q=V[ae],ye[g]=255&q,re>1&&(ye[g+1]=q>>8&255),re>2&&(ye[g+2]=q>>16&255)),ye},Er.prototype=new ot,Er.prototype.finalize=function(){return this.encode(this.outputBits,!0),ot.prototype.finalize.call(this)};var B=function(g){var q,Q,V,te,re,ae,pe,ye,he,Ce,Ve,We,nt,St,Pt,xe,ut,Lt,mn,Mn,jn,ar,Qr,Wt,qt,vt,Uo,Fo,Vo,Ho,Go,zo,Wo,Yo,Ko,Jo,Xo,Qo,Zo,xo,eu,tu,ru,nu,iu,au,su,ou,uu,cu,lu,du,fu,pu,mu,hu,yu,gu,_u,Eu,vu,bu,Tu;for(V=0;V<48;V+=2)te=g[0]^g[10]^g[20]^g[30]^g[40],re=g[1]^g[11]^g[21]^g[31]^g[41],ae=g[2]^g[12]^g[22]^g[32]^g[42],pe=g[3]^g[13]^g[23]^g[33]^g[43],ye=g[4]^g[14]^g[24]^g[34]^g[44],he=g[5]^g[15]^g[25]^g[35]^g[45],Ce=g[6]^g[16]^g[26]^g[36]^g[46],Ve=g[7]^g[17]^g[27]^g[37]^g[47],q=(We=g[8]^g[18]^g[28]^g[38]^g[48])^(ae<<1|pe>>>31),Q=(nt=g[9]^g[19]^g[29]^g[39]^g[49])^(pe<<1|ae>>>31),g[0]^=q,g[1]^=Q,g[10]^=q,g[11]^=Q,g[20]^=q,g[21]^=Q,g[30]^=q,g[31]^=Q,g[40]^=q,g[41]^=Q,q=te^(ye<<1|he>>>31),Q=re^(he<<1|ye>>>31),g[2]^=q,g[3]^=Q,g[12]^=q,g[13]^=Q,g[22]^=q,g[23]^=Q,g[32]^=q,g[33]^=Q,g[42]^=q,g[43]^=Q,q=ae^(Ce<<1|Ve>>>31),Q=pe^(Ve<<1|Ce>>>31),g[4]^=q,g[5]^=Q,g[14]^=q,g[15]^=Q,g[24]^=q,g[25]^=Q,g[34]^=q,g[35]^=Q,g[44]^=q,g[45]^=Q,q=ye^(We<<1|nt>>>31),Q=he^(nt<<1|We>>>31),g[6]^=q,g[7]^=Q,g[16]^=q,g[17]^=Q,g[26]^=q,g[27]^=Q,g[36]^=q,g[37]^=Q,g[46]^=q,g[47]^=Q,q=Ce^(te<<1|re>>>31),Q=Ve^(re<<1|te>>>31),g[8]^=q,g[9]^=Q,g[18]^=q,g[19]^=Q,g[28]^=q,g[29]^=Q,g[38]^=q,g[39]^=Q,g[48]^=q,g[49]^=Q,St=g[0],Pt=g[1],au=g[11]<<4|g[10]>>>28,su=g[10]<<4|g[11]>>>28,Fo=g[20]<<3|g[21]>>>29,Vo=g[21]<<3|g[20]>>>29,Eu=g[31]<<9|g[30]>>>23,vu=g[30]<<9|g[31]>>>23,tu=g[40]<<18|g[41]>>>14,ru=g[41]<<18|g[40]>>>14,Yo=g[2]<<1|g[3]>>>31,Ko=g[3]<<1|g[2]>>>31,xe=g[13]<<12|g[12]>>>20,ut=g[12]<<12|g[13]>>>20,ou=g[22]<<10|g[23]>>>22,uu=g[23]<<10|g[22]>>>22,Ho=g[33]<<13|g[32]>>>19,Go=g[32]<<13|g[33]>>>19,bu=g[42]<<2|g[43]>>>30,Tu=g[43]<<2|g[42]>>>30,pu=g[5]<<30|g[4]>>>2,mu=g[4]<<30|g[5]>>>2,Jo=g[14]<<6|g[15]>>>26,Xo=g[15]<<6|g[14]>>>26,Lt=g[25]<<11|g[24]>>>21,mn=g[24]<<11|g[25]>>>21,cu=g[34]<<15|g[35]>>>17,lu=g[35]<<15|g[34]>>>17,zo=g[45]<<29|g[44]>>>3,Wo=g[44]<<29|g[45]>>>3,Wt=g[6]<<28|g[7]>>>4,qt=g[7]<<28|g[6]>>>4,hu=g[17]<<23|g[16]>>>9,yu=g[16]<<23|g[17]>>>9,Qo=g[26]<<25|g[27]>>>7,Zo=g[27]<<25|g[26]>>>7,Mn=g[36]<<21|g[37]>>>11,jn=g[37]<<21|g[36]>>>11,du=g[47]<<24|g[46]>>>8,fu=g[46]<<24|g[47]>>>8,nu=g[8]<<27|g[9]>>>5,iu=g[9]<<27|g[8]>>>5,vt=g[18]<<20|g[19]>>>12,Uo=g[19]<<20|g[18]>>>12,gu=g[29]<<7|g[28]>>>25,_u=g[28]<<7|g[29]>>>25,xo=g[38]<<8|g[39]>>>24,eu=g[39]<<8|g[38]>>>24,ar=g[48]<<14|g[49]>>>18,Qr=g[49]<<14|g[48]>>>18,g[0]=St^~xe&Lt,g[1]=Pt^~ut&mn,g[10]=Wt^~vt&Fo,g[11]=qt^~Uo&Vo,g[20]=Yo^~Jo&Qo,g[21]=Ko^~Xo&Zo,g[30]=nu^~au&ou,g[31]=iu^~su&uu,g[40]=pu^~hu&gu,g[41]=mu^~yu&_u,g[2]=xe^~Lt&Mn,g[3]=ut^~mn&jn,g[12]=vt^~Fo&Ho,g[13]=Uo^~Vo&Go,g[22]=Jo^~Qo&xo,g[23]=Xo^~Zo&eu,g[32]=au^~ou&cu,g[33]=su^~uu&lu,g[42]=hu^~gu&Eu,g[43]=yu^~_u&vu,g[4]=Lt^~Mn&ar,g[5]=mn^~jn&Qr,g[14]=Fo^~Ho&zo,g[15]=Vo^~Go&Wo,g[24]=Qo^~xo&tu,g[25]=Zo^~eu&ru,g[34]=ou^~cu&du,g[35]=uu^~lu&fu,g[44]=gu^~Eu&bu,g[45]=_u^~vu&Tu,g[6]=Mn^~ar&St,g[7]=jn^~Qr&Pt,g[16]=Ho^~zo&Wt,g[17]=Go^~Wo&qt,g[26]=xo^~tu&Yo,g[27]=eu^~ru&Ko,g[36]=cu^~du&nu,g[37]=lu^~fu&iu,g[46]=Eu^~bu&pu,g[47]=vu^~Tu&mu,g[8]=ar^~St&xe,g[9]=Qr^~Pt&ut,g[18]=zo^~Wt&vt,g[19]=Wo^~qt&Uo,g[28]=tu^~Yo&Jo,g[29]=ru^~Ko&Xo,g[38]=du^~nu&au,g[39]=fu^~iu&su,g[48]=bu^~pu&hu,g[49]=Tu^~mu&yu,g[0]^=ir[V],g[1]^=ir[V+1]};if(oe)y.exports=zt;else for(tr=0;tr<fn.length;++tr)J[fn[tr]]=zt[fn[tr]]})()})(o);var u=o.exports,l=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,c=Math.ceil,d=Math.floor,m="[BigNumber Error] ",p=m+"Number primitive has more than 15 significant digits: ",v=1e14,w=14,R=9007199254740991,O=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],f=1e7,E=1e9;function b(y){var T=0|y;return y>0||y===T?T:T-1}function h(y){for(var T,C,J=1,x=y.length,oe=y[0]+"";J<x;){for(T=y[J++]+"",C=w-T.length;C--;T="0"+T);oe+=T}for(x=oe.length;oe.charCodeAt(--x)===48;);return oe.slice(0,x+1||1)}function S(y,T){var C,J,x=y.c,oe=T.c,ve=y.s,Pe=T.s,Fe=y.e,He=T.e;if(!ve||!Pe)return null;if(C=x&&!x[0],J=oe&&!oe[0],C||J)return C?J?0:-Pe:ve;if(ve!=Pe)return ve;if(C=ve<0,J=Fe==He,!x||!oe)return J?0:!x^C?1:-1;if(!J)return Fe>He^C?1:-1;for(Pe=(Fe=x.length)<(He=oe.length)?Fe:He,ve=0;ve<Pe;ve++)if(x[ve]!=oe[ve])return x[ve]>oe[ve]^C?1:-1;return Fe==He?0:Fe>He^C?1:-1}function A(y,T,C,J){if(y<T||y>C||y!==d(y))throw Error(m+(J||"Argument")+(typeof y=="number"?y<T||y>C?" out of range: ":" not an integer: ":" not a primitive number: ")+String(y))}function P(y){var T=y.c.length-1;return b(y.e/w)==T&&y.c[T]%2!=0}function k(y,T){return(y.length>1?y.charAt(0)+"."+y.slice(1):y)+(T<0?"e":"e+")+T}function z(y,T,C){var J,x;if(T<0){for(x=C+".";++T;x+=C);y=x+y}else if(++T>(J=y.length)){for(x=C,T-=J;--T;x+=C);y+=x}else T<J&&(y=y.slice(0,T)+"."+y.slice(T));return y}var Y=(function y(T){var C,J,x,oe,ve,Pe,Fe,He,ir,jt,Me=Ae.prototype={constructor:Ae,toString:null,valueOf:null},Gt=new Ae(1),bt=20,Tt=4,xt=-7,dn=21,Kr=-1e7,er=1e7,Jr=!1,Cn=1,zt=0,fn={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},tr="0123456789abcdefghijklmnopqrstuvwxyz",Xr=!0;function Ae(B,g){var q,Q,V,te,re,ae,pe,ye,he=this;if(!(he instanceof Ae))return new Ae(B,g);if(g==null){if(B&&B._isBigNumber===!0)return he.s=B.s,void(!B.c||B.e>er?he.c=he.e=null:B.e<Kr?he.c=[he.e=0]:(he.e=B.e,he.c=B.c.slice()));if((ae=typeof B=="number")&&0*B==0){if(he.s=1/B<0?(B=-B,-1):1,B===~~B){for(te=0,re=B;re>=10;re/=10,te++);return void(te>er?he.c=he.e=null:(he.e=te,he.c=[B]))}ye=String(B)}else{if(!l.test(ye=String(B)))return x(he,ye,ae);he.s=ye.charCodeAt(0)==45?(ye=ye.slice(1),-1):1}(te=ye.indexOf("."))>-1&&(ye=ye.replace(".","")),(re=ye.search(/e/i))>0?(te<0&&(te=re),te+=+ye.slice(re+1),ye=ye.substring(0,re)):te<0&&(te=ye.length)}else{if(A(g,2,tr.length,"Base"),g==10&&Xr)return ot(he=new Ae(B),bt+he.e+1,Tt);if(ye=String(B),ae=typeof B=="number"){if(0*B!=0)return x(he,ye,ae,g);if(he.s=1/B<0?(ye=ye.slice(1),-1):1,Ae.DEBUG&&ye.replace(/^0\.0*|\./,"").length>15)throw Error(p+B)}else he.s=ye.charCodeAt(0)===45?(ye=ye.slice(1),-1):1;for(q=tr.slice(0,g),te=re=0,pe=ye.length;re<pe;re++)if(q.indexOf(Q=ye.charAt(re))<0){if(Q=="."){if(re>te){te=pe;continue}}else if(!V&&(ye==ye.toUpperCase()&&(ye=ye.toLowerCase())||ye==ye.toLowerCase()&&(ye=ye.toUpperCase()))){V=!0,re=-1,te=0;continue}return x(he,String(B),ae,g)}ae=!1,(te=(ye=J(ye,g,10,he.s)).indexOf("."))>-1?ye=ye.replace(".",""):te=ye.length}for(re=0;ye.charCodeAt(re)===48;re++);for(pe=ye.length;ye.charCodeAt(--pe)===48;);if(ye=ye.slice(re,++pe)){if(pe-=re,ae&&Ae.DEBUG&&pe>15&&(B>R||B!==d(B)))throw Error(p+he.s*B);if((te=te-re-1)>er)he.c=he.e=null;else if(te<Kr)he.c=[he.e=0];else{if(he.e=te,he.c=[],re=(te+1)%w,te<0&&(re+=w),re<pe){for(re&&he.c.push(+ye.slice(0,re)),pe-=w;re<pe;)he.c.push(+ye.slice(re,re+=w));re=w-(ye=ye.slice(re)).length}else re-=pe;for(;re--;ye+="0");he.c.push(+ye)}}else he.c=[he.e=0]}function pn(B,g,q,Q){var V,te,re,ae,pe;if(q==null?q=Tt:A(q,0,8),!B.c)return B.toString();if(V=B.c[0],re=B.e,g==null)pe=h(B.c),pe=Q==1||Q==2&&(re<=xt||re>=dn)?k(pe,re):z(pe,re,"0");else if(te=(B=ot(new Ae(B),g,q)).e,ae=(pe=h(B.c)).length,Q==1||Q==2&&(g<=te||te<=xt)){for(;ae<g;pe+="0",ae++);pe=k(pe,te)}else if(g-=re,pe=z(pe,te,"0"),te+1>ae){if(--g>0)for(pe+=".";g--;pe+="0");}else if((g+=te-ae)>0)for(te+1==ae&&(pe+=".");g--;pe+="0");return B.s<0&&V?"-"+pe:pe}function pa(B,g){for(var q,Q=1,V=new Ae(B[0]);Q<B.length;Q++){if(!(q=new Ae(B[Q])).s){V=q;break}g.call(V,q)&&(V=q)}return V}function ma(B,g,q){for(var Q=1,V=g.length;!g[--V];g.pop());for(V=g[0];V>=10;V/=10,Q++);return(q=Q+q*w-1)>er?B.c=B.e=null:q<Kr?B.c=[B.e=0]:(B.e=q,B.c=g),B}function ot(B,g,q,Q){var V,te,re,ae,pe,ye,he,Ce=B.c,Ve=O;if(Ce){e:{for(V=1,ae=Ce[0];ae>=10;ae/=10,V++);if((te=g-V)<0)te+=w,re=g,he=(pe=Ce[ye=0])/Ve[V-re-1]%10|0;else if((ye=c((te+1)/w))>=Ce.length){if(!Q)break e;for(;Ce.length<=ye;Ce.push(0));pe=he=0,V=1,re=(te%=w)-w+1}else{for(pe=ae=Ce[ye],V=1;ae>=10;ae/=10,V++);he=(re=(te%=w)-w+V)<0?0:pe/Ve[V-re-1]%10|0}if(Q=Q||g<0||Ce[ye+1]!=null||(re<0?pe:pe%Ve[V-re-1]),Q=q<4?(he||Q)&&(q==0||q==(B.s<0?3:2)):he>5||he==5&&(q==4||Q||q==6&&(te>0?re>0?pe/Ve[V-re]:0:Ce[ye-1])%10&1||q==(B.s<0?8:7)),g<1||!Ce[0])return Ce.length=0,Q?(g-=B.e+1,Ce[0]=Ve[(w-g%w)%w],B.e=-g||0):Ce[0]=B.e=0,B;if(te==0?(Ce.length=ye,ae=1,ye--):(Ce.length=ye+1,ae=Ve[w-te],Ce[ye]=re>0?d(pe/Ve[V-re]%Ve[re])*ae:0),Q)for(;;){if(ye==0){for(te=1,re=Ce[0];re>=10;re/=10,te++);for(re=Ce[0]+=ae,ae=1;re>=10;re/=10,ae++);te!=ae&&(B.e++,Ce[0]==v&&(Ce[0]=1));break}if(Ce[ye]+=ae,Ce[ye]!=v)break;Ce[ye--]=0,ae=1}for(te=Ce.length;Ce[--te]===0;Ce.pop());}B.e>er?B.c=B.e=null:B.e<Kr&&(B.c=[B.e=0])}return B}function Er(B){var g,q=B.e;return q===null?B.toString():(g=h(B.c),g=q<=xt||q>=dn?k(g,q):z(g,q,"0"),B.s<0?"-"+g:g)}return Ae.clone=y,Ae.ROUND_UP=0,Ae.ROUND_DOWN=1,Ae.ROUND_CEIL=2,Ae.ROUND_FLOOR=3,Ae.ROUND_HALF_UP=4,Ae.ROUND_HALF_DOWN=5,Ae.ROUND_HALF_EVEN=6,Ae.ROUND_HALF_CEIL=7,Ae.ROUND_HALF_FLOOR=8,Ae.EUCLID=9,Ae.config=Ae.set=function(B){var g,q;if(B!=null){if(typeof B!="object")throw Error(m+"Object expected: "+B);if(B.hasOwnProperty(g="DECIMAL_PLACES")&&(A(q=B[g],0,E,g),bt=q),B.hasOwnProperty(g="ROUNDING_MODE")&&(A(q=B[g],0,8,g),Tt=q),B.hasOwnProperty(g="EXPONENTIAL_AT")&&((q=B[g])&&q.pop?(A(q[0],-E,0,g),A(q[1],0,E,g),xt=q[0],dn=q[1]):(A(q,-E,E,g),xt=-(dn=q<0?-q:q))),B.hasOwnProperty(g="RANGE"))if((q=B[g])&&q.pop)A(q[0],-E,-1,g),A(q[1],1,E,g),Kr=q[0],er=q[1];else{if(A(q,-E,E,g),!q)throw Error(m+g+" cannot be zero: "+q);Kr=-(er=q<0?-q:q)}if(B.hasOwnProperty(g="CRYPTO")){if((q=B[g])!==!!q)throw Error(m+g+" not true or false: "+q);if(q){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Jr=!q,Error(m+"crypto unavailable");Jr=q}else Jr=q}if(B.hasOwnProperty(g="MODULO_MODE")&&(A(q=B[g],0,9,g),Cn=q),B.hasOwnProperty(g="POW_PRECISION")&&(A(q=B[g],0,E,g),zt=q),B.hasOwnProperty(g="FORMAT")){if(typeof(q=B[g])!="object")throw Error(m+g+" not an object: "+q);fn=q}if(B.hasOwnProperty(g="ALPHABET")){if(typeof(q=B[g])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(q))throw Error(m+g+" invalid: "+q);Xr=q.slice(0,10)=="0123456789",tr=q}}return{DECIMAL_PLACES:bt,ROUNDING_MODE:Tt,EXPONENTIAL_AT:[xt,dn],RANGE:[Kr,er],CRYPTO:Jr,MODULO_MODE:Cn,POW_PRECISION:zt,FORMAT:fn,ALPHABET:tr}},Ae.isBigNumber=function(B){if(!B||B._isBigNumber!==!0)return!1;if(!Ae.DEBUG)return!0;var g,q,Q=B.c,V=B.e,te=B.s;e:if({}.toString.call(Q)=="[object Array]"){if((te===1||te===-1)&&V>=-E&&V<=E&&V===d(V)){if(Q[0]===0){if(V===0&&Q.length===1)return!0;break e}if((g=(V+1)%w)<1&&(g+=w),String(Q[0]).length==g){for(g=0;g<Q.length;g++)if((q=Q[g])<0||q>=v||q!==d(q))break e;if(q!==0)return!0}}}else if(Q===null&&V===null&&(te===null||te===1||te===-1))return!0;throw Error(m+"Invalid BigNumber: "+B)},Ae.maximum=Ae.max=function(){return pa(arguments,Me.lt)},Ae.minimum=Ae.min=function(){return pa(arguments,Me.gt)},Ae.random=(oe=9007199254740992,ve=Math.random()*oe&2097151?function(){return d(Math.random()*oe)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(B){var g,q,Q,V,te,re=0,ae=[],pe=new Ae(Gt);if(B==null?B=bt:A(B,0,E),V=c(B/w),Jr)if(crypto.getRandomValues){for(g=crypto.getRandomValues(new Uint32Array(V*=2));re<V;)(te=131072*g[re]+(g[re+1]>>>11))>=9e15?(q=crypto.getRandomValues(new Uint32Array(2)),g[re]=q[0],g[re+1]=q[1]):(ae.push(te%1e14),re+=2);re=V/2}else{if(!crypto.randomBytes)throw Jr=!1,Error(m+"crypto unavailable");for(g=crypto.randomBytes(V*=7);re<V;)(te=281474976710656*(31&g[re])+1099511627776*g[re+1]+4294967296*g[re+2]+16777216*g[re+3]+(g[re+4]<<16)+(g[re+5]<<8)+g[re+6])>=9e15?crypto.randomBytes(7).copy(g,re):(ae.push(te%1e14),re+=7);re=V/7}if(!Jr)for(;re<V;)(te=ve())<9e15&&(ae[re++]=te%1e14);for(V=ae[--re],B%=w,V&&B&&(te=O[w-B],ae[re]=d(V/te)*te);ae[re]===0;ae.pop(),re--);if(re<0)ae=[Q=0];else{for(Q=-1;ae[0]===0;ae.splice(0,1),Q-=w);for(re=1,te=ae[0];te>=10;te/=10,re++);re<w&&(Q-=w-re)}return pe.e=Q,pe.c=ae,pe}),Ae.sum=function(){for(var B=1,g=arguments,q=new Ae(g[0]);B<g.length;)q=q.plus(g[B++]);return q},J=(function(){var B="0123456789";function g(q,Q,V,te){for(var re,ae,pe=[0],ye=0,he=q.length;ye<he;){for(ae=pe.length;ae--;pe[ae]*=Q);for(pe[0]+=te.indexOf(q.charAt(ye++)),re=0;re<pe.length;re++)pe[re]>V-1&&(pe[re+1]==null&&(pe[re+1]=0),pe[re+1]+=pe[re]/V|0,pe[re]%=V)}return pe.reverse()}return function(q,Q,V,te,re){var ae,pe,ye,he,Ce,Ve,We,nt,St=q.indexOf("."),Pt=bt,xe=Tt;for(St>=0&&(he=zt,zt=0,q=q.replace(".",""),Ve=(nt=new Ae(Q)).pow(q.length-St),zt=he,nt.c=g(z(h(Ve.c),Ve.e,"0"),10,V,B),nt.e=nt.c.length),ye=he=(We=g(q,Q,V,re?(ae=tr,B):(ae=B,tr))).length;We[--he]==0;We.pop());if(!We[0])return ae.charAt(0);if(St<0?--ye:(Ve.c=We,Ve.e=ye,Ve.s=te,We=(Ve=C(Ve,nt,Pt,xe,V)).c,Ce=Ve.r,ye=Ve.e),St=We[pe=ye+Pt+1],he=V/2,Ce=Ce||pe<0||We[pe+1]!=null,Ce=xe<4?(St!=null||Ce)&&(xe==0||xe==(Ve.s<0?3:2)):St>he||St==he&&(xe==4||Ce||xe==6&&1&We[pe-1]||xe==(Ve.s<0?8:7)),pe<1||!We[0])q=Ce?z(ae.charAt(1),-Pt,ae.charAt(0)):ae.charAt(0);else{if(We.length=pe,Ce)for(--V;++We[--pe]>V;)We[pe]=0,pe||(++ye,We=[1].concat(We));for(he=We.length;!We[--he];);for(St=0,q="";St<=he;q+=ae.charAt(We[St++]));q=z(q,ye,ae.charAt(0))}return q}})(),C=(function(){function B(Q,V,te){var re,ae,pe,ye,he=0,Ce=Q.length,Ve=V%f,We=V/f|0;for(Q=Q.slice();Ce--;)he=((ae=Ve*(pe=Q[Ce]%f)+(re=We*pe+(ye=Q[Ce]/f|0)*Ve)%f*f+he)/te|0)+(re/f|0)+We*ye,Q[Ce]=ae%te;return he&&(Q=[he].concat(Q)),Q}function g(Q,V,te,re){var ae,pe;if(te!=re)pe=te>re?1:-1;else for(ae=pe=0;ae<te;ae++)if(Q[ae]!=V[ae]){pe=Q[ae]>V[ae]?1:-1;break}return pe}function q(Q,V,te,re){for(var ae=0;te--;)Q[te]-=ae,ae=Q[te]<V[te]?1:0,Q[te]=ae*re+Q[te]-V[te];for(;!Q[0]&&Q.length>1;Q.splice(0,1));}return function(Q,V,te,re,ae){var pe,ye,he,Ce,Ve,We,nt,St,Pt,xe,ut,Lt,mn,Mn,jn,ar,Qr,Wt=Q.s==V.s?1:-1,qt=Q.c,vt=V.c;if(!(qt&&qt[0]&&vt&&vt[0]))return new Ae(Q.s&&V.s&&(qt?!vt||qt[0]!=vt[0]:vt)?qt&&qt[0]==0||!vt?0*Wt:Wt/0:NaN);for(Pt=(St=new Ae(Wt)).c=[],Wt=te+(ye=Q.e-V.e)+1,ae||(ae=v,ye=b(Q.e/w)-b(V.e/w),Wt=Wt/w|0),he=0;vt[he]==(qt[he]||0);he++);if(vt[he]>(qt[he]||0)&&ye--,Wt<0)Pt.push(1),Ce=!0;else{for(Mn=qt.length,ar=vt.length,he=0,Wt+=2,(Ve=d(ae/(vt[0]+1)))>1&&(vt=B(vt,Ve,ae),qt=B(qt,Ve,ae),ar=vt.length,Mn=qt.length),mn=ar,ut=(xe=qt.slice(0,ar)).length;ut<ar;xe[ut++]=0);Qr=vt.slice(),Qr=[0].concat(Qr),jn=vt[0],vt[1]>=ae/2&&jn++;do{if(Ve=0,(pe=g(vt,xe,ar,ut))<0){if(Lt=xe[0],ar!=ut&&(Lt=Lt*ae+(xe[1]||0)),(Ve=d(Lt/jn))>1)for(Ve>=ae&&(Ve=ae-1),nt=(We=B(vt,Ve,ae)).length,ut=xe.length;g(We,xe,nt,ut)==1;)Ve--,q(We,ar<nt?Qr:vt,nt,ae),nt=We.length,pe=1;else Ve==0&&(pe=Ve=1),nt=(We=vt.slice()).length;if(nt<ut&&(We=[0].concat(We)),q(xe,We,ut,ae),ut=xe.length,pe==-1)for(;g(vt,xe,ar,ut)<1;)Ve++,q(xe,ar<ut?Qr:vt,ut,ae),ut=xe.length}else pe===0&&(Ve++,xe=[0]);Pt[he++]=Ve,xe[0]?xe[ut++]=qt[mn]||0:(xe=[qt[mn]],ut=1)}while((mn++<Mn||xe[0]!=null)&&Wt--);Ce=xe[0]!=null,Pt[0]||Pt.splice(0,1)}if(ae==v){for(he=1,Wt=Pt[0];Wt>=10;Wt/=10,he++);ot(St,te+(St.e=he+ye*w-1)+1,re,Ce)}else St.e=ye,St.r=+Ce;return St}})(),Pe=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Fe=/^([^.]+)\.$/,He=/^\.([^.]+)$/,ir=/^-?(Infinity|NaN)$/,jt=/^\s*\+(?=[\w.])|^\s+|\s+$/g,x=function(B,g,q,Q){var V,te=q?g:g.replace(jt,"");if(ir.test(te))B.s=isNaN(te)?null:te<0?-1:1;else{if(!q&&(te=te.replace(Pe,(function(re,ae,pe){return V=(pe=pe.toLowerCase())=="x"?16:pe=="b"?2:8,Q&&Q!=V?re:ae})),Q&&(V=Q,te=te.replace(Fe,"$1").replace(He,"0.$1")),g!=te))return new Ae(te,V);if(Ae.DEBUG)throw Error(m+"Not a"+(Q?" base "+Q:"")+" number: "+g);B.s=null}B.c=B.e=null},Me.absoluteValue=Me.abs=function(){var B=new Ae(this);return B.s<0&&(B.s=1),B},Me.comparedTo=function(B,g){return S(this,new Ae(B,g))},Me.decimalPlaces=Me.dp=function(B,g){var q,Q,V,te=this;if(B!=null)return A(B,0,E),g==null?g=Tt:A(g,0,8),ot(new Ae(te),B+te.e+1,g);if(!(q=te.c))return null;if(Q=((V=q.length-1)-b(this.e/w))*w,V=q[V])for(;V%10==0;V/=10,Q--);return Q<0&&(Q=0),Q},Me.dividedBy=Me.div=function(B,g){return C(this,new Ae(B,g),bt,Tt)},Me.dividedToIntegerBy=Me.idiv=function(B,g){return C(this,new Ae(B,g),0,1)},Me.exponentiatedBy=Me.pow=function(B,g){var q,Q,V,te,re,ae,pe,ye,he=this;if((B=new Ae(B)).c&&!B.isInteger())throw Error(m+"Exponent not an integer: "+Er(B));if(g!=null&&(g=new Ae(g)),re=B.e>14,!he.c||!he.c[0]||he.c[0]==1&&!he.e&&he.c.length==1||!B.c||!B.c[0])return ye=new Ae(Math.pow(+Er(he),re?B.s*(2-P(B)):+Er(B))),g?ye.mod(g):ye;if(ae=B.s<0,g){if(g.c?!g.c[0]:!g.s)return new Ae(NaN);(Q=!ae&&he.isInteger()&&g.isInteger())&&(he=he.mod(g))}else{if(B.e>9&&(he.e>0||he.e<-1||(he.e==0?he.c[0]>1||re&&he.c[1]>=24e7:he.c[0]<8e13||re&&he.c[0]<=9999975e7)))return te=he.s<0&&P(B)?-0:0,he.e>-1&&(te=1/te),new Ae(ae?1/te:te);zt&&(te=c(zt/w+2))}for(re?(q=new Ae(.5),ae&&(B.s=1),pe=P(B)):pe=(V=Math.abs(+Er(B)))%2,ye=new Ae(Gt);;){if(pe){if(!(ye=ye.times(he)).c)break;te?ye.c.length>te&&(ye.c.length=te):Q&&(ye=ye.mod(g))}if(V){if((V=d(V/2))===0)break;pe=V%2}else if(ot(B=B.times(q),B.e+1,1),B.e>14)pe=P(B);else{if((V=+Er(B))==0)break;pe=V%2}he=he.times(he),te?he.c&&he.c.length>te&&(he.c.length=te):Q&&(he=he.mod(g))}return Q?ye:(ae&&(ye=Gt.div(ye)),g?ye.mod(g):te?ot(ye,zt,Tt,void 0):ye)},Me.integerValue=function(B){var g=new Ae(this);return B==null?B=Tt:A(B,0,8),ot(g,g.e+1,B)},Me.isEqualTo=Me.eq=function(B,g){return S(this,new Ae(B,g))===0},Me.isFinite=function(){return!!this.c},Me.isGreaterThan=Me.gt=function(B,g){return S(this,new Ae(B,g))>0},Me.isGreaterThanOrEqualTo=Me.gte=function(B,g){return(g=S(this,new Ae(B,g)))===1||g===0},Me.isInteger=function(){return!!this.c&&b(this.e/w)>this.c.length-2},Me.isLessThan=Me.lt=function(B,g){return S(this,new Ae(B,g))<0},Me.isLessThanOrEqualTo=Me.lte=function(B,g){return(g=S(this,new Ae(B,g)))===-1||g===0},Me.isNaN=function(){return!this.s},Me.isNegative=function(){return this.s<0},Me.isPositive=function(){return this.s>0},Me.isZero=function(){return!!this.c&&this.c[0]==0},Me.minus=function(B,g){var q,Q,V,te,re=this,ae=re.s;if(g=(B=new Ae(B,g)).s,!ae||!g)return new Ae(NaN);if(ae!=g)return B.s=-g,re.plus(B);var pe=re.e/w,ye=B.e/w,he=re.c,Ce=B.c;if(!pe||!ye){if(!he||!Ce)return he?(B.s=-g,B):new Ae(Ce?re:NaN);if(!he[0]||!Ce[0])return Ce[0]?(B.s=-g,B):new Ae(he[0]?re:Tt==3?-0:0)}if(pe=b(pe),ye=b(ye),he=he.slice(),ae=pe-ye){for((te=ae<0)?(ae=-ae,V=he):(ye=pe,V=Ce),V.reverse(),g=ae;g--;V.push(0));V.reverse()}else for(Q=(te=(ae=he.length)<(g=Ce.length))?ae:g,ae=g=0;g<Q;g++)if(he[g]!=Ce[g]){te=he[g]<Ce[g];break}if(te&&(V=he,he=Ce,Ce=V,B.s=-B.s),(g=(Q=Ce.length)-(q=he.length))>0)for(;g--;he[q++]=0);for(g=v-1;Q>ae;){if(he[--Q]<Ce[Q]){for(q=Q;q&&!he[--q];he[q]=g);--he[q],he[Q]+=v}he[Q]-=Ce[Q]}for(;he[0]==0;he.splice(0,1),--ye);return he[0]?ma(B,he,ye):(B.s=Tt==3?-1:1,B.c=[B.e=0],B)},Me.modulo=Me.mod=function(B,g){var q,Q,V=this;return B=new Ae(B,g),!V.c||!B.s||B.c&&!B.c[0]?new Ae(NaN):!B.c||V.c&&!V.c[0]?new Ae(V):(Cn==9?(Q=B.s,B.s=1,q=C(V,B,0,3),B.s=Q,q.s*=Q):q=C(V,B,0,Cn),(B=V.minus(q.times(B))).c[0]||Cn!=1||(B.s=V.s),B)},Me.multipliedBy=Me.times=function(B,g){var q,Q,V,te,re,ae,pe,ye,he,Ce,Ve,We,nt,St,Pt,xe=this,ut=xe.c,Lt=(B=new Ae(B,g)).c;if(!(ut&&Lt&&ut[0]&&Lt[0]))return!xe.s||!B.s||ut&&!ut[0]&&!Lt||Lt&&!Lt[0]&&!ut?B.c=B.e=B.s=null:(B.s*=xe.s,ut&&Lt?(B.c=[0],B.e=0):B.c=B.e=null),B;for(Q=b(xe.e/w)+b(B.e/w),B.s*=xe.s,(pe=ut.length)<(Ce=Lt.length)&&(nt=ut,ut=Lt,Lt=nt,V=pe,pe=Ce,Ce=V),V=pe+Ce,nt=[];V--;nt.push(0));for(St=v,Pt=f,V=Ce;--V>=0;){for(q=0,Ve=Lt[V]%Pt,We=Lt[V]/Pt|0,te=V+(re=pe);te>V;)q=((ye=Ve*(ye=ut[--re]%Pt)+(ae=We*ye+(he=ut[re]/Pt|0)*Ve)%Pt*Pt+nt[te]+q)/St|0)+(ae/Pt|0)+We*he,nt[te--]=ye%St;nt[te]=q}return q?++Q:nt.splice(0,1),ma(B,nt,Q)},Me.negated=function(){var B=new Ae(this);return B.s=-B.s||null,B},Me.plus=function(B,g){var q,Q=this,V=Q.s;if(g=(B=new Ae(B,g)).s,!V||!g)return new Ae(NaN);if(V!=g)return B.s=-g,Q.minus(B);var te=Q.e/w,re=B.e/w,ae=Q.c,pe=B.c;if(!te||!re){if(!ae||!pe)return new Ae(V/0);if(!ae[0]||!pe[0])return pe[0]?B:new Ae(ae[0]?Q:0*V)}if(te=b(te),re=b(re),ae=ae.slice(),V=te-re){for(V>0?(re=te,q=pe):(V=-V,q=ae),q.reverse();V--;q.push(0));q.reverse()}for((V=ae.length)-(g=pe.length)<0&&(q=pe,pe=ae,ae=q,g=V),V=0;g;)V=(ae[--g]=ae[g]+pe[g]+V)/v|0,ae[g]=v===ae[g]?0:ae[g]%v;return V&&(ae=[V].concat(ae),++re),ma(B,ae,re)},Me.precision=Me.sd=function(B,g){var q,Q,V,te=this;if(B!=null&&B!==!!B)return A(B,1,E),g==null?g=Tt:A(g,0,8),ot(new Ae(te),B,g);if(!(q=te.c))return null;if(Q=(V=q.length-1)*w+1,V=q[V]){for(;V%10==0;V/=10,Q--);for(V=q[0];V>=10;V/=10,Q++);}return B&&te.e+1>Q&&(Q=te.e+1),Q},Me.shiftedBy=function(B){return A(B,-9007199254740991,R),this.times("1e"+B)},Me.squareRoot=Me.sqrt=function(){var B,g,q,Q,V,te=this,re=te.c,ae=te.s,pe=te.e,ye=bt+4,he=new Ae("0.5");if(ae!==1||!re||!re[0])return new Ae(!ae||ae<0&&(!re||re[0])?NaN:re?te:1/0);if((ae=Math.sqrt(+Er(te)))==0||ae==1/0?(((g=h(re)).length+pe)%2==0&&(g+="0"),ae=Math.sqrt(+g),pe=b((pe+1)/2)-(pe<0||pe%2),q=new Ae(g=ae==1/0?"5e"+pe:(g=ae.toExponential()).slice(0,g.indexOf("e")+1)+pe)):q=new Ae(ae+""),q.c[0]){for((ae=(pe=q.e)+ye)<3&&(ae=0);;)if(V=q,q=he.times(V.plus(C(te,V,ye,1))),h(V.c).slice(0,ae)===(g=h(q.c)).slice(0,ae)){if(q.e<pe&&--ae,(g=g.slice(ae-3,ae+1))!="9999"&&(Q||g!="4999")){+g&&(+g.slice(1)||g.charAt(0)!="5")||(ot(q,q.e+bt+2,1),B=!q.times(q).eq(te));break}if(!Q&&(ot(V,V.e+bt+2,0),V.times(V).eq(te))){q=V;break}ye+=4,ae+=4,Q=1}}return ot(q,q.e+bt+1,Tt,B)},Me.toExponential=function(B,g){return B!=null&&(A(B,0,E),B++),pn(this,B,g,1)},Me.toFixed=function(B,g){return B!=null&&(A(B,0,E),B=B+this.e+1),pn(this,B,g)},Me.toFormat=function(B,g,q){var Q,V=this;if(q==null)B!=null&&g&&typeof g=="object"?(q=g,g=null):B&&typeof B=="object"?(q=B,B=g=null):q=fn;else if(typeof q!="object")throw Error(m+"Argument not an object: "+q);if(Q=V.toFixed(B,g),V.c){var te,re=Q.split("."),ae=+q.groupSize,pe=+q.secondaryGroupSize,ye=q.groupSeparator||"",he=re[0],Ce=re[1],Ve=V.s<0,We=Ve?he.slice(1):he,nt=We.length;if(pe&&(te=ae,ae=pe,pe=te,nt-=te),ae>0&&nt>0){for(te=nt%ae||ae,he=We.substr(0,te);te<nt;te+=ae)he+=ye+We.substr(te,ae);pe>0&&(he+=ye+We.slice(te)),Ve&&(he="-"+he)}Q=Ce?he+(q.decimalSeparator||"")+((pe=+q.fractionGroupSize)?Ce.replace(new RegExp("\\d{"+pe+"}\\B","g"),"$&"+(q.fractionGroupSeparator||"")):Ce):he}return(q.prefix||"")+Q+(q.suffix||"")},Me.toFraction=function(B){var g,q,Q,V,te,re,ae,pe,ye,he,Ce,Ve,We=this,nt=We.c;if(B!=null&&(!(ae=new Ae(B)).isInteger()&&(ae.c||ae.s!==1)||ae.lt(Gt)))throw Error(m+"Argument "+(ae.isInteger()?"out of range: ":"not an integer: ")+Er(ae));if(!nt)return new Ae(We);for(g=new Ae(Gt),ye=q=new Ae(Gt),Q=pe=new Ae(Gt),Ve=h(nt),te=g.e=Ve.length-We.e-1,g.c[0]=O[(re=te%w)<0?w+re:re],B=!B||ae.comparedTo(g)>0?te>0?g:ye:ae,re=er,er=1/0,ae=new Ae(Ve),pe.c[0]=0;he=C(ae,g,0,1),(V=q.plus(he.times(Q))).comparedTo(B)!=1;)q=Q,Q=V,ye=pe.plus(he.times(V=ye)),pe=V,g=ae.minus(he.times(V=g)),ae=V;return V=C(B.minus(q),Q,0,1),pe=pe.plus(V.times(ye)),q=q.plus(V.times(Q)),pe.s=ye.s=We.s,Ce=C(ye,Q,te*=2,Tt).minus(We).abs().comparedTo(C(pe,q,te,Tt).minus(We).abs())<1?[ye,Q]:[pe,q],er=re,Ce},Me.toNumber=function(){return+Er(this)},Me.toPrecision=function(B,g){return B!=null&&A(B,1,E),pn(this,B,g,2)},Me.toString=function(B){var g,q=this,Q=q.s,V=q.e;return V===null?Q?(g="Infinity",Q<0&&(g="-"+g)):g="NaN":(B==null?g=V<=xt||V>=dn?k(h(q.c),V):z(h(q.c),V,"0"):B===10&&Xr?g=z(h((q=ot(new Ae(q),bt+V+1,Tt)).c),q.e,"0"):(A(B,2,tr.length,"Base"),g=J(z(h(q.c),V,"0"),10,B,Q,!0)),Q<0&&q.c[0]&&(g="-"+g)),g},Me.valueOf=Me.toJSON=function(){return Er(this)},Me._isBigNumber=!0,Me[Symbol.toStringTag]="BigNumber",Me[Symbol.for("nodejs.util.inspect.custom")]=Me.valueOf,T!=null&&Ae.set(T),Ae})();const W={ROUNDING_MODE:Y.ROUND_DOWN};function U(y){return new TextEncoder().encode(y)}function F(y){return typeof y=="string"?F(X(y)):new TextDecoder().decode(y)}Y.config(W);const ce="UNKNOWN_ERROR",se="INVALID_ARGUMENT";function ne(y,T=ce,C={}){const J=[];Object.keys(C).forEach((ve=>{try{J.push(ve+"="+JSON.stringify(C[ve]))}catch{J.push(ve+"="+JSON.stringify(C[ve].toString()))}}));const x=y;J.length&&(y+=" ("+J.join(", ")+")");const oe=new Error(y);return oe.reason=x,oe.code=T,Object.keys(C).forEach((function(ve){oe[ve]=C[ve]})),oe}function X(y){if(typeof y!="string")throw new Error("hexToBytes only accept strings, got: "+typeof y);if(y.substr(0,2)==="0x")return X(y.substr(2));const T=new Uint8Array(Math.ceil(y.length/2));let C=0;for(let J=0;J<y.length;J+=2){const x=parseInt(y.substr(J,2),16);if(isNaN(x))throw new Error("Cannot read hex string:"+JSON.stringify(y));T[C]=x,C++}return T}function K(y){return Array.from(y).map((T=>T.toString(16).padStart(2,"0"))).join("")}function $(y,T){if(typeof y=="string"){if(T&&T.encoding==="hex"&&typeof y=="string"){let C=y;C.length>2&&C.substr(0,2)==="0x"&&(C=C.substr(2));const J=X(C);return u.keccak256(J)}return u.keccak256(U(y))}return u.keccak256(y)}const j={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function L(y,T,C){return new Array(T-y.length+1).join(C||"0")+y}function H(y){let T="",C=0;const J=y.length;for(y.substring(0,2)==="0x"&&(C=2);C<J;C+=2){const x=parseInt(y.substr(C,2),16);T+=String.fromCharCode(x)}return T}function N(y){return I(y)&&y.name&&y.name.indexOf("(")!==-1?y.name:y.name+"("+Z(!1,y.inputs||[]).join(",")+")"}function D(...y){const T=y.reduce(((x,oe)=>x+oe.length),0),C=new Uint8Array(T);let J=0;for(const x of y)C.set(x,J),J+=x.length;return C}function Z(y,T){const C=[];return T.forEach((function(J){if(typeof J.components=="object"){if(J.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let x="";const oe=J.type.indexOf("[");oe>=0&&(x=J.type.substring(oe));const ve=Z(y,J.components);C.push("("+ve.join(",")+")"+x)}else C.push(J.type)})),C}function Ee(y){const T=y.indexOf("("),C=y.indexOf(")");return T!==-1&&C!==-1?y.substr(0,T):y}function _e(y){const T=y.indexOf("("),C=y.indexOf(")");return T!==-1&&C!==-1?y.substr(T+1,C-T-1).replace(" ",""):""}function Se(y){return y==null?y:Ye(y).toNumber()}function Ie(y){return Ye(y).toNumber()}function ie(y){return M(y)?y.toString(10):""+y}function le(y){return typeof y=="string"&&!y.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(y)?"0x"+y:we(y)}function fe(y){if(typeof y=="string")return y.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(y)?we(y):"0x"+K(U(y));if(y instanceof Uint8Array)return"0x"+K(y);throw new Error(`toStringData: Error trying to convert ${y} (${typeof y}) to a hex string.`)}function me(y){return typeof y=="boolean"?y:Ye(y).toNumber()!==0}function Te(y){const T=Ye(y),C=T.toString(16);return T.isLessThan(0)?"-0x"+C.substr(1):"0x"+C}function we(y){if(G(y))return Te(+y);if(M(y))return Te(y);if(_(y)){const T=y;if(T.indexOf("-0x")===0)return Te(T);if(T.indexOf("0x")===0)return T;if(!isFinite(T))return K(U(T))}if(y instanceof Uint8Array)return"0x"+K(y);if(de(y)||I(y))throw new Error("toHex can only be called with scalar values, not objects or arrays");return Te(y)}function Ue(y){const T=y?y.toLowerCase():"ether",C=j[T];if(C===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(j,null,2));return new Y(C,10)}function Ye(y){let T=y||0;return M(T)?T:(typeof T=="string"&&(T=T.trim()),typeof T!="string"||T.indexOf("0x")!==0&&T.indexOf("-0x")!==0?T instanceof Uint8Array?new Y(K(T),16):new Y(T,10):new Y(T.replace("0x","").toLowerCase(),16))}function et(y){return new Y(new Array(y).fill("1").join(""),2)}function Je(y,T=256){const C=Ye(y).integerValue();return C.isLessThan(0)?et(T).plus(C).plus(1):C}function st(y,T){return L(y.toString(2),T,"0")[0]==="1"}function Mt(y){if(typeof y!="string")throw ne("invalid address",se,{arg:"address",value:y});if(y.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return y.trim().substring(0,2)!=="0x"&&(y="0x"+y),Zt(y);throw ne("invalid address",se,{arg:"address",value:y})}function gt(y,T=256){if(st(y,T)){const C=et(T);return y.minus(C).minus(1)}return y}function Ut(y){return/^0x[0-9a-f]{40}$/i.test(y)}function _t(y){return!!/^(0x)?[0-9a-f]{40}$/i.test(y)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(y)&&!/^(0x)?[0-9A-F]{40}$/.test(y))||Qt(y))}function Qt(y){const T=y.replace("0x",""),C=$(T.toLowerCase());for(let J=0;J<40;J++)if(parseInt(C[J],16)>7&&T[J].toUpperCase()!==T[J]||parseInt(C[J],16)<=7&&T[J].toLowerCase()!==T[J])return!1;return!0}function Zt(y){if(y===void 0)return"";const T=y.toLowerCase().replace("0x",""),C=$(T);let J="0x";for(let x=0;x<T.length;x++)parseInt(C[x],16)>7?J+=T[x].toUpperCase():J+=T[x];return J}function ft(y){if(!Array.isArray(y))throw new Error(`Value was not an array: ${JSON.stringify(y)}`);return y}function _r(y){return Ut(y)?y:/^[0-9a-f]{40}$/.test(y)?"0x"+y:"0x"+L(we(y).substr(2),40)}function M(y){return y instanceof Y}function _(y){return typeof y=="string"||y&&y.constructor&&y.constructor.name==="String"}function I(y){return y!==null&&!Array.isArray(y)&&typeof y=="object"}function G(y){return typeof y=="boolean"}function de(y){return Array.isArray(y)}var ge,be;function Qe(y,T){if(!y)throw new Error("jsonrpc method should be specified!");if(typeof y!="string")throw new Error(`jsonrpc must be a string, got ${typeof y}!`);return r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:y,params:T||[]}}function wt(y){return Array.isArray(y)?y.every(T):T(y);function T(C){return!!C&&(C.error===void 0||C.error===null)&&C.jsonrpc==="2.0"&&C.id!==null&&"result"in C&&C.result!==void 0}}r.TransactionStatus=void 0,(ge=r.TransactionStatus||(r.TransactionStatus={})).pending="pending",ge.confirmed="confirmed",ge.failed="failed",r.TransactionType=void 0,(be=r.TransactionType||(r.TransactionType={})).queued="queued",be.dropped="dropped",be.replaced="replaced",be.pending="pending",be.reverted="reverted",be.confirmed="confirmed",r.messageId=0;function Et(y){return Ye(y)}function At(y){return y==="latest"||y==="pending"||y==="earliest"}function rt(y){return y===void 0?"latest":Ft(y)}function Ft(y){return y==null?null:At(y)?y:we(y)}function $l(y){return y.from&&(y.from=fr(y.from)),y.to&&(y.to=fr(y.to)),y.gasPrice!==void 0&&(y.gasPrice=Te(y.gasPrice)),y.gas!==void 0&&(y.gas=Te(y.gas)),y.value!==void 0&&(y.value=Te(y.value)),y.nonce!==void 0&&(y.nonce=Te(y.nonce)),y.data&&!y.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(y.data)&&(y.data="0x"+y.data),y}function fa(y){if(typeof y!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(y));if(y.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(y));if(y.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(y));return y}function Ll(y){if(typeof y!="object")throw new Error("Did not provide transaction options");if(!y.from)throw new Error('Missing "from" in transaction options');return y.from=fr(y.from),y.to&&(y.to=fr(y.to)),y.gasPrice!==void 0&&(y.gasPrice=Te(y.gasPrice)),y.gas!==void 0&&(y.gas=Te(y.gas)),y.value!==void 0&&(y.value=Te(y.value)),y.nonce!==void 0&&(y.nonce=Te(y.nonce)),y.data&&!y.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(y.data)&&(y.data="0x"+y.data),y}function ss(y){return y?(y.blockNumber!==null&&(y.blockNumber=Ie(y.blockNumber)),y.transactionIndex!==null&&(y.transactionIndex=Ie(y.transactionIndex)),y.nonce=Ie(y.nonce),y.gas=Ie(y.gas),y.gasPrice=Ye(y.gasPrice),y.value=Ye(y.value),y):null}function E_(y){return y?(y.blockNumber!==null&&(y.blockNumber=Ie(y.blockNumber)),y.transactionIndex!==null&&(y.transactionIndex=Ie(y.transactionIndex)),y.cumulativeGasUsed=Ie(y.cumulativeGasUsed),y.gasUsed=Ie(y.gasUsed),y.effectiveGasPrice!==void 0&&y.effectiveGasPrice!==null&&(y.effectiveGasPrice=Ie(y.effectiveGasPrice)),y.logs&&de(y.logs)&&(y.logs=y.logs.map((function(T){return Lo(T)}))),y.status=Ie(y.status||""),y):null}function os(y){return y?(y.gasLimit=Ie(y.gasLimit),y.gasUsed=Ie(y.gasUsed),y.size=Ie(y.size),y.timestamp=Ie(y.timestamp),y.number!==null&&(y.number=Ie(y.number)),y.difficulty=Ye(y.difficulty),y.totalDifficulty=Ye(y.totalDifficulty),de(y.transactions)&&y.transactions.forEach((function(T,C){_(T)||(y.transactions[C]=ss(T)||y.transactions[C])})),y):null}function Lo(y){return y&&(y.blockNumber&&(y.blockNumber=Ie(y.blockNumber)),y.transactionIndex&&(y.transactionIndex=Ie(y.transactionIndex)),y.logIndex&&(y.logIndex=Ie(y.logIndex)),y)}function fr(y){if(Ut(y))return y;if(_t(y))return"0x"+y;throw new Error(`Invalid address: ${JSON.stringify(y)}`)}function v_(y){return y}function b_(y){return y&&(y.startingBlock=Ie(y.startingBlock),y.currentBlock=Ie(y.currentBlock),y.highestBlock=Ie(y.highestBlock),y.knownStates&&(y.knownStates=Ie(y.knownStates),y.pulledStates=Ie(y.pulledStates)),y)}function ql(y){if(y===null)throw ne("cannot convert null value to array",se,{arg:"value",value:y});if(y instanceof Uint8Array)return new Uint8Array(y);if(typeof y=="string"){const T=y.match(/^(0x)?[0-9a-fA-F]*$/);if(!T)throw ne("invalid hexidecimal string",se,{arg:"value",value:y});if(T[1]!=="0x")throw ne("hex string must have 0x prefix",se,{arg:"value",value:y});(y=y.substring(2)).length%2&&(y="0"+y);const C=[];for(let J=0;J<y.length;J+=2)C.push(parseInt(y.substr(J,2),16));return new Uint8Array(C)}if((function(T){if(!T||parseInt(String(T.length))!==T.length||typeof T=="string")return!1;for(let C=0;C<T.length;C++){const J=T[C];if(J<0||J>=256||parseInt(String(J))!==J)return!1}return!0})(y))return new Uint8Array(y);throw ne("invalid arrayify value",void 0,{arg:"value",value:y,type:typeof y})}function T_(y,T,C){Object.defineProperty(y,T,{enumerable:!0,value:C,writable:!1})}const aC=new Y(-1),sC=new Y(0),oC=new Y(1),S_=new Y("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function I_(y){return(function(T,C){function J(ve){return new Error('unexpected character "'+T[ve]+'" at position '+ve+' in "'+T+'"')}const x={type:"",name:"",state:{allowType:!0}};let oe=x;for(let ve=0;ve<T.length;ve++){const Pe=T[ve];switch(Pe){case"(":if(!oe.state.allowParams)throw J(ve);oe.state.allowType=!1,oe.type=us(oe.type),oe.components=[{type:"",name:"",parent:oe,state:{allowType:!0}}],oe=oe.components[0];break;case")":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=us(oe.type);const Fe=oe;if(oe=oe.parent,!oe)throw J(ve);delete Fe.parent,oe.state.allowParams=!1,oe.state.allowName=!0,oe.state.allowArray=!0;break;case",":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=us(oe.type);const He={type:"",name:"",parent:oe.parent,state:{allowType:!0}};oe.parent.components.push(He),delete oe.parent,oe=He;break;case" ":oe.state.allowType&&oe.type!==""&&(oe.type=us(oe.type),delete oe.state.allowType,oe.state.allowName=!0,oe.state.allowParams=!0),oe.state.allowName&&oe.name!==""&&(oe.name==="indexed"?(oe.indexed=!0,oe.name=""):oe.state.allowName=!1);break;case"[":if(!oe.state.allowArray)throw J(ve);oe.type+=Pe,oe.state.allowArray=!1,oe.state.allowName=!1,oe.state.readArray=!0;break;case"]":if(!oe.state.readArray)throw J(ve);oe.type+=Pe,oe.state.readArray=!1,oe.state.allowArray=!0,oe.state.allowName=!0;break;default:if(oe.state.allowType)oe.type+=Pe,oe.state.allowParams=!0,oe.state.allowArray=!0;else if(oe.state.allowName)oe.name+=Pe,delete oe.state.allowArray;else{if(!oe.state.readArray)throw J(ve);oe.type+=Pe}}}if(oe.parent)throw new Error("unexpected eof");return delete x.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),x.type=us(x.type),x})(y)}function us(y){return y.match(/^uint($|[^1-9])/)?y="uint256"+y.substring(4):y.match(/^int($|[^1-9])/)&&(y="int256"+y.substring(3)),y}const uC=new RegExp(/^bytes([0-9]*)$/),R_=new RegExp(/^(u?int)([0-9]*)$/),cC=new RegExp(/^(.*)\[([0-9]*)\]$/),lC=function(y,T){const C=y.match(R_);return C&&parseInt(C[2])<=48?T.toNumber():T};class Yr{constructor(T,C,J,x="",oe){this.coerceFunc=T,this.name=C,this.type=J,this.localName=x,this.dynamic=oe}}class dC extends Yr{constructor(T){super(T.coerceFunc,T.name,T.type,void 0,T.dynamic),T_(this,"coder",T)}encode(T){return this.coder.encode(T)}decode(T,C){return this.coder.decode(T,C)}}class fC extends Yr{constructor(T,C){super(T,"null","",C,!1)}encode(T){return ql([])}decode(T,C){if(C>T.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function qo(y,T){return new Y(y.toString(2).substr(-T),2)}class w_ extends Yr{constructor(T,C,J,x){const oe=(J?"int":"uint")+8*C;super(T,oe,oe,x,!1),this.size=C,this.signed=J}encode(T){try{let C=Ye(T);if(this.signed){let x=qo(S_,8*this.size-1);if(C.gt(x))throw new Error("out-of-bounds");if(x=x.plus(oC).multipliedBy(aC),C.lt(x))throw new Error("out-of-bounds")}else if(C.lt(sC)||C.gt(qo(S_,8*this.size)))throw new Error("out-of-bounds");C=qo(Je(C,8*this.size),8*this.size),this.signed&&(C=Je(gt(C,8*this.size),256));const J=L(Je(C).toString(16),64);if(J.indexOf("NaN")!==-1)throw ne("invalid number value, NaN",se,{arg:this.localName,coderType:this.name,value:T,v:C,twosComplement:Je(C),twosComplement16:Je(C).toString(16),pad:L(Je(C).toString(16),64),size:this.size});return X(J)}catch(C){throw ne("invalid number value",se,{arg:this.localName,coderType:this.name,value:T,message:C.toString()})}}decode(T,C){if(T.length<C+32)throw ne("insufficient data for "+this.name+" type",se,{arg:this.localName,coderType:this.name,value:we(T.slice(C,C+32))});const J=32-this.size;let x=new Y(K(T.slice(C+J,C+32)),16);return x=this.signed?gt(x,8*this.size):qo(x,8*this.size),{consumed:32,value:this.coerceFunc(this.name,x)}}}const ln=new w_((function(y,T){return T}),32,!1,"none");class A_ extends Yr{constructor(T,C,J){const x="bytes"+C;super(T,x,x,J,!1),this.length=C}encode(T){const C=new Uint8Array(32);try{if(typeof T=="string"&&T.length%2!=0)throw new Error("hex string cannot be odd-length");const J=ql(T);if(J.length>this.length)throw new Error("incorrect data length");C.set(J)}catch(J){throw ne("invalid "+this.name+" value. Use hex strings or Uint8Array",se,{arg:this.localName,coderType:this.name,value:J.value||T,details:J.message})}return C}decode(T,C){if(T.length<C+32)throw ne("insufficient data for "+this.name+" type",se,{arg:this.localName,coderType:this.name,value:we(T.slice(C,C+32))});return{consumed:32,value:this.coerceFunc(this.name,T.slice(C,C+this.length))}}}function O_(y){const T=32*Math.ceil(y.length/32),C=new Uint8Array(T-y.length);return D(ln.encode(y.length),y,C)}function N_(y,T,C){if(y.length<T+32)throw ne("insufficient data for dynamicBytes length",se,{arg:C,coderType:"dynamicBytes",value:we(y.slice(T,T+32))});let J=ln.decode(y,T).value;try{J=J.toNumber()}catch(x){throw x("dynamic bytes count too large",se,{arg:C,coderType:"dynamicBytes",value:J.toString()})}if(y.length<T+32+J)throw ne("insufficient data for dynamicBytes type",se,{arg:C,coderType:"dynamicBytes",value:we(y.slice(T,T+32+J))});return{consumed:32+32*Math.ceil(J/32),value:y.slice(T+32,T+32+J)}}function ko(y){return 32*Math.ceil(y/32)}function P_(y,T){if(!Array.isArray(T)){if(!T||typeof T!="object")throw ne("invalid tuple value",se,{coderType:"tuple",value:T});{const Fe=[];y.forEach((function(He){Fe.push(T[He.localName])})),T=Fe}}if(y.length!==T.length)throw ne("types/value length mismatch",se,{coderType:"tuple",value:T});const C=[];y.forEach((function(Fe,He){C.push({dynamic:Fe.dynamic,value:Fe.encode(T[He])})}));let J=0,x=0;C.forEach((function(Fe){Fe.dynamic?(J+=32,x+=ko(Fe.value.length)):J+=ko(Fe.value.length)}));let oe=0,ve=J;const Pe=new Uint8Array(J+x);return C.forEach((function(Fe){Fe.dynamic?(Pe.set(ln.encode(ve),oe),oe+=32,Pe.set(Fe.value,ve),ve+=ko(Fe.value.length)):(Pe.set(Fe.value,oe),oe+=ko(Fe.value.length))})),Pe}class pC extends Array{}class mC extends Yr{constructor(T,C,J,x){super(T,"array",C.type+"["+(J>=0?J:"")+"]",x,J===-1||C.dynamic),this.coder=C,this.length=J}encode(T){if(!Array.isArray(T))throw ne("expected array value",se,{arg:this.localName,coderType:"array",value:T});let C=this.length,J=new Uint8Array(0);C===-1&&(C=T.length,J=ln.encode(C)),(function(oe,ve,Pe){if(Pe||(Pe=""),oe<ve)throw ne("missing argument"+Pe,"MISSING_ARGUMENT",{count:oe,expectedCount:ve});if(oe>ve)throw ne("too many arguments"+Pe,"UNEXPECTED_ARGUMENT",{count:oe,expectedCount:ve})})(C,T.length,"in coder array"+(this.localName?" "+this.localName:""));const x=[];for(let oe=0;oe<T.length;oe++)x.push(this.coder);return D(J,P_(x,T))}decode(T,C){let J=0,x=this.length;if(x===-1){let Pe;try{Pe=ln.decode(T,C)}catch(Fe){throw ne("insufficient data for dynamic array length",se,{arg:this.localName,coderType:"array",value:Fe.value})}try{x=Pe.value.toNumber()}catch{throw ne("array count too large",se,{arg:this.localName,coderType:"array",value:Pe.value.toString()})}J+=Pe.consumed,C+=Pe.consumed}const oe=[];for(let Pe=0;Pe<x;Pe++)oe.push(new dC(this.coder));const ve=(function(Pe,Fe,He){const ir=He;let jt=0;const Me=[];return Pe.forEach((function(Gt){let bt;if(Gt.dynamic){const Tt=ln.decode(Fe,He);bt=Gt.decode(Fe,ir+Tt.value.toNumber()),bt.consumed=Tt.consumed}else bt=Gt.decode(Fe,He);bt.value!==void 0&&Me.push(bt.value),He+=bt.consumed,jt+=bt.consumed})),{value:Me,consumed:jt}})(oe,T,C);return ve.consumed+=J,ve.value=this.coerceFunc(this.type,ve.value),ve}}class kl extends Yr{constructor(T,C,J){let x=!1;const oe=[];C.forEach((function(ve){ve.dynamic&&(x=!0),oe.push(ve.type)})),super(T,"tuple","tuple("+oe.join(",")+")",J,x),this.coders=C}encode(T){return P_(this.coders,T)}decode(T,C){const J=(function(x,oe,ve){const Pe=ve;let Fe=0;const He=new pC;return x.forEach((function(ir){let jt;if(ir.dynamic){const Me=ln.decode(oe,ve);jt=ir.decode(oe,Pe+Me.value.toNumber()),jt.consumed=Me.consumed}else jt=ir.decode(oe,ve);jt.value!==void 0&&He.push(jt.value),ve+=jt.consumed,Fe+=jt.consumed})),x.forEach((function(ir,jt){let Me=ir.localName;Me&&(Me==="length"&&(Me="_length"),He[Me]!==null&&He[Me]!==void 0||(He[Me]=He[jt]))})),{value:He,consumed:Fe}})(this.coders,T,C);return J.value=this.coerceFunc(this.type,J.value),J}}const hC={address:class extends Yr{constructor(y,T){super(y,"address","address",T,!1)}encode(y){const T=new Uint8Array(32),C=y.trim();if(!_t(C))throw ne("invalid address format",se,{arg:this.localName,coderType:"address",value:y});try{T.set(X(fr(C)),12)}catch(J){throw ne(`invalid address (${J.message})`,se,{arg:this.localName,coderType:"address",value:y})}return T}decode(y,T){if(y.length<T+32)throw ne("insufficuent data for address type",se,{arg:this.localName,coderType:"address",value:we(y.slice(T,T+32)),missingBytes:T+32-y.length});return{consumed:32,value:this.coerceFunc("address",Mt(we(y.slice(T+12,T+32))))}}},bool:class extends Yr{constructor(y,T){super(y,"bool","bool",T,!1)}encode(y){return ln.encode(y?1:0)}decode(y,T){try{const C=ln.decode(y,T);return{consumed:C.consumed,value:this.coerceFunc("bool",!C.value.isZero())}}catch(C){throw C.reason==="insufficient data for uint256 type"?ne("insufficient data for boolean type",se,{arg:this.localName,coderType:"boolean",value:C.value}):C}}},string:class extends Yr{constructor(y,T){super(y,"string","string",T,!0)}encode(y){if(typeof y!="string")throw ne("invalid string value",se,{arg:this.localName,coderType:"string",value:y});return O_(U(y))}decode(y,T){const C=N_(y,T,this.localName);return C.value=this.coerceFunc("string",F(C.value)),C}},bytes:class extends Yr{constructor(y,T){super(y,"bytes","bytes",T,!0)}encode(y){try{return O_(ql(y))}catch(T){throw T("invalid bytes value",se,{arg:this.localName,coderType:"bytes",value:T.value})}}decode(y,T){const C=N_(y,T,this.localName);return C.value=this.coerceFunc("bytes",C.value),C}},function:class extends A_{constructor(y,T){super(y,24,T)}}};function Bo(y,T){const C=hC[T.type];if(C)return new C(y,T.name);let J=T.type.match(R_);if(J){const x=parseInt(J[2]||"256");if(x===0||x>256||x%8!=0)throw ne("invalid "+J[1]+" bit length",se,{arg:"param",value:T});return new w_(y,x/8,J[1]==="int",T.name)}if(J=T.type.match(uC),J){const x=parseInt(J[1]);if(x===0||x>32)throw ne("invalid bytes length",se,{arg:"param",value:T});return new A_(y,x,T.name)}if(J=T.type.match(cC),J){const x=Object.assign({},T),oe=parseInt(J[2]||"-1");return x.type=J[1],new mC(y,Bo(y,x),oe,T.name)}if(T.type.substring(0,5)==="tuple")return(function(x,oe,ve){oe||(oe=[]);const Pe=oe.map((Fe=>Bo(x,Fe)));return new kl(x,Pe,ve)})(y,T.components,T.name);if(T.type==="")return new fC(y,T.name);throw ne("invalid type",se,{arg:"type",value:T.type,fullType:T})}class Bl{constructor(T){(function(C,J){if(!(C instanceof J))throw ne("missing new","MISSING_NEW",{name:J.name})})(this,Bl),T||(T=lC),T_(this,"coerceFunc",T)}encode(T,C){if(T.length!==C.length)throw ne("types/values length mismatch",se,{count:{types:T.length,values:C.length},value:{types:T,values:C}});const J=T.map((x=>typeof x=="string"?I_(x):x)).map((x=>Bo(this.coerceFunc,x)));return new kl(this.coerceFunc,J,"_").encode(C)}decode(T,C){const J=T.map((x=>typeof x=="string"?I_(x):x)).map((x=>Bo(this.coerceFunc,x)));return new kl(this.coerceFunc,J,"_").decode(C,0).value}}const C_=new Bl;var M_,$e;function Le(y,T,C,J){var x,oe=arguments.length,ve=oe<3?T:J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(y,T,C,J);else for(var Pe=y.length-1;Pe>=0;Pe--)(x=y[Pe])&&(ve=(oe<3?x(ve):oe>3?x(T,C,ve):x(T,C))||ve);return oe>3&&ve&&Object.defineProperty(T,C,ve),ve}function qe(y,T){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(y,T)}r.coder=void 0,(M_=r.coder||(r.coder={})).encodeParams=function(y,T){return K(C_.encode(y,T))},M_.decodeParams=function(y,T){if(y.length>0&&(!T||T==="0x"||T==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return C_.decode(y,X("0x"+T.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class Ge{constructor(T){this.callName=T.callName,this.params=T.params||0,this.inputFormatter=T.inputFormatter||null,this.outputFormatter=T.outputFormatter}validateArgs(T){if(T.length!==this.params)throw C=this.callName,J=T.length,x=this.params,new Error(`Invalid number of input parameters to RPC method "${C}" given: ${J}, expected: ${x}`);var C,J,x}formatInput(T){return this.inputFormatter?this.inputFormatter.map((function(C,J){return C?C(T[J]):T[J]})):T}formatOutput(T){return T!==null?this.outputFormatter(T):null}toPayload(T){const C=this.formatInput(T);return this.validateArgs(C),{method:this.callName,params:C}}async execute(T,...C){const J=this.toPayload(C);if(!T)throw new Error("Missing RequestManager in method#exec");const x=await T.sendAsync(J);return this.formatOutput(x)}}class pr{constructor(T){this.getter=T.getter,this.outputFormatter=T.outputFormatter}formatOutput(T){return this.outputFormatter(T)}async execute(T,...C){const J=await T.sendAsync({method:this.getter,params:[]});return this.formatOutput(J)}}function j_(y){return new Promise((T=>setTimeout(T,y)))}r.eth=void 0,($e=r.eth||(r.eth={})).eth_getBalance=new Ge({callName:"eth_getBalance",params:2,inputFormatter:[fr,rt],outputFormatter:Et}),$e.eth_getStorageAt=new Ge({callName:"eth_getStorageAt",params:3,inputFormatter:[fr,we,rt],outputFormatter:le}),$e.eth_getCode=new Ge({callName:"eth_getCode",params:2,inputFormatter:[fr,rt],outputFormatter:le}),$e.eth_getBlockByHash=new Ge({callName:"eth_getBlockByHash",params:2,inputFormatter:[Ft,function(y){return!!y}],outputFormatter:os}),$e.eth_getBlockByNumber=new Ge({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Ft,function(y){return!!y}],outputFormatter:os}),$e.eth_getUncleByBlockHashAndIndex=new Ge({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Ft,we],outputFormatter:os}),$e.eth_getUncleByBlockNumberAndIndex=new Ge({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Ft,we],outputFormatter:os}),$e.eth_getBlockTransactionCountByHash=new Ge({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Ft],outputFormatter:Ie}),$e.eth_getBlockTransactionCountByNumber=new Ge({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Ft],outputFormatter:Ie}),$e.eth_getUncleCountByBlockHash=new Ge({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Ft],outputFormatter:Ie}),$e.eth_getUncleCountByBlockNumber=new Ge({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Ft],outputFormatter:Ie}),$e.eth_getTransactionByHash=new Ge({callName:"eth_getTransactionByHash",params:1,inputFormatter:[fa],outputFormatter:ss}),$e.eth_getTransactionByBlockHashAndIndex=new Ge({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Ft,we],outputFormatter:ss}),$e.eth_getTransactionByBlockNumberAndIndex=new Ge({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Ft,we],outputFormatter:ss}),$e.eth_getTransactionReceipt=new Ge({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[fa],outputFormatter:E_}),$e.eth_getTransactionCount=new Ge({callName:"eth_getTransactionCount",params:2,inputFormatter:[fr,rt],outputFormatter:Ie}),$e.eth_sendRawTransaction=new Ge({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:le}),$e.web3_sha3=new Ge({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:le}),$e.eth_sendTransaction=new Ge({callName:"eth_sendTransaction",params:1,inputFormatter:[Ll],outputFormatter:le}),$e.eth_sign=new Ge({callName:"eth_sign",params:2,inputFormatter:[fr,null],outputFormatter:le}),$e.eth_call=new Ge({callName:"eth_call",params:2,inputFormatter:[$l,rt],outputFormatter:le}),$e.eth_estimateGas=new Ge({callName:"eth_estimateGas",params:1,inputFormatter:[$l],outputFormatter:Ie}),$e.eth_submitWork=new Ge({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:me}),$e.eth_getWork=new Ge({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:ft}),$e.eth_coinbase=new pr({getter:"eth_coinbase",outputFormatter:_r}),$e.eth_mining=new pr({getter:"eth_mining",outputFormatter:me}),$e.eth_hashrate=new pr({getter:"eth_hashrate",outputFormatter:Ie}),$e.eth_syncing=new pr({getter:"eth_syncing",outputFormatter:b_}),$e.eth_gasPrice=new pr({getter:"eth_gasPrice",outputFormatter:Et}),$e.eth_accounts=new pr({getter:"eth_accounts",outputFormatter:ft}),$e.eth_blockNumber=new pr({getter:"eth_blockNumber",outputFormatter:Ie}),$e.eth_protocolVersion=new pr({getter:"eth_protocolVersion",outputFormatter:Ie}),$e.web3_clientVersion=new pr({getter:"web3_clientVersion",outputFormatter:ie}),$e.net_version=new pr({getter:"net_version",outputFormatter:ie}),$e.shh_version=new Ge({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Ie}),$e.shh_post=new Ge({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:me}),$e.personal_newAccount=new Ge({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:_r}),$e.personal_importRawKey=new Ge({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:_r}),$e.personal_sign=new Ge({callName:"personal_sign",params:3,inputFormatter:[fe,fr,null],outputFormatter:le}),$e.personal_ecRecover=new Ge({callName:"personal_ecRecover",params:2,inputFormatter:[fe,null],outputFormatter:_r}),$e.personal_unlockAccount=new Ge({callName:"personal_unlockAccount",params:3,inputFormatter:[fr,null,Se],outputFormatter:me}),$e.personal_sendTransaction=new Ge({callName:"personal_sendTransaction",params:2,inputFormatter:[Ll,null],outputFormatter:le}),$e.personal_lockAccount=new Ge({callName:"personal_lockAccount",params:1,inputFormatter:[fr],outputFormatter:me}),$e.personal_listAccounts=new pr({getter:"personal_listAccounts",outputFormatter:ft}),$e.net_listening=new pr({getter:"net_listening",outputFormatter:me}),$e.net_peerCount=new pr({getter:"net_peerCount",outputFormatter:Ie}),$e.eth_newFilter=new Ge({callName:"eth_newFilter",params:1,inputFormatter:[v_],outputFormatter:we}),$e.eth_getLogs=new Ge({callName:"eth_getLogs",params:1,inputFormatter:[ft],outputFormatter:ft}),$e.eth_newBlockFilter=new Ge({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:we}),$e.eth_newPendingTransactionFilter=new Ge({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:we}),$e.eth_uninstallFilter=new Ge({callName:"eth_uninstallFilter",params:1,inputFormatter:[we],outputFormatter:me}),$e.eth_getFilterLogs=new Ge({callName:"eth_getFilterLogs",params:1,inputFormatter:[we],outputFormatter:ft}),$e.eth_getFilterChanges=new Ge({callName:"eth_getFilterChanges",params:1,inputFormatter:[we],outputFormatter:ft}),$e.eth_submitHashrate=new Ge({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:me}),$e.shh_newIdentity=new Ge({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:le}),$e.shh_hasIdentity=new Ge({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:me}),$e.shh_newGroup=new Ge({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:le}),$e.shh_addToGroup=new Ge({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:me}),$e.shh_newFilter=new Ge({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:we}),$e.shh_uninstallFilter=new Ge({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:me}),$e.shh_getLogs=new Ge({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:ft}),$e.shh_getFilterMessages=new Ge({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:ft}),$e.shh_getFilterChanges=new Ge({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:ft}),$e.shh_getMessages=new Ge({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:ft});function ke(y,T){const C=r.eth[T];if(!C)throw new Error(`Could not find the method/property named ${T.toString()}`);Object.defineProperty(y,T,{value:function(...J){return C.execute(this,...J)}})}class De{constructor(T){this.provider=T,this.requests=new Map}async sendAsync(T){const C=await this.provider;if(!C)throw new Error("Provider not set or invalid");const J=Qe(T.method,T.params),x=s();return this.requests.set(J.id,x),C.sendAsync(J,((oe,ve)=>{this.requests.delete(J.id),oe?x.reject(oe):wt(ve)?x.resolve(ve.result):x.reject((function(Pe){const Fe=Pe&&Pe.error&&Pe.error.message?Pe.error.message:"Invalid JSON RPC response: "+JSON.stringify(Pe);return new Error(Fe)})(ve))})),x}setProvider(T){this.provider=T}async getConfirmedTransaction(T){const C=await this.waitForCompletion(T);if(this.isFailure(C))throw new Error(`Transaction "${T}" failed`);return C}async waitForCompletion(T,C){const J=fa(T);if(await this.isTxDropped(J,C)){const x=await this.getTransactionAndReceipt(J);return Object.assign(Object.assign({},x),{status:r.TransactionStatus.failed})}for(;;){const x=await this.getTransactionAndReceipt(J);if(!this.isPending(x)&&x.receipt)return Object.assign(Object.assign({},x),{status:this.isFailure(x)?r.TransactionStatus.failed:r.TransactionStatus.confirmed});await j_(2e3)}}async getTransaction(T){let C,J=null;const x=fa(T);try{const ve=(await this.eth_accounts())[0];ve&&(J=await this.eth_getTransactionCount(ve,"latest"))}catch{J=null}try{if(C=await this.eth_getTransactionByHash(x),C===null)return null}catch{return null}if(C.blockNumber===null){if(J!==null){if(C.nonce<J)return{hash:x,type:r.TransactionType.replaced,nonce:C.nonce};if(C.nonce>J)return{hash:x,type:r.TransactionType.queued,nonce:C.nonce}}return Object.assign({type:r.TransactionType.pending},C)}let oe;try{if(oe=await this.eth_getTransactionReceipt(x),oe===null||oe.status===0)return Object.assign({type:r.TransactionType.reverted},C)}catch{return null}return Object.assign(Object.assign({type:r.TransactionType.confirmed},C),{receipt:oe})}async isTxDropped(T,C=15){let J=C;for(;J>0;){if(await this.getTransactionAndReceipt(T)!==null)return!1;J-=1,await j_(2e3)}return!0}async getTransactionAndReceipt(T){T=fa(T);const[C,J]=await Promise.all([this.eth_getTransactionByHash(T),this.eth_getTransactionReceipt(T)]);return Object.assign(Object.assign({},C),{receipt:J})}isPending(T){return T&&T.blockNumber===null}isFailure(T){return T&&(!T.receipt||T.receipt.status===0)}}Le([ke,qe("design:type",Function)],De.prototype,"web3_clientVersion",void 0),Le([ke,qe("design:type",Function)],De.prototype,"web3_sha3",void 0),Le([ke,qe("design:type",Function)],De.prototype,"net_version",void 0),Le([ke,qe("design:type",Function)],De.prototype,"net_peerCount",void 0),Le([ke,qe("design:type",Function)],De.prototype,"net_listening",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_protocolVersion",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_syncing",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_coinbase",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_mining",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_hashrate",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_gasPrice",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_accounts",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_blockNumber",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getBalance",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getStorageAt",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getTransactionCount",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getBlockTransactionCountByHash",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getBlockTransactionCountByNumber",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getUncleCountByBlockHash",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getUncleCountByBlockNumber",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getCode",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_sign",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_sendTransaction",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_sendRawTransaction",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_call",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_estimateGas",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getBlockByHash",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getBlockByNumber",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getTransactionByHash",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getTransactionReceipt",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_newFilter",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_newBlockFilter",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_newPendingTransactionFilter",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_uninstallFilter",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getFilterChanges",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getFilterLogs",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getLogs",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_getWork",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_submitWork",void 0),Le([ke,qe("design:type",Function)],De.prototype,"eth_submitHashrate",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_post",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_version",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_newIdentity",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_hasIdentity",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_newGroup",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_addToGroup",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_newFilter",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_uninstallFilter",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_getFilterChanges",void 0),Le([ke,qe("design:type",Function)],De.prototype,"shh_getMessages",void 0),Le([ke,qe("design:type",Function)],De.prototype,"personal_unlockAccount",void 0),Le([ke,qe("design:type",Function)],De.prototype,"personal_newAccount",void 0),Le([ke,qe("design:type",Function)],De.prototype,"personal_listAccounts",void 0),Le([ke,qe("design:type",Function)],De.prototype,"personal_lockAccount",void 0),Le([ke,qe("design:type",Function)],De.prototype,"personal_importRawKey",void 0),Le([ke,qe("design:type",Function)],De.prototype,"personal_sendTransaction",void 0),Le([ke,qe("design:type",Function)],De.prototype,"personal_sign",void 0),Le([ke,qe("design:type",Function)],De.prototype,"personal_ecRecover",void 0);class D_{constructor(T){this.json=T,this._inputTypes=T.inputs||[],this._outputTypes=T.outputs||[],this._constant=!!T.constant,this._payable=!!T.payable||T.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in T&&!T.constant||T.stateMutability==="nonpayable",this._name=N(T)}extractDefaultBlock(T){return T.length>this._inputTypes.length&&!I(T[T.length-1])&&rt(T.pop())||"latest"}validateArgs(T){if(T.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const C=T.filter((function(oe){return!(I(oe)===!0&&de(oe)===!1&&M(oe)===!1&&!(oe instanceof Uint8Array))}));if(C.length!==this._inputTypes.length)throw J=C.length,x=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${J}, expected: ${x}`);var J,x}toPayload(T){let C={to:void 0,data:void 0,value:void 0,from:void 0};T.length>this._inputTypes.length&&I(T[T.length-1])&&(C=T.pop()),this.validateArgs(T);const J=this.signature();let x=r.coder.encodeParams(this._inputTypes,T);return x.indexOf("0x")===0&&(x=x.substr(2)),C.data="0x"+J+x,C}signature(){return $(this._name).slice(0,8)}unpackOutput(T){if(!T)return;const C=T.length>=2?T.slice(2):T,J=r.coder.decodeParams(this._outputTypes,C);return J.length===1?J[0]:J}async execute(T,C,...J){if(!T)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const x=this.toPayload(J);if(x.to=C,x.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!x.from)throw new Error('Missing "from" in transaction options');return await T.eth_sendTransaction(x)}{const x=this.extractDefaultBlock(J),oe=this.toPayload(J);oe.to=C;const ve=await T.eth_call(oe,x);return this.unpackOutput(ve)}}estimateGas(T,C,...J){if(!(T instanceof De))throw new Error("estimateGas needs to receive a RequestManager as first argument");const x=this.toPayload(J);return x.to=C,T.eth_estimateGas(x)}displayName(){return Ee(this._name)}typeName(){return _e(this._name)||"void"}attachToContract(T){const C=this.displayName(),J=Object.assign(((...x)=>this.execute(T.requestManager,T.address,...x)),{estimateGas:this.estimateGas.bind(this,T.requestManager,T.address),toPayload:(...x)=>this.toPayload(x),toRPCMessage:(...x)=>{const oe=this.extractDefaultBlock(x),ve=this.toPayload(x);return ve.to=T.address,{method:"eth_call",params:[ve,oe]}},unpackOutput:x=>this.unpackOutput(x)});T[C]||(T[C]=J),T[C][this.typeName()]=J}}function $_(y){if(y==null)return null;const T=String(y).toString();return T.indexOf("0x")===0?T:K(U(T))}class Ul{constructor(T){this.requestManager=T,this.isStarted=!1,this.isDisposed=!1,this.formatter=C=>C,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(T){if(this.isDisposed)throw new Error("The filter was disposed");T&&(this.callbacks.push(T),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const T=await this.getNewFilter();if(!T)throw new Error("Could not create a filter, response: "+JSON.stringify(T));this.filterId.resolve(T)}catch(T){throw T}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const T=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${T}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const C=await this.getChanges();C&&this.callbacks.forEach((J=>{this.formatter?C.forEach((x=>{J(this.formatter(x))})):C.forEach((x=>J(x)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((T=()=>this.poll(),function(){T().catch((C=>console.error(C)))}),500))}else this.stopSemaphore.resolve(1);var T}}class cs extends Ul{constructor(T,C,J=(x=>x)){super(T),this.requestManager=T,this.options=C,this.formatter=J,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(x){return $_(x)})),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?Ft(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Ft(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const T=await this.filterId;return this.requestManager.eth_getFilterLogs(T)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const T=await this.filterId;return this.requestManager.eth_getFilterChanges(T)}async uninstall(){const T=await this.filterId;return this.requestManager.eth_uninstallFilter(T)}}class Fl{constructor(T,C,J){this.requestManager=T,this.address=J,this._anonymous=!1,this._params=C.inputs||[],this._name=N(C),this._anonymous=C.anonymous||!1}types(T){return this._params.filter((function(C){return C.indexed===T}))}displayName(){return Ee(this._name)}typeName(){return _e(this._name)||"void"}signature(){return $(this._name)}encode(T={},C={}){const J={topics:[],address:this.address};C.fromBlock!==void 0&&(J.fromBlock=Ft(C.fromBlock)||void 0),C.toBlock!==void 0&&(J.toBlock=Ft(C.toBlock)||void 0),J.topics=J.topics||[],this._anonymous||J.topics.push("0x"+this.signature());const x=this._params.filter((function(oe){return oe.indexed===!0})).map((function(oe){const ve=T[oe.name];return ve==null?null:de(ve)?ve.map((function(Pe){return"0x"+r.coder.encodeParams([oe],[Pe])})):"0x"+r.coder.encodeParams([oe],[ve])}));return J.topics=J.topics.concat(x),J}decode(T){T.data=T.data||"",T.topics=T.topics||[];const C=(this._anonymous?T.topics:T.topics.slice(1)).map((function(Pe){return Pe.slice(2)})).join(""),J=r.coder.decodeParams(this.types(!0),C),x=T.data.slice(2),oe=r.coder.decodeParams(this.types(!1),x),ve=this._params.reduce((function(Pe,Fe){return Pe[Fe.name]=Fe.indexed?J.shift():oe.shift(),Pe}),{});return Object.assign(Object.assign({},Lo(T)),{event:this.displayName(),address:T.address,args:ve})}async execute(T,C){const J=this.encode(T,C),x=this.decode.bind(this);return new cs(this.requestManager,J,x)}attachToContract(T){const C=this.execute.bind(this),J=this.displayName();T.events[J]||(T.events[J]=C),T.events[J][this.typeName()]=this.execute.bind(this,T)}}class yC{constructor(T,C,J){this._requestManager=T,this._json=C,this._address=J}encode(T={}){const C={address:this._address};return T.fromBlock!==void 0&&(C.fromBlock=Ft(T.fromBlock)||void 0),T.toBlock!==void 0&&(C.toBlock=Ft(T.toBlock)||void 0),C}decode(T){T.data=T.data||"";const C=de(T.topics)&&_(T.topics[0])?T.topics[0].slice(2):"",J=this._json.filter((function(x){return C===$(N(x))}))[0];return J?new Fl(this._requestManager,J,this._address).decode(T):Lo(T)}async execute(T){const C=this.encode(T),J=this.decode.bind(this);return new cs(this._requestManager,C,J)}getAllEventsFunction(){return this.execute.bind(this)}}class L_{constructor(T,C,J){var x;this.requestManager=T,this.abi=C,this.address=J,this.events={},this.transactionHash=null,this.address=J,this.abi=C,(x=this).abi.filter((function(oe){return oe.type==="function"})).map((function(oe){return new D_(oe)})).forEach((function(oe){oe.attachToContract(x)})),this.allEvents=(function(oe){const ve=oe.abi.filter((function(Fe){return Fe.type==="event"})),Pe=new yC(oe.requestManager,ve,oe.address);return ve.map((function(Fe){return new Fl(oe.requestManager,Fe,oe.address)})).forEach((function(Fe){Fe.attachToContract(oe)})),Pe.getAllEventsFunction()})(this)}}r.AbstractFilter=Ul,r.BigNumber=Y,r.Contract=L_,r.ContractFactory=class{constructor(y,T){this.requestManager=y,this.abi=T}async deploy(...y){let T;const C=y[y.length-1];if(I(C)&&!de(C)&&(T=y.pop()),!T)throw new Error("Missing options object");if(!T.data||typeof T.data!="string")throw new Error("Invalid options.data");if(Ie(T.value)>0&&!(this.abi.filter((function(He){return He.type==="constructor"&&He.inputs.length===y.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const J=(x=this.abi,oe=y,x.filter((function(He){return He.type==="constructor"&&He.inputs&&He.inputs.length===oe.length})).map((function(He){return He.inputs||[]})).map((function(He){return r.coder.encodeParams(He,oe)}))[0]||"");var x,oe;T.data+=J,T.gas||(T.gas=await this.requestManager.eth_estimateGas(T));const ve=await this.requestManager.eth_sendTransaction(T);if(!ve)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const Pe=await(async function(He,ir){const jt=s();let Me=0;const Gt=()=>{Me++,Me>50?jt.reject(new Error("Contract transaction couldn't be found after 50 blocks")):He.eth_getTransactionReceipt(ir).then((xt=>{xt&&xt.blockHash?jt.resolve(xt):setTimeout(Gt,1e3)}),(xt=>jt.reject(xt)))};Gt();const bt=await jt,Tt=await He.eth_getCode(bt.contractAddress,"latest");if(Tt&&Tt.length>3)return bt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Tt,receipt:bt})})(this.requestManager,ve),Fe=await this.at(Pe);return Fe.transactionHash=ve,Fe}async at(y){if(!_t(y))throw new TypeError(`Invalid address ${JSON.stringify(y)}`);return new L_(this.requestManager,this.abi,y)}},r.EthBlockFilter=class extends cs{constructor(y){super(y,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},r.EthFilter=cs,r.EthPendingTransactionFilter=class extends cs{constructor(y){super(y,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},r.HTTPProvider=class{constructor(y,T={}){this.host=y,this.options=T,this.debug=!1,this.host=y||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(y,T){try{let C=null;C=y instanceof Array?y.map((oe=>n(oe))):n(y);const J=this.options.fetch||globalThis.fetch;if(J===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const x={body:JSON.stringify(C),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+x.body),J(this.host,x).then((async oe=>{if(oe.ok){const ve=await oe.json();this.debug&&console.log("RECV << "+JSON.stringify(ve)),ve.error?T(Object.assign(new Error(ve.error.json||ve.error),ve.error)):T(null,ve)}else{const ve=(typeof oe.text=="function"?await oe.text().catch((()=>"")):"").trim().slice(0,512),Pe="External error. response code: "+oe.status+(ve?" — "+ve:"");this.debug&&console.log("ERR << "+Pe),T(new Error(Pe))}}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),T(oe)}))}catch(C){this.debug&&console.log("ERR << "+JSON.stringify(C)),T(C)}}},r.Method=Ge,r.Property=pr,r.RequestManager=De,r.SHHFilter=class extends Ul{constructor(y,T){super(y),this.requestManager=y,this.options=T,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(C){return $_(C)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const y=await this.filterId;return this.requestManager.shh_getMessages(y)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const y=await this.filterId;return this.requestManager.shh_getFilterChanges(y)}async uninstall(){const y=await this.filterId;return this.requestManager.shh_uninstallFilter(y)}},r.SolidityEvent=Fl,r.SolidityFunction=D_,r.WebSocketProvider=class{constructor(y,T={}){this.url=y,this.options=T,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const y=this.connection;this.timeout(new Error("Provider disposed.")),y.then((T=>T.close())).catch((T=>{this.debug&&console.error(T)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(y,T){const C=[];let J;if(y instanceof Array)J=Promise.all(y.map((x=>{const oe=s();try{const ve=n(x);C.push(ve),this.responseCallbacks.set(ve.id,oe)}catch(ve){oe.reject(ve)}return oe})));else{const x=s();try{const oe=n(y);C.push(oe),this.responseCallbacks.set(oe.id,x)}catch(oe){x.reject(oe)}J=x}J.then((x=>T(null,x)),(x=>T(x))),this.connection.then((x=>{C.forEach((oe=>{const ve=JSON.stringify(oe);this.debug&&console.log("SEND >> "+ve),x.send(ve)}))}),(x=>{T(x)}))}parseResponse(y){const T=[];return y.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((C=>{let J=C;this.lastChunk&&(J=this.lastChunk+J);let x=null;try{x=JSON.parse(J)}catch{return this.lastChunk=J,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",x&&T.push(x)})),T}processMessage(y){if("id"in y){const T=y.id,C=this.responseCallbacks.get(T);if(!C)return void console.error("Error: Received a response for an unknown request",y);this.responseCallbacks.delete(T),y.error!==void 0&&y.error!==null?C.reject(Object.assign(new Error(y.error.message||y.error),y.error)):"result"in y&&C.resolve(y)}else this.notificationCallbacks.forEach((T=>T(null,y)))}timeout(y){this.connection&&this.connection.isPending||(this.connection=s());const T=y||new Error("Connection timeout");this.responseCallbacks.forEach((C=>C.reject(T))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((C=>C.close())).catch((C=>{this.debug&&console.error(C)})),this.connection&&this.connection.isPending||(this.connection=s()),this.lastChunk="";const y=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!y)throw new Error("Please provide a WebSocketConstructor");const T=new y(this.url,this.options.protocol);T.onopen=()=>{this.connection.resolve(T)},T.onerror=C=>{const J=new Error("Error in web socket");J.data=C,this.timeout(J)},T.onclose=C=>{this.timeout(new Error(`Connection closed (${C&&C.reason||"Unknown reason"})`))},T.onmessage=C=>{const J=typeof C.data=="string"?C.data:"";this.debug&&console.log("RECV << "+C.data),this.parseResponse(J).forEach((x=>{x instanceof Array?x.forEach((oe=>this.processMessage(oe))):this.processMessage(x)}))}}},r.bytesToHex=K,r.bytesToUtf8String=F,r.concatBytes=D,r.default=De,r.extractDisplayName=Ee,r.extractTypeName=_e,r.fromAscii=function(y,T=0){let C="";for(let J=0;J<y.length;J++){const x=y.charCodeAt(J).toString(16);C+=x.length<2?"0"+x:x}return"0x"+C.padEnd(T,"0")},r.fromDecimal=Te,r.fromTwosComplement=gt,r.fromWei=function(y,T){const C=Ye(y).dividedBy(Ue(T));return M(y)?C:C.toString(10)},r.getAddress=Mt,r.getValueOfUnit=Ue,r.hexToBytes=X,r.inputAddressFormatter=fr,r.inputBlockNumberFormatter=Ft,r.inputCallFormatter=$l,r.inputDefaultBlockNumberFormatter=rt,r.inputFilterOptions=v_,r.inputPostFormatter=function(y){return y?(y.ttl=Te(y.ttl),y.workToProve=Te(y.workToProve),y.priority=Te(y.priority),de(y.topics)||(y.topics=y.topics?[y.topics]:[]),y.topics=y.topics.map((function(T){return T.indexOf("0x")===0?T:"0x"+K(U(T))})),y):null},r.inputTransactionFormatter=Ll,r.inputTransactionId=fa,r.isAddress=_t,r.isArray=de,r.isBigNumber=M,r.isBloom=function(y){return!!/^(0x)?[0-9a-f]{512}$/i.test(y)&&!!/^(0x)?[0-9a-f]{512}$/i.test(y)},r.isBoolean=G,r.isChecksumAddress=Qt,r.isFunction=function(y){return typeof y=="function"},r.isHex=function(y){return typeof y=="string"&&/^0x[0-9a-fA-F]+$/.test(y)},r.isJson=function(y){try{return!!JSON.parse(y)}catch{return!1}},r.isObject=I,r.isPredefinedBlockNumber=At,r.isStrictAddress=Ut,r.isString=_,r.isTopic=function(y){return!!/^(0x)?[0-9a-f]{64}$/i.test(y)&&!!/^(0x)?[0-9a-f]{64}$/i.test(y)},r.isValidResponse=wt,r.outputBigNumberFormatter=Et,r.outputBlockFormatter=os,r.outputLogFormatter=Lo,r.outputPostFormatter=function(y){return y?(y.expiry=Ie(y.expiry),y.sent=Ie(y.sent),y.ttl=Ie(y.ttl),y.workProved=Ie(y.workProved),y.topics||(y.topics=[]),y.topics=y.topics.map((function(T){return H(T)})),y):null},r.outputSyncingFormatter=b_,r.outputTransactionFormatter=ss,r.outputTransactionReceiptFormatter=E_,r.padLeft=L,r.padRight=function(y,T,C){return y+new Array(T-y.length+1).join(C||"0")},r.sha3=$,r.signedIsNegative=st,r.stringToUtf8Bytes=U,r.toAddress=_r,r.toArray=ft,r.toAscii=H,r.toBatchPayload=function(y){return y.map((function(T){return Qe(T.method,T.params)}))},r.toBigNumber=Ye,r.toBoolean=me,r.toChecksumAddress=Zt,r.toData=le,r.toDecimal=Ie,r.toHex=we,r.toJsonRpcRequest=Qe,r.toNullDecimal=Se,r.toString=ie,r.toStringData=fe,r.toTwosComplement=Je,r.toWei=function(y,T){const C=Ye(y).times(Ue(T));return M(y)?C:C.toString(10)},r.transformToFullName=N,Object.defineProperty(r,"__esModule",{value:!0})}))})(eo,eo.exports)),eo.exports}var jc={},WS;function AF(){if(WS)return jc;WS=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.SignatureValidator=t;const e=wl();async function t(r,n){const i=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new e.ContractFactory(r,i).at(n)}return jc}var xr={},gp={},_p={},_i={},_n={},Vt={},YS;function t_(){if(YS)return Vt;YS=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.output=Vt.exists=Vt.hash=Vt.bytes=Vt.bool=Vt.number=Vt.isBytes=void 0;function e(u){if(!Number.isSafeInteger(u)||u<0)throw new Error(`positive integer expected, not ${u}`)}Vt.number=e;function t(u){if(typeof u!="boolean")throw new Error(`boolean expected, not ${u}`)}Vt.bool=t;function r(u){return u instanceof Uint8Array||u!=null&&typeof u=="object"&&u.constructor.name==="Uint8Array"}Vt.isBytes=r;function n(u,...l){if(!r(u))throw new Error("Uint8Array expected");if(l.length>0&&!l.includes(u.length))throw new Error(`Uint8Array expected of length ${l}, not of length=${u.length}`)}Vt.bytes=n;function i(u){if(typeof u!="function"||typeof u.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");e(u.outputLen),e(u.blockLen)}Vt.hash=i;function a(u,l=!0){if(u.destroyed)throw new Error("Hash instance has been destroyed");if(l&&u.finished)throw new Error("Hash#digest() has already been called")}Vt.exists=a;function s(u,l){n(u);const c=l.outputLen;if(u.length<c)throw new Error(`digestInto() expects output buffer of length at least ${c}`)}Vt.output=s;const o={number:e,bool:t,bytes:n,hash:i,exists:a,output:s};return Vt.default=o,Vt}var Ep={},vs={},KS;function OF(){return KS||(KS=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.crypto=void 0,vs.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),vs}var JS;function jo(){return JS||(JS=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const t=OF(),r=t_();function n(W){return W instanceof Uint8Array||W!=null&&typeof W=="object"&&W.constructor.name==="Uint8Array"}e.isBytes=n;const i=W=>new Uint8Array(W.buffer,W.byteOffset,W.byteLength);e.u8=i;const a=W=>new Uint32Array(W.buffer,W.byteOffset,Math.floor(W.byteLength/4));e.u32=a;const s=W=>new DataView(W.buffer,W.byteOffset,W.byteLength);e.createView=s;const o=(W,U)=>W<<32-U|W>>>U;e.rotr=o;const u=(W,U)=>W<<U|W>>>32-U>>>0;e.rotl=u,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const l=W=>W<<24&4278190080|W<<8&16711680|W>>>8&65280|W>>>24&255;e.byteSwap=l,e.byteSwapIfBE=e.isLE?W=>W:W=>(0,e.byteSwap)(W);function c(W){for(let U=0;U<W.length;U++)W[U]=(0,e.byteSwap)(W[U])}e.byteSwap32=c;const d=Array.from({length:256},(W,U)=>U.toString(16).padStart(2,"0"));function m(W){(0,r.bytes)(W);let U="";for(let F=0;F<W.length;F++)U+=d[W[F]];return U}e.bytesToHex=m;const p={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function v(W){if(W>=p._0&&W<=p._9)return W-p._0;if(W>=p._A&&W<=p._F)return W-(p._A-10);if(W>=p._a&&W<=p._f)return W-(p._a-10)}function w(W){if(typeof W!="string")throw new Error("hex string expected, got "+typeof W);const U=W.length,F=U/2;if(U%2)throw new Error("padded hex string expected, got unpadded hex of length "+U);const ce=new Uint8Array(F);for(let se=0,ne=0;se<F;se++,ne+=2){const X=v(W.charCodeAt(ne)),K=v(W.charCodeAt(ne+1));if(X===void 0||K===void 0){const $=W[ne]+W[ne+1];throw new Error('hex string expected, got non-hex character "'+$+'" at index '+ne)}ce[se]=X*16+K}return ce}e.hexToBytes=w;const R=async()=>{};e.nextTick=R;async function O(W,U,F){let ce=Date.now();for(let se=0;se<W;se++){F(se);const ne=Date.now()-ce;ne>=0&&ne<U||(await(0,e.nextTick)(),ce+=ne)}}e.asyncLoop=O;function f(W){if(typeof W!="string")throw new Error(`utf8ToBytes expected string, got ${typeof W}`);return new Uint8Array(new TextEncoder().encode(W))}e.utf8ToBytes=f;function E(W){return typeof W=="string"&&(W=f(W)),(0,r.bytes)(W),W}e.toBytes=E;function b(...W){let U=0;for(let ce=0;ce<W.length;ce++){const se=W[ce];(0,r.bytes)(se),U+=se.length}const F=new Uint8Array(U);for(let ce=0,se=0;ce<W.length;ce++){const ne=W[ce];F.set(ne,se),se+=ne.length}return F}e.concatBytes=b;class h{clone(){return this._cloneInto()}}e.Hash=h;const S={}.toString;function A(W,U){if(U!==void 0&&S.call(U)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(W,U)}e.checkOpts=A;function P(W){const U=ce=>W().update(E(ce)).digest(),F=W();return U.outputLen=F.outputLen,U.blockLen=F.blockLen,U.create=()=>W(),U}e.wrapConstructor=P;function k(W){const U=(ce,se)=>W(se).update(E(ce)).digest(),F=W({});return U.outputLen=F.outputLen,U.blockLen=F.blockLen,U.create=ce=>W(ce),U}e.wrapConstructorWithOpts=k;function z(W){const U=(ce,se)=>W(se).update(E(ce)).digest(),F=W({});return U.outputLen=F.outputLen,U.blockLen=F.blockLen,U.create=ce=>W(ce),U}e.wrapXOFConstructorWithOpts=z;function Y(W=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(W));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=Y})(Ep)),Ep}var XS;function NF(){if(XS)return _n;XS=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.HashMD=_n.Maj=_n.Chi=void 0;const e=t_(),t=jo();function r(s,o,u,l){if(typeof s.setBigUint64=="function")return s.setBigUint64(o,u,l);const c=BigInt(32),d=BigInt(4294967295),m=Number(u>>c&d),p=Number(u&d),v=l?4:0,w=l?0:4;s.setUint32(o+v,m,l),s.setUint32(o+w,p,l)}const n=(s,o,u)=>s&o^~s&u;_n.Chi=n;const i=(s,o,u)=>s&o^s&u^o&u;_n.Maj=i;class a extends t.Hash{constructor(o,u,l,c){super(),this.blockLen=o,this.outputLen=u,this.padOffset=l,this.isLE=c,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(o),this.view=(0,t.createView)(this.buffer)}update(o){(0,e.exists)(this);const{view:u,buffer:l,blockLen:c}=this;o=(0,t.toBytes)(o);const d=o.length;for(let m=0;m<d;){const p=Math.min(c-this.pos,d-m);if(p===c){const v=(0,t.createView)(o);for(;c<=d-m;m+=c)this.process(v,m);continue}l.set(o.subarray(m,m+p),this.pos),this.pos+=p,m+=p,this.pos===c&&(this.process(u,0),this.pos=0)}return this.length+=o.length,this.roundClean(),this}digestInto(o){(0,e.exists)(this),(0,e.output)(o,this),this.finished=!0;const{buffer:u,view:l,blockLen:c,isLE:d}=this;let{pos:m}=this;u[m++]=128,this.buffer.subarray(m).fill(0),this.padOffset>c-m&&(this.process(l,0),m=0);for(let O=m;O<c;O++)u[O]=0;r(l,c-8,BigInt(this.length*8),d),this.process(l,0);const p=(0,t.createView)(o),v=this.outputLen;if(v%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const w=v/4,R=this.get();if(w>R.length)throw new Error("_sha2: outputLen bigger than state");for(let O=0;O<w;O++)p.setUint32(4*O,R[O],d)}digest(){const{buffer:o,outputLen:u}=this;this.digestInto(o);const l=o.slice(0,u);return this.destroy(),l}_cloneInto(o){o||(o=new this.constructor),o.set(...this.get());const{blockLen:u,buffer:l,length:c,finished:d,destroyed:m,pos:p}=this;return o.length=c,o.pos=p,o.finished=d,o.destroyed=m,c%u&&o.buffer.set(l),o}}return _n.HashMD=a,_n}var QS;function PF(){if(QS)return _i;QS=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.sha224=_i.sha256=void 0;const e=NF(),t=jo(),r=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),n=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64);class a extends e.HashMD{constructor(){super(64,32,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0,this.F=n[5]|0,this.G=n[6]|0,this.H=n[7]|0}get(){const{A:u,B:l,C:c,D:d,E:m,F:p,G:v,H:w}=this;return[u,l,c,d,m,p,v,w]}set(u,l,c,d,m,p,v,w){this.A=u|0,this.B=l|0,this.C=c|0,this.D=d|0,this.E=m|0,this.F=p|0,this.G=v|0,this.H=w|0}process(u,l){for(let f=0;f<16;f++,l+=4)i[f]=u.getUint32(l,!1);for(let f=16;f<64;f++){const E=i[f-15],b=i[f-2],h=(0,t.rotr)(E,7)^(0,t.rotr)(E,18)^E>>>3,S=(0,t.rotr)(b,17)^(0,t.rotr)(b,19)^b>>>10;i[f]=S+i[f-7]+h+i[f-16]|0}let{A:c,B:d,C:m,D:p,E:v,F:w,G:R,H:O}=this;for(let f=0;f<64;f++){const E=(0,t.rotr)(v,6)^(0,t.rotr)(v,11)^(0,t.rotr)(v,25),b=O+E+(0,e.Chi)(v,w,R)+r[f]+i[f]|0,S=((0,t.rotr)(c,2)^(0,t.rotr)(c,13)^(0,t.rotr)(c,22))+(0,e.Maj)(c,d,m)|0;O=R,R=w,w=v,v=p+b|0,p=m,m=d,d=c,c=b+S|0}c=c+this.A|0,d=d+this.B|0,m=m+this.C|0,p=p+this.D|0,v=v+this.E|0,w=w+this.F|0,R=R+this.G|0,O=O+this.H|0,this.set(c,d,m,p,v,w,R,O)}roundClean(){i.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class s extends a{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return _i.sha256=(0,t.wrapConstructor)(()=>new a),_i.sha224=(0,t.wrapConstructor)(()=>new s),_i}var bs={},vp={},ZS;function CF(){return ZS||(ZS=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=t_(),r=jo();class n extends r.Hash{constructor(s,o){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(s);const u=(0,r.toBytes)(o);if(this.iHash=s.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 l=this.blockLen,c=new Uint8Array(l);c.set(u.length>l?s.create().update(u).digest():u);for(let d=0;d<c.length;d++)c[d]^=54;this.iHash.update(c),this.oHash=s.create();for(let d=0;d<c.length;d++)c[d]^=106;this.oHash.update(c),c.fill(0)}update(s){return(0,t.exists)(this),this.iHash.update(s),this}digestInto(s){(0,t.exists)(this),(0,t.bytes)(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:o,iHash:u,finished:l,destroyed:c,blockLen:d,outputLen:m}=this;return s=s,s.finished=l,s.destroyed=c,s.blockLen=d,s.outputLen=m,s.oHash=o._cloneInto(s.oHash),s.iHash=u._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const i=(a,s,o)=>new n(a,s).update(o).digest();e.hmac=i,e.hmac.create=(a,s)=>new n(a,s)})(vp)),vp}var bp={},Ts={},Ct={},Ot={},xS;function Wa(){if(xS)return Ot;xS=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.bitMask=void 0,Ot.isBytes=n,Ot.abytes=i,Ot.bytesToHex=s,Ot.numberToHexUnpadded=o,Ot.hexToNumber=u,Ot.hexToBytes=d,Ot.bytesToNumberBE=m,Ot.bytesToNumberLE=p,Ot.numberToBytesBE=v,Ot.numberToBytesLE=w,Ot.numberToVarBytesBE=R,Ot.ensureBytes=O,Ot.concatBytes=f,Ot.equalBytes=E,Ot.utf8ToBytes=b,Ot.bitLen=h,Ot.bitGet=S,Ot.bitSet=A,Ot.createHmacDrbg=Y,Ot.validateObject=U;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=BigInt(0),t=BigInt(1),r=BigInt(2);function n(F){return F instanceof Uint8Array||F!=null&&typeof F=="object"&&F.constructor.name==="Uint8Array"}function i(F){if(!n(F))throw new Error("Uint8Array expected")}const a=Array.from({length:256},(F,ce)=>ce.toString(16).padStart(2,"0"));function s(F){i(F);let ce="";for(let se=0;se<F.length;se++)ce+=a[F[se]];return ce}function o(F){const ce=F.toString(16);return ce.length&1?`0${ce}`:ce}function u(F){if(typeof F!="string")throw new Error("hex string expected, got "+typeof F);return BigInt(F===""?"0":`0x${F}`)}const l={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function c(F){if(F>=l._0&&F<=l._9)return F-l._0;if(F>=l._A&&F<=l._F)return F-(l._A-10);if(F>=l._a&&F<=l._f)return F-(l._a-10)}function d(F){if(typeof F!="string")throw new Error("hex string expected, got "+typeof F);const ce=F.length,se=ce/2;if(ce%2)throw new Error("padded hex string expected, got unpadded hex of length "+ce);const ne=new Uint8Array(se);for(let X=0,K=0;X<se;X++,K+=2){const $=c(F.charCodeAt(K)),j=c(F.charCodeAt(K+1));if($===void 0||j===void 0){const L=F[K]+F[K+1];throw new Error('hex string expected, got non-hex character "'+L+'" at index '+K)}ne[X]=$*16+j}return ne}function m(F){return u(s(F))}function p(F){return i(F),u(s(Uint8Array.from(F).reverse()))}function v(F,ce){return d(F.toString(16).padStart(ce*2,"0"))}function w(F,ce){return v(F,ce).reverse()}function R(F){return d(o(F))}function O(F,ce,se){let ne;if(typeof ce=="string")try{ne=d(ce)}catch(K){throw new Error(`${F} must be valid hex string, got "${ce}". Cause: ${K}`)}else if(n(ce))ne=Uint8Array.from(ce);else throw new Error(`${F} must be hex string or Uint8Array`);const X=ne.length;if(typeof se=="number"&&X!==se)throw new Error(`${F} expected ${se} bytes, got ${X}`);return ne}function f(...F){let ce=0;for(let ne=0;ne<F.length;ne++){const X=F[ne];i(X),ce+=X.length}const se=new Uint8Array(ce);for(let ne=0,X=0;ne<F.length;ne++){const K=F[ne];se.set(K,X),X+=K.length}return se}function E(F,ce){if(F.length!==ce.length)return!1;let se=0;for(let ne=0;ne<F.length;ne++)se|=F[ne]^ce[ne];return se===0}function b(F){if(typeof F!="string")throw new Error(`utf8ToBytes expected string, got ${typeof F}`);return new Uint8Array(new TextEncoder().encode(F))}function h(F){let ce;for(ce=0;F>e;F>>=t,ce+=1);return ce}function S(F,ce){return F>>BigInt(ce)&t}function A(F,ce,se){return F|(se?t:e)<<BigInt(ce)}const P=F=>(r<<BigInt(F-1))-t;Ot.bitMask=P;const k=F=>new Uint8Array(F),z=F=>Uint8Array.from(F);function Y(F,ce,se){if(typeof F!="number"||F<2)throw new Error("hashLen must be a number");if(typeof ce!="number"||ce<2)throw new Error("qByteLen must be a number");if(typeof se!="function")throw new Error("hmacFn must be a function");let ne=k(F),X=k(F),K=0;const $=()=>{ne.fill(1),X.fill(0),K=0},j=(...D)=>se(X,ne,...D),L=(D=k())=>{X=j(z([0]),D),ne=j(),D.length!==0&&(X=j(z([1]),D),ne=j())},H=()=>{if(K++>=1e3)throw new Error("drbg: tried 1000 values");let D=0;const Z=[];for(;D<ce;){ne=j();const Ee=ne.slice();Z.push(Ee),D+=ne.length}return f(...Z)};return(D,Z)=>{$(),L(D);let Ee;for(;!(Ee=Z(H()));)L();return $(),Ee}}const W={bigint:F=>typeof F=="bigint",function:F=>typeof F=="function",boolean:F=>typeof F=="boolean",string:F=>typeof F=="string",stringOrUint8Array:F=>typeof F=="string"||n(F),isSafeInteger:F=>Number.isSafeInteger(F),array:F=>Array.isArray(F),field:(F,ce)=>ce.Fp.isValid(F),hash:F=>typeof F=="function"&&Number.isSafeInteger(F.outputLen)};function U(F,ce,se={}){const ne=(X,K,$)=>{const j=W[K];if(typeof j!="function")throw new Error(`Invalid validator "${K}", expected function`);const L=F[X];if(!($&&L===void 0)&&!j(L,F))throw new Error(`Invalid param ${String(X)}=${L} (${typeof L}), expected ${K}`)};for(const[X,K]of Object.entries(ce))ne(X,K,!1);for(const[X,K]of Object.entries(se))ne(X,K,!0);return F}return Ot}var eI;function Al(){if(eI)return Ct;eI=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.isNegativeLE=void 0,Ct.mod=u,Ct.pow=l,Ct.pow2=c,Ct.invert=d,Ct.tonelliShanks=m,Ct.FpSqrt=p,Ct.validateField=R,Ct.FpPow=O,Ct.FpInvertBatch=f,Ct.FpDiv=E,Ct.FpIsSquare=b,Ct.nLength=h,Ct.Field=S,Ct.FpSqrtOdd=A,Ct.FpSqrtEven=P,Ct.hashToPrivateScalar=k,Ct.getFieldBytesLength=z,Ct.getMinHashLength=Y,Ct.mapHashToField=W;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Wa(),t=BigInt(0),r=BigInt(1),n=BigInt(2),i=BigInt(3),a=BigInt(4),s=BigInt(5),o=BigInt(8);BigInt(9),BigInt(16);function u(U,F){const ce=U%F;return ce>=t?ce:F+ce}function l(U,F,ce){if(ce<=t||F<t)throw new Error("Expected power/modulo > 0");if(ce===r)return t;let se=r;for(;F>t;)F&r&&(se=se*U%ce),U=U*U%ce,F>>=r;return se}function c(U,F,ce){let se=U;for(;F-- >t;)se*=se,se%=ce;return se}function d(U,F){if(U===t||F<=t)throw new Error(`invert: expected positive integers, got n=${U} mod=${F}`);let ce=u(U,F),se=F,ne=t,X=r;for(;ce!==t;){const $=se/ce,j=se%ce,L=ne-X*$;se=ce,ce=j,ne=X,X=L}if(se!==r)throw new Error("invert: does not exist");return u(ne,F)}function m(U){const F=(U-r)/n;let ce,se,ne;for(ce=U-r,se=0;ce%n===t;ce/=n,se++);for(ne=n;ne<U&&l(ne,F,U)!==U-r;ne++);if(se===1){const K=(U+r)/a;return function(j,L){const H=j.pow(L,K);if(!j.eql(j.sqr(H),L))throw new Error("Cannot find square root");return H}}const X=(ce+r)/n;return function($,j){if($.pow(j,F)===$.neg($.ONE))throw new Error("Cannot find square root");let L=se,H=$.pow($.mul($.ONE,ne),ce),N=$.pow(j,X),D=$.pow(j,ce);for(;!$.eql(D,$.ONE);){if($.eql(D,$.ZERO))return $.ZERO;let Z=1;for(let _e=$.sqr(D);Z<L&&!$.eql(_e,$.ONE);Z++)_e=$.sqr(_e);const Ee=$.pow(H,r<<BigInt(L-Z-1));H=$.sqr(Ee),N=$.mul(N,Ee),D=$.mul(D,H),L=Z}return N}}function p(U){if(U%a===i){const F=(U+r)/a;return function(se,ne){const X=se.pow(ne,F);if(!se.eql(se.sqr(X),ne))throw new Error("Cannot find square root");return X}}if(U%o===s){const F=(U-s)/o;return function(se,ne){const X=se.mul(ne,n),K=se.pow(X,F),$=se.mul(ne,K),j=se.mul(se.mul($,n),K),L=se.mul($,se.sub(j,se.ONE));if(!se.eql(se.sqr(L),ne))throw new Error("Cannot find square root");return L}}return m(U)}const v=(U,F)=>(u(U,F)&r)===r;Ct.isNegativeLE=v;const w=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function R(U){const F={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},ce=w.reduce((se,ne)=>(se[ne]="function",se),F);return(0,e.validateObject)(U,ce)}function O(U,F,ce){if(ce<t)throw new Error("Expected power > 0");if(ce===t)return U.ONE;if(ce===r)return F;let se=U.ONE,ne=F;for(;ce>t;)ce&r&&(se=U.mul(se,ne)),ne=U.sqr(ne),ce>>=r;return se}function f(U,F){const ce=new Array(F.length),se=F.reduce((X,K,$)=>U.is0(K)?X:(ce[$]=X,U.mul(X,K)),U.ONE),ne=U.inv(se);return F.reduceRight((X,K,$)=>U.is0(K)?X:(ce[$]=U.mul(X,ce[$]),U.mul(X,K)),ne),ce}function E(U,F,ce){return U.mul(F,typeof ce=="bigint"?d(ce,U.ORDER):U.inv(ce))}function b(U){const F=(U.ORDER-r)/n;return ce=>{const se=U.pow(ce,F);return U.eql(se,U.ZERO)||U.eql(se,U.ONE)}}function h(U,F){const ce=F!==void 0?F:U.toString(2).length,se=Math.ceil(ce/8);return{nBitLength:ce,nByteLength:se}}function S(U,F,ce=!1,se={}){if(U<=t)throw new Error(`Expected Field ORDER > 0, got ${U}`);const{nBitLength:ne,nByteLength:X}=h(U,F);if(X>2048)throw new Error("Field lengths over 2048 bytes are not supported");const K=p(U),$=Object.freeze({ORDER:U,BITS:ne,BYTES:X,MASK:(0,e.bitMask)(ne),ZERO:t,ONE:r,create:j=>u(j,U),isValid:j=>{if(typeof j!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof j}`);return t<=j&&j<U},is0:j=>j===t,isOdd:j=>(j&r)===r,neg:j=>u(-j,U),eql:(j,L)=>j===L,sqr:j=>u(j*j,U),add:(j,L)=>u(j+L,U),sub:(j,L)=>u(j-L,U),mul:(j,L)=>u(j*L,U),pow:(j,L)=>O($,j,L),div:(j,L)=>u(j*d(L,U),U),sqrN:j=>j*j,addN:(j,L)=>j+L,subN:(j,L)=>j-L,mulN:(j,L)=>j*L,inv:j=>d(j,U),sqrt:se.sqrt||(j=>K($,j)),invertBatch:j=>f($,j),cmov:(j,L,H)=>H?L:j,toBytes:j=>ce?(0,e.numberToBytesLE)(j,X):(0,e.numberToBytesBE)(j,X),fromBytes:j=>{if(j.length!==X)throw new Error(`Fp.fromBytes: expected ${X}, got ${j.length}`);return ce?(0,e.bytesToNumberLE)(j):(0,e.bytesToNumberBE)(j)}});return Object.freeze($)}function A(U,F){if(!U.isOdd)throw new Error("Field doesn't have isOdd");const ce=U.sqrt(F);return U.isOdd(ce)?ce:U.neg(ce)}function P(U,F){if(!U.isOdd)throw new Error("Field doesn't have isOdd");const ce=U.sqrt(F);return U.isOdd(ce)?U.neg(ce):ce}function k(U,F,ce=!1){U=(0,e.ensureBytes)("privateHash",U);const se=U.length,ne=h(F).nByteLength+8;if(ne<24||se<ne||se>1024)throw new Error(`hashToPrivateScalar: expected ${ne}-1024 bytes of input, got ${se}`);const X=ce?(0,e.bytesToNumberLE)(U):(0,e.bytesToNumberBE)(U);return u(X,F-r)+r}function z(U){if(typeof U!="bigint")throw new Error("field order must be bigint");const F=U.toString(2).length;return Math.ceil(F/8)}function Y(U){const F=z(U);return F+Math.ceil(F/2)}function W(U,F,ce=!1){const se=U.length,ne=z(F),X=Y(F);if(se<16||se<X||se>1024)throw new Error(`expected ${X}-1024 bytes of input, got ${se}`);const K=ce?(0,e.bytesToNumberBE)(U):(0,e.bytesToNumberLE)(U),$=u(K,F-r)+r;return ce?(0,e.numberToBytesLE)($,ne):(0,e.numberToBytesBE)($,ne)}return Ct}var tI;function MF(){if(tI)return Ts;tI=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.wNAF=i,Ts.validateBasic=a;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Al(),t=Wa(),r=BigInt(0),n=BigInt(1);function i(s,o){const u=(c,d)=>{const m=d.negate();return c?m:d},l=c=>{const d=Math.ceil(o/c)+1,m=2**(c-1);return{windows:d,windowSize:m}};return{constTimeNegate:u,unsafeLadder(c,d){let m=s.ZERO,p=c;for(;d>r;)d&n&&(m=m.add(p)),p=p.double(),d>>=n;return m},precomputeWindow(c,d){const{windows:m,windowSize:p}=l(d),v=[];let w=c,R=w;for(let O=0;O<m;O++){R=w,v.push(R);for(let f=1;f<p;f++)R=R.add(w),v.push(R);w=R.double()}return v},wNAF(c,d,m){const{windows:p,windowSize:v}=l(c);let w=s.ZERO,R=s.BASE;const O=BigInt(2**c-1),f=2**c,E=BigInt(c);for(let b=0;b<p;b++){const h=b*v;let S=Number(m&O);m>>=E,S>v&&(S-=f,m+=n);const A=h,P=h+Math.abs(S)-1,k=b%2!==0,z=S<0;S===0?R=R.add(u(k,d[A])):w=w.add(u(z,d[P]))}return{p:w,f:R}},wNAFCached(c,d,m,p){const v=c._WINDOW_SIZE||1;let w=d.get(c);return w||(w=this.precomputeWindow(c,v),v!==1&&d.set(c,p(w))),this.wNAF(v,w,m)}}}function a(s){return(0,e.validateField)(s.Fp),(0,t.validateObject)(s,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(s.n,s.nBitLength),...s,p:s.Fp.ORDER})}return Ts}var rI;function eP(){return rI||(rI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=p,e.weierstrass=w,e.SWUFpSqrtRatio=R,e.mapToCurveSimpleSWU=O;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=MF(),r=Al(),n=Wa(),i=Wa();function a(f){const E=(0,t.validateBasic)(f);n.validateObject(E,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:b,Fp:h,a:S}=E;if(b){if(!h.eql(S,h.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof b!="object"||typeof b.beta!="bigint"||typeof b.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...E})}const{bytesToNumberBE:s,hexToBytes:o}=n;e.DER={Err:class extends Error{constructor(E=""){super(E)}},_parseInt(f){const{Err:E}=e.DER;if(f.length<2||f[0]!==2)throw new E("Invalid signature integer tag");const b=f[1],h=f.subarray(2,b+2);if(!b||h.length!==b)throw new E("Invalid signature integer: wrong length");if(h[0]&128)throw new E("Invalid signature integer: negative");if(h[0]===0&&!(h[1]&128))throw new E("Invalid signature integer: unnecessary leading zero");return{d:s(h),l:f.subarray(b+2)}},toSig(f){const{Err:E}=e.DER,b=typeof f=="string"?o(f):f;n.abytes(b);let h=b.length;if(h<2||b[0]!=48)throw new E("Invalid signature tag");if(b[1]!==h-2)throw new E("Invalid signature: incorrect length");const{d:S,l:A}=e.DER._parseInt(b.subarray(2)),{d:P,l:k}=e.DER._parseInt(A);if(k.length)throw new E("Invalid signature: left bytes after parsing");return{r:S,s:P}},hexFromSig(f){const E=Y=>Number.parseInt(Y[0],16)&8?"00"+Y:Y,b=Y=>{const W=Y.toString(16);return W.length&1?`0${W}`:W},h=E(b(f.s)),S=E(b(f.r)),A=h.length/2,P=S.length/2,k=b(A),z=b(P);return`30${b(P+A+4)}02${z}${S}02${k}${h}`}};const u=BigInt(0),l=BigInt(1),c=BigInt(2),d=BigInt(3),m=BigInt(4);function p(f){const E=a(f),{Fp:b}=E,h=E.toBytes||((se,ne,X)=>{const K=ne.toAffine();return n.concatBytes(Uint8Array.from([4]),b.toBytes(K.x),b.toBytes(K.y))}),S=E.fromBytes||(se=>{const ne=se.subarray(1),X=b.fromBytes(ne.subarray(0,b.BYTES)),K=b.fromBytes(ne.subarray(b.BYTES,2*b.BYTES));return{x:X,y:K}});function A(se){const{a:ne,b:X}=E,K=b.sqr(se),$=b.mul(K,se);return b.add(b.add($,b.mul(se,ne)),X)}if(!b.eql(b.sqr(E.Gy),A(E.Gx)))throw new Error("bad generator point: equation left != right");function P(se){return typeof se=="bigint"&&u<se&&se<E.n}function k(se){if(!P(se))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function z(se){const{allowedPrivateKeyLengths:ne,nByteLength:X,wrapPrivateKey:K,n:$}=E;if(ne&&typeof se!="bigint"){if(n.isBytes(se)&&(se=n.bytesToHex(se)),typeof se!="string"||!ne.includes(se.length))throw new Error("Invalid key");se=se.padStart(X*2,"0")}let j;try{j=typeof se=="bigint"?se:n.bytesToNumberBE((0,i.ensureBytes)("private key",se,X))}catch{throw new Error(`private key must be ${X} bytes, hex or bigint, not ${typeof se}`)}return K&&(j=r.mod(j,$)),k(j),j}const Y=new Map;function W(se){if(!(se instanceof U))throw new Error("ProjectivePoint expected")}class U{constructor(ne,X,K){if(this.px=ne,this.py=X,this.pz=K,ne==null||!b.isValid(ne))throw new Error("x required");if(X==null||!b.isValid(X))throw new Error("y required");if(K==null||!b.isValid(K))throw new Error("z required")}static fromAffine(ne){const{x:X,y:K}=ne||{};if(!ne||!b.isValid(X)||!b.isValid(K))throw new Error("invalid affine point");if(ne instanceof U)throw new Error("projective point not allowed");const $=j=>b.eql(j,b.ZERO);return $(X)&&$(K)?U.ZERO:new U(X,K,b.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(ne){const X=b.invertBatch(ne.map(K=>K.pz));return ne.map((K,$)=>K.toAffine(X[$])).map(U.fromAffine)}static fromHex(ne){const X=U.fromAffine(S((0,i.ensureBytes)("pointHex",ne)));return X.assertValidity(),X}static fromPrivateKey(ne){return U.BASE.multiply(z(ne))}_setWindowSize(ne){this._WINDOW_SIZE=ne,Y.delete(this)}assertValidity(){if(this.is0()){if(E.allowInfinityPoint&&!b.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:ne,y:X}=this.toAffine();if(!b.isValid(ne)||!b.isValid(X))throw new Error("bad point: x or y not FE");const K=b.sqr(X),$=A(ne);if(!b.eql(K,$))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:ne}=this.toAffine();if(b.isOdd)return!b.isOdd(ne);throw new Error("Field doesn't support isOdd")}equals(ne){W(ne);const{px:X,py:K,pz:$}=this,{px:j,py:L,pz:H}=ne,N=b.eql(b.mul(X,H),b.mul(j,$)),D=b.eql(b.mul(K,H),b.mul(L,$));return N&&D}negate(){return new U(this.px,b.neg(this.py),this.pz)}double(){const{a:ne,b:X}=E,K=b.mul(X,d),{px:$,py:j,pz:L}=this;let H=b.ZERO,N=b.ZERO,D=b.ZERO,Z=b.mul($,$),Ee=b.mul(j,j),_e=b.mul(L,L),Se=b.mul($,j);return Se=b.add(Se,Se),D=b.mul($,L),D=b.add(D,D),H=b.mul(ne,D),N=b.mul(K,_e),N=b.add(H,N),H=b.sub(Ee,N),N=b.add(Ee,N),N=b.mul(H,N),H=b.mul(Se,H),D=b.mul(K,D),_e=b.mul(ne,_e),Se=b.sub(Z,_e),Se=b.mul(ne,Se),Se=b.add(Se,D),D=b.add(Z,Z),Z=b.add(D,Z),Z=b.add(Z,_e),Z=b.mul(Z,Se),N=b.add(N,Z),_e=b.mul(j,L),_e=b.add(_e,_e),Z=b.mul(_e,Se),H=b.sub(H,Z),D=b.mul(_e,Ee),D=b.add(D,D),D=b.add(D,D),new U(H,N,D)}add(ne){W(ne);const{px:X,py:K,pz:$}=this,{px:j,py:L,pz:H}=ne;let N=b.ZERO,D=b.ZERO,Z=b.ZERO;const Ee=E.a,_e=b.mul(E.b,d);let Se=b.mul(X,j),Ie=b.mul(K,L),ie=b.mul($,H),le=b.add(X,K),fe=b.add(j,L);le=b.mul(le,fe),fe=b.add(Se,Ie),le=b.sub(le,fe),fe=b.add(X,$);let me=b.add(j,H);return fe=b.mul(fe,me),me=b.add(Se,ie),fe=b.sub(fe,me),me=b.add(K,$),N=b.add(L,H),me=b.mul(me,N),N=b.add(Ie,ie),me=b.sub(me,N),Z=b.mul(Ee,fe),N=b.mul(_e,ie),Z=b.add(N,Z),N=b.sub(Ie,Z),Z=b.add(Ie,Z),D=b.mul(N,Z),Ie=b.add(Se,Se),Ie=b.add(Ie,Se),ie=b.mul(Ee,ie),fe=b.mul(_e,fe),Ie=b.add(Ie,ie),ie=b.sub(Se,ie),ie=b.mul(Ee,ie),fe=b.add(fe,ie),Se=b.mul(Ie,fe),D=b.add(D,Se),Se=b.mul(me,fe),N=b.mul(le,N),N=b.sub(N,Se),Se=b.mul(le,Ie),Z=b.mul(me,Z),Z=b.add(Z,Se),new U(N,D,Z)}subtract(ne){return this.add(ne.negate())}is0(){return this.equals(U.ZERO)}wNAF(ne){return ce.wNAFCached(this,Y,ne,X=>{const K=b.invertBatch(X.map($=>$.pz));return X.map(($,j)=>$.toAffine(K[j])).map(U.fromAffine)})}multiplyUnsafe(ne){const X=U.ZERO;if(ne===u)return X;if(k(ne),ne===l)return this;const{endo:K}=E;if(!K)return ce.unsafeLadder(this,ne);let{k1neg:$,k1:j,k2neg:L,k2:H}=K.splitScalar(ne),N=X,D=X,Z=this;for(;j>u||H>u;)j&l&&(N=N.add(Z)),H&l&&(D=D.add(Z)),Z=Z.double(),j>>=l,H>>=l;return $&&(N=N.negate()),L&&(D=D.negate()),D=new U(b.mul(D.px,K.beta),D.py,D.pz),N.add(D)}multiply(ne){k(ne);let X=ne,K,$;const{endo:j}=E;if(j){const{k1neg:L,k1:H,k2neg:N,k2:D}=j.splitScalar(X);let{p:Z,f:Ee}=this.wNAF(H),{p:_e,f:Se}=this.wNAF(D);Z=ce.constTimeNegate(L,Z),_e=ce.constTimeNegate(N,_e),_e=new U(b.mul(_e.px,j.beta),_e.py,_e.pz),K=Z.add(_e),$=Ee.add(Se)}else{const{p:L,f:H}=this.wNAF(X);K=L,$=H}return U.normalizeZ([K,$])[0]}multiplyAndAddUnsafe(ne,X,K){const $=U.BASE,j=(H,N)=>N===u||N===l||!H.equals($)?H.multiplyUnsafe(N):H.multiply(N),L=j(this,X).add(j(ne,K));return L.is0()?void 0:L}toAffine(ne){const{px:X,py:K,pz:$}=this,j=this.is0();ne==null&&(ne=j?b.ONE:b.inv($));const L=b.mul(X,ne),H=b.mul(K,ne),N=b.mul($,ne);if(j)return{x:b.ZERO,y:b.ZERO};if(!b.eql(N,b.ONE))throw new Error("invZ was invalid");return{x:L,y:H}}isTorsionFree(){const{h:ne,isTorsionFree:X}=E;if(ne===l)return!0;if(X)return X(U,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:ne,clearCofactor:X}=E;return ne===l?this:X?X(U,this):this.multiplyUnsafe(E.h)}toRawBytes(ne=!0){return this.assertValidity(),h(U,this,ne)}toHex(ne=!0){return n.bytesToHex(this.toRawBytes(ne))}}U.BASE=new U(E.Gx,E.Gy,b.ONE),U.ZERO=new U(b.ZERO,b.ONE,b.ZERO);const F=E.nBitLength,ce=(0,t.wNAF)(U,E.endo?Math.ceil(F/2):F);return{CURVE:E,ProjectivePoint:U,normPrivateKeyToScalar:z,weierstrassEquation:A,isWithinCurveOrder:P}}function v(f){const E=(0,t.validateBasic)(f);return n.validateObject(E,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...E})}function w(f){const E=v(f),{Fp:b,n:h}=E,S=b.BYTES+1,A=2*b.BYTES+1;function P(fe){return u<fe&&fe<b.ORDER}function k(fe){return r.mod(fe,h)}function z(fe){return r.invert(fe,h)}const{ProjectivePoint:Y,normPrivateKeyToScalar:W,weierstrassEquation:U,isWithinCurveOrder:F}=p({...E,toBytes(fe,me,Te){const we=me.toAffine(),Ue=b.toBytes(we.x),Ye=n.concatBytes;return Te?Ye(Uint8Array.from([me.hasEvenY()?2:3]),Ue):Ye(Uint8Array.from([4]),Ue,b.toBytes(we.y))},fromBytes(fe){const me=fe.length,Te=fe[0],we=fe.subarray(1);if(me===S&&(Te===2||Te===3)){const Ue=n.bytesToNumberBE(we);if(!P(Ue))throw new Error("Point is not on curve");const Ye=U(Ue);let et;try{et=b.sqrt(Ye)}catch(Mt){const gt=Mt instanceof Error?": "+Mt.message:"";throw new Error("Point is not on curve"+gt)}const Je=(et&l)===l;return(Te&1)===1!==Je&&(et=b.neg(et)),{x:Ue,y:et}}else if(me===A&&Te===4){const Ue=b.fromBytes(we.subarray(0,b.BYTES)),Ye=b.fromBytes(we.subarray(b.BYTES,2*b.BYTES));return{x:Ue,y:Ye}}else throw new Error(`Point of length ${me} was invalid. Expected ${S} compressed bytes or ${A} uncompressed bytes`)}}),ce=fe=>n.bytesToHex(n.numberToBytesBE(fe,E.nByteLength));function se(fe){const me=h>>l;return fe>me}function ne(fe){return se(fe)?k(-fe):fe}const X=(fe,me,Te)=>n.bytesToNumberBE(fe.slice(me,Te));class K{constructor(me,Te,we){this.r=me,this.s=Te,this.recovery=we,this.assertValidity()}static fromCompact(me){const Te=E.nByteLength;return me=(0,i.ensureBytes)("compactSignature",me,Te*2),new K(X(me,0,Te),X(me,Te,2*Te))}static fromDER(me){const{r:Te,s:we}=e.DER.toSig((0,i.ensureBytes)("DER",me));return new K(Te,we)}assertValidity(){if(!F(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!F(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(me){return new K(this.r,this.s,me)}recoverPublicKey(me){const{r:Te,s:we,recovery:Ue}=this,Ye=D((0,i.ensureBytes)("msgHash",me));if(Ue==null||![0,1,2,3].includes(Ue))throw new Error("recovery id invalid");const et=Ue===2||Ue===3?Te+E.n:Te;if(et>=b.ORDER)throw new Error("recovery id 2 or 3 invalid");const Je=(Ue&1)===0?"02":"03",st=Y.fromHex(Je+ce(et)),Mt=z(et),gt=k(-Ye*Mt),Ut=k(we*Mt),_t=Y.BASE.multiplyAndAddUnsafe(st,gt,Ut);if(!_t)throw new Error("point at infinify");return _t.assertValidity(),_t}hasHighS(){return se(this.s)}normalizeS(){return this.hasHighS()?new K(this.r,k(-this.s),this.recovery):this}toDERRawBytes(){return n.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return n.hexToBytes(this.toCompactHex())}toCompactHex(){return ce(this.r)+ce(this.s)}}const $={isValidPrivateKey(fe){try{return W(fe),!0}catch{return!1}},normPrivateKeyToScalar:W,randomPrivateKey:()=>{const fe=r.getMinHashLength(E.n);return r.mapHashToField(E.randomBytes(fe),E.n)},precompute(fe=8,me=Y.BASE){return me._setWindowSize(fe),me.multiply(BigInt(3)),me}};function j(fe,me=!0){return Y.fromPrivateKey(fe).toRawBytes(me)}function L(fe){const me=n.isBytes(fe),Te=typeof fe=="string",we=(me||Te)&&fe.length;return me?we===S||we===A:Te?we===2*S||we===2*A:fe instanceof Y}function H(fe,me,Te=!0){if(L(fe))throw new Error("first arg must be private key");if(!L(me))throw new Error("second arg must be public key");return Y.fromHex(me).multiply(W(fe)).toRawBytes(Te)}const N=E.bits2int||function(fe){const me=n.bytesToNumberBE(fe),Te=fe.length*8-E.nBitLength;return Te>0?me>>BigInt(Te):me},D=E.bits2int_modN||function(fe){return k(N(fe))},Z=n.bitMask(E.nBitLength);function Ee(fe){if(typeof fe!="bigint")throw new Error("bigint expected");if(!(u<=fe&&fe<Z))throw new Error(`bigint expected < 2^${E.nBitLength}`);return n.numberToBytesBE(fe,E.nByteLength)}function _e(fe,me,Te=Se){if(["recovered","canonical"].some(Zt=>Zt in Te))throw new Error("sign() legacy options not supported");const{hash:we,randomBytes:Ue}=E;let{lowS:Ye,prehash:et,extraEntropy:Je}=Te;Ye==null&&(Ye=!0),fe=(0,i.ensureBytes)("msgHash",fe),et&&(fe=(0,i.ensureBytes)("prehashed msgHash",we(fe)));const st=D(fe),Mt=W(me),gt=[Ee(Mt),Ee(st)];if(Je!=null&&Je!==!1){const Zt=Je===!0?Ue(b.BYTES):Je;gt.push((0,i.ensureBytes)("extraEntropy",Zt))}const Ut=n.concatBytes(...gt),_t=st;function Qt(Zt){const ft=N(Zt);if(!F(ft))return;const _r=z(ft),M=Y.BASE.multiply(ft).toAffine(),_=k(M.x);if(_===u)return;const I=k(_r*k(_t+_*Mt));if(I===u)return;let G=(M.x===_?0:2)|Number(M.y&l),de=I;return Ye&&se(I)&&(de=ne(I),G^=1),new K(_,de,G)}return{seed:Ut,k2sig:Qt}}const Se={lowS:E.lowS,prehash:!1},Ie={lowS:E.lowS,prehash:!1};function ie(fe,me,Te=Se){const{seed:we,k2sig:Ue}=_e(fe,me,Te),Ye=E;return n.createHmacDrbg(Ye.hash.outputLen,Ye.nByteLength,Ye.hmac)(we,Ue)}Y.BASE._setWindowSize(8);function le(fe,me,Te,we=Ie){var M;const Ue=fe;if(me=(0,i.ensureBytes)("msgHash",me),Te=(0,i.ensureBytes)("publicKey",Te),"strict"in we)throw new Error("options.strict was renamed to lowS");const{lowS:Ye,prehash:et}=we;let Je,st;try{if(typeof Ue=="string"||n.isBytes(Ue))try{Je=K.fromDER(Ue)}catch(_){if(!(_ instanceof e.DER.Err))throw _;Je=K.fromCompact(Ue)}else if(typeof Ue=="object"&&typeof Ue.r=="bigint"&&typeof Ue.s=="bigint"){const{r:_,s:I}=Ue;Je=new K(_,I)}else throw new Error("PARSE");st=Y.fromHex(Te)}catch(_){if(_.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Ye&&Je.hasHighS())return!1;et&&(me=E.hash(me));const{r:Mt,s:gt}=Je,Ut=D(me),_t=z(gt),Qt=k(Ut*_t),Zt=k(Mt*_t),ft=(M=Y.BASE.multiplyAndAddUnsafe(st,Qt,Zt))==null?void 0:M.toAffine();return ft?k(ft.x)===Mt:!1}return{CURVE:E,getPublicKey:j,getSharedSecret:H,sign:ie,verify:le,ProjectivePoint:Y,Signature:K,utils:$}}function R(f,E){const b=f.ORDER;let h=u;for(let se=b-l;se%c===u;se/=c)h+=l;const S=h,A=c<<S-l-l,P=A*c,k=(b-l)/P,z=(k-l)/c,Y=P-l,W=A,U=f.pow(E,k),F=f.pow(E,(k+l)/c);let ce=(se,ne)=>{let X=U,K=f.pow(ne,Y),$=f.sqr(K);$=f.mul($,ne);let j=f.mul(se,$);j=f.pow(j,z),j=f.mul(j,K),K=f.mul(j,ne),$=f.mul(j,se);let L=f.mul($,K);j=f.pow(L,W);let H=f.eql(j,f.ONE);K=f.mul($,F),j=f.mul(L,X),$=f.cmov(K,$,H),L=f.cmov(j,L,H);for(let N=S;N>l;N--){let D=N-c;D=c<<D-l;let Z=f.pow(L,D);const Ee=f.eql(Z,f.ONE);K=f.mul($,X),X=f.mul(X,X),Z=f.mul(L,X),$=f.cmov(K,$,Ee),L=f.cmov(Z,L,Ee)}return{isValid:H,value:$}};if(f.ORDER%m===d){const se=(f.ORDER-d)/m,ne=f.sqrt(f.neg(E));ce=(X,K)=>{let $=f.sqr(K);const j=f.mul(X,K);$=f.mul($,j);let L=f.pow($,se);L=f.mul(L,j);const H=f.mul(L,ne),N=f.mul(f.sqr(L),K),D=f.eql(N,X);let Z=f.cmov(H,L,D);return{isValid:D,value:Z}}}return ce}function O(f,E){if(r.validateField(f),!f.isValid(E.A)||!f.isValid(E.B)||!f.isValid(E.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const b=R(f,E.Z);if(!f.isOdd)throw new Error("Fp.isOdd is not implemented!");return h=>{let S,A,P,k,z,Y,W,U;S=f.sqr(h),S=f.mul(S,E.Z),A=f.sqr(S),A=f.add(A,S),P=f.add(A,f.ONE),P=f.mul(P,E.B),k=f.cmov(E.Z,f.neg(A),!f.eql(A,f.ZERO)),k=f.mul(k,E.A),A=f.sqr(P),Y=f.sqr(k),z=f.mul(Y,E.A),A=f.add(A,z),A=f.mul(A,P),Y=f.mul(Y,k),z=f.mul(Y,E.B),A=f.add(A,z),W=f.mul(S,P);const{isValid:F,value:ce}=b(A,Y);U=f.mul(S,h),U=f.mul(U,ce),W=f.cmov(W,P,F),U=f.cmov(U,ce,F);const se=f.isOdd(h)===f.isOdd(U);return U=f.cmov(f.neg(U),U,se),W=f.div(W,k),{x:W,y:U}}}})(bp)),bp}var nI;function jF(){if(nI)return bs;nI=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.getHash=n,bs.createCurve=i;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=CF(),t=jo(),r=eP();function n(a){return{hash:a,hmac:(s,...o)=>(0,e.hmac)(a,s,(0,t.concatBytes)(...o)),randomBytes:t.randomBytes}}function i(a,s){const o=u=>(0,r.weierstrass)({...a,...n(u)});return Object.freeze({...o(s),create:o})}return bs}var qn={},iI;function DF(){if(iI)return qn;iI=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.expand_message_xmd=s,qn.expand_message_xof=o,qn.hash_to_field=u,qn.isogenyMap=l,qn.createHasher=c;const e=Al(),t=Wa(),r=t.bytesToNumberBE;function n(d,m){if(d<0||d>=1<<8*m)throw new Error(`bad I2OSP call: value=${d} length=${m}`);const p=Array.from({length:m}).fill(0);for(let v=m-1;v>=0;v--)p[v]=d&255,d>>>=8;return new Uint8Array(p)}function i(d,m){const p=new Uint8Array(d.length);for(let v=0;v<d.length;v++)p[v]=d[v]^m[v];return p}function a(d){if(!Number.isSafeInteger(d))throw new Error("number expected")}function s(d,m,p,v){(0,t.abytes)(d),(0,t.abytes)(m),a(p),m.length>255&&(m=v((0,t.concatBytes)((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-"),m)));const{outputLen:w,blockLen:R}=v,O=Math.ceil(p/w);if(O>255)throw new Error("Invalid xmd length");const f=(0,t.concatBytes)(m,n(m.length,1)),E=n(0,R),b=n(p,2),h=new Array(O),S=v((0,t.concatBytes)(E,d,b,n(0,1),f));h[0]=v((0,t.concatBytes)(S,n(1,1),f));for(let P=1;P<=O;P++){const k=[i(S,h[P-1]),n(P+1,1),f];h[P]=v((0,t.concatBytes)(...k))}return(0,t.concatBytes)(...h).slice(0,p)}function o(d,m,p,v,w){if((0,t.abytes)(d),(0,t.abytes)(m),a(p),m.length>255){const R=Math.ceil(2*v/8);m=w.create({dkLen:R}).update((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(m).digest()}if(p>65535||m.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return w.create({dkLen:p}).update(d).update(n(p,2)).update(m).update(n(m.length,1)).digest()}function u(d,m,p){(0,t.validateObject)(p,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:v,k:w,m:R,hash:O,expand:f,DST:E}=p;(0,t.abytes)(d),a(m);const b=typeof E=="string"?(0,t.utf8ToBytes)(E):E,h=v.toString(2).length,S=Math.ceil((h+w)/8),A=m*R*S;let P;if(f==="xmd")P=s(d,b,A,O);else if(f==="xof")P=o(d,b,A,w,O);else if(f==="_internal_pass")P=d;else throw new Error('expand must be "xmd" or "xof"');const k=new Array(m);for(let z=0;z<m;z++){const Y=new Array(R);for(let W=0;W<R;W++){const U=S*(W+z*R),F=P.subarray(U,U+S);Y[W]=(0,e.mod)(r(F),v)}k[z]=Y}return k}function l(d,m){const p=m.map(v=>Array.from(v).reverse());return(v,w)=>{const[R,O,f,E]=p.map(b=>b.reduce((h,S)=>d.add(d.mul(h,v),S)));return v=d.div(R,O),w=d.mul(w,d.div(f,E)),{x:v,y:w}}}function c(d,m,p){if(typeof m!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(v,w){const R=u(v,2,{...p,DST:p.DST,...w}),O=d.fromAffine(m(R[0])),f=d.fromAffine(m(R[1])),E=O.add(f).clearCofactor();return E.assertValidity(),E},encodeToCurve(v,w){const R=u(v,1,{...p,DST:p.encodeDST,...w}),O=d.fromAffine(m(R[0])).clearCofactor();return O.assertValidity(),O},mapToCurve(v){if(!Array.isArray(v))throw new Error("mapToCurve: expected array of bigints");for(const R of v)if(typeof R!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${R} in array`);const w=d.fromAffine(m(v)).clearCofactor();return w.assertValidity(),w}}}return qn}var aI;function $F(){return aI||(aI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=PF(),r=jo(),n=jF(),i=DF(),a=Al(),s=Wa(),o=eP(),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),c=BigInt(1),d=BigInt(2),m=(K,$)=>(K+$/d)/$;function p(K){const $=u,j=BigInt(3),L=BigInt(6),H=BigInt(11),N=BigInt(22),D=BigInt(23),Z=BigInt(44),Ee=BigInt(88),_e=K*K*K%$,Se=_e*_e*K%$,Ie=(0,a.pow2)(Se,j,$)*Se%$,ie=(0,a.pow2)(Ie,j,$)*Se%$,le=(0,a.pow2)(ie,d,$)*_e%$,fe=(0,a.pow2)(le,H,$)*le%$,me=(0,a.pow2)(fe,N,$)*fe%$,Te=(0,a.pow2)(me,Z,$)*me%$,we=(0,a.pow2)(Te,Ee,$)*Te%$,Ue=(0,a.pow2)(we,Z,$)*me%$,Ye=(0,a.pow2)(Ue,j,$)*Se%$,et=(0,a.pow2)(Ye,D,$)*fe%$,Je=(0,a.pow2)(et,L,$)*_e%$,st=(0,a.pow2)(Je,d,$);if(!v.eql(v.sqr(st),K))throw new Error("Cannot find square root");return st}const v=(0,a.Field)(u,void 0,void 0,{sqrt:p});e.secp256k1=(0,n.createCurve)({a:BigInt(0),b:BigInt(7),Fp:v,n:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:K=>{const $=l,j=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),L=-c*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),H=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),N=j,D=BigInt("0x100000000000000000000000000000000"),Z=m(N*K,$),Ee=m(-L*K,$);let _e=(0,a.mod)(K-Z*j-Ee*H,$),Se=(0,a.mod)(-Z*L-Ee*N,$);const Ie=_e>D,ie=Se>D;if(Ie&&(_e=$-_e),ie&&(Se=$-Se),_e>D||Se>D)throw new Error("splitScalar: Endomorphism failed, k="+K);return{k1neg:Ie,k1:_e,k2neg:ie,k2:Se}}}},t.sha256);const w=BigInt(0),R=K=>typeof K=="bigint"&&w<K&&K<u,O=K=>typeof K=="bigint"&&w<K&&K<l,f={};function E(K,...$){let j=f[K];if(j===void 0){const L=(0,t.sha256)(Uint8Array.from(K,H=>H.charCodeAt(0)));j=(0,s.concatBytes)(L,L),f[K]=j}return(0,t.sha256)((0,s.concatBytes)(j,...$))}const b=K=>K.toRawBytes(!0).slice(1),h=K=>(0,s.numberToBytesBE)(K,32),S=K=>(0,a.mod)(K,u),A=K=>(0,a.mod)(K,l),P=e.secp256k1.ProjectivePoint,k=(K,$,j)=>P.BASE.multiplyAndAddUnsafe(K,$,j);function z(K){let $=e.secp256k1.utils.normPrivateKeyToScalar(K),j=P.fromPrivateKey($);return{scalar:j.hasEvenY()?$:A(-$),bytes:b(j)}}function Y(K){if(!R(K))throw new Error("bad x: need 0 < x < p");const $=S(K*K),j=S($*K+BigInt(7));let L=p(j);L%d!==w&&(L=S(-L));const H=new P(K,L,c);return H.assertValidity(),H}function W(...K){return A((0,s.bytesToNumberBE)(E("BIP0340/challenge",...K)))}function U(K){return z(K).bytes}function F(K,$,j=(0,r.randomBytes)(32)){const L=(0,s.ensureBytes)("message",K),{bytes:H,scalar:N}=z($),D=(0,s.ensureBytes)("auxRand",j,32),Z=h(N^(0,s.bytesToNumberBE)(E("BIP0340/aux",D))),Ee=E("BIP0340/nonce",Z,H,L),_e=A((0,s.bytesToNumberBE)(Ee));if(_e===w)throw new Error("sign failed: k is zero");const{bytes:Se,scalar:Ie}=z(_e),ie=W(Se,H,L),le=new Uint8Array(64);if(le.set(Se,0),le.set(h(A(Ie+ie*N)),32),!ce(le,L,H))throw new Error("sign: Invalid signature produced");return le}function ce(K,$,j){const L=(0,s.ensureBytes)("signature",K,64),H=(0,s.ensureBytes)("message",$),N=(0,s.ensureBytes)("publicKey",j,32);try{const D=Y((0,s.bytesToNumberBE)(N)),Z=(0,s.bytesToNumberBE)(L.subarray(0,32));if(!R(Z))return!1;const Ee=(0,s.bytesToNumberBE)(L.subarray(32,64));if(!O(Ee))return!1;const _e=W(h(Z),b(D),H),Se=k(D,Ee,A(-_e));return!(!Se||!Se.hasEvenY()||Se.toAffine().x!==Z)}catch{return!1}}e.schnorr={getPublicKey:U,sign:F,verify:ce,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:Y,pointToBytes:b,numberToBytesBE:s.numberToBytesBE,bytesToNumberBE:s.bytesToNumberBE,taggedHash:E,mod:a.mod}};const se=(0,i.isogenyMap)(v,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(K=>K.map($=>BigInt($)))),ne=(0,o.mapToCurveSimpleSWU)(v,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:v.create(BigInt("-11"))}),X=(0,i.createHasher)(e.secp256k1.ProjectivePoint,K=>{const{x:$,y:j}=ne(v.create(K[0]));return se($,j)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:v.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=X.hashToCurve,e.encodeToCurve=X.encodeToCurve})(_p)),_p}var sI;function LF(){return sI||(sI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=$F();Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(gp)),gp}var oI;function qF(){if(oI)return xr;oI=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.recoverPublicKey=r,xr.recoverAddressFromEthSignature=i,xr.sign=a,xr.createEthereumMessageHash=s,xr.ethSign=o,xr.computeAddress=u,xr.createUnsafeIdentity=l;const e=wl(),t=LF();function r(c,d){if(c.length!==65)throw new Error("Invalid signature length "+c.length);const m=c[64];if(m!==27&&m!==28)throw new Error(`Invalid signature recovery value: ${m}. Expected 27 or 28.`);const p=c.slice(0,c.length-1),v=m===28?1:0;return t.secp256k1.Signature.fromCompact(p).addRecoveryBit(v).recoverPublicKey(d).toRawBytes(!1).slice(1)}function n(c){if(c.length!==65)throw new Error("Invalid ethereum signature");const d=c[64];if(d===0||d===1){const m=new Uint8Array(c);return m[64]=d+27,m}return c}function i(c,d){if(typeof c=="string"){if((0,e.isHex)(c))return i((0,e.hexToBytes)(c),d);throw new Error("String signatures must be encoded in hex")}return u(r(n(c),s(d)))}function a(c,d){const m=t.secp256k1.sign(d,c),p=m.recovery===1?"1c":"1b";return"0x"+m.toCompactHex()+p}function s(c){const d=typeof c=="string"?(0,e.stringToUtf8Bytes)(c):c,m=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
70
- `),(0,e.stringToUtf8Bytes)(String(d.length)),d);return(0,e.hexToBytes)((0,e.sha3)(m))}function o(c,d){return a(c,s(d))}function u(c){let d;if(c.length===65&&c[0]===4)d=c.slice(1);else if(c.length===64)d=c;else throw new Error(`Invalid public key length: ${c.length}. Expected 64 bytes, or 65 bytes with a leading 0x04 uncompressed prefix.`);return(0,e.getAddress)((0,e.sha3)(d).substring(24))}function l(){const c=t.secp256k1.utils.randomPrivateKey(),d=t.secp256k1.getPublicKey(c,!1).slice(1),m=u(d);return{privateKey:(0,e.bytesToHex)(c),publicKey:(0,e.bytesToHex)(d),address:m}}return xr}var Dc={},uI;function kF(){if(uI)return Dc;uI=1,Object.defineProperty(Dc,"__esModule",{value:!0});const e=wl();class t{constructor(n,i=!0){Dn(this,"requestManager");Dn(this,"checkedBlocks");Dn(this,"saveBlocks");Dn(this,"savedBlocks");Dn(this,"requests");Dn(this,"blockTime");Dn(this,"firstTimestamp");this.requestManager=n,this.checkedBlocks={},this.saveBlocks=i,this.savedBlocks={},this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),i=await this.getBlockWrapper(1);return this.blockTime=(n.timestamp-i.timestamp)/(Number(n.number)-1),this.firstTimestamp=i.timestamp,{blockTime:this.blockTime,firstTimestamp:this.firstTimestamp}}async getDate(n,i=!0){const a=n/1e3,s=Date.now()/1e3;let o=this.firstTimestamp,u=this.blockTime;if((o===void 0||u===void 0)&&({firstTimestamp:o,blockTime:u}=await this.fillBlockTime()),a<o)return{block:1,timestamp:a};const l=this.savedBlocks.latest;if(a>=s||l&&a>l.timestamp)return{block:(0,e.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:a};this.checkedBlocks[a]=[];const c=await this.getBlockWrapper(Math.ceil((a-o)/u));return{block:await this.findBetter(a,c,i,u),timestamp:a}}async findBetter(n,i,a,s){let o=s??this.blockTime??(await this.fillBlockTime()).blockTime;if(await this.isBetterBlock(n,i,a))return i.number;const u=n-i.timestamp;let l=Math.ceil(u/o);l===0&&(l=u<0?-1:1);const c=await this.getBlockWrapper(this.getNextBlock(n,i.number,l));return o=Math.abs((i.timestamp-c.timestamp)/(i.number-c.number)),this.findBetter(n,c,a,o)}async isBetterBlock(n,i,a){const s=i.timestamp;if(a){if(s<n)return!1;const o=await this.getBlockWrapper(i.number-1);if(s>=n&&o.timestamp<n)return!0}else{if(s>=n)return!1;const o=await this.getBlockWrapper(i.number+1);if(s<n&&o.timestamp>=n)return!0}return!1}getNextBlock(n,i,a){const s=i+a;if(this.checkedBlocks[n].includes(s)){const o=a<0?a+1:a-1;if(o===0)throw new Error(`Could not find an unchecked block for timestamp ${n}`);return this.getNextBlock(n,i,o)}return this.checkedBlocks[n].push(s),s}async getBlockWrapper(n){if(!this.saveBlocks){const s=await this.requestManager.eth_getBlockByNumber(n,!1);return{number:(0,e.toBigNumber)(s.number).toNumber(),timestamp:(0,e.toBigNumber)(s.timestamp).toNumber()}}const i=n.toString();if(this.savedBlocks[i])return this.savedBlocks[i];if(typeof n=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=n)return this.savedBlocks.latest;const{timestamp:a}=await this.requestManager.eth_getBlockByNumber(n,!1);return this.savedBlocks[i]={number:(0,e.toBigNumber)(n==="latest"?await this.requestManager.eth_blockNumber():n).toNumber(),timestamp:(0,e.toBigNumber)(a).toNumber()},this.requests++,this.savedBlocks[i]}}return Dc.default=t,Dc}var $c={},cI;function BF(){if(cI)return $c;cI=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.moveMinutes=e;function e(t){const r=new Date;return r.setMinutes(r.getMinutes()+t),r}return $c}var Tp={},jr={},Ei={},vi={},Sp={},Dr={},lI;function Ne(){if(lI)return Dr;lI=1;var e=Dr&&Dr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.validateType=Dr.generateLazyValidator=Dr.Ajv=void 0;const t=e(Gg());Dr.Ajv=t.default;const r=e(wN()),n=e(AN());function i(s,o){let u=null;const l=(c,d)=>{if(!u){const m=new t.default({$data:!0,allErrors:!0});(0,r.default)(m),(0,n.default)(m,{singleError:!0}),o==null||o.forEach(p=>m.addKeyword(p)),u=m.compile(s),Object.defineProperty(l,"errors",{get(){return u==null?void 0:u.errors}})}return u(c,d)};return l}Dr.generateLazyValidator=i;function a(s,o){return s.validate(o)}return Dr.validateType=a,Dr}var dI;function UF(){return dI||(dI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const t=Ne();e.SCENE_UPDATE="SCENE_UPDATE",(function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(Sp)),Sp}var Ip={},fI;function FF(){return fI||(fI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const t=Ne();e.UPDATE="update",(function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Update||(e.Update={}))})(Ip)),Ip}var pI;function VF(){return pI||(pI=1,(function(e){var t=vi&&vi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=vi&&vi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(UF(),e),r(FF(),e)})(vi)),vi}var bi={},Rp={},mI;function HF(){return mI||(mI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const t=Ne();(function(r){r.SCENE="scene",r.SMART_ITEM="smart-item",r.PORTABLE_EXPERIENCE="portable-experience",r.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ProjectType||(e.ProjectType={}))})(Rp)),Rp}var wp={},Ap={},hI;function Ol(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const t=Ne();(function(r){r.UNIQUE="unique",r.MYTHIC="mythic",r.EXOTIC="exotic",r.LEGENDARY="legendary",r.EPIC="epic",r.RARE="rare",r.UNCOMMON="uncommon",r.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema);const n={[r.UNIQUE]:1,[r.MYTHIC]:10,[r.EXOTIC]:50,[r.LEGENDARY]:100,[r.EPIC]:1e3,[r.RARE]:5e3,[r.UNCOMMON]:1e4,[r.COMMON]:1e5},i={[r.UNIQUE]:"#FFE617",[r.MYTHIC]:"#FB7DE3",[r.EXOTIC]:"#E4FFB8",[r.LEGENDARY]:"#A657ED",[r.EPIC]:"#6397F2",[r.RARE]:"#3AD682",[r.UNCOMMON]:"#FF8563",[r.COMMON]:"#D4E0E0"},a={[r.UNIQUE]:"#FFB626",[r.MYTHIC]:"#FF63E1",[r.EXOTIC]:"#CAFF73",[r.LEGENDARY]:"#842DDA",[r.EPIC]:"#3D85E6",[r.RARE]:"#36CF75",[r.UNCOMMON]:"#ED6D4F",[r.COMMON]:"#ABC1C1"};function s(c){return n[c]}r.getMaxSupply=s;function o(c){return a[c]}r.getColor=o;function u(){return[r.UNIQUE,r.MYTHIC,r.EXOTIC,r.LEGENDARY,r.EPIC,r.RARE,r.UNCOMMON,r.COMMON]}r.getRarities=u;function l(c){return[i[c],a[c]]}r.getGradient=l})(e.Rarity||(e.Rarity={}))})(Ap)),Ap}var Op={},yI;function ua(){return yI||(yI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const t=Ne();(function(r){r.EYEBROWS="eyebrows",r.EYES="eyes",r.FACIAL_HAIR="facial_hair",r.HAIR="hair",r.BODY_SHAPE="body_shape",r.MOUTH="mouth",r.UPPER_BODY="upper_body",r.LOWER_BODY="lower_body",r.FEET="feet",r.EARRING="earring",r.EYEWEAR="eyewear",r.HAT="hat",r.HELMET="helmet",r.MASK="mask",r.TIARA="tiara",r.TOP_HEAD="top_head",r.SKIN="skin",r.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WearableCategory||(e.WearableCategory={}))})(Op)),Op}var Np={},Pp={},gI;function r_(){return gI||(gI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const t=Ne();(function(r){r.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",r.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BodyShape||(e.BodyShape={}))})(Pp)),Pp}var Cp={},Mp={},_I;function tP(){return _I||(_I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const t=Ne();(function(r){r.HEAD="head",r.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(Mp)),Mp}var EI;function n_(){return EI||(EI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=ua(),r=Ne(),n=tP();(function(i){i.schema={oneOf:[Object.assign({},t.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Cp)),Cp}var vI;function i_(){return vI||(vI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Ne(),r=r_(),n=n_();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Np)),Np}var Ti={},Si={},jp={},Dp={},bI;function ca(){return bI||(bI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const t=Ne();(function(r){r.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,t.generateLazyValidator)(r.schema);r.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(r){r.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(r){r.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(r){r.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(Dp)),Dp}var TI;function rP(){return TI||(TI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=ua(),r=ca(),n=Ne();var i;(function(u){u.schema={type:"object",required:["face256","body"],properties:{face256:r.IPFSv2.schema,body:r.IPFSv2.schema}},u.validate=(0,n.generateLazyValidator)(u.schema)})(i=e.Snapshots||(e.Snapshots={}));var a;(function(u){u.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:Object.assign(Object.assign({},i.schema),{nullable:!0})},additionalProperties:!0},u.validate=(0,n.generateLazyValidator)(u.schema)})(a=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(u){u.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const l=new RegExp(u.schema.pattern,"i");u.validate=c=>l.test(c)})(s=e.LinkUrl||(e.LinkUrl={}));var o;(function(u){u.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(o=e.Link||(e.Link={})),(function(u){u.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},nameColor:Object.assign(Object.assign({},r.Color3.schema),{nullable:!0}),description:{type:"string"},links:{type:"array",maxItems:5,items:o.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:r.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:a.schema},additionalProperties:!0},u.validate=(0,n.generateLazyValidator)(u.schema)})(e.Avatar||(e.Avatar={}))})(jp)),jp}var $p={},SI;function GF(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Ne(),r=rP();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:r.Avatar.schema}},additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})($p)),$p}var II;function zF(){return II||(II=1,(function(e){var t=Si&&Si.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Si&&Si.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(rP(),e),r(GF(),e)})(Si)),Si}var Lp={},qp={},RI;function nP(){return RI||(RI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const t=Ne();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(r){r.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(qp)),qp}var kp={},wI;function iP(){return wI||(wI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(kp)),kp}var Bp={},AI;function aP(){return AI||(AI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const t=Ne();(function(r){r.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},r.schemaValidator=(0,t.generateLazyValidator)(r.schema),r.validate=n=>r.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(Bp)),Bp}var Up={},Ss={},OI;function a_(){return OI||(OI=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.displayableProperties=void 0,Ss.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Ss}var Fp={},NI;function sP(){return NI||(NI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Source||(e.Source={}))})(Fp)),Fp}var Vp={},PI;function oP(){return PI||(PI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Vp)),Vp}var CI;function WF(){return CI||(CI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Ne(),r=a_(),n=nP(),i=aP(),a=sP(),s=oP(),o=iP();var u;(function(l){l.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",l.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",l.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",l.USE_WEB3_API="USE_WEB3_API",l.USE_FETCH="USE_FETCH",l.USE_WEBSOCKET="USE_WEBSOCKET",l.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(u=e.RequiredPermission||(e.RequiredPermission={})),(function(l){l.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},r.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},creator:{type:"string",nullable:!0,description:"Wallet address of the creator of the scene",pattern:"^(0x[a-fA-F0-9]{40})?$",errorMessage:"Creator must be a valid wallet address"},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},a.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:s.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(u)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},o.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:u.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},l.validate=(0,t.generateLazyValidator)(l.schema)})(e.Scene||(e.Scene={}))})(Up)),Up}var MI;function YF(){return MI||(MI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var t=nP();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var r=iP();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=aP();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=WF();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=sP();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=oP();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(Lp)),Lp}var Ii={},Hp={},Gp={},jI;function uP(){return jI||(jI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const t=Ne();(function(r){r.EN="en",r.ES="es"})(e.Locale||(e.Locale={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Locale||(e.Locale={}))})(Gp)),Gp}var DI;function cP(){return DI||(DI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Ne(),r=uP();(function(n){n.schema={type:"object",properties:{code:r.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(Hp)),Hp}var zp={},$I;function lP(){return $I||($I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Metrics||(e.Metrics={}))})(zp)),zp}var Wp={},LI;function s_(){return LI||(LI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=Ol(),r=Ne();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:t.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,r.generateLazyValidator)(n);function a(s){return i(s)}e.isStandard=a})(Wp)),Wp}var Yp={},Ri={},Kp={},qI;function KF(){return qI||(qI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Kp)),Kp}var kI;function dP(){return kI||(kI=1,(function(e){var t=Ri&&Ri.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ri&&Ri.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(KF(),e)})(Ri)),Ri}var Jp={},BI;function o_(){return BI||(BI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const t=Ne();var r;(function(d){d.SINGLE="single",d.ANY="any",d.MULTIPLE="multiple",d.RANGE="range"})(r=e.MappingType||(e.MappingType={}));var n;(function(d){d.MAINNET="mainnet",d.BASE_MAINNET="base_mainnet",d.BASE_SEPOLIA="base_sepolia",d.MONAD_MAINNET="monad_mainnet",d.MONAD_TESTNET="monad_testnet",d.APE_MAINNET="ape_mainnet",d.APE_CALDERA="ape_caldera",d.MATIC="matic",d.SEPOLIA="sepolia",d.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.ANY}},required:["type"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var s;(function(d){d._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(p,v){if(!v||!v.from||!v.to)return!1;let{to:w,from:R}=v;return(typeof R!="bigint"||typeof w!="bigint")&&(R=BigInt(R),w=BigInt(w)),R<=w},errors:!1},d.schema={type:"object",properties:{type:{type:"string",const:r.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[d._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(d){d.schema={type:"object",properties:{type:{type:"string",const:r.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},d.validate=(0,t.generateLazyValidator)(d.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var u;(function(d){d.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo])})(u=e.Mapping||(e.Mapping={})),(function(d){d._isMappingsValid={keyword:"_isMappingsValid",validate:function(p,v){try{c(v)}catch{return!1}return!0},errors:!1},d.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:u.schema}},minProperties:1,required:[],additionalProperties:!1};const m=Object.values(n).reduce((p,v)=>(p[v]=d.innerSchema,p),{});d.schema={type:"object",properties:m,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},d.validate=(0,t.generateLazyValidator)(d.schema,[s._fromLessThanOrEqualTo,d._isMappingsValid])})(e.Mappings||(e.Mappings={}));class l extends Error{constructor(m,p,v){super(m),this.existingMapping=p,this.conflictingMapping=v}}e.AddMappingError=l;function c(d={}){const m={};for(const[h,S]of Object.entries(d)){m[h]={};for(const[A,P]of Object.entries(S))for(const k of P)E(h,A,k)}function p(){return JSON.parse(JSON.stringify(m))}function v(h,S,A){const P=BigInt(h);return P>=BigInt(S)&&P<=BigInt(A)}function w(h,S){switch(S.type){case r.SINGLE:return h.id===S.id;case r.MULTIPLE:return S.ids.includes(h.id);case r.RANGE:return v(h.id,S.from,S.to);default:return!1}}function R(h,S){switch(S.type){case r.SINGLE:return h.ids.includes(S.id);case r.MULTIPLE:return h.ids.some(A=>S.ids.includes(A));case r.RANGE:return h.ids.some(A=>v(A,S.from,S.to));default:return!1}}function O(h,S){switch(S.type){case r.SINGLE:return v(S.id,h.from,h.to);case r.MULTIPLE:return S.ids.some(A=>v(A,h.from,h.to));case r.RANGE:return BigInt(h.from)<=BigInt(S.to)&&BigInt(h.to)>=BigInt(S.from)}}function f(h,S){if(h.type===r.ANY||S.type===r.ANY)return!0;switch(h.type){case r.SINGLE:return w(h,S);case r.MULTIPLE:return R(h,S);case r.RANGE:return O(h,S)}}function E(h,S,A){var P,k;const z=S.toLowerCase();m[h]=(P=m[h])!==null&&P!==void 0?P:{},m[h][z]=(k=m[h][z])!==null&&k!==void 0?k:[];for(const Y of m[h][z])if(f(Y,A))throw new l(`Cannot add mapping to contract ${z} on network ${h} because it overlaps with existing mapping`,Y,A);m[h][z].push(A)}function b(h,S,A){var P;return!((P=m[h])===null||P===void 0)&&P[S]?m[h][S].some(k=>{switch(k.type){case r.SINGLE:return k.id===A;case r.ANY:return!0;case r.MULTIPLE:return k.ids.includes(A);case r.RANGE:return BigInt(A)>=BigInt(k.from)&&BigInt(A)<=BigInt(k.to)}}):!1}return{addMapping:E,getMappings:p,includesNft:b}}e.createMappingsHelper=c})(Jp)),Jp}var UI;function u_(){return UI||(UI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=Ne(),r=dP(),n=o_();e.schema={type:"object",properties:{merkleProof:r.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const i={keyword:"_containsHashingKeys",validate:function(o,u){var l;const c=u;return!((l=c==null?void 0:c.merkleProof)===null||l===void 0)&&l.hashingKeys?c.merkleProof.hashingKeys.every(d=>c.hasOwnProperty(d)):!1},errors:!1},a=(0,t.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function s(o){return a(o)}e.isThirdParty=s})(Yp)),Yp}var Xp={},Qp={},$r={},FI;function fP(){if(FI)return $r;FI=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.isBaseEmote=$r.isBaseAvatar=$r.requiredBaseItemProps=$r.baseItemProperties=void 0;const e=cP(),t=lP(),r=a_();$r.baseItemProperties=Object.assign(Object.assign({},r.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},t.Metrics.schema),{nullable:!0})}),$r.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(a){if(!a||!a.id)return!1;const s=a.id.split(":"),o=s[1]==="decentraland",u=s[3]==="base-avatars";return s.length===5&&o&&u}$r.isBaseAvatar=n;function i(a){if(!a||!a.id)return!1;const s=a.id.split(":");return s.length===5&&s[1]==="decentraland"&&s[3]==="base-emotes"}return $r.isBaseEmote=i,$r}var VI;function JF(){return VI||(VI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Ne(),r=ua(),n=i_(),i=fP(),a=s_(),s=u_(),o=n_(),u=o_();(function(l){l.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),s.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:o.HideableWearableCategory.schema},hides:{type:"array",items:o.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const c={keyword:"_isThirdParty",validate:(m,p)=>!m||(0,s.isThirdParty)(p),errors:!1},d={keyword:"_isBaseAvatar",validate:(m,p)=>!m||(0,i.isBaseAvatar)(p),errors:!1};l.validate=(0,t.generateLazyValidator)(l.schema,[c,d,u.RangeMapping._fromLessThanOrEqualTo,u.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Qp)),Qp}var HI;function XF(){return HI||(HI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=i_();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var r=JF();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=ua();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=tP();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=n_();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(Xp)),Xp}var Zp={},xp={},em={},tm={},GI;function pP(){return GI||(GI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const t=Ne();(function(r){r.DANCE="dance",r.STUNT="stunt",r.GREETINGS="greetings",r.FUN="fun",r.POSES="poses",r.REACTIONS="reactions",r.HORROR="horror",r.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(tm)),tm}var rm={},zI;function mP(){return zI||(zI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Ne(),r=r_();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(rm)),rm}var nm={},WI;function hP(){return WI||(WI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const t=Ne();var r;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(r=e.ArmatureId||(e.ArmatureId={})),(function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.ArmatureId||(e.ArmatureId={}));var n;(function(i){i.schema={type:"object",properties:{animation:{type:"string",minLength:1,errorMessage:"animation must be a non-empty string (GLB clip name)"}},required:["animation"],additionalProperties:!1,errorMessage:{required:{animation:"animation is required (GLB clip name)"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(n=e.EmoteClip||(e.EmoteClip={})),(function(i){i.schema={type:"object",properties:{loop:{type:"boolean",errorMessage:"startAnimation.loop must be a boolean"},[r.Armature]:Object.assign(Object.assign({},n.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[r.Armature_Prop]:Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:"startAnimation.Armature_Prop must contain valid animation data when provided"}),audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["loop",r.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[r.Armature]:"startAnimation.Armature is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.StartAnimation||(e.StartAnimation={})),(function(i){i.schema={type:"object",properties:{title:{type:"string",minLength:1,errorMessage:"outcome.title must be a non-empty string"},loop:{type:"boolean",errorMessage:"outcome.loop must be a boolean"},clips:{type:"object",properties:Object.values(r).reduce((a,s)=>(a[s]=Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:`outcome.clips.${s} must contain valid animation data when provided`}),a),{}),additionalProperties:!0,minProperties:1,errorMessage:"outcome.clips must contain at least one armature animation"},audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["title","loop","clips"],additionalProperties:!1,errorMessage:{required:{title:"outcome.title is required",loop:"outcome.loop is required",clips:"outcome.clips is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(nm)),nm}var YI;function yP(){return YI||(YI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=pP(),r=Ne(),n=mP(),i=hP();(function(a){a.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:t.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},i.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:i.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:["category","tags","representations","loop"],dependencies:{startAnimation:["randomizeOutcomes","outcomes"],randomizeOutcomes:["startAnimation","outcomes"],outcomes:["startAnimation","randomizeOutcomes"]},additionalProperties:!0},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(em)),em}var KI;function QF(){return KI||(KI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=gP(),r=Ne(),n=fP(),i=s_(),a=u_(),s=yP();(function(o){o.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),a.schema.properties),{emoteDataADR74:s.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const u={keyword:"_isThirdParty",validate:(c,d)=>!c||(0,t.isThirdParty)(d),errors:!1},l={keyword:"_isBaseEmote",validate:(c,d)=>!c||(0,n.isBaseEmote)(d),errors:!1};o.validate=(0,r.generateLazyValidator)(o.schema,[u,l,t.RangeMapping._fromLessThanOrEqualTo,t.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(xp)),xp}var im={},JI;function ZF(){return JI||(JI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const t=Ne();(function(r){r.SIMPLE="simple",r.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(im)),im}var am={},XI;function xF(){return XI||(XI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const t=Ne();(function(r){r.SIMPLE_OUTCOME="so",r.MULTIPLE_OUTCOME="mo",r.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(am)),am}var QI;function e2(){return QI||(QI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var t=QF();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var r=mP();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=yP();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=hP();Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return i.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return i.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return i.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return i.StartAnimation}});var a=pP();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=ZF();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=xF();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})})(Zp)),Zp}var ZI;function gP(){return ZI||(ZI=1,(function(e){var t=Ii&&Ii.__createBinding||(Object.create?(function(l,c,d,m){m===void 0&&(m=d);var p=Object.getOwnPropertyDescriptor(c,d);(!p||("get"in p?!c.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(l,m,p)}):(function(l,c,d,m){m===void 0&&(m=d),l[m]=c[d]})),r=Ii&&Ii.__exportStar||function(l,c){for(var d in l)d!=="default"&&!Object.prototype.hasOwnProperty.call(c,d)&&t(c,l,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=cP();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=uP();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=lP();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=r_();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=s_();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var u=u_();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return u.isThirdParty}}),r(o_(),e),r(XF(),e),r(e2(),e)})(Ii)),Ii}var sm={},om={},xI;function Do(){return xI||(xI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const t=Ne();var r;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(r=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:r.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,t.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(om)),om}var e1;function t2(){return e1||(e1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=ca(),r=Do(),n=Ne();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(sm)),sm}var um={},cm={},t1;function _P(){return t1||(t1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=ca(),r=Ne();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(cm)),cm}var r1;function EP(){return r1||(r1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=ca(),r=_P(),n=Ne();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:r.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(um)),um}var lm={},n1;function r2(){return n1||(n1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=Do(),r=Ne();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:t.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(lm)),lm}var wi={},dm={},i1;function n2(){return i1||(i1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=ua(),r=ca(),n=Ne();var i;(function(a){a.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(i=e.Outfit||(e.Outfit={})),(function(a){a.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(e.Outfits||(e.Outfits={}))})(dm)),dm}var a1;function i2(){return a1||(a1=1,(function(e){var t=wi&&wi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=wi&&wi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(n2(),e)})(wi)),wi}var Ai={},fm={},s1;function vP(){return s1||(s1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(t){t.BADGE_GRANTED="badge_granted",t.BID_ACCEPTED="bid_accepted",t.BID_RECEIVED="bid_received",t.EVENTS_STARTED="events_started",t.EVENTS_STARTS_SOON="events_starts_soon",t.EVENT_CREATED="event_created",t.GOVERNANCE_ANNOUNCEMENT="governance_announcement",t.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",t.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",t.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",t.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",t.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",t.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",t.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",t.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",t.GOVERNANCE_TENDER_PASSED="governance_tender_passed",t.GOVERNANCE_WHALE_VOTE="governance_whale_vote",t.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",t.ITEM_SOLD="item_sold",t.ITEM_PUBLISHED="item_published",t.LAND_RENTAL_ENDED="rental_ended",t.LAND_RENTED="rental_started",t.REWARD_ASSIGNED="reward_assignment",t.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",t.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",t.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",t.REWARD_DELAYED="reward_delayed",t.REWARD_IN_PROGRESS="reward_in_progress",t.ROYALTIES_EARNED="royalties_earned",t.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",t.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",t.WORLDS_ACCESS_RESTORED="worlds_access_restored",t.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",t.WORLDS_MISSING_RESOURCES="worlds_missing_resources",t.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",t.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",t.CREDITS_GOAL_COMPLETED="credits_goal_completed",t.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",t.STREAMING_KEY_RESET="streaming_key_reset",t.STREAMING_KEY_REVOKE="streaming_key_revoke",t.STREAMING_KEY_EXPIRED="streaming_key_expired",t.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",t.STREAMING_PLACE_UPDATED="streaming_place_updated",t.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",t.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",t.CREDITS_REMINDER_USAGE="credits_reminder_usage",t.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",t.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",t.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",t.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",t.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",t.COMMUNITY_DELETED="community_deleted",t.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",t.COMMUNITY_RENAMED="community_renamed",t.COMMUNITY_MEMBER_BANNED="community_member_banned",t.COMMUNITY_MEMBER_REMOVED="community_member_removed",t.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",t.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",t.COMMUNITY_INVITE_RECEIVED="community_invite_received",t.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",t.COMMUNITY_POST_ADDED="community_post_added",t.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",t.USER_BANNED_FROM_SCENE="user_banned_from_scene",t.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",t.TRANSFER_RECEIVED="transfer_received",t.TIP_RECEIVED="tip_received",t.BANNED="banned",t.BAN_WARNING="ban_warning",t.BAN_LIFTED="ban_lifted"})(e.NotificationType||(e.NotificationType={})),(function(t){t.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(fm)),fm}var pm={},mm={},o1;function bP(){return o1||(o1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=Ne(),r=vP(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(r.NotificationType).reduce((a,s)=>(a[s]=n,a),{});(function(a){a.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(r.NotificationType),additionalProperties:!1,properties:i}}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(mm)),mm}var hm={},u1;function TP(){return u1||(u1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(t){t.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const r=new RegExp(t.schema.pattern);t.validate=n=>r.test(n)})(e.Email||(e.Email={}))})(hm)),hm}var c1;function a2(){return c1||(c1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=Ne(),r=bP(),n=ca(),i=TP();(function(a){a.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:r.SubscriptionDetails.schema}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Subscription||(e.Subscription={}))})(pm)),pm}var l1;function s2(){return l1||(l1=1,(function(e){var t=Ai&&Ai.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ai&&Ai.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(vP(),e),r(a2(),e),r(bP(),e)})(Ai)),Ai}var Oi={},ym={},d1;function dr(){return d1||(d1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(t){(function(r){r.BLOCKCHAIN="blockchain",r.CATALYST_DEPLOYMENT="catalyst-deployment",r.WORLD="world",r.CLIENT="client",r.WEB="web",r.MARKETPLACE="marketplace",r.REWARDS="rewards",r.BADGE="badge",r.ASSET_BUNDLE="asset-bundle",r.SOCIAL_SERVICE="social-service",r.CREDITS_SERVICE="credits-service",r.STREAMING="streaming",r.COMMS="comms",r.REFERRAL="referral",r.COMMUNITY="community",r.CAMERA="camera",r.EVENT="event",r.GOVERNANCE="governance",r.MODERATION="moderation"})(t.Type||(t.Type={})),(function(r){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published",n.TRANSFER_RECEIVED="transfer-received",n.TIP_RECEIVED="tip-received"})(r.Blockchain||(r.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(r.Marketplace||(r.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(r.CatalystDeployment||(r.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment",n.WORLD_SETTINGS_CHANGED="world_settings_changed",n.WORLD_SCENES_UNDEPLOYMENT="world_scenes_undeployment",n.WORLD_UNDEPLOYMENT="world_undeployment",n.WORLD_SPAWN_COORDINATE_SET="world_spawn_coordinate_set",n.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",n.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",n.WORLDS_ACCESS_RESTORED="worlds_access_restored",n.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",n.WORLDS_MISSING_RESOURCES="worlds_missing_resources"})(r.Worlds||(r.Worlds={})),(function(n){n.LOGGED_IN="logged-in",n.LOGGED_IN_CACHED="logged-in-cached",n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(r.Client||(r.Client={})),(function(n){n.AUTH_IDENTIFY="auth-identify"})(r.Web||(r.Web={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(r.Rewards||(r.Rewards={})),(function(n){n.GRANTED="badge-granted"})(r.Badge||(r.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(r.AssetBundle||(r.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(r.SocialService||(r.SocialService={})),(function(n){n.CREDITS_GOAL_COMPLETED="credits-goal-completed",n.COMPLETE_GOALS_REMINDER="complete-goals-reminder",n.CLAIM_CREDITS_REMINDER="claim-credits-reminder",n.DO_NOT_MISS_OUT_REMINDER="do-not-miss-out-reminder",n.USAGE_REMINDER="usage-reminder",n.USAGE_24_HOURS_REMINDER="usage-24-hours-reminder",n.ON_DEMAND_CREDITS_GRANTED="on-demand-credits-granted",n.NEW_SEASON_REMINDER="new-season-reminder"})(r.CreditsService||(r.CreditsService={})),(function(n){n.STREAMING_KEY_RESET="streaming-key-reset",n.STREAMING_KEY_REVOKE="streaming-key-revoke",n.STREAMING_KEY_EXPIRED="streaming-key-expired",n.STREAMING_TIME_EXCEEDED="streaming-time-exceeded",n.STREAMING_PLACE_UPDATED="streaming-place-updated",n.COMMUNITY_STREAMING_ENDED="community-streaming-ended"})(r.Streaming||(r.Streaming={})),(function(n){n.USER_JOINED_ROOM="user-joined-room",n.USER_LEFT_ROOM="user-left-room",n.USER_BANNED_FROM_SCENE="user-banned-from-scene",n.USER_UNBANNED_FROM_SCENE="user-unbanned-from-scene"})(r.Comms||(r.Comms={})),(function(n){n.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",n.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"})(r.Referral||(r.Referral={})),(function(n){n.DELETED="community-deleted",n.DELETED_CONTENT_VIOLATION="community-deleted-content-violation",n.RENAMED="community-renamed",n.MEMBER_BANNED="community-member-banned",n.MEMBER_LEFT="community-member-left",n.MEMBER_REMOVED="community-member-removed",n.REQUEST_TO_JOIN_RECEIVED="community-request-to-join-received",n.REQUEST_TO_JOIN_ACCEPTED="community-request-to-join-accepted",n.INVITE_RECEIVED="community-invite-received",n.OWNERSHIP_TRANSFERRED="community-ownership-transferred",n.POST_ADDED="community-post-added",n.VOICE_CHAT_STARTED="community-voice-chat-started"})(r.Community||(r.Community={})),(function(n){n.PHOTO_TAKEN="photo-taken",n.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"})(r.Camera||(r.Camera={})),(function(n){n.EVENT_CREATED="event-created",n.EVENT_STARTS_SOON="event-starts-soon",n.EVENT_STARTED="event-started",n.EVENT_ENDED="event-ended"})(r.Event||(r.Event={})),(function(n){n.PROPOSAL_ENACTED="governance_proposal_enacted",n.COAUTHOR_REQUESTED="governance_coauthor_requested",n.PITCH_PASSED="governance_pitch_passed",n.TENDER_PASSED="governance_tender_passed",n.AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",n.VOTING_ENDED_VOTER="governance_voting_ended_voter",n.NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",n.NEW_COMMENT_ON_PROJECT_UPDATED="governance_new_comment_on_project_update",n.WHALE_VOTE="governance_whale_vote",n.VOTED_ON_BEHALF="governance_voted_on_behalf",n.CLIFF_ENDED="governance_cliff_ended"})(r.Governance||(r.Governance={})),(function(n){n.USER_BAN_CREATED="user-ban-created",n.USER_BAN_LIFTED="user-ban-lifted",n.USER_WARNING_CREATED="user-warning-created"})(r.Moderation||(r.Moderation={}))})(t.SubType||(t.SubType={}))})(e.Events||(e.Events={}))})(ym)),ym}var gm={},f1;function o2(){return f1||(f1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TipReceivedEvent=e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const t=Ne(),r=dr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},tokenUri:{type:"string",nullable:!0}},required:["senderAddress","receiverAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BLOCKCHAIN},subType:{type:"string",const:r.Events.SubType.Blockchain.TIP_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},amount:{type:"string"}},required:["senderAddress","receiverAddress","amount"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.TipReceivedEvent||(e.TipReceivedEvent={}))})(gm)),gm}var _m={},p1;function u2(){return p1||(p1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=Do(),r=Ne(),n=EP(),i=dr();(function(a){a.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:t.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},a.validate=(0,r.generateLazyValidator)(a.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(_m)),_m}var Em={},m1;function c2(){return m1||(m1=1,Object.defineProperty(Em,"__esModule",{value:!0})),Em}var vm={},h1;function l2(){return h1||(h1=1,Object.defineProperty(vm,"__esModule",{value:!0})),vm}var bm={},y1;function d2(){return y1||(y1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const t=Ne(),r=dr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MARKETPLACE},subType:{type:"string",const:r.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(bm)),bm}var Tm={},Is={},g1;function Nl(){if(g1)return Is;g1=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.createEventSchema=void 0;function e(t,r,n){return{type:"object",properties:{type:{type:"string",const:t},subType:{type:"string",const:r},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return Is.createEventSchema=e,Is}var _1;function f2(){return _1||(_1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const t=Ne(),r=dr(),n=Nl(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},a={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_ASSIGNED,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,a),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(s){s.schema=(0,n.createEventSchema)(r.Events.Type.REWARDS,r.Events.SubType.Rewards.REWARD_DELAYED,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(Tm)),Tm}var Sm={},E1;function p2(){return E1||(E1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const t=Ne(),r=dr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.BADGE},subType:{type:"string",const:r.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:r.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","statusCode","isLods","isWorld","version"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:r.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:r.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},message:{type:"string",nullable:!0}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:r.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creditsGranted:{type:"number",minimum:1},address:{type:"string"},granterAddress:{type:"string"}},required:["creditsGranted","address","granterAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{goalId:{type:"string"},creditsObtained:{type:"number",minimum:0},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},address:{type:"string"}},required:["goalId","creditsObtained","seasonId","weekNumber","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},pendingGoalIds:{type:"array",items:{type:"string"},minItems:1}},required:["address","seasonId","weekNumber","pendingGoalIds"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"},expirationDay:{type:"string"}},required:["address","creditsAmount","expirationDate","expirationDay"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{addresses:{type:"array",items:{type:"string"}},seasonName:{type:"string"},startDate:{type:"string"},endDate:{type:"string"}},required:["addresses","seasonName","startDate","endDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"}},required:["address","creditsAmount","expirationDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:r.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1}},required:["address","seasonId","weekNumber"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(Sm)),Sm}var Im={},v1;function m2(){return v1||(v1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const t=Ne(),r=dr(),n=Nl(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},position:{type:"string"},worldName:{type:"string",nullable:!0},isWorld:{type:"boolean"},url:{type:"string"},address:{type:"string"},image:{type:"string"}},required:["position","isWorld","url","title","description","address","image"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_RESET,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.STREAMING,r.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(Im)),Im}var Rm={},b1;function h2(){return b1||(b1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const t=Ne(),r=dr();var n;(function(i){i.PRIVATE_MESSAGE="private-message",i.VOICE_CHAT="voice-chat",i.COMMUNITY_VOICE_CHAT="community-voice-chat",i.ISLAND="island",i.SCENE="scene",i.WORLD="world",i.UNKNOWN="unknown"})(n=e.RoomType||(e.RoomType={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{parcel:{type:"string"},sceneId:{type:"string"},userAddress:{type:"string"},realmName:{type:"string"},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)}},required:["parcel","sceneId","userAddress","realmName","isWorld","roomType"]}},required:["type","subType","key","timestamp","metadata"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},realmName:{type:"string"},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)},sceneId:{type:"string",nullable:!0},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0}},required:["isWorld","userAddress","realmName","roomType"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMS},subType:{type:"string",const:r.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(Rm)),Rm}var wm={},T1;function y2(){return T1||(T1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=Ne(),r=dr(),n=Nl(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},address:{type:"string"},tier:{type:"number",minimum:1},url:{type:"string"},image:{type:"string"},invitedUserAddress:{type:"string"},invitedUsers:{type:"number",minimum:1},rarity:{type:"string",nullable:!0}},required:["address","tier","url","title","description","image","invitedUserAddress"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.REFERRAL,r.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.REFERRAL,r.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(wm)),wm}var Am={},S1;function g2(){return S1||(S1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberLeftEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;const t=Ne(),r=dr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.DELETED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","name","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},ownerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","ownerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.RENAMED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},oldName:{type:"string"},newName:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","oldName","newName","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_BANNED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_LEFT},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},memberAddress:{type:"string"}},required:["id","memberAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberLeftEvent||(e.CommunityMemberLeftEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.MEMBER_REMOVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},memberName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","memberAddress","memberName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.INVITE_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.POST_ADDED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},postId:{type:"string"},authorAddress:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["addressesToNotify","communityId","communityName","thumbnailUrl","postId","authorAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},oldOwnerAddress:{type:"string"},newOwnerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","oldOwnerAddress","newOwnerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.COMMUNITY},subType:{type:"string",const:r.Events.SubType.Community.VOICE_CHAT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(Am)),Am}var Om={},I1;function _2(){return I1||(I1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const t=Ne(),r=dr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CAMERA},subType:{type:"string",const:r.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"}},required:["userAddress","photoId","isPublic"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.CAMERA},subType:{type:"string",const:r.Events.SubType.Camera.PHOTO_TAKEN},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sceneId:{type:"string"},userAddress:{type:"string"},realm:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"},users:{type:"array",items:{type:"object",properties:{address:{type:"string"},isEmoting:{type:"boolean"}},required:["address","isEmoting"],additionalProperties:!1}},placeId:{type:"string",nullable:!0}},required:["userAddress","realm","photoId","isPublic","users"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(Om)),Om}var Nm={},R1;function E2(){return R1||(R1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const t=Ne(),r=dr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},communityId:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_STARTS_SOON},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},startsAt:{type:"string"},endsAt:{type:"string"},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link","startsAt","endsAt"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},communityId:{type:"string"},communityName:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.EVENT},subType:{type:"string",const:r.Events.SubType.Event.EVENT_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{communityId:{type:"string",nullable:!0},totalAttendees:{type:"number"}},required:["totalAttendees"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={}))})(Nm)),Nm}var Pm={},w1;function v2(){return w1||(w1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;const t=Ne(),r=dr(),n=Nl(),i={type:"object",properties:{proposalId:{type:"string"},proposalTitle:{type:"string"},title:{type:"string"},description:{type:"string"},link:{type:"string"},address:{type:"string"}},required:["proposalId","proposalTitle","title","description","link","address"],additionalProperties:!1};(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.PROPOSAL_ENACTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.COAUTHOR_REQUESTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.PITCH_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.TENDER_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.VOTING_ENDED_VOTER,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.WHALE_VOTE,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.VOTED_ON_BEHALF,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(a){a.schema=(0,n.createEventSchema)(r.Events.Type.GOVERNANCE,r.Events.SubType.Governance.CLIFF_ENDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(Pm)),Pm}var Cm={},A1;function b2(){return A1||(A1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=e.WorldUndeploymentEvent=e.WorldScenesUndeploymentEvent=e.WorldSpawnCoordinateSetEvent=e.WorldSettingsChangedEvent=void 0;const t=Do(),r=Ne(),n=dr();(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SETTINGS_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},title:{type:"string",nullable:!0},description:{type:"string",nullable:!0},contentRating:{type:"string",nullable:!0},skyboxTime:{type:"number",nullable:!0},categories:{type:"array",items:{type:"string"},nullable:!0},singlePlayer:{type:"boolean",nullable:!0},showInPlaces:{type:"boolean",nullable:!0},thumbnailUrl:{type:"string",nullable:!0},accessType:{type:"string",nullable:!0}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}})(e.WorldSettingsChangedEvent||(e.WorldSettingsChangedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SPAWN_COORDINATE_SET},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string",pattern:"^[a-zA-Z0-9_-]+\\.dcl\\.eth|[a-zA-Z0-9_-]+\\.eth$"},oldCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1,nullable:!0},newCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1}},required:["name","oldCoordinate","newCoordinate"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldSpawnCoordinateSetEvent||(e.WorldSpawnCoordinateSetEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_SCENES_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},scenes:{type:"array",items:{type:"object",properties:{entityId:{type:"string"},baseParcel:{type:"string"}},required:["entityId","baseParcel"],additionalProperties:!1},minItems:1}},required:["worldName","scenes"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldScenesUndeploymentEvent||(e.WorldScenesUndeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLD_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldUndeploymentEvent||(e.WorldUndeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.DEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},entity:{type:"object",properties:{entityId:{type:"string"},authChain:t.AuthChain.schema},additionalProperties:!0,required:["entityId","authChain"]},contentServerUrls:{type:"array",items:{type:"string"},nullable:!0},force:{type:"boolean",nullable:!0},animation:{type:"string",nullable:!0},lods:{type:"array",items:{type:"string"},nullable:!0}},required:["type","subType","key","timestamp","entity"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},attendee:{type:"string"}},required:["title","description","url","attendee"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","url","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(Cm)),Cm}var Mm={},O1;function T2(){return O1||(O1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const t=Ne(),r=dr();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_BAN_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},bannedBy:{type:"string"},reason:{type:"string"},bannedAt:{type:"number",minimum:0},expiresAt:{type:"number",nullable:!0,minimum:0},customMessage:{type:"string",nullable:!0}},required:["id","bannedAddress","bannedBy","reason","bannedAt","expiresAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserBanCreatedEvent||(e.UserBanCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_BAN_LIFTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},liftedBy:{type:"string"},liftedAt:{type:"number",minimum:0}},required:["id","bannedAddress","liftedBy","liftedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserBanLiftedEvent||(e.UserBanLiftedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.MODERATION},subType:{type:"string",const:r.Events.SubType.Moderation.USER_WARNING_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},warnedAddress:{type:"string"},warnedBy:{type:"string"},reason:{type:"string"},warnedAt:{type:"number",minimum:0}},required:["id","warnedAddress","warnedBy","reason","warnedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.UserWarningCreatedEvent||(e.UserWarningCreatedEvent={}))})(Mm)),Mm}var N1;function S2(){return N1||(N1=1,(function(e){var t=Oi&&Oi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Oi&&Oi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(dr(),e),r(o2(),e),r(u2(),e),r(c2(),e),r(l2(),e),r(d2(),e),r(f2(),e),r(p2(),e),r(m2(),e),r(h2(),e),r(y2(),e),r(g2(),e),r(_2(),e),r(E2(),e),r(v2(),e),r(b2(),e),r(T2(),e)})(Oi)),Oi}var P1;function c_(){return P1||(P1=1,(function(e){var t=Ti&&Ti.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ti&&Ti.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(zF(),e),r(YF(),e),r(gP(),e),r(a_(),e),r(dP(),e),r(t2(),e),r(EP(),e),r(r2(),e),r(i2(),e),r(s2(),e),r(S2(),e)})(Ti)),Ti}var C1;function I2(){return C1||(C1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=Ol(),r=ua(),n=i_(),i=Ne(),a=c_();(function(s){s.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},t.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:r.WearableCategory.schema},hides:{type:"array",items:r.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:a.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.WearableJson||(e.WearableJson={}))})(wp)),wp}var M1;function R2(){return M1||(M1=1,(function(e){var t=bi&&bi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=bi&&bi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(HF(),e),r(I2(),e)})(bi)),bi}var j1;function w2(){return j1||(j1=1,(function(e){var t=Ei&&Ei.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ei&&Ei.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(VF(),e),r(R2(),e)})(Ei)),Ei}var Ni={},jm={},D1;function A2(){return D1||(D1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const t=Ne();(function(r){r.MOST_SALES="most_sales",r.MOST_PURCHASES="most_purchases",r.MOST_SPENT="most_spent",r.MOST_EARNED="most_earned",r.MOST_ROYALTIES="most_royalties",r.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(r){r.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Account||(e.Account={}))})(jm)),jm}var Dm={},$m={},$1;function SP(){return $1||($1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Ne(),r=zr();var n;(function(a){a.ETHEREUM_MAINNET="Ethereum Mainnet",a.ETHEREUM_ROPSTEN="Ropsten",a.ETHEREUM_RINKEBY="Rinkeby",a.ETHEREUM_GOERLI="Goerli",a.ETHEREUM_KOVAN="Kovan",a.ETHEREUM_SEPOLIA="Sepolia",a.MATIC_MAINNET="Polygon",a.MATIC_MUMBAI="Mumbai",a.MATIC_AMOY="Amoy",a.AVALANCHE_MAINNET="Avalanche",a.BINANCE_MAINNET="Binance Smart Chain",a.ARBITRUM_MAINNET="Arbitrum",a.OPTIMISM_MAINNET="Optimism",a.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function i(a){switch(a){case n.ETHEREUM_MAINNET:return r.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return r.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return r.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return r.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return r.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return r.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return r.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return r.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return r.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return r.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return r.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return r.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return r.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return r.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,t.generateLazyValidator)(a.schema)})(n=e.ChainName||(e.ChainName={}))})($m)),$m}var Lm={},L1;function Gr(){return L1||(L1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const t=Ne();(function(r){r.ETHEREUM="ETHEREUM",r.MATIC="MATIC",r.AVALANCHE="AVALANCHE",r.BSC="BINANCE SMART CHAIN",r.OPTIMISM="OPTIMISM",r.ARBITRUM="ARBITRUM",r.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Network||(e.Network={}))})(Lm)),Lm}var q1;function zr(){return q1||(q1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const t=Ne(),r=SP(),n=Gr();var i;(function(l){l[l.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",l[l.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",l[l.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",l[l.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",l[l.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",l[l.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",l[l.MATIC_MAINNET=137]="MATIC_MAINNET",l[l.MATIC_MUMBAI=80001]="MATIC_MUMBAI",l[l.MATIC_AMOY=80002]="MATIC_AMOY",l[l.BSC_MAINNET=56]="BSC_MAINNET",l[l.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",l[l.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",l[l.FANTOM_MAINNET=250]="FANTOM_MAINNET",l[l.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(i=e.ChainId||(e.ChainId={}));function a(l){switch(l){case i.ETHEREUM_MAINNET:return r.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return r.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return r.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return r.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return r.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return r.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return r.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return r.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return r.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return r.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return r.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return r.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return r.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return r.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=a;function s(l){switch(l){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=s;function o(l){const c={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(l){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},c);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},c);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},c);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},c)}}e.getNetworkMapping=o;function u(l){switch(l){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=u,(function(l){l.schema={type:"number",enum:Object.values(l)},l.validate=(0,t.generateLazyValidator)(l.schema)})(i=e.ChainId||(e.ChainId={}))})(Dm)),Dm}var qm={},k1;function O2(){return k1||(k1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Ne(),r=zr(),n=Gr();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(qm)),qm}var km={},Bm={},B1;function Pl(){return B1||(B1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const t=Ne();(function(r){r.PARCEL="parcel",r.ESTATE="estate",r.WEARABLE="wearable",r.ENS="ens",r.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Bm)),Bm}var U1;function N2(){return U1||(U1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Ne(),r=zr(),n=Gr(),i=Pl();(function(a){a.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(a){a.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:r.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Contract||(e.Contract={}))})(km)),km}var Um={},Fm={},F1;function IP(){return F1||(F1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Ne(),r=zr(),n=c_(),i=Gr(),a=Pl(),s=Ol(),o=ua();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_LISTED="recently_listed",u.RECENTLY_SOLD="recently_sold",u.CHEAPEST="cheapest",u.RENTAL_LISTING_DATE="rental_listing_date",u.RENTAL_DATE="rented_date",u.MAX_RENTAL_PRICE="max_rental_price",u.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(u){u.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:o.WearableCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"},outcomeType:{type:"string",nullable:!0}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:a.NFTCategory.schema,network:i.Network.schema,chainId:r.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},u.validate=(0,t.generateLazyValidator)(u.schema)})(e.NFT||(e.NFT={}))})(Fm)),Fm}var V1;function P2(){return V1||(V1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Ne(),r=zr(),n=Gr(),i=IP(),a=Pl();(function(s){s.NAME="name",s.NEWEST="newest",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_SOLD="recently_sold",s.RECENTLY_LISTED="recently_listed",s.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:a.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},tradeContractAddress:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:r.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.Item||(e.Item={}))})(Um)),Um}var Vm={},H1;function l_(){return H1||(H1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const t=Ne();(function(r){r.OPEN="open",r.SOLD="sold",r.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Vm)),Vm}var Hm={},G1;function C2(){return G1||(G1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Hm)),Hm}var Gm={},z1;function M2(){return z1||(z1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Ne(),r=zr(),n=Gr();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(Gm)),Gm}var zm={},W1;function j2(){return W1||(W1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(t){t.NEWEST="newest",t.RECENTLY_SOLD="recently_sold",t.CHEAPEST="cheapest",t.MOST_EXPENSIVE="most_expensive",t.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(t){t.ASC="asc",t.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(zm)),zm}var Wm={},Y1;function D2(){return Y1||(Y1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Ne(),r=zr(),n=l_(),i=Gr();(function(a){a.RECENTLY_LISTED="recently_listed",a.RECENTLY_UPDATED="recently_updated",a.CHEAPEST="cheapest",a.ISSUED_ID_ASC="issued_id_asc",a.ISSUED_ID_DESC="issued_id_desc",a.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(a){a.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Order||(e.Order={}))})(Wm)),Wm}var Ym={},K1;function $2(){return K1||(K1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const t=Ne();(function(r){r.INJECTED="injected",r.MAGIC="magic",r.MAGIC_TEST="magic_test",r.FORTMATIC="formatic",r.NETWORK="network",r.WALLET_CONNECT="wallet_connect",r.WALLET_CONNECT_V2="wallet_connect_v2",r.WALLET_LINK="wallet_link",r.METAMASK_MOBILE="metamask_mobile",r.AUTH_SERVER="auth_server",r.THIRDWEB="thirdweb"})(e.ProviderType||(e.ProviderType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.ProviderType||(e.ProviderType={}))})(Ym)),Ym}var Km={},J1;function RP(){return J1||(J1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const t=Ne();(function(r){r.ORDER="order",r.BID="bid",r.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SaleType||(e.SaleType={}))})(Km)),Km}var Jm={},X1;function L2(){return X1||(X1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Ne(),r=zr(),n=RP(),i=Gr();(function(a){a.RECENTLY_SOLD="recently_sold",a.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(a){a.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:r.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Sale||(e.Sale={}))})(Jm)),Jm}var Xm={},Q1;function q2(){return Q1||(Q1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const t=Ne(),r=zr(),n=Gr();(function(a){a.OPEN="open",a.CANCELLED="cancelled",a.EXECUTED="executed",a.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(a){a.PARCEL="parcel",a.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(a){a.LAND_CREATION_DATE="land_creation_date",a.RENTAL_LISTING_DATE="rental_listing_date",a.RENTAL_DATE="rented_date",a.NAME="name",a.MAX_RENTAL_PRICE="max_rental_price",a.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(a){a.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(a){a.schema={type:"object",properties:{network:n.Network.schema,chainId:r.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Xm)),Xm}var Qm={},Z1;function k2(){return Z1||(Z1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(t){t.DATE="date",t.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Qm)),Qm}var Zm={},x1;function B2(){return x1||(x1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Store||(e.Store={}))})(Zm)),Zm}var xm={},eR;function U2(){return eR||(eR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const t=Ne();(function(r){r.MALE="male",r.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(r){r.MALE="male",r.FEMALE="female",r.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.WearableGender||(e.WearableGender={}))})(xm)),xm}var eh={},tR;function F2(){return tR||(tR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const t=Ne();function r(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=r;function n(i,a){const s=r().validWorldRanges;for(const o of s)if(i>=o.xMin&&i<=o.xMax&&a>=o.yMin&&a<=o.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(eh)),eh}var th={},rR;function V2(){return rR||(rR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Ne(),r=zr(),n=l_(),i=Gr();(function(a){a.RECENTLY_OFFERED="recently_offered",a.RECENTLY_UPDATED="recently_updated",a.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(a){const s={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};a.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...s.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Bid||(e.Bid={}))})(th)),th}var rh={},nR;function H2(){return nR||(nR=1,Object.defineProperty(rh,"__esModule",{value:!0})),rh}var nh={},iR;function G2(){return iR||(iR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(t){t.BID="bid",t.PUBLIC_NFT_ORDER="public_nft_order",t.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(t){t[t.ERC20=1]="ERC20",t[t.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",t[t.ERC721=3]="ERC721",t[t.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(t){t.SENT="sent",t.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(nh)),nh}var Pi={},ih={},aR;function z2(){return aR||(aR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const t=Ne();(function(r){r.STATIC="static",r.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(ih)),ih}var ah={},sR;function W2(){return sR||(sR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(t){t.AUTH="authentication",t.BUILDER="builder",t.MARKETPLACE="marketplace",t.PROFILE="profile",t.CONFIG="configurator",t.JESUS="jesus"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(ah)),ah}var sh={},oR;function Y2(){return oR||(oR=1,Object.defineProperty(sh,"__esModule",{value:!0})),sh}var oh={},uR;function K2(){return uR||(uR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const t=Ne();(function(r){r.ANIMATION_PLAY="animation_play",r.ANIMATION_PAUSE="animation_pause",r.ANIMATION_LOOP="animation_loop",r.ANIMATION_END="animation_end",r.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(oh)),oh}var uh={},cR;function J2(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const t=Ne();(function(r){r.IDLE="idle",r.WALK="walk",r.RUN="run",r.JUMP="jump",r.CLAP="clap",r.DAB="dab",r.DANCE="dance",r.FASHION="fashion",r.FASHION_2="fashion-2",r.FASHION_3="fashion-3",r.FASHION_4="fashion-4",r.LOVE="love",r.MONEY="money",r.FIST_PUMP="fist-pump",r.HEAD_EXPLODE="head-explode",r.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(uh)),uh}var ch={},lR;function X2(){return lR||(lR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const t=Ne();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.BABYLON="babylon",n.UNITY="unity"})(e.PreviewRenderer||(e.PreviewRenderer={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const r=(n,i,a,s="*")=>{const o={type:i,payload:a};n.postMessage(o,s)};e.sendMessage=r})(ch)),ch}var lh={},dR;function Q2(){return dR||(dR=1,Object.defineProperty(lh,"__esModule",{value:!0})),lh}var dh={},fR;function Z2(){return fR||(fR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const t=Ne();(function(r){r.ORTHOGRAPHIC="orthographic",r.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(dh)),dh}var fh={},pR;function x2(){return pR||(pR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const t=Ne();(function(r){r.TEXTURE="texture",r.WEARABLE="wearable",r.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PreviewType||(e.PreviewType={}))})(fh)),fh}var ph={},mR;function eV(){return mR||(mR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{stiffness:{type:"number",minimum:0,maximum:5},gravityPower:{type:"number",minimum:0,maximum:10},gravityDir:{type:"array",items:[{type:"number"},{type:"number"},{type:"number"}],minItems:3,maxItems:3},dragForce:{type:"number",minimum:0,maximum:1},center:{type:"integer",minimum:0,nullable:!0}},required:["stiffness","gravityPower","gravityDir","dragForce"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.SpringBoneParams||(e.SpringBoneParams={}))})(ph)),ph}var mh={},hR;function tV(){return hR||(hR=1,Object.defineProperty(mh,"__esModule",{value:!0})),mh}var hh={},yR;function rV(){return yR||(yR=1,Object.defineProperty(hh,"__esModule",{value:!0})),hh}var yh={},gR;function nV(){return gR||(gR=1,Object.defineProperty(yh,"__esModule",{value:!0})),yh}var gh={},_R;function iV(){return _R||(_R=1,Object.defineProperty(gh,"__esModule",{value:!0})),gh}var _h={},ER;function aV(){return ER||(ER=1,Object.defineProperty(_h,"__esModule",{value:!0})),_h}var Eh={},vR;function sV(){return vR||(vR=1,Object.defineProperty(Eh,"__esModule",{value:!0})),Eh}var vh={},bR;function oV(){return bR||(bR=1,Object.defineProperty(vh,"__esModule",{value:!0})),vh}var bh={},TR;function uV(){return TR||(TR=1,Object.defineProperty(bh,"__esModule",{value:!0})),bh}var SR;function cV(){return SR||(SR=1,(function(e){var t=Pi&&Pi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Pi&&Pi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(z2(),e),r(W2(),e),r(Y2(),e),r(K2(),e),r(J2(),e),r(X2(),e),r(Q2(),e),r(Z2(),e),r(x2(),e),r(eV(),e),r(tV(),e),r(rV(),e),r(nV(),e),r(iV(),e),r(aV(),e),r(sV(),e),r(oV(),e),r(uV(),e)})(Pi)),Pi}var Ci={},Rs={},IR;function lV(){if(IR)return Rs;IR=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.isSysLink=void 0;const e=t=>t!==null&&typeof t=="object"&&"sys"in t&&"id"in t.sys;return Rs.isSysLink=e,Rs}var ws={},RR;function dV(){if(RR)return ws;RR=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.ContentfulLocale=void 0;var e;return(function(t){t.enUS="en-US",t.es="es",t.zh="zh"})(e||(e={})),ws.ContentfulLocale=e,ws}var Th={},wR;function fV(){return wR||(wR=1,Object.defineProperty(Th,"__esModule",{value:!0})),Th}var AR;function pV(){return AR||(AR=1,(function(e){var t=Ci&&Ci.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ci&&Ci.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(lV(),e),r(dV(),e),r(fV(),e)})(Ci)),Ci}var OR;function mV(){return OR||(OR=1,(function(e){var t=Ni&&Ni.__createBinding||(Object.create?(function(z,Y,W,U){U===void 0&&(U=W);var F=Object.getOwnPropertyDescriptor(Y,W);(!F||("get"in F?!Y.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return Y[W]}}),Object.defineProperty(z,U,F)}):(function(z,Y,W,U){U===void 0&&(U=W),z[U]=Y[W]})),r=Ni&&Ni.__exportStar||function(z,Y){for(var W in z)W!=="default"&&!Object.prototype.hasOwnProperty.call(Y,W)&&t(Y,z,W)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var n=A2();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=zr();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var a=SP();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=O2();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=N2();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var u=P2();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return u.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return u.ItemSortBy}});var l=l_();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return l.ListingStatus}});var c=C2();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return c.MetaTransaction}});var d=M2();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return d.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return d.MintSortBy}});var m=Gr();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return m.Network}});var p=Pl();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return p.NFTCategory}});var v=IP();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return v.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return v.NFTSortBy}});var w=j2();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return w.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return w.CatalogSortDirection}});var R=D2();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return R.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return R.OrderSortBy}});var O=$2();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return O.ProviderType}});var f=Ol();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return f.Rarity}});var E=RP();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return E.SaleType}});var b=L2();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return b.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return b.SaleSortBy}});var h=q2();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return h.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return h.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return h.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return h.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return h.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return h.PeriodCreation}});var S=k2();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var A=B2();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return A.Store}});var P=U2();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return P.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return P.GenderFilterOption}});var k=F2();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return k.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return k.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return k.isInsideWorldLimits}}),r(V2(),e),r(H2(),e),r(G2(),e),r(cV(),e),r(pV(),e)})(Ni)),Ni}var Sh={},NR;function hV(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const t=Ne();(function(r){r.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Sh)),Sh}var Mi={},Ih={},As={},PR;function wP(){if(PR)return As;PR=1,Object.defineProperty(As,"__esModule",{value:!0}),As.isInExceptionBlock=void 0;function e(i,a){return i>=62&&i<=150&&a>=151&&a<=158}function t(i,a){return i>=151&&i<=162&&a>=144&&a<=158}function r(i,a){return i>=151&&i<=163&&a>=59&&a<=143}function n(i,a){return e(i,a)||t(i,a)||r(i,a)}return As.isInExceptionBlock=n,As}var CR;function yV(){return CR||(CR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=Ne(),r=wP();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(p,v){return!v||typeof v.x!="number"||typeof v.y!="number"?!1:o(v)||(0,r.isInExceptionBlock)(v.x,v.y)},errors:!1},n.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},n.validate=(0,t.generateLazyValidator)(n.schema,[n._isInLimits]);function i({x:m,y:p}){return`${m},${p}`}n.parcelToString=i;function a(m){const p=m.match(/^(-?\d+),(-?\d+)$/);if(!p)return null;const[,v,w]=p,R=parseInt(v,10),O=parseInt(w,10);return{x:R,y:O}}n.stringToParcel=a;function s(m){const p=a(m);return p?n.validate(p):!1}n.isParcelStringValid=s;function o(m){const{x:p,y:v}=m;return p>=e.PARCEL_LIMITS.minX&&p<=e.PARCEL_LIMITS.maxX&&v>=e.PARCEL_LIMITS.minY&&v<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=o;function u(m){return(0,r.isInExceptionBlock)(m.x,m.y)}n.isExceptionParcel=u;function l(m){return o(m)||u(m)}n.isInBounds=l;function c(m){return n.validate(m)}n.isValid=c;function d(m){const p=a(m);return p?n.validate(p):!1}n.isValidString=d})(e.Parcel||(e.Parcel={}))})(Ih)),Ih}var ji={},MR;function gV(){if(MR)return ji;MR=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.validateUrlInstance=ji.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function t(p,v=2){let w=p;for(let R=0;R<v;R++)try{w=decodeURIComponent(w)}catch{break}return w.normalize("NFKC")}function r(p){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(p)}function n(p){return!!(p.username||p.password)}function i(p){return/\\/.test(p)}const a=["80","443"];function s(p,v){return!!p.port&&!v.includes(p.port)}function o(p){const v=p.toLowerCase();return!!(v==="localhost"||v.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(v)||v==="::1"||v==="[::1]"||v.startsWith("fe80:")||v.startsWith("fc00:"))}function u(p){if(p.startsWith("//"))return null;try{return{url:new URL(p),wasRelative:!1}}catch{try{return{url:new URL(p,"https://example.com"),wasRelative:!0}}catch{return null}}}function l(p){const v=t(String(p).toLowerCase());return!(r(v)||i(v))}function c(p){return!(!p||p.includes("..")||p.includes("//")||r(p)||i(p))}function d(p,v={}){const w=Object.assign(Object.assign({},e),v),R=[...a,...w.allowedPorts];if(!p||p.length===0||p.length>4096||r(p)||i(p))return!1;const O=t(p);if(r(O)||i(O)||p.startsWith("//"))return!1;const f=u(p);if(!f)return!1;const{url:E,wasRelative:b}=f;if(E.protocol!=="http:"&&E.protocol!=="https:"&&E.protocol!==""||n(E)||i(p)||i(E.href)||!b&&(s(E,R)||!w.allowLocalhost&&E.hostname&&o(E.hostname))||!c(E.pathname)||E.pathname.length>2048)return!1;const h=Array.from(E.searchParams.entries());if(h.length>50||(E.search?E.search.startsWith("?")?E.search.length-1:E.search.length:0)>2048)return!1;for(const[A,P]of h)if(A.length===0||!l(A)||!l(P)||A.length>128||P.length>1024)return!1;return!(E.hash&&r(E.hash))}ji.validateUrl=d;function m(p,v={}){return d(p.toString(),v)}return ji.validateUrlInstance=m,ji}var jR;function _V(){return jR||(jR=1,(function(e){var t=Mi&&Mi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Mi&&Mi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(yV(),e),r(wP(),e),r(gV(),e)})(Mi)),Mi}var DR;function EV(){return DR||(DR=1,(function(e){var t=jr&&jr.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u);var c=Object.getOwnPropertyDescriptor(o,u);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[u]}}),Object.defineProperty(s,l,c)}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=jr&&jr.__setModuleDefault||(Object.create?(function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}):function(s,o){s.default=o}),n=jr&&jr.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&t(o,s,u);return r(o,s),o},i=jr&&jr.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const a=n(w2());e.sdk=a,i(Ne(),e),i(mV(),e),i(c_(),e),i(ca(),e),i(hV(),e),i(Do(),e),i(_P(),e),i(TP(),e),i(_V(),e)})(jr)),jr}var $R;function AP(){return $R||($R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=EV();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return t.AuthChain}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return t.AuthLink}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return t.AuthLinkType}})})(Tp)),Tp}var LR;function OP(){return LR||(LR=1,(function(e){var t=Mr&&Mr.__createBinding||(Object.create?(function(X,K,$,j){j===void 0&&(j=$);var L=Object.getOwnPropertyDescriptor(K,$);(!L||("get"in L?!K.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return K[$]}}),Object.defineProperty(X,j,L)}):(function(X,K,$,j){j===void 0&&(j=$),X[j]=K[$]})),r=Mr&&Mr.__setModuleDefault||(Object.create?(function(X,K){Object.defineProperty(X,"default",{enumerable:!0,value:K})}):function(X,K){X.default=K}),n=Mr&&Mr.__importStar||(function(){var X=function(K){return X=Object.getOwnPropertyNames||function($){var j=[];for(var L in $)Object.prototype.hasOwnProperty.call($,L)&&(j[j.length]=L);return j},X(K)};return function(K){if(K&&K.__esModule)return K;var $={};if(K!=null)for(var j=X(K),L=0;L<j.length;L++)j[L]!=="default"&&t($,K,j[L]);return r($,K),$}})(),i=Mr&&Mr.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseEmphemeralPayload=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.createEthereumMessageHash=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0,e.validateSignature=m,e.isValidAuthChain=p,e.createEIP1271MessageHash=v,e.createSimpleAuthChain=w,e.createAuthChain=R,e.initializeAuthChain=O,e.signPayload=f,e.createSignature=E,e.ownerAddress=b,e.getEphemeralMessage=h,e.getEphemeralSignatureType=W,e.getSignedIdentitySignatureType=U,e.parseEphemeralPayload=F,e.isValidEIP1271Signature=ce;const a=n(wl()),s=AF(),o=qF(),u=i(kF()),l=BF(),c=AP();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const d=132;async function m(X,K,$,j=Date.now()){let L="";if(!p(K))return{ok:!1,message:"ERROR: Malformed authChain"};for(const N of K){const D=ne(N.type);try{const{nextAuthority:Z}=await D(L,N,{provider:$,dateToValidateExpirationInMillis:j});L=Z||""}catch(Z){const Ee=Z instanceof Error?Z.message:String(Z);return{ok:!1,message:`ERROR. Link type: ${N.type}. ${Ee}.`}}}const H=L===X;return{ok:H,message:H?void 0:`ERROR: Invalid final authority. Expected: ${X}. Current ${L}.`}}function p(X){for(const[K,$]of X.entries())if(K===0&&$.type!==c.AuthLinkType.SIGNER||$.type===c.AuthLinkType.SIGNER&&K!==0)return!1;return!0}function v(X){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(X)))}function w(X,K,$){return[{type:c.AuthLinkType.SIGNER,payload:K,signature:""},{type:U($),payload:X,signature:$}]}function R(X,K,$,j){const L=(0,l.moveMinutes)($),H=h(K.address,L),N=E(X,H),D=E(K,j);return[{type:c.AuthLinkType.SIGNER,payload:X.address,signature:""},{type:c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:H,signature:N},{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:j,signature:D}]}async function O(X,K,$,j){const L=(0,l.moveMinutes)($),H=h(K.address,L),N=await j(H),D=[{type:c.AuthLinkType.SIGNER,payload:X,signature:""},{type:W(N),payload:H,signature:N}];return{ephemeralIdentity:K,expiration:L,authChain:D}}function f(X,K){const $=E(X.ephemeralIdentity,K);return[...X.authChain,{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:K,signature:$}]}e.createEthereumMessageHash=o.createEthereumMessageHash;function E(X,K){return(0,o.ethSign)((0,a.hexToBytes)(X.privateKey),K)}function b(X){return X.length>0&&X[0].type===c.AuthLinkType.SIGNER?X[0].payload:"Invalid-Owner-Address"}function h(X,K){return`Decentraland Login
71
- Ephemeral address: ${X}
72
- Expiration: ${K.toISOString()}`}e.Authenticator={validateSignature:m,isValidAuthChain:p,createEIP1271MessageHash:v,createSimpleAuthChain:w,createAuthChain:R,initializeAuthChain:O,signPayload:f,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:E,ownerAddress:b,getEphemeralMessage:h};const S=async(X,K)=>({nextAuthority:K.payload});e.SIGNER_VALIDATOR=S;const A=async(X,K)=>{if(!K.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const $=(0,o.recoverAddressFromEthSignature)(K.signature,K.payload),j=X.toLocaleLowerCase(),L=$.toLocaleLowerCase();if(j===L)return{nextAuthority:K.payload};throw new Error(`Invalid signer address. Expected: ${j}. Actual: ${L}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=A;const P=async(X,K,$)=>{if(!K.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:j,ephemeralAddress:L,expiration:H}=F(K.payload),N=($==null?void 0:$.dateToValidateExpirationInMillis)||Date.now();if(H>N){const D=(0,o.recoverAddressFromEthSignature)(K.signature,j),Z=X.toLocaleLowerCase(),Ee=D.toLocaleLowerCase();if(Z===Ee)return{nextAuthority:L};throw new Error(`Invalid signer address. Expected: ${Z}. Actual: ${Ee}`)}throw new Error(`Ephemeral key expired. Expiration: ${H}. Test: ${N}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=P;const k=async(X,K,$)=>{if(!K.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:j,ephemeralAddress:L,expiration:H}=F(K.payload),N=($==null?void 0:$.dateToValidateExpirationInMillis)||Date.now();if(H>N&&await se($==null?void 0:$.provider,X,j,K.signature,N))return{nextAuthority:L};throw new Error(`Ephemeral key expired. Expiration: ${H}. Test: ${N}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=k;const z=async(X,K,$)=>{if(!K.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(!$)throw new Error("Missing validation options for 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await se($.provider,X,K.payload,K.signature,$.dateToValidateExpirationInMillis))return{nextAuthority:K.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=z;const Y=async(X,K)=>({error:"Error Validator."});function W(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}function U(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}function F(X){const K=X.replace(/\r/g,""),$=K.split(`
73
- `),j="Ephemeral address: ",L="Expiration: ";if($.length<3||!$[1].startsWith(j)||!$[2].startsWith(L))throw new Error(`Invalid ephemeral payload. Expected 3 lines with "${j}" on line 2 and "${L}" on line 3.`);const H=$[1].substring(j.length),N=$[2].substring(L.length),D=Date.parse(N);if(Number.isNaN(D))throw new Error(`Invalid expiration date in ephemeral payload: "${N}"`);return{message:K,ephemeralAddress:H,expiration:D}}e.parseEmphemeralPayload=F;async function ce(X,K,$,j){const L=v(K),H=(0,a.hexToBytes)($);let N;try{N=(0,a.bytesToHex)(await X.isValidSignature(L,H,j))}catch{}if(N===e.ERC1654_MAGIC_VALUE)return!0;const D=(0,o.createEthereumMessageHash)(K);try{N=(0,a.bytesToHex)(await X.isValidSignature(D,H,j))}catch{}return N===e.ERC1654_MAGIC_VALUE}async function se(X,K,$,j,L){if(!X)throw new Error("Missing provider");const H=new a.default(X),N=await(0,s.SignatureValidator)(H,K);let D=await ce(N,$,j);if(D)return!0;const Z=new u.default(H);try{const{block:Ee}=await Z.getDate(L,!1);if(D=await ce(N,$,j,Ee),D)return!0}catch(Ee){const _e=Ee instanceof Error?Ee.message:String(Ee);throw new Error(`Invalid validation. Error: ${_e}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${D}`)}function ne(X){switch(X){case c.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return Y}}})(Mr)),Mr}var En={},qR;function vV(){return qR||(qR=1,Object.defineProperty(En,"__esModule",{value:!0}),En.AUTH_METADATA_HEADER=En.AUTH_TIMESTAMP_HEADER=En.AUTH_CHAIN_HEADER_PREFIX=void 0,En.AUTH_CHAIN_HEADER_PREFIX="x-identity-auth-chain-",En.AUTH_TIMESTAMP_HEADER="x-identity-timestamp",En.AUTH_METADATA_HEADER="x-identity-metadata"),En}var kR;function bV(){return kR||(kR=1,(function(e){var t=gi&&gi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=gi&&gi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(OP(),e),r(vV(),e),r(AP(),e)})(gi)),gi}var TV=bV(),Di={},Lr={},Lc={exports:{}},qc={exports:{}},BR;function d_(){return BR||(BR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){if(n==null)throw new TypeError("Expected a string but received a ".concat(n));if(n.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(n.constructor.name))}e.exports=t.default,e.exports.default=t.default})(qc,qc.exports)),qc.exports}var kc={exports:{}},UR;function SV(){return UR||(UR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(i){return Object.prototype.toString.call(i)==="[object RegExp]"}function n(i,a){for(var s=0;s<a.length;s++){var o=a[s];if(i===o||r(o)&&o.test(i))return!0}return!1}e.exports=t.default,e.exports.default=t.default})(kc,kc.exports)),kc.exports}var Bc={exports:{}},FR;function IV(){return FR||(FR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(i,a){return i.indexOf(a)!==-1};t.default=r,e.exports=t.default,e.exports.default=t.default})(Bc,Bc.exports)),Bc.exports}var Uc={exports:{}},Fc={exports:{}},VR;function NP(){return VR||(VR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(i){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},r(i)}function n(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;(r(i)!=="object"||i===null)&&(i={});for(var s in a)typeof i[s]>"u"&&(i[s]=a[s]);return i}e.exports=t.default,e.exports.default=t.default})(Fc,Fc.exports)),Fc.exports}var HR;function RV(){return HR||(HR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=i(d_()),n=i(NP());function i(o){return o&&o.__esModule?o:{default:o}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function s(o,u){(0,r.default)(o),u=(0,n.default)(u,a),u.allow_trailing_dot&&o[o.length-1]==="."&&(o=o.substring(0,o.length-1)),u.allow_wildcard===!0&&o.indexOf("*.")===0&&(o=o.substring(2));var l=o.split("."),c=l[l.length-1];return u.require_tld&&(l.length<2||!u.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(c)||/\s/.test(c))||!u.allow_numeric_tld&&/^\d+$/.test(c)?!1:l.every(function(d){return!(d.length>63&&!u.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(d)||/[\uff01-\uff5e]/.test(d)||/^-|-$/.test(d)||!u.allow_underscores&&/_/.test(d))})}e.exports=t.default,e.exports.default=t.default})(Uc,Uc.exports)),Uc.exports}var Vc={exports:{}},GR;function wV(){return GR||(GR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(d_());function n(d){return d&&d.__esModule?d:{default:d}}function i(d){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},i(d)}var a="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",s="(".concat(a,"[.]){3}").concat(a),o=new RegExp("^".concat(s,"$")),u="(?:[0-9a-fA-F]{1,4})",l=new RegExp("^("+"(?:".concat(u,":){7}(?:").concat(u,"|:)|")+"(?:".concat(u,":){6}(?:").concat(s,"|:").concat(u,"|:)|")+"(?:".concat(u,":){5}(?::").concat(s,"|(:").concat(u,"){1,2}|:)|")+"(?:".concat(u,":){4}(?:(:").concat(u,"){0,1}:").concat(s,"|(:").concat(u,"){1,3}|:)|")+"(?:".concat(u,":){3}(?:(:").concat(u,"){0,2}:").concat(s,"|(:").concat(u,"){1,4}|:)|")+"(?:".concat(u,":){2}(?:(:").concat(u,"){0,3}:").concat(s,"|(:").concat(u,"){1,5}|:)|")+"(?:".concat(u,":){1}(?:(:").concat(u,"){0,4}:").concat(s,"|(:").concat(u,"){1,6}|:)|")+"(?::((?::".concat(u,"){0,5}:").concat(s,"|(?::").concat(u,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function c(d){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,r.default)(d);var p=(i(m)==="object"?m.version:arguments[1])||"";return p?p.toString()==="4"?o.test(d):p.toString()==="6"?l.test(d):!1:c(d,{version:4})||c(d,{version:6})}e.exports=t.default,e.exports.default=t.default})(Vc,Vc.exports)),Vc.exports}var zR;function AV(){return zR||(zR=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r=u(d_()),n=u(SV()),i=u(IV()),a=u(RV()),s=u(wV()),o=u(NP());function u(f){return f&&f.__esModule?f:{default:f}}function l(f,E){return v(f)||p(f,E)||d(f,E)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
74
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(f,E){if(f){if(typeof f=="string")return m(f,E);var b={}.toString.call(f).slice(8,-1);return b==="Object"&&f.constructor&&(b=f.constructor.name),b==="Map"||b==="Set"?Array.from(f):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?m(f,E):void 0}}function m(f,E){(E==null||E>f.length)&&(E=f.length);for(var b=0,h=Array(E);b<E;b++)h[b]=f[b];return h}function p(f,E){var b=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(b!=null){var h,S,A,P,k=[],z=!0,Y=!1;try{if(A=(b=b.call(f)).next,E!==0)for(;!(z=(h=A.call(b)).done)&&(k.push(h.value),k.length!==E);z=!0);}catch(W){Y=!0,S=W}finally{try{if(!z&&b.return!=null&&(P=b.return(),Object(P)!==P))return}finally{if(Y)throw S}}return k}}function v(f){if(Array.isArray(f))return f}var w={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},R=/^\[([^\]]+)\](?::([0-9]+))?$/;function O(f,E){if((0,r.default)(f),!f||/[\s<>]/.test(f)||f.indexOf("mailto:")===0||(E=(0,o.default)(E,w),E.validate_length&&f.length>E.max_allowed_length)||!E.allow_fragments&&(0,i.default)(f,"#")||!E.allow_query_components&&((0,i.default)(f,"?")||(0,i.default)(f,"&")))return!1;var b,h,S,A,P,k,z,Y;z=f.split("#"),f=z.shift(),z=f.split("?"),f=z.shift();var W=f.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(le){return U=!0,b=le.toLowerCase(),E.require_valid_protocol&&E.protocols.indexOf(b)===-1?!1:f.substring(W[0].length)};if(W){var ce=W[1],se=f.substring(W[0].length),ne=se.slice(0,2)==="//";if(ne){if(f=F(ce),f===!1)return!1}else{var X=se.indexOf("/"),K=X===-1?se:se.substring(0,X),$=K.indexOf("@");if($!==-1){var j=K.substring(0,$),L=/^[a-zA-Z0-9\-_.%:]*$/,H=L.test(j),N=/%[0-9a-fA-F]{2}/.test(j);if(H&&!N){if(E.require_protocol)return!1}else if(f=F(ce),f===!1)return!1}else{var D=/^[0-9]/.test(se);if(D){if(E.require_protocol)return!1}else if(f=F(ce),f===!1)return!1}}}else if(E.require_protocol)return!1;if(f.slice(0,2)==="//"){if(!U&&!E.allow_protocol_relative_urls)return!1;f=f.slice(2)}if(f==="")return!1;if(z=f.split("/"),f=z.shift(),f===""&&!E.require_host)return!0;if(z=f.split("@"),z.length>1){if(E.disallow_auth||z[0]===""||(h=z.shift(),h.indexOf(":")>=0&&h.split(":").length>2))return!1;var Z=h.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}A=z.join("@"),k=null,Y=null;var Ie=A.match(R);if(Ie?(S="",Y=Ie[1],k=Ie[2]||null):(z=A.split(":"),S=z.shift(),z.length&&(k=z.join(":"))),k!==null&&k.length>0){if(P=parseInt(k,10),!/^[0-9]+$/.test(k)||P<=0||P>65535)return!1}else if(E.require_port)return!1;return E.host_whitelist?(0,n.default)(S,E.host_whitelist):S===""&&!E.require_host?!0:!(!(0,s.default)(S)&&!(0,a.default)(S,E)&&(!Y||!(0,s.default)(Y,6))||(S=S||Y,E.host_blacklist&&(0,n.default)(S,E.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(Lc,Lc.exports)),Lc.exports}var Rh={},WR;function PP(){return WR||(WR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var t;(function(o){o.GET="get",o.STORE="store",o.CLEAR="clear",o.PING="ping"})(t||(e.Action=t={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function r(o){return{target:e.SINGLE_SIGN_ON_TARGET,...o}}e.createMessage=r;function n(o){const u=localStorage.getItem(s(o));if(!u)return null;let l;try{l=JSON.parse(u)}catch{return a(o),null}return l.expiration=new Date(l.expiration),l.expiration.getTime()<=Date.now()?(a(o),null):l}e.localStorageGetIdentity=n;function i(o,u){new Date(u.expiration).getTime()>Date.now()&&localStorage.setItem(s(o),JSON.stringify(u))}e.localStorageStoreIdentity=i;function a(o){localStorage.removeItem(s(o))}e.localStorageClearIdentity=a;function s(o){if(!/^0x[a-fA-F0-9]{40}$/.test(o))throw new Error("User must be a valid ethereum address");return`single-sign-on-${o.toLowerCase()}`}})(Rh)),Rh}var YR;function OV(){if(YR)return Lr;YR=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.clearIdentity=Lr.storeIdentity=Lr.getIdentity=Lr.init=void 0;const e=AV(),t=PP(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(R,O={}){if(!(0,e.default)(R,{...o,...O}))throw new Error(`Invalid url: ${R}`);if(s)throw new Error("Already initialized");const f=document.createElement("iframe");f.id=r,f.src=R,f.style.width="0",f.style.height="0",f.style.border="none",f.style.position="absolute",document.body.appendChild(f),s=R}Lr.init=u;async function l(R){let O;try{O=(await p(await m(),t.Action.GET,{user:R})).identity??null}catch(f){w(f),O=(0,t.localStorageGetIdentity)(R)}return O}Lr.getIdentity=l;async function c(R,O){try{await p(await m(),t.Action.STORE,{user:R,identity:O})}catch(f){w(f),(0,t.localStorageStoreIdentity)(R,O)}}Lr.storeIdentity=c;async function d(R){try{await p(await m(),t.Action.CLEAR,{user:R})}catch(O){w(O),(0,t.localStorageClearIdentity)(R)}}Lr.clearIdentity=d;async function m(){if(!s)throw new Error("Not initialized");for(let R=0;R<i;R++){const O=document.getElementById(r),f=O==null?void 0:O.contentWindow;if(!f){await v(n);continue}try{await p(f,t.Action.PING,{},n)}catch{continue}return f}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function p(R,O,f,E=0){a++;const b=a;let h=null;const S=new Promise((A,P)=>{h=({data:k})=>{!k||k.target!==t.SINGLE_SIGN_ON_TARGET||k.id!==b||(k.error?P(new Error(k.error)):A(k))},window.addEventListener("message",h)});R.postMessage((0,t.createMessage)({id:b,action:O,...f}),s);try{return await(E?Promise.race([S,new Promise((A,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),E))]):S)}catch(A){throw A}finally{h&&window.removeEventListener("message",h)}}function v(R){return new Promise(O=>setTimeout(O,R))}function w(R){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",R.message)}return Lr}var KR;function NV(){return KR||(KR=1,(function(e){var t=Di&&Di.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Di&&Di.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(OV(),e),r(PP(),e)})(Di)),Di}var cg=NV();function PV(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?cn.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?cn.STAGING:t.endsWith(".io")||t.endsWith(".zone")?cn.DEVELOPMENT:null}function CV(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(MP(n))return n}return null}var JR={},cn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(cn||(cn={}));function CP(){return Object.values(cn)}function MP(e){return CP().includes(e)}function Hc(e){if(MP(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${CP().map(t=>`"${t}"`).join(", ")}.`)}function MV(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:r,VITE_DCL_DEFAULT_ENV:n,GATSBY_DCL_DEFAULT_ENV:i}=e;if(t&&r&&t!==r)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(t&&n&&t!==n)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(t&&i&&t!==i)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(r&&i&&r!==i)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?Hc(t):r?Hc(r):n?Hc(n):i?Hc(i):cn.PRODUCTION}function jV(e){if(typeof window<"u"){const r=CV(window.location);if(r)return r;const n=PV(window.location);if(n)return n}return MV(typeof e>"u"&&typeof zc=="object"&&typeof JR=="object"?JR:e)}function DV(e,t){const r=jV(t==null?void 0:t.systemEnvVariables),n=e[r];return{get:(i,a="")=>{if(!n)throw new Error(`Could not find a config for env=${r}`);return i in n?n[i]:a},is:i=>r===i,getEnv:()=>r}}const $V="development",LV="80002",qV="https://marketplace-api.decentraland.zone",kV="https://marketplace-api.decentraland.zone",BV="/auth",UV="https://rpc.decentraland.org/amoy",FV="https://credits.decentraland.zone",VV="https://builder-api.decentraland.zone",HV="https://peer.decentraland.zone",GV="",zV="",WV="",YV="",KV={ENVIRONMENT:$V,CHAIN_ID:LV,MARKETPLACE_SERVER_URL:qV,NFT_API_URL:kV,AUTH_URL:BV,RPC_URL:UV,CREDITS_SERVER_URL:FV,BUILDER_SERVER_URL:VV,PEER_URL:HV,SHOP_SERVER_URL:GV,STRIPE_PUBLISHABLE_KEY:zV,SEGMENT_WRITE_KEY:WV,SENTRY_DSN:YV},JV="staging",XV="80002",QV="https://marketplace-api.decentraland.zone",ZV="https://marketplace-api.decentraland.zone",xV="/auth",eH="https://rpc.decentraland.org/amoy",tH="https://credits.decentraland.zone",rH="https://builder-api.decentraland.zone",nH="https://peer.decentraland.zone",iH="",aH="",sH="",oH="",uH={ENVIRONMENT:JV,CHAIN_ID:XV,MARKETPLACE_SERVER_URL:QV,NFT_API_URL:ZV,AUTH_URL:xV,RPC_URL:eH,CREDITS_SERVER_URL:tH,BUILDER_SERVER_URL:rH,PEER_URL:nH,SHOP_SERVER_URL:iH,STRIPE_PUBLISHABLE_KEY:aH,SEGMENT_WRITE_KEY:sH,SENTRY_DSN:oH},cH="production",lH="137",dH="https://marketplace-api.decentraland.org",fH="https://marketplace-api.decentraland.org",pH="/auth",mH="https://rpc.decentraland.org/polygon",hH="https://credits.decentraland.org",yH="https://builder-api.decentraland.org",gH="https://peer.decentraland.org",_H="",EH="",vH="",bH="",TH={ENVIRONMENT:cH,CHAIN_ID:lH,MARKETPLACE_SERVER_URL:dH,NFT_API_URL:fH,AUTH_URL:pH,RPC_URL:mH,CREDITS_SERVER_URL:hH,BUILDER_SERVER_URL:yH,PEER_URL:gH,SHOP_SERVER_URL:_H,STRIPE_PUBLISHABLE_KEY:EH,SEGMENT_WRITE_KEY:vH,SENTRY_DSN:bH},SH={},br=DV({[cn.DEVELOPMENT]:KV,[cn.STAGING]:uH,[cn.PRODUCTION]:TH},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),rr=SH,Nt={marketplaceServerUrl:rr.VITE_MARKETPLACE_SERVER_URL??br.get("MARKETPLACE_SERVER_URL"),nftApiUrl:rr.VITE_NFT_API_URL??br.get("NFT_API_URL"),chainId:Number(rr.VITE_CHAIN_ID??br.get("CHAIN_ID")),authUrl:rr.VITE_AUTH_URL??br.get("AUTH_URL"),rpcUrl:rr.VITE_RPC_URL??br.get("RPC_URL"),creditsServerUrl:rr.VITE_CREDITS_SERVER_URL??br.get("CREDITS_SERVER_URL"),builderServerUrl:rr.VITE_BUILDER_SERVER_URL??br.get("BUILDER_SERVER_URL"),peerUrl:rr.VITE_PEER_URL??br.get("PEER_URL"),shopServerUrl:rr.VITE_SHOP_SERVER_URL??br.get("SHOP_SERVER_URL"),stripePublishableKey:rr.VITE_STRIPE_PK??br.get("STRIPE_PUBLISHABLE_KEY"),segmentWriteKey:rr.VITE_SEGMENT_WRITE_KEY??br.get("SEGMENT_WRITE_KEY"),sentryDsn:rr.VITE_SENTRY_DSN??br.get("SENTRY_DSN"),sentryEnvironment:rr.VITE_SENTRY_ENVIRONMENT??(Number(rr.VITE_CHAIN_ID??br.get("CHAIN_ID"))===80002?"dev":"prod"),sentryRelease:rr.VITE_SENTRY_RELEASE??`shop@${rr.VITE_APP_VERSION??"0.0.0-dev"}`},IH=744*60;async function jP(){return(await Xt(async()=>{const{connection:e}=await import("./index-63GX_n07.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([6,1]))).connection}async function RH(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new IC(e.provider),n=r.getSigner();let i=cg.localStorageGetIdentity(t);if(!i){const a=RC.createRandom();i=await TV.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:k_(a.publicKey),privateKey:k_(a.privateKey)},IH,s=>n.signMessage(s)),cg.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function wH(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Nt.authUrl}/login?redirectTo=${e}`)}async function AH(){try{const t=await(await jP()).tryPreviousConnection();return!t.account||!cg.localStorageGetIdentity(t.account.toLowerCase())?null:await RH(t)}catch{return null}}async function OH(){try{await(await jP()).disconnect()}catch{}}const NH=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,PH=Nt.chainId===80002?"amoy":"polygon",CH=Nt.chainId===80002?"dev":"prod";function DP(){return window.analytics}function MH(){let e=null;try{e=is.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:NH,network:PH,app_env:CH}}function Xn(e,t={}){const r={...MH(),...t},n=DP();n&&n.track(e,r)}function jH(e,t={}){const r=DP();r&&r.identify(e.toLowerCase(),t)}function DH(e){Xn("Shop Viewed Page",{page:e})}function XR(e){return e===xi.ProviderType.MAGIC||e===xi.ProviderType.MAGIC_TEST?"magic":"wallet"}function $H(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function po(e){return Math.round(e*10)/100}function f_(e){return!e.tokenId}function r4(e){return{item_id:e.itemId??null,contract_address:e.contractAddress,token_id:e.tokenId??null,trade_id:e.tradeId??null,price_credits:e.priceCredits,price_usd:po(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:f_(e)}}function n4(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(f_);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:po(n.priceCredits)})),value_credits:t,value_usd:po(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function LH(e){const t=e;if((t==null?void 0:t.code)===4001)return"user_rejected";const r=((t==null?void 0:t.message)??"").toLowerCase();return r.includes("reject")||r.includes("denied")||r.includes("cancel")?"user_rejected":r.includes("insufficient")?"insufficient_credits":r.includes("not for sale")||r.includes("no active listing")||r.includes("sold")?"not_for_sale":"unknown"}function i4(e){return LH(e)==="user_rejected"}function qH(e){const t=window;if(t.analytics&&t.analytics.invoked)return;const r=t.analytics||[];r.invoked=!0,r.methods=["track","identify","page","group","alias","ready","on","once","off","reset","setAnonymousId"],r.factory=n=>(...i)=>(r.push([n,...i]),r);for(const n of r.methods)r[n]=r.factory(n);r.load=n=>{const i=document.createElement("script");i.async=!0,i.src=`https://cdn.segment.com/analytics.js/v1/${encodeURIComponent(n)}/analytics.min.js`,document.head.appendChild(i)},t.analytics=r,r.load(e),r.page()}let QR=!1;function kH(){if(QR)return;QR=!0;const e=Nt.segmentWriteKey;e&&qH(e)}let lg=null;function BH(e){lg=e}function ZR(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),lg)try{lg(e,t)}catch{}}const UH=/0x[a-fA-F0-9]{130}\b/g,FH=/0x[a-fA-F0-9]{64}\b/g,VH=/(sk_[a-z]+_[A-Za-z0-9]+|pi_[A-Za-z0-9]+_secret_[A-Za-z0-9]+|[A-Za-z0-9-]*secret[A-Za-z0-9-]*)/gi,HH=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function Os(e){return e.replace(UH,"<signature>").replace(VH,"<secret>").replace(FH,"<hex32>")}function GH(e){var r;e.message&&(e.message=Os(e.message));for(const n of((r=e.exception)==null?void 0:r.values)??[])n.value&&(n.value=Os(n.value));for(const n of e.breadcrumbs??[])n.message&&(n.message=Os(n.message));e.request&&(e.request.url&&(e.request.url=Os(e.request.url)),delete e.request.cookies,delete e.request.headers);const t=n=>{if(n)for(const i of Object.keys(n)){if(HH.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=Os(n[i]))}};return t(e.tags),t(e.extra),e}let xR=!1;function zH(){if(xR)return;const e=Nt.sentryDsn;if(!e)return;xR=!0,Dq({dsn:e,environment:Nt.sentryEnvironment,release:Nt.sentryRelease,integrations:[new bL],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:GH});const t=WH();t&&Gj({id:t}),BH((r,n)=>Ag(r,{extra:n}))}function WH(){var e;try{return((e=is.getState().session)==null?void 0:e.address)??null}catch{return null}}const wh="shop:signing_in",is=No(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(wh,"1")}catch{}wH()},disconnect:async()=>{Xn("Shop Signed Out");try{await OH()}catch(t){ZR(t,{flow:"wallet",step:"disconnect"})}e({session:null})},restore:async()=>{let t;try{t=await AH()}catch(n){ZR(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),jH(t.address,{sign_in_method:XR(t.providerType)});let r=!1;try{r=sessionStorage.getItem(wh)==="1",r&&sessionStorage.removeItem(wh)}catch{}r&&Xn("Shop Signed In",{method:XR(t.providerType),is_new_user:$H(t.address)})}})),YH=Nt.peerUrl;function p_(e){return sl({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const t=await fetch(`${YH}/lambdas/profiles/${e.toLowerCase()}`);if(!t.ok)return;const r=await t.json();return(n=r==null?void 0:r.avatars)==null?void 0:n[0]}})}var vn={},Ah={},ew;function $P(){return ew||(ew=1,Object.defineProperty(Ah,"__esModule",{value:!0})),Ah}var bn={},en={},Ea={},$i={},tw={},Ns,rw;function Wr(){if(rw)return Ns;rw=1;var e=function(t){return t&&t.Math===Math&&t};return Ns=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof Iy=="object"&&Iy)||e(typeof Ns=="object"&&Ns)||(function(){return this})()||Function("return this")(),Ns}var Oh,nw;function la(){return nw||(nw=1,Oh=function(e){try{return!!e()}catch{return!0}}),Oh}var Nh,iw;function Cl(){if(iw)return Nh;iw=1;var e=la();return Nh=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Nh}var Ph,aw;function KH(){if(aw)return Ph;aw=1;var e=Cl(),t=Function.prototype,r=t.apply,n=t.call;return Ph=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),Ph}var Ch,sw;function as(){if(sw)return Ch;sw=1;var e=Cl(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Ch=e?n:function(i){return function(){return r.apply(i,arguments)}},Ch}var Mh,ow;function LP(){if(ow)return Mh;ow=1;var e=as(),t=e({}.toString),r=e("".slice);return Mh=function(n){return r(t(n),8,-1)},Mh}var jh,uw;function qP(){if(uw)return jh;uw=1;var e=LP(),t=as();return jh=function(r){if(e(r)==="Function")return t(r)},jh}var Dh,cw;function da(){if(cw)return Dh;cw=1;var e=typeof document=="object"&&document.all;return Dh=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Dh}var $h={},Lh,lw;function $o(){if(lw)return Lh;lw=1;var e=la();return Lh=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Lh}var qh,dw;function m_(){if(dw)return qh;dw=1;var e=Cl(),t=Function.prototype.call;return qh=e?t.bind(t):function(){return t.apply(t,arguments)},qh}var kh={},fw;function JH(){if(fw)return kh;fw=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return kh.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,kh}var Bh,pw;function kP(){return pw||(pw=1,Bh=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Bh}var Uh,mw;function XH(){if(mw)return Uh;mw=1;var e=as(),t=la(),r=LP(),n=Object,i=e("".split);return Uh=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,Uh}var Fh,hw;function BP(){return hw||(hw=1,Fh=function(e){return e==null}),Fh}var Vh,yw;function UP(){if(yw)return Vh;yw=1;var e=BP(),t=TypeError;return Vh=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Vh}var Hh,gw;function QH(){if(gw)return Hh;gw=1;var e=XH(),t=UP();return Hh=function(r){return e(t(r))},Hh}var Gh,_w;function Ml(){if(_w)return Gh;_w=1;var e=da();return Gh=function(t){return typeof t=="object"?t!==null:e(t)},Gh}var zh,Ew;function FP(){return Ew||(Ew=1,zh={}),zh}var Wh,vw;function ZH(){if(vw)return Wh;vw=1;var e=FP(),t=Wr(),r=da(),n=function(i){return r(i)?i:void 0};return Wh=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},Wh}var Yh,bw;function xH(){if(bw)return Yh;bw=1;var e=as();return Yh=e({}.isPrototypeOf),Yh}var Kh,Tw;function e3(){if(Tw)return Kh;Tw=1;var e=Wr(),t=e.navigator,r=t&&t.userAgent;return Kh=r?String(r):"",Kh}var Jh,Sw;function t3(){if(Sw)return Jh;Sw=1;var e=Wr(),t=e3(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,a=i&&i.v8,s,o;return a&&(s=a.split("."),o=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!o&&t&&(s=t.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=t.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),Jh=o,Jh}var Xh,Iw;function VP(){if(Iw)return Xh;Iw=1;var e=t3(),t=la(),r=Wr(),n=r.String;return Xh=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Xh}var Qh,Rw;function HP(){if(Rw)return Qh;Rw=1;var e=VP();return Qh=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Qh}var Zh,ww;function GP(){if(ww)return Zh;ww=1;var e=ZH(),t=da(),r=xH(),n=HP(),i=Object;return Zh=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Zh}var xh,Aw;function r3(){if(Aw)return xh;Aw=1;var e=String;return xh=function(t){try{return e(t)}catch{return"Object"}},xh}var ey,Ow;function zP(){if(Ow)return ey;Ow=1;var e=da(),t=r3(),r=TypeError;return ey=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},ey}var ty,Nw;function n3(){if(Nw)return ty;Nw=1;var e=zP(),t=BP();return ty=function(r,n){var i=r[n];return t(i)?void 0:e(i)},ty}var ry,Pw;function i3(){if(Pw)return ry;Pw=1;var e=m_(),t=da(),r=Ml(),n=TypeError;return ry=function(i,a){var s,o;if(a==="string"&&t(s=i.toString)&&!r(o=e(s,i))||t(s=i.valueOf)&&!r(o=e(s,i))||a!=="string"&&t(s=i.toString)&&!r(o=e(s,i)))return o;throw new n("Can't convert object to primitive value")},ry}var ny={exports:{}},iy,Cw;function a3(){return Cw||(Cw=1,iy=!0),iy}var ay,Mw;function s3(){if(Mw)return ay;Mw=1;var e=Wr(),t=Object.defineProperty;return ay=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},ay}var jw;function o3(){if(jw)return ny.exports;jw=1;var e=a3(),t=Wr(),r=s3(),n="__core-js_shared__",i=ny.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ny.exports}var sy,Dw;function u3(){if(Dw)return sy;Dw=1;var e=o3();return sy=function(t,r){return e[t]||(e[t]=r||{})},sy}var oy,$w;function c3(){if($w)return oy;$w=1;var e=UP(),t=Object;return oy=function(r){return t(e(r))},oy}var uy,Lw;function h_(){if(Lw)return uy;Lw=1;var e=as(),t=c3(),r=e({}.hasOwnProperty);return uy=Object.hasOwn||function(i,a){return r(t(i),a)},uy}var cy,qw;function l3(){if(qw)return cy;qw=1;var e=as(),t=0,r=Math.random(),n=e(1.1.toString);return cy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},cy}var ly,kw;function d3(){if(kw)return ly;kw=1;var e=Wr(),t=u3(),r=h_(),n=l3(),i=VP(),a=HP(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return ly=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},ly}var dy,Bw;function f3(){if(Bw)return dy;Bw=1;var e=m_(),t=Ml(),r=GP(),n=n3(),i=i3(),a=d3(),s=TypeError,o=a("toPrimitive");return dy=function(u,l){if(!t(u)||r(u))return u;var c=n(u,o),d;if(c){if(l===void 0&&(l="default"),d=e(c,u,l),!t(d)||r(d))return d;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},dy}var fy,Uw;function WP(){if(Uw)return fy;Uw=1;var e=f3(),t=GP();return fy=function(r){var n=e(r,"string");return t(n)?n:n+""},fy}var py,Fw;function p3(){if(Fw)return py;Fw=1;var e=Wr(),t=Ml(),r=e.document,n=t(r)&&t(r.createElement);return py=function(i){return n?r.createElement(i):{}},py}var my,Vw;function YP(){if(Vw)return my;Vw=1;var e=$o(),t=la(),r=p3();return my=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),my}var Hw;function m3(){if(Hw)return $h;Hw=1;var e=$o(),t=m_(),r=JH(),n=kP(),i=QH(),a=WP(),s=h_(),o=YP(),u=Object.getOwnPropertyDescriptor;return $h.f=e?u:function(c,d){if(c=i(c),d=a(d),o)try{return u(c,d)}catch{}if(s(c,d))return n(!t(r.f,c,d),c[d])},$h}var hy,Gw;function h3(){if(Gw)return hy;Gw=1;var e=la(),t=da(),r=/#|\.prototype\./,n=function(u,l){var c=a[i(u)];return c===o?!0:c===s?!1:t(l)?e(l):!!l},i=n.normalize=function(u){return String(u).replace(r,".").toLowerCase()},a=n.data={},s=n.NATIVE="N",o=n.POLYFILL="P";return hy=n,hy}var yy,zw;function y3(){if(zw)return yy;zw=1;var e=qP(),t=zP(),r=Cl(),n=e(e.bind);return yy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},yy}var gy={},_y,Ww;function g3(){if(Ww)return _y;Ww=1;var e=$o(),t=la();return _y=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),_y}var Ey,Yw;function _3(){if(Yw)return Ey;Yw=1;var e=Ml(),t=String,r=TypeError;return Ey=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Ey}var Kw;function E3(){if(Kw)return gy;Kw=1;var e=$o(),t=YP(),r=g3(),n=_3(),i=WP(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return gy.f=e?r?function(m,p,v){if(n(m),p=i(p),n(v),typeof m=="function"&&p==="prototype"&&"value"in v&&c in v&&!v[c]){var w=o(m,p);w&&w[c]&&(m[p]=v.value,v={configurable:l in v?v[l]:w[l],enumerable:u in v?v[u]:w[u],writable:!1})}return s(m,p,v)}:s:function(m,p,v){if(n(m),p=i(p),n(v),t)try{return s(m,p,v)}catch{}if("get"in v||"set"in v)throw new a("Accessors not supported");return"value"in v&&(m[p]=v.value),m},gy}var vy,Jw;function v3(){if(Jw)return vy;Jw=1;var e=$o(),t=E3(),r=kP();return vy=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},vy}var by,Xw;function b3(){if(Xw)return by;Xw=1;var e=Wr(),t=KH(),r=qP(),n=da(),i=m3().f,a=h3(),s=FP(),o=y3(),u=v3(),l=h_(),c=function(d){var m=function(p,v,w){if(this instanceof m){switch(arguments.length){case 0:return new d;case 1:return new d(p);case 2:return new d(p,v)}return new d(p,v,w)}return t(d,this,arguments)};return m.prototype=d.prototype,m};return by=function(d,m){var p=d.target,v=d.global,w=d.stat,R=d.proto,O=v?e:w?e[p]:e[p]&&e[p].prototype,f=v?s:s[p]||u(s,p,{})[p],E=f.prototype,b,h,S,A,P,k,z,Y,W;for(A in m)b=a(v?A:p+(w?".":"#")+A,d.forced),h=!b&&O&&l(O,A),k=f[A],h&&(d.dontCallGetSet?(W=i(O,A),z=W&&W.value):z=O[A]),P=h&&z?z:m[A],!(!b&&!R&&typeof k==typeof P)&&(d.bind&&h?Y=o(P,e):d.wrap&&h?Y=c(P):R&&n(P)?Y=r(P):Y=P,(d.sham||P&&P.sham||k&&k.sham)&&u(Y,"sham",!0),u(f,A,Y),R&&(S=p+"Prototype",l(s,S)||u(s,S,{}),u(s[S],A,P),d.real&&E&&(b||!E[A])&&u(E,A,P)))},by}var Qw;function T3(){if(Qw)return tw;Qw=1;var e=b3(),t=Wr();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),tw}var Ty,Zw;function S3(){return Zw||(Zw=1,T3(),Ty=Wr()),Ty}var Sy,xw;function I3(){if(xw)return Sy;xw=1;var e=S3();return Sy=e,Sy}var eA;function KP(){if(eA)return $i;eA=1;var e=$i&&$i.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty($i,"__esModule",{value:!0}),$i.getImplementation=void 0;var t=e(I3());function r(n,i){var a,s=(a=n[i])!==null&&a!==void 0?a:t.default[i];if(!s)throw new ReferenceError('"'+i+'" is not defined');return s}return $i.getImplementation=r,$i}var tA;function JP(){if(tA)return Ea;tA=1;var e=Ea&&Ea.__values||function(o){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&o[u],c=0;if(l)return l.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&c>=o.length&&(o=void 0),{value:o&&o[c++],done:!o}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ea,"__esModule",{value:!0});var t=OP(),r=KP(),n="x-identity-auth-chain-",i="x-identity-timestamp",a="x-identity-metadata";function s(o){o===void 0&&(o={});var u=(0,r.getImplementation)(o,"Headers");return function(c,d,m,p,v){var w,R,O=new u(v),f=String(Date.now()),E=JSON.stringify(p),b=[d,m,f,E].join(":").toLowerCase(),h=0,S=t.Authenticator.signPayload(c,b);try{for(var A=e(S),P=A.next();!P.done;P=A.next()){var k=P.value;O.set(n+h,JSON.stringify(k)),h++}}catch(z){w={error:z}}finally{try{P&&!P.done&&(R=A.return)&&R.call(A)}finally{if(w)throw w.error}}return O.set(i,f),O.set(a,E),O}}return Ea.default=s,Ea}var rA;function XP(){if(rA)return en;rA=1;var e=en&&en.__assign||function(){return e=Object.assign||function(s){for(var o,u=1,l=arguments.length;u<l;u++){o=arguments[u];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(s[c]=o[c])}return s},e.apply(this,arguments)},t=en&&en.__rest||function(s,o){var u={};for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&o.indexOf(l)<0&&(u[l]=s[l]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(s);c<l.length;c++)o.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(s,l[c])&&(u[l[c]]=s[l[c]]);return u},r=en&&en.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(en,"__esModule",{value:!0});var n=r(JP()),i=KP();function a(s){s===void 0&&(s={});var o=(0,n.default)(s),u=(0,i.getImplementation)(s,"URL"),l=(0,i.getImplementation)(s,"Request"),c=(0,i.getImplementation)(s,"fetch");return function(m,p){if(p&&p.identity){var v=p.identity,w=p.metadata,R=t(p,["identity","metadata"]);if(typeof m=="string"||m instanceof u||globalThis.URL&&m instanceof globalThis.URL){var O=typeof m=="string"?new u(m):m,f=new l(O.toString(),e(e({},R),{headers:o(v,p.method||"GET",O.pathname,w||{},R==null?void 0:R.headers)}));return c(f)}var E=new u(m.url),b=new l(m),h=o(v,m.method||"GET",E.pathname,w||{});return h.forEach(function(S,A){b.headers.set(A,S)}),c(b)}return c(m,p)}}return en.default=a,en}var nA;function R3(){return nA||(nA=1,(function(e){var t=bn&&bn.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u),Object.defineProperty(s,l,{enumerable:!0,get:function(){return o[u]}})}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=bn&&bn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=bn&&bn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r($P(),e);var i=XP();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=JP();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(bn)),bn}var iA;function w3(){return iA||(iA=1,(function(e){var t=vn&&vn.__createBinding||(Object.create?(function(a,s,o,u){u===void 0&&(u=o),Object.defineProperty(a,u,{enumerable:!0,get:function(){return s[o]}})}):(function(a,s,o,u){u===void 0&&(u=o),a[u]=s[o]})),r=vn&&vn.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=vn&&vn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r($P(),e),r(R3(),e);var i=n(XP());e.default=(0,i.default)()})(vn)),vn}var A3=w3();const jl=SA(A3);async function O3(e,t){const r=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await jl(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function N3(e,t){const{usd:r}=await O3(e,t);return r??{balanceCents:0,credits:0}}async function a4(e,t,r){const n=`${Nt.creditsServerUrl}/credits/authorize`,i=await jl(n,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({usdPriceCents:t,tradeId:r})});if(!i.ok)throw new Error(`authorizeUsdCredit ${i.status}: ${await i.text()}`);return i.json()}async function s4(e,t,r){const n=new URLSearchParams;n.set("status","all"),n.set("limit",String(r.first)),(r==null?void 0:r.skip)!=null&&n.set("offset",String(r.skip));const i=n.toString(),a=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await jl(a,{method:"GET",identity:t,metadata:{}});if(!s.ok)throw new Error(`fetchUserPurchases ${s.status}: ${await s.text()}`);const o=await s.json(),u=o.purchases??[],l=(r==null?void 0:r.skip)??0,c=r==null?void 0:r.first,d=typeof o.total=="number"?o.total:l+u.length+(u.length>=c?1:0);return{items:u,total:d}}async function o4(e,t){if(t.length===0)return 0;const r=`${Nt.creditsServerUrl}/credits/authorize/cancel`,n=await jl(r,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({salts:t})});if(!n.ok)throw new Error(`cancelUsdIntents ${n.status}: ${await n.text()}`);return(await n.json()).released??0}async function u4(e,t=1e3){const r=await fetch(`${Nt.creditsServerUrl}/dev/mint-usd`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e.toLowerCase(),usdCents:t})});if(!r.ok)throw new Error(`devMintUsd ${r.status}: ${await r.text()}`);return r.json()}function P3(e){return sl({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>N3(e.address,e.identity)})}const C3=e=>po(e.reduce((t,r)=>t+r.priceCredits,0)),kr=No((e,t)=>({items:[],open:!1,fittingOpen:!1,add:(r,n="grid")=>{const i=t().items.some(s=>s.id===r.id);if(e(s=>i?{open:!0}:{items:[...s.items,r],open:!0}),i)return;const a=t().items;Xn("Shop Added To Cart",{item_id:r.itemId??null,contract_address:r.contractAddress,price_credits:r.priceCredits,price_usd:po(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:C3(a)})},remove:r=>{const n=t().items.find(i=>i.id===r);e(i=>({items:i.items.filter(a=>a.id!==r)})),n&&Xn("Shop Removed From Cart",{item_id:n.itemId??null,cart_size:t().items.length})},clear:()=>e({items:[]}),setOpen:r=>e({open:r}),setFittingOpen:r=>e(r?{fittingOpen:r,open:!1}:{fittingOpen:r})})),Ya={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function c4(e){return`${e} ${e===1?Ya.nameSingular:Ya.name}`}function An({className:e}){return ee.jsx("span",{className:`ico ${Ya.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function M3(){const e=kr(s=>s.items),t=kr(s=>s.open),r=kr(s=>s.setOpen),n=kr(s=>s.setFittingOpen),i=Be.useRef(null),a=e.reduce((s,o)=>s+o.priceCredits,0);return Be.useEffect(()=>{if(!t)return;const s=setTimeout(()=>r(!1),4500),o=u=>{i.current&&!i.current.contains(u.target)&&r(!1)};return document.addEventListener("mousedown",o),()=>{clearTimeout(s),document.removeEventListener("mousedown",o)}},[t,e.length,r]),!t||e.length===0?null:ee.jsxs("div",{className:"cart-pop",ref:i,role:"dialog","aria-label":"Cart",children:[ee.jsxs("div",{className:"cart-pop__head",children:[ee.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),ee.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(s=>ee.jsxs("div",{className:"cart-pop__row",children:[ee.jsx("div",{className:"cart-pop__thumb",children:s.thumbnail?ee.jsx("img",{src:s.thumbnail,alt:s.name}):null}),ee.jsx("div",{className:"cart-pop__name",title:s.name,children:s.name}),ee.jsxs("div",{className:"cart-pop__price",children:[ee.jsx(An,{className:"ccy-mark"})," ",s.priceCredits]})]},s.id))}),ee.jsxs("div",{className:"cart-pop__foot",children:[ee.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",ee.jsxs("strong",{children:[ee.jsx(An,{className:"ccy-mark"})," ",a]})]}),ee.jsxs("div",{className:"cart-pop__actions",children:[ee.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>n(!0),children:"Try on"}),ee.jsx(Jc,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}function j3(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=is(),a=e==null?void 0:e.address,{data:s,isLoading:o}=p_(a),{data:u}=P3(e),l=kr(R=>R.items.length),c=al(),[d,m]=Be.useState(""),p=Be.useRef();Be.useEffect(()=>{i()},[i]);function v(R){c(R.trim()?`/assets?q=${encodeURIComponent(R.trim())}`:"/assets",{replace:!0})}function w(R){m(R),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>v(R),300)}return ee.jsxs(ee.Fragment,{children:[ee.jsx(Vq,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),ee.jsxs("div",{className:"subnav",children:[ee.jsxs("nav",{className:"subnav__tabs",children:[ee.jsx($n,{to:"/overview",children:"Overview"}),ee.jsx($n,{to:"/assets",children:"Collectibles"}),ee.jsx($n,{to:"/market",children:"Market"}),ee.jsx($n,{to:"/my-assets",children:"My Assets"}),ee.jsx($n,{to:"/my-favorites",children:"My Favorites"}),e?ee.jsx($n,{to:"/my-purchases",children:"My Purchases"}):null]}),ee.jsxs("div",{className:"subnav__search",children:[ee.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),ee.jsx("input",{value:d,"aria-label":"Search the shop",placeholder:"Search items, creators, collections…",onChange:R=>w(R.target.value),onKeyDown:R=>{R.key==="Enter"&&(p.current&&clearTimeout(p.current),v(d))}})]}),e?ee.jsxs("span",{className:"subnav__balance",title:`Your ${Ya.name}`,children:[ee.jsx(An,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,ee.jsxs($n,{to:"/credits",className:"subnav__credits",children:[ee.jsx(An,{className:"subnav__credits-ico"}),"Get ",Ya.name]}),ee.jsxs("div",{className:"subnav__cart-wrap",children:[ee.jsxs($n,{to:"/cart",className:"subnav__cart","aria-label":"Cart",children:[ee.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?ee.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),ee.jsx(M3,{})]})]})]})}let D3=0;const no=No(e=>({toasts:[],push:t=>{const r=++D3;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),l4={success:e=>no.getState().push({message:e,kind:"success"}),error:e=>no.getState().push({message:e,kind:"error"}),info:e=>no.getState().push({message:e,kind:"info"})},$3={success:"✓",error:"!",info:"i"};function L3({t:e}){const t=no(r=>r.dismiss);return Be.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),ee.jsxs("div",{className:`toast toast--${e.kind}`,role:e.kind==="error"?"alert":"status",onClick:()=>t(e.id),children:[ee.jsx("span",{className:"toast__icon","aria-hidden":!0,children:$3[e.kind]}),ee.jsx("span",{className:"toast__msg",children:e.message})]})}function q3(){const e=no(t=>t.toasts);return e.length===0?null:ee.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>ee.jsx(L3,{t},t.id))})}const k3=Be.lazy(()=>Xt(()=>import("./index-D7_2_7YY.js"),__vite__mapDeps([7,1,8,5,3,4,9])).then(e=>({default:e.WearablePreview})));function y_(e){return ee.jsx(Be.Suspense,{fallback:null,children:ee.jsx(k3,{...e})})}function B3(e){return e.itemId?`urn:decentraland:${Nt.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Yi(e){return e.category!=="emote"}function Ka(e){return Yi(e)?e.wearableCategory??`unknown:${e.id}`:null}const U3=new Set(["hat","helmet","mask","tiara","top_head","hair","facial_hair","eyewear","earring","eyes","eyebrows","mouth"]);function F3(e){if(!Yi(e))return"item";const t=e.wearableCategory;return t?U3.has(t)?"head":t==="upper_body"?"upper":t==="lower_body"?"lower":t==="feet"?"feet":t==="hands"||t==="hands_wear"?"hands":"item":"item"}function aA(e){const t=new Set,r=new Set;for(const n of e){const i=Ka(n);i==null||r.has(i)||(r.add(i),t.add(n.id))}return t}function V3(e,t,r){if(!Yi(t))return e;const n=new Set(e);if(n.has(t.id))return n.delete(t.id),n;const i=Ka(t);if(i!=null)for(const a of r)a.id!==t.id&&n.has(a.id)&&Ka(a)===i&&n.delete(a.id);return n.add(t.id),n}function H3(e){const t=new Map;for(const n of e){const i=Ka(n);if(i==null)continue;const a=t.get(i)??[];a.push(n.id),t.set(i,a)}const r=new Set;for(const n of t.values())n.length>1&&n.forEach(i=>r.add(i));return r}function G3(e,t){const r=[];for(const n of e){if(!t.has(n.id)||!Yi(n))continue;const i=B3(n);i&&r.push(i)}return r}function sA(e){return!e||e.startsWith("unknown:")?"Wearable":e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," ")}function z3(){const e=kr(E=>E.fittingOpen),t=kr(E=>E.setFittingOpen),r=kr(E=>E.items),n=kr(E=>E.remove),i=al(),a=is(E=>{var b;return(b=E.session)==null?void 0:b.address}),{data:s,isFetched:o}=p_(a),u=!a||o,l=a&&s?a:"default",[c,d]=Be.useState(()=>aA(r)),[m,p]=Be.useState(!1);Be.useEffect(()=>{e&&d(aA(r))},[e]),Be.useEffect(()=>{const E=new Set(r.map(b=>b.id));d(b=>{const h=new Set([...b].filter(S=>E.has(S)));return h.size===b.size?b:h})},[r]);const v=Be.useMemo(()=>H3(r),[r]),w=Be.useMemo(()=>G3(r,c),[r,c]),R=r.reduce((E,b)=>E+b.priceCredits,0),O=w.join(",");Be.useEffect(()=>{p(!1)},[O,l]);const f=Be.useRef(!1);return Be.useEffect(()=>{if(!e){f.current=!1;return}f.current||(f.current=!0,Xn("Shop Tried On Outfit",{cart_size:r.length,wearables:r.filter(Yi).length,emotes:r.filter(E=>!Yi(E)).length,cart_value_credits:R}))},[e,r,R]),Be.useEffect(()=>{if(!e)return;const E=b=>{b.key==="Escape"&&t(!1)};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[e,t]),!e||r.length===0?null:ee.jsxs("div",{className:"fitting",role:"dialog","aria-modal":"true","aria-label":"Fitting room",children:[ee.jsx("div",{className:"fitting__scrim",onClick:()=>t(!1)}),ee.jsxs("div",{className:"fitting__panel",children:[ee.jsx("button",{className:"fitting__close",onClick:()=>t(!1),"aria-label":"Close",children:"×"}),ee.jsx("div",{className:"fitting__stage",children:u?w.length>0?ee.jsxs(ee.Fragment,{children:[ee.jsx(y_,{profile:l,urns:w,type:xi.PreviewType.AVATAR,emote:xi.PreviewEmote.FASHION,background:"ecebed",disableFadeEffect:!0,dev:Nt.chainId===80002,onLoad:()=>p(!0)},l),m?null:ee.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:ee.jsx("span",{className:"fitting__spinner"})})]}):ee.jsxs("div",{className:"fitting__empty-stage",children:[ee.jsx("p",{children:"Nothing on right now."}),ee.jsx("p",{className:"muted",children:"Turn on an item from the list to try it."})]}):ee.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:ee.jsx("span",{className:"fitting__spinner"})})}),ee.jsxs("div",{className:"fitting__side",children:[ee.jsxs("div",{className:"fitting__head",children:[ee.jsx("h2",{className:"fitting__title",children:"Fitting room"}),ee.jsx("p",{className:"fitting__sub muted",children:"Mix and match your cart. Turn items on and off to see the look."})]}),ee.jsx("div",{className:"fitting__items",children:r.map(E=>{const b=Yi(E),h=c.has(E.id),S=v.has(E.id);return ee.jsxs("div",{className:`fitting-row${h?" is-on":""}`,children:[ee.jsxs("label",{className:"fitting-row__toggle",children:[ee.jsx("input",{type:"checkbox",checked:h,disabled:!b,onChange:()=>d(A=>V3(A,E,r))}),ee.jsx("span",{className:"fitting-row__box","aria-hidden":!0})]}),ee.jsx("div",{className:"fitting-row__thumb",children:E.thumbnail?ee.jsx("img",{src:E.thumbnail,alt:E.name}):null}),ee.jsxs("div",{className:"fitting-row__info",children:[ee.jsx("div",{className:"fitting-row__name",title:E.name,children:E.name}),ee.jsxs("div",{className:"fitting-row__meta",children:[ee.jsx("span",{className:`ico ico-slot-${b?F3(E):"item"} fitting-row__slot-ico`,title:b?sA(Ka(E)):"Emote",role:"img","aria-label":b?sA(Ka(E)):"Emote"}),S?ee.jsx("span",{className:"fitting-row__conflict",title:"Only one item per slot can be worn",children:"1 per slot"}):null]})]}),ee.jsxs("div",{className:"fitting-row__price",children:[ee.jsx(An,{className:"fitting-row__diamond"}),E.priceCredits]}),ee.jsx("button",{className:"fitting-row__remove",onClick:()=>n(E.id),"aria-label":`Remove ${E.name} from cart`,title:"Remove",children:ee.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},E.id)})}),ee.jsxs("div",{className:"fitting__foot",children:[ee.jsxs("div",{className:"fitting__total",children:[r.length," item",r.length>1?"s":""," · ",ee.jsxs("strong",{children:[Ya.symbol," ",R]})]}),ee.jsx("button",{className:"btn btn--purple fitting__checkout",onClick:()=>{t(!1),i("/cart")},children:"Checkout"})]})]})]})]})}function W3(){const[e,t]=Be.useState(!1);return Be.useEffect(()=>{if(typeof window.requestIdleCallback=="function"){const n=window.requestIdleCallback(()=>t(!0),{timeout:3e3});return()=>window.cancelIdleCallback(n)}const r=window.setTimeout(()=>t(!0),1500);return()=>window.clearTimeout(r)},[]),e?ee.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:ee.jsx(y_,{id:"preview-warmer",profile:"default",dev:Nt.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function Y3(){const e=is(t=>t.session);Be.useEffect(()=>{if(!e||e.providerType!==xi.ProviderType.INJECTED)return;const t=e.web3Provider.provider;if(!(t!=null&&t.on)||!t.removeListener)return;const r=e.address.toLowerCase(),n=(...i)=>{var o;((o=(i[0]??[])[0])==null?void 0:o.toLowerCase())!==r&&window.location.reload()};return t.on("accountsChanged",n),()=>{var i;return(i=t.removeListener)==null?void 0:i.call(t,"accountsChanged",n)}},[e])}const g_=`${Nt.nftApiUrl}/v1`;function QP(e){if(!e)return 0;try{return Math.ceil(Number(RA(e))*10)}catch{return 0}}function d4(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function f4(e){const{listings:t}=await Dl({contractAddress:e,first:200}),r={};for(const n of t)n.listingType!=="primary"||n.itemId==null||(r[String(n.itemId)]={isOnSale:!0,priceCredits:n.priceCredits,tradeId:n.tradeId});return r}async function K3(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${g_}/nfts?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return((a=i==null?void 0:i[0])==null?void 0:a.nft)??null}function ZP(e){return{id:e.tradeId,tradeId:e.tradeId,name:e.name,creator:e.creator,contractAddress:e.contractAddress,itemId:e.itemId,tokenId:e.tokenId??void 0,category:e.category,wearableCategory:e.wearableCategory??void 0,rarity:e.rarity,network:e.network,chainId:e.chainId,thumbnail:e.thumbnail,priceCredits:e.priceCredits,gender:null,compareAtCredits:e.compareAtCredits!=null&&e.compareAtCredits>e.priceCredits?e.compareAtCredits:void 0,saleEndsAt:e.saleEndsAt!=null?e.saleEndsAt*1e3:void 0}}async function Dl(e){var i,a;const t=new URLSearchParams;(e.category==="wearable"||e.category==="emote")&&t.set("category",e.category),e.first!=null&&t.set("first",String(e.first)),e.skip!=null&&t.set("skip",String(e.skip)),e.contractAddress&&t.set("contractAddress",e.contractAddress),e.itemId!=null&&t.set("itemId",e.itemId),(i=e.rarities)!=null&&i.length&&t.set("rarity",e.rarities.join(",")),(a=e.wearableCategories)!=null&&a.length&&t.set("wearableCategory",e.wearableCategories.join(",")),e.minPriceCredits!=null&&t.set("minPriceCredits",String(e.minPriceCredits)),e.maxPriceCredits!=null&&t.set("maxPriceCredits",String(e.maxPriceCredits)),e.search&&t.set("search",e.search),e.sortBy&&t.set("sortBy",e.sortBy);const r=await fetch(`${Nt.marketplaceServerUrl}/v3/catalog/shop?${t.toString()}`);if(!r.ok)throw new Error(`fetchShopListings ${r.status}`);const n=await r.json();return{listings:n.data??[],total:n.total??0}}async function p4(e,t){const{listings:r}=await Dl({contractAddress:e,itemId:t,first:1});return r[0]?ZP(r[0]):null}async function J3({first:e=100,...t}={}){const{listings:r,total:n}=await Dl({...t,first:e});return{items:r.map(ZP),total:n}}function X3(e){return{tradeId:e.tradeId,listingType:"primary",contractAddress:e.contractAddress,itemId:e.itemId??"",name:e.name??"",thumbnail:e.thumbnail??"",rarity:e.rarity??"common",category:e.category??"wearable",wearableCategory:e.wearableCategory??null,creator:e.creator??"",manaWei:e.manaWei,available:e.available??0,network:e.network??"MATIC",chainId:e.chainId??Nt.chainId,createdAt:e.createdAt??0}}async function m4({first:e=100,...t}={}){var s,o;const r=new URLSearchParams;(t.category==="wearable"||t.category==="emote")&&r.set("category",t.category),r.set("first",String(e)),t.skip!=null&&r.set("skip",String(t.skip)),(s=t.rarities)!=null&&s.length&&r.set("rarity",t.rarities.join(",")),(o=t.wearableCategories)!=null&&o.length&&r.set("wearableCategory",t.wearableCategories.join(",")),t.search&&r.set("search",t.search),t.sortBy&&r.set("sortBy",t.sortBy);const n=await fetch(`${Nt.marketplaceServerUrl}/v3/catalog/legacy?${r.toString()}`);if(!n.ok)throw new Error(`fetchLegacyListings ${n.status}`);const i=await n.json(),a=i.data??[];return{items:a.map(X3),total:i.total??a.length}}async function h4(e,{category:t="wearable",first:r=48,skip:n=0}={}){const i=new URLSearchParams({owner:e.toLowerCase(),category:t,first:String(r),skip:String(n),sortBy:"newest",orderDirection:"desc"}),a=await fetch(`${g_}/nfts?${i.toString()}`);if(!a.ok)throw new Error(`Failed to fetch assets (${a.status})`);const{data:s,total:o}=await a.json();return{assets:s.map(l=>{var c,d,m,p,v;return{id:l.nft.id,contractAddress:l.nft.contractAddress,tokenId:l.nft.tokenId,itemId:l.nft.itemId??null,name:l.nft.name,category:l.nft.category,image:l.nft.image,rarity:((d=(c=l.nft.data)==null?void 0:c.wearable)==null?void 0:d.rarity)??((p=(m=l.nft.data)==null?void 0:m.emote)==null?void 0:p.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?QP(l.order.price):void 0,tradeId:(v=l.order)==null?void 0:v.tradeId}}),total:o}}const Q3="dcl:marketplace";async function y4(e,t){const{TradeService:r}=await Xt(async()=>{const{TradeService:i}=await import("./TradeService-BOr6_BxE.js");return{TradeService:i}},__vite__mapDeps([10,5,1,11,2,6]));return new r(Q3,Nt.marketplaceServerUrl,()=>t).addTrade(e)}async function xP(e){const t=await fetch(`${Nt.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function Z3(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${g_}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function g4(e){var u,l;let t;try{t=await xP(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=QP(n==null?void 0:n.amount),a=(r==null?void 0:r.contractAddress)??"",s=(r==null?void 0:r.value)??"";if(!a)return{name:"Item",thumbnail:"",credits:i,contractAddress:""};if((r==null?void 0:r.assetType)===xi.TradeAssetType.COLLECTION_ITEM){const c=await Z3(a,s);return{name:(c==null?void 0:c.name)??"Item",thumbnail:(c==null?void 0:c.thumbnail)??"",credits:i,contractAddress:a,itemId:s}}const o=await K3(a,s);return{name:(o==null?void 0:o.name)??`#${s}`,thumbnail:(o==null?void 0:o.image)??"",credits:i,contractAddress:a,tokenId:s}}async function _4(e,t){var i;const{listings:r}=await Dl({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?xP(n):null}const x3={};function eG(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var a;const s=u=>u===null?null:JSON.parse(u,void 0),o=(a=r.getItem(i))!=null?a:null;return o instanceof Promise?o.then(s):s(o)},setItem:(i,a)=>r.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>r.removeItem(i)}}const mo=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return mo(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return mo(n)(r)}}}},tG=(e,t)=>(r,n,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:R=>R,version:0,merge:(R,O)=>({...O,...R}),...t},s=!1;const o=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...R)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...R)},n,i);const c=mo(a.serialize),d=()=>{const R=a.partialize({...n()});let O;const f=c({state:R,version:a.version}).then(E=>l.setItem(a.name,E)).catch(E=>{O=E});if(O)throw O;return f},m=i.setState;i.setState=(R,O)=>{m(R,O),d()};const p=e((...R)=>{r(...R),d()},n,i);let v;const w=()=>{var R;if(!l)return;s=!1,o.forEach(f=>f(n()));const O=((R=a.onRehydrateStorage)==null?void 0:R.call(a,n()))||void 0;return mo(l.getItem.bind(l))(a.name).then(f=>{if(f)return a.deserialize(f)}).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return a.migrate(f.state,f.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return f.state}).then(f=>{var E;return v=a.merge(f,(E=n())!=null?E:p),r(v,!0),d()}).then(()=>{O==null||O(v,void 0),s=!0,u.forEach(f=>f(v))}).catch(f=>{O==null||O(void 0,f)})};return i.persist={setOptions:R=>{a={...a,...R},R.getStorage&&(l=R.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>w(),hasHydrated:()=>s,onHydrate:R=>(o.add(R),()=>{o.delete(R)}),onFinishHydration:R=>(u.add(R),()=>{u.delete(R)})},w(),v||p},rG=(e,t)=>(r,n,i)=>{let a={storage:eG(()=>localStorage),partialize:w=>w,version:0,merge:(w,R)=>({...R,...w}),...t},s=!1;const o=new Set,u=new Set;let l=a.storage;if(!l)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...w)},n,i);const c=()=>{const w=a.partialize({...n()});return l.setItem(a.name,{state:w,version:a.version})},d=i.setState;i.setState=(w,R)=>{d(w,R),c()};const m=e((...w)=>{r(...w),c()},n,i);i.getInitialState=()=>m;let p;const v=()=>{var w,R;if(!l)return;s=!1,o.forEach(f=>{var E;return f((E=n())!=null?E:m)});const O=((R=a.onRehydrateStorage)==null?void 0:R.call(a,(w=n())!=null?w:m))||void 0;return mo(l.getItem.bind(l))(a.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return[!0,a.migrate(f.state,f.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var E;const[b,h]=f;if(p=a.merge(h,(E=n())!=null?E:m),r(p,!0),b)return c()}).then(()=>{O==null||O(p,void 0),p=n(),s=!0,u.forEach(f=>f(p))}).catch(f=>{O==null||O(void 0,f)})};return i.persist={setOptions:w=>{a={...a,...w},w.storage&&(l=w.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:w=>(o.add(w),()=>{o.delete(w)}),onFinishHydration:w=>(u.add(w),()=>{u.delete(w)})},a.skipHydration||v(),p||m},nG=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((x3?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),tG(e,t)):rG(e,t),iG=nG,oA=No()(iG(e=>({items:{},toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],{items:n}})}),{name:"shop-favorites"}));function aG(e,t){return!t||!e.creator?!1:f_(e)&&e.creator.toLowerCase()===t.toLowerCase()}function E4(e,t){return!!e.signer&&!!t&&e.signer.toLowerCase()===t.toLowerCase()}function sG(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function oG({address:e,className:t,linkToProfile:r}){var u,l;const n=al(),{data:i}=p_(e);if(!e)return null;const a=(i==null?void 0:i.name)||sG(e),s=(l=(u=i==null?void 0:i.avatar)==null?void 0:u.snapshots)==null?void 0:l.face256,o=ee.jsxs(ee.Fragment,{children:[s?ee.jsx("img",{className:"creator__ava",src:s,alt:"",loading:"lazy"}):ee.jsx("span",{className:"creator__ava creator__ava--ph","aria-hidden":!0}),ee.jsxs("span",{className:"creator__name",children:["By ",a]})]});return r?ee.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${a}`,onClick:c=>{c.stopPropagation(),n(`/creator/${e}`)},children:o}):ee.jsx("span",{className:`creator${t?` ${t}`:""}`,children:o})}function uA(e){if(!e)return"#a09ba8";try{return xi.Rarity.getColor(e.toLowerCase())}catch{return"#a09ba8"}}function uG(e){const t=e.replace("#","");if(t.length<6)return"#161518";const r=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return .299*r+.587*n+.114*i>150?"#161518":"#ffffff"}function cG(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function lG(e,t){if(!(e>0)||!(t>=0)||t>=e)return 0;const r=Math.round((1-t/e)*100);return Math.min(99,Math.max(1,r))}function Gc(e,t=Date.now()){return e==null?1/0:Math.max(0,e-t)}function dG(e){if(!isFinite(e)||e<=0)return"";const t=Math.floor(e/1e3),r=Math.floor(t/86400),n=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=t%60;return r>0?n>0?`${r}d ${n}h`:`${r}d`:n>0?`${n}h ${i}m`:i>0?`${i}m ${a}s`:`${a}s`}function cA(e){return!isFinite(e)||e<=0?0:e<36e5?1e3:6e4}function fG({endsAt:e,className:t}){const[r,n]=Be.useState(()=>Gc(e));Be.useEffect(()=>{if(n(Gc(e)),e==null)return;let a;const s=()=>{const u=Gc(e);n(u);const l=cA(u);l>0&&(a=setTimeout(s,l))},o=cA(Gc(e));return o>0&&(a=setTimeout(s,o)),()=>clearTimeout(a)},[e]);const i=dG(r);return i?ee.jsxs("span",{className:t??"sale-countdown",children:[ee.jsx("span",{className:"ico ico-clock sale-countdown__ico","aria-hidden":!0}),i]}):null}const pG=120,mG=250;function hG(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function __(e){const{item:t}=e,r=e.mode==="market",[n,i]=Be.useState(!1),[a,s]=Be.useState(!1),o=Be.useRef(),u=Be.useRef(),l=kr(z=>z.add),c=kr(z=>z.items.some(Y=>Y.id===t.id)),d=is(z=>{var Y;return(Y=z.session)==null?void 0:Y.address}),m=aG(t,d),p=oA(z=>z.toggle),v=oA(z=>!!z.items[t.id]),w=al(),R=!!t.contractAddress&&!!t.itemId,O=t.tokenId??t.itemId,f=!r&&!!t.contractAddress&&!!O;function E(){f&&w(`/item/${t.contractAddress}/${O}`,{state:{item:t,tradeId:t.tradeId}})}function b(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),pG)}function h(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function S(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),mG)}const A=hG(t.gender),P=!r&&cG({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),k=P?lG(t.compareAtCredits,t.priceCredits):0;return ee.jsxs("article",{className:`card${n?" card--hover":""}`,style:f?{cursor:"pointer"}:void 0,onMouseEnter:b,onMouseLeave:h,onClick:E,role:f?"link":void 0,tabIndex:f?0:void 0,onKeyDown:f?z=>{(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),E())}:void 0,children:[ee.jsxs("div",{className:"card__media",children:[P?ee.jsxs("span",{className:"card__sale-badge",children:["SALE",k>0?` -${k}%`:""]}):null,ee.jsx("button",{className:`card__fav${v?" is-on":""}`,onClick:z=>{z.stopPropagation(),p(t)},"aria-label":v?"Remove from favorites":"Add to favorites",children:ee.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?ee.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&R?ee.jsxs(ee.Fragment,{children:[ee.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:ee.jsx(y_,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",dev:Nt.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:S})}),ee.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:ee.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),ee.jsxs("div",{className:"card__body",children:[ee.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?ee.jsx(oG,{address:t.creator,className:"card__creator",linkToProfile:!0}):ee.jsx("div",{className:"card__creator",children:" "}),n?r&&e.mode==="market"?ee.jsx("button",{className:"card__cart",onClick:z=>{z.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"Unavailable":"Buy now"}):ee.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:z=>{z.stopPropagation(),m||l(t,"grid")},disabled:c||m,children:[m?null:ee.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),m?"Your item":c?"In cart":"Add to cart"]}):ee.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?ee.jsxs("div",{className:"card__price card__price--market",children:[ee.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),ee.jsx(An,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,ee.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):P?ee.jsxs("div",{className:"card__price card__price--sale",children:[ee.jsxs("span",{className:"card__price-now",children:[ee.jsx(An,{className:"card__diamond"}),t.priceCredits]}),ee.jsxs("span",{className:"card__price-was",children:[ee.jsx(An,{className:"card__diamond card__diamond--was"}),t.compareAtCredits]}),ee.jsx(fG,{endsAt:t.saleEndsAt,className:"card__countdown"})]}):ee.jsxs("div",{className:"card__price",children:[ee.jsx(An,{className:"card__diamond"}),t.priceCredits]}),ee.jsxs("div",{className:"card__chips",children:[ee.jsx("span",{className:"chip chip--rarity",style:{background:uA(t.rarity),color:uG(uA(t.rarity))},children:t.rarity}),t.category==="wearable"?ee.jsx("span",{className:"chip chip--icon",children:ee.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,A?ee.jsx("span",{className:"chip chip--icon",children:A}):null]})]})]})]})}function yG(e){if(!e)return 0;try{return Math.ceil(Number(RA(e))*10)}catch{return 0}}function gG(e){if(!e||e.length===0)return null;const t=e.some(n=>n.includes("Male")),r=e.some(n=>n.includes("Female"));return t&&r?"unisex":t?"male":r?"female":null}function eC(e){var t,r,n,i,a,s;return{id:e.id,name:e.name,creator:e.creator??"",contractAddress:e.contractAddress,itemId:e.itemId??null,category:e.category,wearableCategory:((r=(t=e.data)==null?void 0:t.wearable)==null?void 0:r.category)??((i=(n=e.data)==null?void 0:n.emote)==null?void 0:i.category),rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.thumbnail??"",priceCredits:yG(e.price??e.minPrice),gender:gG((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function v4(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Nt.nftApiUrl}/v1/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCollectionItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(eC);return{items:o,total:s??r+o.length}}async function _G(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Nt.nftApiUrl}/v1/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCreatorItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(eC);return{items:o,total:s??r+o.length}}const tC="shop:followed-creators:v1",EG=200;function vG(){try{const e=localStorage.getItem(tC);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function lA(e){try{localStorage.setItem(tC,JSON.stringify(e))}catch{}}const bG=No((e,t)=>({followed:vG(),isFollowing:r=>t().followed.includes(r.toLowerCase()),follow:r=>{const n=r.toLowerCase();if(!n||t().followed.includes(n))return;const i=[n,...t().followed].slice(0,EG);lA(i),e({followed:i}),Xn("Shop Followed Creator",{creator_address:n,following_count:i.length})},unfollow:r=>{const n=r.toLowerCase();if(!t().followed.includes(n))return;const i=t().followed.filter(a=>a!==n);lA(i),e({followed:i}),Xn("Shop Unfollowed Creator",{creator_address:n,following_count:i.length})},toggle:r=>t().isFollowing(r)?t().unfollow(r):t().follow(r)})),TG=8,SG=8,IG=12;function RG(){const t=bG(i=>i.followed).slice(0,TG),{data:r=[],isLoading:n}=sl({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>_G(a,{first:SG}).then(s=>s.items).catch(()=>[])));return wG(i).filter(a=>a.priceCredits>0).slice(0,IG)}});return t.length===0||!n&&r.length===0?null:ee.jsxs("section",{className:"row",children:[ee.jsx("div",{className:"row__head",children:ee.jsx("h2",{className:"row__title",children:"From creators you follow"})}),ee.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>ee.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>ee.jsx(__,{item:i},i.id))})]})}function wG(e){const t=[],r=new Set,n=e.reduce((i,a)=>Math.max(i,a.length),0);for(let i=0;i<n;i++)for(const a of e){const s=a[i];s&&!r.has(s.id)&&(r.add(s.id),t.push(s))}return t}const rC="shop:recently-viewed",nC=12;function iC(){try{const e=localStorage.getItem(rC);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,nC):[]}catch{return[]}}function b4(e){if(e!=null&&e.id)try{const t=[e,...iC().filter(r=>r.id!==e.id)].slice(0,nC);localStorage.setItem(rC,JSON.stringify(t))}catch{}}function AG({excludeId:e}){const t=Be.useMemo(()=>iC().filter(r=>r.id!==e),[e]);return t.length===0?null:ee.jsxs("section",{className:"row",children:[ee.jsx("div",{className:"row__head",children:ee.jsx("h2",{className:"row__title",children:"Recently viewed"})}),ee.jsx("div",{className:"row__track",children:t.map(r=>ee.jsx(__,{item:r},r.id))})]})}function dA({title:e,items:t,loading:r}){return ee.jsxs("section",{className:"row",children:[ee.jsxs("div",{className:"row__head",children:[ee.jsx("h2",{className:"row__title",children:e}),ee.jsxs(Jc,{className:"row__viewall",to:"/assets",children:["View all ",ee.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),ee.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>ee.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>ee.jsx(__,{item:n},n.id))})]})}function OG(){const{data:e,isLoading:t}=sl({queryKey:["overview-listings"],queryFn:()=>J3({first:24})}),r=(e==null?void 0:e.items)??[];return ee.jsxs("div",{className:"overview",children:[ee.jsx("section",{className:"hero",children:ee.jsxs("div",{className:"hero__inner",children:[ee.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),ee.jsx(Jc,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),ee.jsx(RG,{}),ee.jsx(AG,{}),t||r.length>0?ee.jsxs(ee.Fragment,{children:[ee.jsx(dA,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>6?ee.jsx(dA,{title:"New Creations",items:r.slice(6,18),loading:!1}):null]}):ee.jsxs("div",{className:"overview__empty",children:[ee.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),ee.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),ee.jsx(Jc,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const NG={"/overview":"overview","/assets":"assets","/market":"market","/my-assets":"my_assets","/my-favorites":"favorites","/my-purchases":"my_purchases","/import":"import","/cart":"cart","/credits":"credits","/success":"success"},PG=Be.lazy(()=>Xt(()=>import("./Assets-C0yakYaS.js"),__vite__mapDeps([12,1,13,14,15,5])).then(e=>({default:e.Assets}))),CG=Be.lazy(()=>Xt(()=>import("./Market-DjypWFj5.js"),__vite__mapDeps([16,1,17,11,5,13,14,18,19,15])).then(e=>({default:e.Market}))),MG=Be.lazy(()=>Xt(()=>import("./ItemDetail-5H1R8AEJ.js"),__vite__mapDeps([20,1,18,11,5,19,21])).then(e=>({default:e.ItemDetail}))),jG=Be.lazy(()=>Xt(()=>import("./Collection-DpUFjy6q.js"),__vite__mapDeps([22,1,23,24,13,14,15,5])).then(e=>({default:e.Collection}))),DG=Be.lazy(()=>Xt(()=>import("./Creator-BIgvo89M.js"),__vite__mapDeps([25,1,23,24,13,14,15,5])).then(e=>({default:e.Creator}))),$G=Be.lazy(()=>Xt(()=>import("./MyAssets-CrobB3dP.js"),__vite__mapDeps([26,1,27,18,11,5,17,28,14,15,29])).then(e=>({default:e.MyAssets}))),LG=Be.lazy(()=>Xt(()=>import("./MyFavorites-LznRvK5N.js"),__vite__mapDeps([30,1,14,5])).then(e=>({default:e.MyFavorites}))),qG=Be.lazy(()=>Xt(()=>import("./MyPurchases-BM1Uxpk1.js"),__vite__mapDeps([31,1,14,15,5])).then(e=>({default:e.MyPurchases}))),kG=Be.lazy(()=>Xt(()=>import("./ImportListings-_ZmYZr75.js"),__vite__mapDeps([32,1,27,18,11,5,17,28,33])).then(e=>({default:e.ImportListings}))),BG=Be.lazy(()=>Xt(()=>import("./Cart-CcietwVV.js"),__vite__mapDeps([34,1,18,11,5,19])).then(e=>({default:e.Cart}))),UG=Be.lazy(()=>Xt(()=>import("./GetCredits-BkyWsDk5.js"),__vite__mapDeps([35,1,9,4,5])).then(e=>({default:e.GetCredits}))),FG=Be.lazy(()=>Xt(()=>import("./Success-CkhrWNlU.js"),__vite__mapDeps([36,1,28,5])).then(e=>({default:e.Success}))),VG=Be.lazy(()=>Xt(()=>import("./NotFound-DW9xW0V2.js"),__vite__mapDeps([37,1])).then(e=>({default:e.NotFound})));function HG(){return ee.jsx("div",{className:"page-loading","aria-busy":"true",children:ee.jsx("span",{className:"spinner","aria-hidden":!0})})}function GG(){return ee.jsxs("div",{className:"overview__empty",children:[ee.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),ee.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),ee.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function zG(){Y3();const e=EC();return Be.useEffect(()=>{kH()},[]),Be.useEffect(()=>{const t=e.pathname,r=NG[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");DH(r)},[e.pathname]),ee.jsxs(ee.Fragment,{children:[ee.jsx(q3,{}),ee.jsx(W3,{}),ee.jsx(z3,{}),ee.jsx(j3,{}),ee.jsx("main",{className:"page",children:ee.jsx(Bg,{fallback:ee.jsx(GG,{}),children:ee.jsx(Be.Suspense,{fallback:ee.jsx(HG,{}),children:ee.jsxs(vC,{children:[ee.jsx(sr,{path:"/",element:ee.jsx(bC,{to:"/overview",replace:!0})}),ee.jsx(sr,{path:"/overview",element:ee.jsx(OG,{})}),ee.jsx(sr,{path:"/assets",element:ee.jsx(PG,{})}),ee.jsx(sr,{path:"/market",element:ee.jsx(CG,{})}),ee.jsx(sr,{path:"/item/:contractAddress/:tokenId",element:ee.jsx(MG,{})}),ee.jsx(sr,{path:"/collection/:contractAddress",element:ee.jsx(jG,{})}),ee.jsx(sr,{path:"/creator/:address",element:ee.jsx(DG,{})}),ee.jsx(sr,{path:"/my-assets",element:ee.jsx($G,{})}),ee.jsx(sr,{path:"/my-favorites",element:ee.jsx(LG,{})}),ee.jsx(sr,{path:"/my-purchases",element:ee.jsx(qG,{})}),ee.jsx(sr,{path:"/import",element:ee.jsx(kG,{})}),ee.jsx(sr,{path:"/cart",element:ee.jsx(BG,{})}),ee.jsx(sr,{path:"/credits",element:ee.jsx(UG,{})}),ee.jsx(sr,{path:"/success",element:ee.jsx(FG,{})}),ee.jsx(sr,{path:"*",element:ee.jsx(VG,{})})]})})})})]})}zH();const WG=new XC({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}});TC.createRoot(document.getElementById("root")).render(ee.jsx(IA.StrictMode,{children:ee.jsx(ZC,{client:WG,children:ee.jsx(SC,{children:ee.jsx(zG,{})})})}));export{p4 as $,__ as A,xi as B,Ya as C,Vr as D,hb as E,bG as F,_G as G,l4 as H,B3 as I,c4 as J,m4 as K,ZG as L,QG as M,cM as N,XG as O,jl as P,HC as Q,u4 as R,p_ as S,r4 as T,b4 as U,cG as V,y_ as W,aG as X,lG as Y,fG as Z,Xt as _,oG as a,h4 as a0,f4 as a1,DV as a2,cn as a3,Hr as a4,FU as a5,A3 as a6,jo as a7,t_ as a8,hF as a9,eF as aa,Gg as ab,wN as ac,AN as ad,v4 as b,is as c,s4 as d,sl as e,J3 as f,An as g,g4 as h,xP as i,Nt as j,kr as k,P3 as l,QC as m,po as n,_4 as o,y4 as p,E4 as q,a4 as r,n4 as s,Xn as t,oA as u,i4 as v,ZR as w,LH as x,o4 as y,d4 as z};